shellscape / jsx-email

Build emails with a delightful DX
https://jsx.email
MIT License
897 stars 28 forks source link

feat(jsx-email): add better environment variable support. fixes #139 #142

Closed shellscape closed 5 months ago

shellscape commented 5 months ago

Component / Package Name: jsx-email

This PR contains:

Are tests included?

Breaking Changes?

If yes, please include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.

List any relevant issue numbers: Resolves #139

Description

This adds better environment variable support to email templates for email preview. Previously, users would have to prefix any environment variables they wanted to use in templates (with the preview) with VITE_ due to using Vite under the hood for the preview server. This is a poor experience. Changes in this PR make the full process.env value set available to templates for the preview app.