Skip to content

Commit 8efbddc

Browse files
committed
fix(react-email): NODE_ENV for emails as "PRODUCTION"
1 parent 8200828 commit 8efbddc

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.changeset/gorgeous-ravens-tease.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"react-email": patch
3+
---
4+
5+
Fix NODE_ENV for emails as "PRODUCTION" instead of "DEVELOPMENT"

packages/react-email/src/cli/utils/preview/start-dev-server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ export const startDevServer = async (
120120
// this is the most reliable way of communicating these paths through
121121
process.env = {
122122
...process.env,
123+
NODE_ENV: "development",
123124
...getEnvVariablesForPreviewApp(
124125
// If we don't do normalization here, stuff like https://github.com/resend/react-email/issues/1354 happens.
125126
path.normalize(emailsDirRelativePath),

0 commit comments

Comments
 (0)