We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c427c60 commit 1748335Copy full SHA for 1748335
.changeset/early-mugs-divide.md
@@ -0,0 +1,5 @@
1
+---
2
+"react-email": patch
3
4
+
5
+Respect user's NODE_ENV when previewing templates
packages/react-email/src/cli/utils/preview/start-dev-server.ts
@@ -119,8 +119,10 @@ export const startDevServer = async (
119
// these environment variables are used on the next app
120
// this is the most reliable way of communicating these paths through
121
process.env = {
122
- ...process.env,
123
NODE_ENV: 'development',
+ ...(process.env as Omit<NodeJS.ProcessEnv, 'NODE_ENV'> & {
124
+ NODE_ENV?: NodeJS.ProcessEnv['NODE_ENV'];
125
+ }),
126
...getEnvVariablesForPreviewApp(
127
// If we don't do normalization here, stuff like https://github.com/resend/react-email/issues/1354 happens.
128
path.normalize(emailsDirRelativePath),
0 commit comments