react-email 4.2.11 → 4.2.12
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 +6 -0
- package/dist/index.js +931 -1321
- package/package.json +4 -5
- package/readme.md +3 -4
- package/src/commands/build.ts +5 -5
- package/src/utils/get-emails-directory-metadata.ts +0 -1
- package/src/utils/preview/serve-static-file.ts +0 -1
- package/src/utils/preview/start-dev-server.ts +0 -2
- package/tsdown.config.ts +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-email",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.12",
|
|
4
4
|
"description": "A live preview of your emails right in your browser.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"email": "./dist/index.js"
|
|
@@ -45,13 +45,12 @@
|
|
|
45
45
|
"next": "^15.3.2",
|
|
46
46
|
"react": "19.0.0",
|
|
47
47
|
"react-dom": "19.0.0",
|
|
48
|
-
"tsup": "8.4.0",
|
|
49
48
|
"typescript": "5.8.3",
|
|
50
|
-
"@react-email/components": "0.5.
|
|
49
|
+
"@react-email/components": "0.5.5"
|
|
51
50
|
},
|
|
52
51
|
"scripts": {
|
|
53
|
-
"build": "
|
|
54
|
-
"build:watch": "
|
|
52
|
+
"build": "tsdown",
|
|
53
|
+
"build:watch": "tsdown --watch src",
|
|
55
54
|
"clean": "rm -rf dist",
|
|
56
55
|
"test": "vitest run",
|
|
57
56
|
"test:watch": "vitest"
|
package/readme.md
CHANGED
|
@@ -4,11 +4,10 @@
|
|
|
4
4
|
<div align="center">The next generation of writing emails.<br />High-quality, unstyled components for creating emails.</div>
|
|
5
5
|
<br />
|
|
6
6
|
<div align="center">
|
|
7
|
-
<a href="https://react.email">Website</a>
|
|
7
|
+
<a href="https://react.email">Website</a>
|
|
8
8
|
<span> · </span>
|
|
9
|
-
<a href="https://github.com/resend/react-email">GitHub</a>
|
|
10
|
-
|
|
11
|
-
<a href="https://react.email/discord">Discord</a>
|
|
9
|
+
<a href="https://github.com/resend/react-email">GitHub</a>
|
|
10
|
+
|
|
12
11
|
</div>
|
|
13
12
|
|
|
14
13
|
## Getting started
|
package/src/commands/build.ts
CHANGED
|
@@ -78,14 +78,14 @@ const setNextEnvironmentVariablesForBuild = async (
|
|
|
78
78
|
const nextConfigContents = `
|
|
79
79
|
const path = require('path');
|
|
80
80
|
const emailsDirRelativePath = path.normalize('${emailsDirRelativePath}');
|
|
81
|
-
const userProjectLocation = '${process.cwd()}';
|
|
81
|
+
const userProjectLocation = '${process.cwd().replace(/\\/g, '/')}';
|
|
82
82
|
/** @type {import('next').NextConfig} */
|
|
83
83
|
module.exports = {
|
|
84
84
|
env: {
|
|
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
|
+
PREVIEW_SERVER_LOCATION: '${builtPreviewAppPath.replace(/\\/g, '/')}',
|
|
89
89
|
USER_PROJECT_LOCATION: userProjectLocation
|
|
90
90
|
},
|
|
91
91
|
// this is needed so that the code for building emails works properly
|
|
@@ -154,9 +154,9 @@ const forceSSGForEmailPreviews = async (
|
|
|
154
154
|
emailsDirPath: string,
|
|
155
155
|
builtPreviewAppPath: string,
|
|
156
156
|
) => {
|
|
157
|
-
const emailDirectoryMetadata =
|
|
158
|
-
|
|
159
|
-
|
|
157
|
+
const emailDirectoryMetadata = (await getEmailsDirectoryMetadata(
|
|
158
|
+
emailsDirPath,
|
|
159
|
+
))!;
|
|
160
160
|
|
|
161
161
|
const parameters = getEmailSlugsFromEmailDirectory(
|
|
162
162
|
emailDirectoryMetadata,
|
|
@@ -83,8 +83,6 @@ export const startDevServer = async (
|
|
|
83
83
|
const { portAlreadyInUse } = await safeAsyncServerListen(devServer, port);
|
|
84
84
|
|
|
85
85
|
if (!portAlreadyInUse) {
|
|
86
|
-
// this errors when linting but doesn't on the editor so ignore the warning on this
|
|
87
|
-
/* eslint-disable-next-line @typescript-eslint/no-unsafe-member-access */
|
|
88
86
|
console.log(
|
|
89
87
|
styleText('greenBright', ` React Email ${packageJson.version}`),
|
|
90
88
|
);
|