Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: move email-preview to devDeps #454

Closed
wants to merge 1 commit into from

Conversation

felixmosh
Copy link

Checklist

  • I have ensured my pull request is not behind the main or master branch of the original repository.
  • I have rebased all commits where necessary so that reviewing this pull request can be done without having to merge it first.
  • I have written a commit message that passes commitlint linting.
  • I have ensured that my code changes pass linting tests.
  • I have ensured that my code changes pass unit tests.
  • I have described my pull request and the reasons for code changes along with context if necessary.

closes #453

@titanism
Copy link
Contributor

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

@titanism titanism closed this Sep 30, 2023
@felixmosh
Copy link
Author

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

@felixmosh
Copy link
Author

felixmosh commented Jul 17, 2024

@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
Copy link
Contributor

@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
Copy link
Author

Thank you! 🙏🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[fix] Move preview-email to devDeps
2 participants