forwardemail / email-templates

Create, preview (browser/iOS Simulator), and send custom email templates for Node.js. Made for @forwardemail, @ladjs, @cabinjs, @spamscanner, and @breejs.
https://forwardemail.net/docs/send-emails-with-node-js-javascript
MIT License
3.64k stars 339 forks source link

chore: move email-preview to devDeps #454

Closed felixmosh closed 10 months ago

felixmosh commented 10 months ago

Checklist

closes #453

titanism commented 10 months ago

You do not put require calls inside conditionals outside of root scope. It is bad practice.

felixmosh commented 10 months ago

How do you suggest to solve this issue? Preview-email appears in production env, even though it is not relevant there.

felixmosh commented 1 week ago

@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.

titanism commented 1 week ago

@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

felixmosh commented 1 week ago

Thank you! 🙏🏼