react-email 4.1.3 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -106,7 +106,7 @@ import prompts from "prompts";
|
|
|
106
106
|
// package.json
|
|
107
107
|
var package_default = {
|
|
108
108
|
name: "react-email",
|
|
109
|
-
version: "4.
|
|
109
|
+
version: "4.2.0",
|
|
110
110
|
description: "A live preview of your emails right in your browser.",
|
|
111
111
|
bin: {
|
|
112
112
|
email: "./dist/index.js"
|
|
@@ -291,6 +291,7 @@ module.exports = {
|
|
|
291
291
|
NEXT_PUBLIC_IS_BUILDING: 'true',
|
|
292
292
|
EMAILS_DIR_RELATIVE_PATH: emailsDirRelativePath,
|
|
293
293
|
EMAILS_DIR_ABSOLUTE_PATH: path.resolve(userProjectLocation, emailsDirRelativePath),
|
|
294
|
+
PREVIEW_SERVER_LOCATION: '${builtPreviewAppPath}',
|
|
294
295
|
USER_PROJECT_LOCATION: userProjectLocation
|
|
295
296
|
},
|
|
296
297
|
// this is needed so that the code for building emails works properly
|
|
@@ -861,10 +862,11 @@ import ora2 from "ora";
|
|
|
861
862
|
|
|
862
863
|
// src/utils/preview/get-env-variables-for-preview-app.ts
|
|
863
864
|
import path7 from "node:path";
|
|
864
|
-
var getEnvVariablesForPreviewApp = (relativePathToEmailsDirectory, cwd) => {
|
|
865
|
+
var getEnvVariablesForPreviewApp = (relativePathToEmailsDirectory, previewServerLocation, cwd) => {
|
|
865
866
|
return {
|
|
866
867
|
EMAILS_DIR_RELATIVE_PATH: relativePathToEmailsDirectory,
|
|
867
868
|
EMAILS_DIR_ABSOLUTE_PATH: path7.resolve(cwd, relativePathToEmailsDirectory),
|
|
869
|
+
PREVIEW_SERVER_LOCATION: previewServerLocation,
|
|
868
870
|
USER_PROJECT_LOCATION: cwd
|
|
869
871
|
};
|
|
870
872
|
};
|
|
@@ -999,6 +1001,7 @@ var startDevServer = async (emailsDirRelativePath, staticBaseDirRelativePath, po
|
|
|
999
1001
|
...getEnvVariablesForPreviewApp(
|
|
1000
1002
|
// If we don't do normalization here, stuff like https://github.com/resend/react-email/issues/1354 happens.
|
|
1001
1003
|
path9.normalize(emailsDirRelativePath),
|
|
1004
|
+
previewServerLocation,
|
|
1002
1005
|
process.cwd()
|
|
1003
1006
|
)
|
|
1004
1007
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-email",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "A live preview of your emails right in your browser.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"email": "./dist/index.js"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"react-dom": "19.0.0",
|
|
49
49
|
"tsup": "8.4.0",
|
|
50
50
|
"typescript": "5.8.3",
|
|
51
|
-
"@react-email/components": "0.3.
|
|
51
|
+
"@react-email/components": "0.3.1"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"build": "tsup-node",
|
package/src/commands/build.ts
CHANGED
|
@@ -85,6 +85,7 @@ module.exports = {
|
|
|
85
85
|
NEXT_PUBLIC_IS_BUILDING: 'true',
|
|
86
86
|
EMAILS_DIR_RELATIVE_PATH: emailsDirRelativePath,
|
|
87
87
|
EMAILS_DIR_ABSOLUTE_PATH: path.resolve(userProjectLocation, emailsDirRelativePath),
|
|
88
|
+
PREVIEW_SERVER_LOCATION: '${builtPreviewAppPath}',
|
|
88
89
|
USER_PROJECT_LOCATION: userProjectLocation
|
|
89
90
|
},
|
|
90
91
|
// this is needed so that the code for building emails works properly
|
|
@@ -2,11 +2,13 @@ import path from 'node:path';
|
|
|
2
2
|
|
|
3
3
|
export const getEnvVariablesForPreviewApp = (
|
|
4
4
|
relativePathToEmailsDirectory: string,
|
|
5
|
+
previewServerLocation: string,
|
|
5
6
|
cwd: string,
|
|
6
7
|
) => {
|
|
7
8
|
return {
|
|
8
9
|
EMAILS_DIR_RELATIVE_PATH: relativePathToEmailsDirectory,
|
|
9
10
|
EMAILS_DIR_ABSOLUTE_PATH: path.resolve(cwd, relativePathToEmailsDirectory),
|
|
11
|
+
PREVIEW_SERVER_LOCATION: previewServerLocation,
|
|
10
12
|
USER_PROJECT_LOCATION: cwd,
|
|
11
13
|
} as const;
|
|
12
14
|
};
|
|
@@ -132,6 +132,7 @@ export const startDevServer = async (
|
|
|
132
132
|
...getEnvVariablesForPreviewApp(
|
|
133
133
|
// If we don't do normalization here, stuff like https://github.com/resend/react-email/issues/1354 happens.
|
|
134
134
|
path.normalize(emailsDirRelativePath),
|
|
135
|
+
previewServerLocation,
|
|
135
136
|
process.cwd(),
|
|
136
137
|
),
|
|
137
138
|
};
|