File tree 2 files changed +8
-1
lines changed
packages/react-email/src/cli/utils/preview
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " react-email " : patch
3
+ ---
4
+
5
+ Respect user's NODE_ENV when previewing templates
Original file line number Diff line number Diff line change @@ -119,8 +119,10 @@ export const startDevServer = async (
119
119
// these environment variables are used on the next app
120
120
// this is the most reliable way of communicating these paths through
121
121
process . env = {
122
- ...process . env ,
123
122
NODE_ENV : 'development' ,
123
+ ...( process . env as Omit < NodeJS . ProcessEnv , 'NODE_ENV' > & {
124
+ NODE_ENV ?: NodeJS . ProcessEnv [ 'NODE_ENV' ] ;
125
+ } ) ,
124
126
...getEnvVariablesForPreviewApp (
125
127
// If we don't do normalization here, stuff like https://github.com/resend/react-email/issues/1354 happens.
126
128
path . normalize ( emailsDirRelativePath ) ,
You can’t perform that action at this time.
0 commit comments