sinclairnick / brail

💌 Transactional email that feels different
https://brail.dev
Apache License 2.0
258 stars 6 forks source link

FAQ: Add entry discussing server-only import issues in the `onSend` function #8

Open sinclairnick opened 1 year ago

sinclairnick commented 1 year ago

Currently, importing server-dependant code in the onSend function causes issues, since templates are used in the browser, even if onSend is never called. Ultimately, a better solution should be established, but in the meantime an FAQ describing workarounds should be created. E.g. defer server-side code to a pages/api file and just fetch that file instead, perhaps.