Closed felixmosh closed 10 months ago
You do not put require
calls inside conditionals outside of root scope. It is bad practice.
How do you suggest to solve this issue? Preview-email appears in production env, even though it is not relevant there.
@titanism any update? since this is the only usage, maybe, it is better to pass the lib it self instead of the config of it.
WDYT?
It not only that preview-email
is on prod env, it brings many other deps, like esprima
and many more.
@felixmosh v12.0.0 of email-templates
has been release to GitHub and npm with optional dependency of preview-email
. In production environments it will console.error
if you attempt to have previewEmail
option with a truthy value, and in production environments it will throw
.
Thank you for your feedback and patience @felixmosh
Consider supporting our efforts at https://forwardemail.net 🙏
https://github.com/forwardemail/email-templates/releases/tag/v12.0.0
Thank you! 🙏🏼
Checklist
closes #453