File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
packages/react-email/src/cli/utils/preview Expand file tree Collapse file tree 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 (
119119 // these environment variables are used on the next app
120120 // this is the most reliable way of communicating these paths through
121121 process . env = {
122- ...process . env ,
123122 NODE_ENV : 'development' ,
123+ ...( process . env as Omit < NodeJS . ProcessEnv , 'NODE_ENV' > & {
124+ NODE_ENV ?: NodeJS . ProcessEnv [ 'NODE_ENV' ] ;
125+ } ) ,
124126 ...getEnvVariablesForPreviewApp (
125127 // If we don't do normalization here, stuff like https://github.com/resend/react-email/issues/1354 happens.
126128 path . normalize ( emailsDirRelativePath ) ,
You can’t perform that action at this time.
0 commit comments