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.
Currently, importing server-dependant code in the
onSend
function causes issues, since templates are used in the browser, even ifonSend
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 apages/api
file and justfetch
that file instead, perhaps.