react-email 5.0.0-canary.3 → 5.0.0-canary.5
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 +4 -0
- package/dist/index.js +8 -22
- package/package.json +4 -4
- package/src/commands/build.ts +5 -22
- package/src/utils/preview/start-dev-server.ts +2 -2
- package/tsconfig.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -86,7 +86,7 @@ const getEmailsDirectoryMetadata = async (absolutePathToEmailsDirectory, keepFil
|
|
|
86
86
|
//#region package.json
|
|
87
87
|
var package_default = {
|
|
88
88
|
name: "react-email",
|
|
89
|
-
version: "5.0.0-canary.
|
|
89
|
+
version: "5.0.0-canary.5",
|
|
90
90
|
description: "A live preview of your emails right in your browser.",
|
|
91
91
|
bin: { "email": "./dist/index.js" },
|
|
92
92
|
type: "module",
|
|
@@ -104,7 +104,7 @@ var package_default = {
|
|
|
104
104
|
"directory": "packages/react-email"
|
|
105
105
|
},
|
|
106
106
|
keywords: ["react", "email"],
|
|
107
|
-
engines: { "node": ">=
|
|
107
|
+
engines: { "node": ">=22.0.0" },
|
|
108
108
|
dependencies: {
|
|
109
109
|
"@babel/parser": "^7.27.0",
|
|
110
110
|
"@babel/traverse": "^7.27.0",
|
|
@@ -129,7 +129,7 @@ var package_default = {
|
|
|
129
129
|
"@types/babel__traverse": "7.20.7",
|
|
130
130
|
"@types/mime-types": "2.1.4",
|
|
131
131
|
"@types/prompts": "2.4.9",
|
|
132
|
-
"next": "
|
|
132
|
+
"next": "16.0.1",
|
|
133
133
|
"react": "19.0.0",
|
|
134
134
|
"react-dom": "19.0.0",
|
|
135
135
|
"typescript": "5.8.3"
|
|
@@ -228,28 +228,15 @@ module.exports = {
|
|
|
228
228
|
PREVIEW_SERVER_LOCATION: '${builtPreviewAppPath.replace(/\\/g, "/")}',
|
|
229
229
|
USER_PROJECT_LOCATION: userProjectLocation
|
|
230
230
|
},
|
|
231
|
-
|
|
232
|
-
webpack: (
|
|
233
|
-
/** @type {import('webpack').Configuration & { externals: string[] }} */
|
|
234
|
-
config,
|
|
235
|
-
{ isServer }
|
|
236
|
-
) => {
|
|
237
|
-
if (isServer) {
|
|
238
|
-
config.externals.push('esbuild');
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
return config;
|
|
242
|
-
},
|
|
231
|
+
serverExternalPackages: ['esbuild'],
|
|
243
232
|
typescript: {
|
|
244
233
|
ignoreBuildErrors: true
|
|
245
234
|
},
|
|
246
|
-
eslint: {
|
|
247
|
-
ignoreDuringBuilds: true
|
|
248
|
-
},
|
|
249
235
|
experimental: {
|
|
250
236
|
webpackBuildWorker: true
|
|
251
237
|
},
|
|
252
238
|
}`;
|
|
239
|
+
await fs.promises.rm(path.resolve(builtPreviewAppPath, "./next.config.ts"));
|
|
253
240
|
await fs.promises.writeFile(path.resolve(builtPreviewAppPath, "./next.config.js"), nextConfigContents, "utf8");
|
|
254
241
|
};
|
|
255
242
|
const getEmailSlugsFromEmailDirectory = (emailDirectory, emailsDirectoryAbsolutePath) => {
|
|
@@ -280,12 +267,11 @@ export function generateStaticParams() {
|
|
|
280
267
|
const updatePackageJson = async (builtPreviewAppPath) => {
|
|
281
268
|
const packageJsonPath = path.resolve(builtPreviewAppPath, "./package.json");
|
|
282
269
|
const packageJson = JSON.parse(await fs.promises.readFile(packageJsonPath, "utf8"));
|
|
283
|
-
packageJson.scripts.build = "next build";
|
|
270
|
+
packageJson.scripts.build = "next build --webpack";
|
|
284
271
|
packageJson.scripts.start = "next start";
|
|
285
272
|
delete packageJson.scripts.postbuild;
|
|
286
273
|
packageJson.name = "preview-server";
|
|
287
274
|
for (const [dependency, version$1] of Object.entries(packageJson.dependencies)) packageJson.dependencies[dependency] = version$1.replace("workspace:", "");
|
|
288
|
-
delete packageJson.devDependencies["@react-email/render"];
|
|
289
275
|
delete packageJson.devDependencies["@react-email/components"];
|
|
290
276
|
delete packageJson.scripts.prepare;
|
|
291
277
|
await fs.promises.writeFile(packageJsonPath, JSON.stringify(packageJson), "utf8");
|
|
@@ -662,8 +648,8 @@ const safeAsyncServerListen = (server, port) => {
|
|
|
662
648
|
};
|
|
663
649
|
const startDevServer = async (emailsDirRelativePath, staticBaseDirRelativePath, port) => {
|
|
664
650
|
const [majorNodeVersion] = process.versions.node.split(".");
|
|
665
|
-
if (majorNodeVersion && Number.parseInt(majorNodeVersion) <
|
|
666
|
-
console.error(` ${logSymbols.error} Node ${majorNodeVersion} is not supported. Please upgrade to Node
|
|
651
|
+
if (majorNodeVersion && Number.parseInt(majorNodeVersion) < 20) {
|
|
652
|
+
console.error(` ${logSymbols.error} Node ${majorNodeVersion} is not supported. Please upgrade to Node 20 or higher.`);
|
|
667
653
|
process.exit(1);
|
|
668
654
|
}
|
|
669
655
|
const previewServerLocation = await getPreviewServerLocation();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-email",
|
|
3
|
-
"version": "5.0.0-canary.
|
|
3
|
+
"version": "5.0.0-canary.5",
|
|
4
4
|
"description": "A live preview of your emails right in your browser.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"email": "./dist/index.js"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"email"
|
|
18
18
|
],
|
|
19
19
|
"engines": {
|
|
20
|
-
"node": ">=
|
|
20
|
+
"node": ">=22.0.0"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@babel/parser": "^7.27.0",
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
"@types/babel__traverse": "7.20.7",
|
|
43
43
|
"@types/mime-types": "2.1.4",
|
|
44
44
|
"@types/prompts": "2.4.9",
|
|
45
|
-
"next": "
|
|
45
|
+
"next": "16.0.1",
|
|
46
46
|
"react": "19.0.0",
|
|
47
47
|
"react-dom": "19.0.0",
|
|
48
48
|
"typescript": "5.8.3",
|
|
49
|
-
"@react-email/components": "1.0.0-canary.
|
|
49
|
+
"@react-email/components": "1.0.0-canary.6"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"build": "tsdown",
|
package/src/commands/build.ts
CHANGED
|
@@ -88,29 +88,17 @@ module.exports = {
|
|
|
88
88
|
PREVIEW_SERVER_LOCATION: '${builtPreviewAppPath.replace(/\\/g, '/')}',
|
|
89
89
|
USER_PROJECT_LOCATION: userProjectLocation
|
|
90
90
|
},
|
|
91
|
-
|
|
92
|
-
webpack: (
|
|
93
|
-
/** @type {import('webpack').Configuration & { externals: string[] }} */
|
|
94
|
-
config,
|
|
95
|
-
{ isServer }
|
|
96
|
-
) => {
|
|
97
|
-
if (isServer) {
|
|
98
|
-
config.externals.push('esbuild');
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
return config;
|
|
102
|
-
},
|
|
91
|
+
serverExternalPackages: ['esbuild'],
|
|
103
92
|
typescript: {
|
|
104
93
|
ignoreBuildErrors: true
|
|
105
94
|
},
|
|
106
|
-
eslint: {
|
|
107
|
-
ignoreDuringBuilds: true
|
|
108
|
-
},
|
|
109
95
|
experimental: {
|
|
110
96
|
webpackBuildWorker: true
|
|
111
97
|
},
|
|
112
98
|
}`;
|
|
113
99
|
|
|
100
|
+
await fs.promises.rm(path.resolve(builtPreviewAppPath, './next.config.ts'));
|
|
101
|
+
|
|
114
102
|
await fs.promises.writeFile(
|
|
115
103
|
path.resolve(builtPreviewAppPath, './next.config.js'),
|
|
116
104
|
nextConfigContents,
|
|
@@ -202,7 +190,8 @@ const updatePackageJson = async (builtPreviewAppPath: string) => {
|
|
|
202
190
|
dependencies: Record<string, string>;
|
|
203
191
|
devDependencies: Record<string, string>;
|
|
204
192
|
};
|
|
205
|
-
|
|
193
|
+
// Turbopack has some errors with the imports in @react-email/tailwind
|
|
194
|
+
packageJson.scripts.build = 'next build --webpack';
|
|
206
195
|
packageJson.scripts.start = 'next start';
|
|
207
196
|
delete packageJson.scripts.postbuild;
|
|
208
197
|
|
|
@@ -214,12 +203,6 @@ const updatePackageJson = async (builtPreviewAppPath: string) => {
|
|
|
214
203
|
packageJson.dependencies[dependency] = version.replace('workspace:', '');
|
|
215
204
|
}
|
|
216
205
|
|
|
217
|
-
// We remove this one to avoid having resolve issues on our demo build process.
|
|
218
|
-
// This is only used in the `export` command so it's irrelevant to have it here.
|
|
219
|
-
//
|
|
220
|
-
// See `src/actions/render-email-by-path` for more info on how we render the
|
|
221
|
-
// email templates without `@react-email/render` being installed.
|
|
222
|
-
delete packageJson.devDependencies['@react-email/render'];
|
|
223
206
|
delete packageJson.devDependencies['@react-email/components'];
|
|
224
207
|
delete packageJson.scripts.prepare;
|
|
225
208
|
|
|
@@ -33,9 +33,9 @@ export const startDevServer = async (
|
|
|
33
33
|
port: number,
|
|
34
34
|
): Promise<http.Server> => {
|
|
35
35
|
const [majorNodeVersion] = process.versions.node.split('.');
|
|
36
|
-
if (majorNodeVersion && Number.parseInt(majorNodeVersion) <
|
|
36
|
+
if (majorNodeVersion && Number.parseInt(majorNodeVersion) < 20) {
|
|
37
37
|
console.error(
|
|
38
|
-
` ${logSymbols.error} Node ${majorNodeVersion} is not supported. Please upgrade to Node
|
|
38
|
+
` ${logSymbols.error} Node ${majorNodeVersion} is not supported. Please upgrade to Node 20 or higher.`,
|
|
39
39
|
);
|
|
40
40
|
process.exit(1);
|
|
41
41
|
}
|
package/tsconfig.json
CHANGED