react-email 5.0.2 → 5.0.3
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 +2 -0
- package/dist/index.js +8 -7
- package/package.json +2 -2
- package/src/commands/build.ts +7 -7
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -87,7 +87,7 @@ const getEmailsDirectoryMetadata = async (absolutePathToEmailsDirectory, keepFil
|
|
|
87
87
|
//#region package.json
|
|
88
88
|
var package_default = {
|
|
89
89
|
name: "react-email",
|
|
90
|
-
version: "5.0.
|
|
90
|
+
version: "5.0.3",
|
|
91
91
|
description: "A live preview of your emails right in your browser.",
|
|
92
92
|
bin: { "email": "./dist/index.js" },
|
|
93
93
|
type: "module",
|
|
@@ -218,11 +218,11 @@ const npmInstall = async (builtPreviewAppPath, packageManager) => {
|
|
|
218
218
|
};
|
|
219
219
|
const setNextEnvironmentVariablesForBuild = async (emailsDirRelativePath, builtPreviewAppPath) => {
|
|
220
220
|
const nextConfigContents = `
|
|
221
|
-
|
|
221
|
+
import path from 'path';
|
|
222
222
|
const emailsDirRelativePath = path.normalize('${emailsDirRelativePath}');
|
|
223
223
|
const userProjectLocation = '${process.cwd().replace(/\\/g, "/")}';
|
|
224
224
|
/** @type {import('next').NextConfig} */
|
|
225
|
-
|
|
225
|
+
const nextConfig = {
|
|
226
226
|
env: {
|
|
227
227
|
NEXT_PUBLIC_IS_BUILDING: 'true',
|
|
228
228
|
EMAILS_DIR_RELATIVE_PATH: emailsDirRelativePath,
|
|
@@ -237,9 +237,10 @@ module.exports = {
|
|
|
237
237
|
experimental: {
|
|
238
238
|
webpackBuildWorker: true
|
|
239
239
|
},
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export default nextConfig`;
|
|
243
|
+
await fs.promises.writeFile(path.resolve(builtPreviewAppPath, "./next.config.mjs"), nextConfigContents, "utf8");
|
|
243
244
|
};
|
|
244
245
|
const getEmailSlugsFromEmailDirectory = (emailDirectory, emailsDirectoryAbsolutePath) => {
|
|
245
246
|
const directoryPathRelativeToEmailsDirectory = emailDirectory.absolutePath.replace(emailsDirectoryAbsolutePath, "").trim();
|
|
@@ -271,7 +272,7 @@ const updatePackageJson = async (builtPreviewAppPath) => {
|
|
|
271
272
|
packageJson.scripts.start = "next start";
|
|
272
273
|
delete packageJson.scripts.postbuild;
|
|
273
274
|
packageJson.name = "preview-server";
|
|
274
|
-
for (const [dependency, version$1] of Object.entries(packageJson.
|
|
275
|
+
for (const [dependency, version$1] of Object.entries(packageJson.devDependencies)) packageJson.devDependencies[dependency] = version$1.replace("workspace:", "");
|
|
275
276
|
delete packageJson.devDependencies["@react-email/components"];
|
|
276
277
|
delete packageJson.scripts.prepare;
|
|
277
278
|
await fs.promises.writeFile(packageJsonPath, JSON.stringify(packageJson), "utf8");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-email",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.3",
|
|
4
4
|
"description": "A live preview of your emails right in your browser.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"email": "./dist/index.js"
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"react": "19.0.0",
|
|
48
48
|
"react-dom": "19.0.0",
|
|
49
49
|
"typescript": "5.8.3",
|
|
50
|
-
"@react-email/components": "1.0.
|
|
50
|
+
"@react-email/components": "1.0.1"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"build": "tsdown",
|
package/src/commands/build.ts
CHANGED
|
@@ -76,11 +76,11 @@ const setNextEnvironmentVariablesForBuild = async (
|
|
|
76
76
|
builtPreviewAppPath: string,
|
|
77
77
|
) => {
|
|
78
78
|
const nextConfigContents = `
|
|
79
|
-
|
|
79
|
+
import path from 'path';
|
|
80
80
|
const emailsDirRelativePath = path.normalize('${emailsDirRelativePath}');
|
|
81
81
|
const userProjectLocation = '${process.cwd().replace(/\\/g, '/')}';
|
|
82
82
|
/** @type {import('next').NextConfig} */
|
|
83
|
-
|
|
83
|
+
const nextConfig = {
|
|
84
84
|
env: {
|
|
85
85
|
NEXT_PUBLIC_IS_BUILDING: 'true',
|
|
86
86
|
EMAILS_DIR_RELATIVE_PATH: emailsDirRelativePath,
|
|
@@ -95,12 +95,12 @@ module.exports = {
|
|
|
95
95
|
experimental: {
|
|
96
96
|
webpackBuildWorker: true
|
|
97
97
|
},
|
|
98
|
-
}
|
|
98
|
+
}
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
export default nextConfig`;
|
|
101
101
|
|
|
102
102
|
await fs.promises.writeFile(
|
|
103
|
-
path.resolve(builtPreviewAppPath, './next.config.
|
|
103
|
+
path.resolve(builtPreviewAppPath, './next.config.mjs'),
|
|
104
104
|
nextConfigContents,
|
|
105
105
|
'utf8',
|
|
106
106
|
);
|
|
@@ -198,9 +198,9 @@ const updatePackageJson = async (builtPreviewAppPath: string) => {
|
|
|
198
198
|
packageJson.name = 'preview-server';
|
|
199
199
|
|
|
200
200
|
for (const [dependency, version] of Object.entries(
|
|
201
|
-
packageJson.
|
|
201
|
+
packageJson.devDependencies,
|
|
202
202
|
)) {
|
|
203
|
-
packageJson.
|
|
203
|
+
packageJson.devDependencies[dependency] = version.replace('workspace:', '');
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
delete packageJson.devDependencies['@react-email/components'];
|