react-email 4.0.4 → 4.0.6
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 +13 -0
- package/dist/cli/index.js +3 -4
- package/dist/cli/index.mjs +3 -4
- package/dist/preview/.next/BUILD_ID +1 -1
- package/dist/preview/.next/app-build-manifest.json +31 -31
- package/dist/preview/.next/build-manifest.json +14 -14
- package/dist/preview/.next/diagnostics/framework.json +1 -1
- package/dist/preview/.next/next-minimal-server.js.nft.json +1 -1
- package/dist/preview/.next/next-server.js.nft.json +1 -1
- package/dist/preview/.next/prerender-manifest.json +3 -3
- package/dist/preview/.next/required-server-files.json +1 -2
- package/dist/preview/.next/server/app/_not-found/page.js +1 -1
- package/dist/preview/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/preview/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/preview/.next/server/app/favicon.ico/route.js +1 -1
- package/dist/preview/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/dist/preview/.next/server/app/page.js +1 -1
- package/dist/preview/.next/server/app/page.js.nft.json +1 -1
- package/dist/preview/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/preview/.next/server/app/preview/[...slug]/page.js +139 -138
- package/dist/preview/.next/server/app/preview/[...slug]/page.js.nft.json +1 -1
- package/dist/preview/.next/server/app/preview/[...slug]/page_client-reference-manifest.js +1 -1
- package/dist/preview/.next/server/chunks/395.js +1 -0
- package/dist/preview/.next/server/chunks/442.js +1 -0
- package/dist/preview/.next/server/chunks/574.js +6 -0
- package/dist/preview/.next/server/chunks/735.js +13 -0
- package/dist/preview/.next/server/chunks/{414.js → 840.js} +3 -3
- package/dist/preview/.next/server/chunks/886.js +8 -0
- package/dist/preview/.next/server/middleware-build-manifest.js +1 -1
- package/dist/preview/.next/server/pages/500.html +1 -1
- package/dist/preview/.next/server/pages/_app.js +1 -1
- package/dist/preview/.next/server/pages/_app.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/_document.js +1 -1
- package/dist/preview/.next/server/pages/_document.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/_error.js +1 -1
- package/dist/preview/.next/server/pages/_error.js.nft.json +1 -1
- package/dist/preview/.next/server/server-reference-manifest.js +1 -1
- package/dist/preview/.next/server/server-reference-manifest.json +1 -1
- package/dist/preview/.next/static/{K5xoH9pPqnevki0YfsRED → SsVKC3PTN7PJbKsZaiN3_}/_buildManifest.js +1 -1
- package/dist/preview/.next/static/chunks/246-e7336e2929971f63.js +1 -0
- package/dist/preview/.next/static/chunks/270-688096d43c717256.js +1 -0
- package/dist/preview/.next/static/chunks/539-6e9405ecdc007bb7.js +1 -0
- package/dist/preview/.next/static/chunks/587-d27727c99e75067e.js +1 -0
- package/dist/preview/.next/static/chunks/782947c8-c6cfd05e68542601.js +1 -0
- package/dist/preview/.next/static/chunks/803-db74f262c4755323.js +1 -0
- package/dist/preview/.next/static/chunks/853-a01d49f63a859f3d.js +1 -0
- package/dist/preview/.next/static/chunks/{afa401a5-68e1b62b50f76414.js → afa401a5-55858bf5265319eb.js} +1 -1
- package/dist/preview/.next/static/chunks/app/_not-found/page-85e83b2d4bd569a2.js +1 -0
- package/dist/preview/.next/static/chunks/app/layout-f9b38ee711366227.js +1 -0
- package/dist/preview/.next/static/chunks/app/page-0ee3a37f3a3f6f17.js +1 -0
- package/dist/preview/.next/static/chunks/app/preview/[...slug]/page-04482cd4439de72f.js +1 -0
- package/dist/preview/.next/static/chunks/{framework-be649707ef7aa6cf.js → framework-b5f555f62da46ed9.js} +1 -1
- package/dist/preview/.next/static/chunks/main-a839e2fbd78a08fa.js +1 -0
- package/dist/preview/.next/static/chunks/main-app-a6a05ec7ce09e366.js +1 -0
- package/dist/preview/.next/static/chunks/pages/_app-ee26b5d329c4bb79.js +1 -0
- package/dist/preview/.next/static/chunks/pages/_error-90cb3f6367e28bcd.js +1 -0
- package/dist/preview/.next/static/chunks/{webpack-a91b84001c1374de.js → webpack-6755bde10ea8daa8.js} +1 -1
- package/dist/preview/.next/trace +27 -27
- package/package.json +3 -3
- package/src/utils/caniemail/tailwind/get-tailwind-config.ts +13 -29
- package/dist/preview/.next/server/chunks/522.js +0 -8
- package/dist/preview/.next/server/chunks/537.js +0 -1
- package/dist/preview/.next/server/chunks/606.js +0 -1
- package/dist/preview/.next/server/chunks/616.js +0 -6
- package/dist/preview/.next/server/chunks/747.js +0 -13
- package/dist/preview/.next/server/chunks/988.js +0 -1
- package/dist/preview/.next/static/MuW7QWwvWSOBq81VUStjM/_buildManifest.js +0 -1
- package/dist/preview/.next/static/MuW7QWwvWSOBq81VUStjM/_ssgManifest.js +0 -1
- package/dist/preview/.next/static/chunks/186-be509f142abcb591.js +0 -1
- package/dist/preview/.next/static/chunks/221-dc9af10e9928fdb1.js +0 -1
- package/dist/preview/.next/static/chunks/323-4c9f66d5bbb5efc5.js +0 -1
- package/dist/preview/.next/static/chunks/508-1f32f4e755f2863a.js +0 -1
- package/dist/preview/.next/static/chunks/508-f8d42583ffe190fa.js +0 -1
- package/dist/preview/.next/static/chunks/529-776647f7f3b9ca0a.js +0 -1
- package/dist/preview/.next/static/chunks/814-343c45533ab34e2a.js +0 -1
- package/dist/preview/.next/static/chunks/9e3860c5-aa584d592f360aac.js +0 -1
- package/dist/preview/.next/static/chunks/app/_not-found/page-3e1a74ee77aa34e0.js +0 -1
- package/dist/preview/.next/static/chunks/app/layout-3374ba2444837d29.js +0 -1
- package/dist/preview/.next/static/chunks/app/layout-9e4a5dd5a5876d05.js +0 -1
- package/dist/preview/.next/static/chunks/app/page-80d082b8323795e9.js +0 -1
- package/dist/preview/.next/static/chunks/app/preview/[...slug]/page-216e171a38fe6f19.js +0 -1
- package/dist/preview/.next/static/chunks/app/preview/[...slug]/page-4f4d84e99b2788c8.js +0 -1
- package/dist/preview/.next/static/chunks/main-1bbd9a2a9e1c1cc0.js +0 -1
- package/dist/preview/.next/static/chunks/main-app-670fa872bbeba501.js +0 -1
- package/dist/preview/.next/static/chunks/pages/_app-300091909fcee354.js +0 -1
- package/dist/preview/.next/static/chunks/pages/_error-f76efb2b82ccd7e7.js +0 -1
- /package/dist/preview/.next/static/{K5xoH9pPqnevki0YfsRED → SsVKC3PTN7PJbKsZaiN3_}/_ssgManifest.js +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-email",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.6",
|
|
4
4
|
"description": "A live preview of your emails right in your browser.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"email": "./dist/cli/index.js"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"glob": "10.3.4",
|
|
30
30
|
"log-symbols": "4.1.0",
|
|
31
31
|
"mime-types": "2.1.35",
|
|
32
|
-
"next": "15.2.
|
|
32
|
+
"next": "15.2.4",
|
|
33
33
|
"normalize-path": "3.0.0",
|
|
34
34
|
"ora": "5.4.1",
|
|
35
35
|
"socket.io": "4.8.1"
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@react-email/components": "0.0.36"
|
|
86
86
|
},
|
|
87
87
|
"scripts": {
|
|
88
|
-
"build": "tsup-node && node ./scripts/build-preview-server.mjs",
|
|
88
|
+
"build": "tsup-node && node ./scripts/build-preview-server.mjs && pnpm install --frozen-lockfile",
|
|
89
89
|
"caniemail:fetch": "node ./scripts/fill-caniemail-data.mjs",
|
|
90
90
|
"clean": "rm -rf dist",
|
|
91
91
|
"dev": "tsup-node --watch",
|
|
@@ -88,33 +88,17 @@ const getConfigFromImport = async (
|
|
|
88
88
|
sourcePath: string,
|
|
89
89
|
): Promise<TailwindConfig> => {
|
|
90
90
|
const configRelativePath = tailwindConfigImport.source.value;
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
configRelativePath,
|
|
94
|
-
);
|
|
95
|
-
const configFilepath = getFirstExistingFilepath([
|
|
96
|
-
configImportPath,
|
|
97
|
-
`${configImportPath}.ts`,
|
|
98
|
-
`${configImportPath}.js`,
|
|
99
|
-
`${configImportPath}.mjs`,
|
|
100
|
-
`${configImportPath}.cjs`,
|
|
101
|
-
]);
|
|
102
|
-
|
|
103
|
-
if (configFilepath === undefined) {
|
|
104
|
-
throw new Error(
|
|
105
|
-
`Could not find Tailwind config by inferring it's extension type (tried .ts, .js, .mjs and .cjs).`,
|
|
106
|
-
{
|
|
107
|
-
cause: {
|
|
108
|
-
configPath: configImportPath,
|
|
109
|
-
sourcePath,
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
);
|
|
113
|
-
}
|
|
91
|
+
const sourceDirpath = path.dirname(sourcePath);
|
|
92
|
+
const configFilepath = path.join(sourceDirpath, configRelativePath);
|
|
114
93
|
|
|
115
94
|
const configBuildResult = await esbuild.build({
|
|
116
95
|
bundle: true,
|
|
117
|
-
|
|
96
|
+
stdin: {
|
|
97
|
+
contents: `import tailwindConfig from "${configRelativePath}";
|
|
98
|
+
export { tailwindConfig };`,
|
|
99
|
+
loader: 'tsx',
|
|
100
|
+
resolveDir: path.dirname(sourcePath),
|
|
101
|
+
},
|
|
118
102
|
platform: 'node',
|
|
119
103
|
write: false,
|
|
120
104
|
format: 'cjs',
|
|
@@ -128,17 +112,17 @@ const getConfigFromImport = async (
|
|
|
128
112
|
}
|
|
129
113
|
const configModule = runBundledCode(configFile.text, configFilepath);
|
|
130
114
|
if (isErr(configModule)) {
|
|
131
|
-
throw new Error(
|
|
132
|
-
|
|
133
|
-
|
|
115
|
+
throw new Error(
|
|
116
|
+
`Error when trying to run the config file: ${configModule.error}`,
|
|
117
|
+
);
|
|
134
118
|
}
|
|
135
119
|
|
|
136
120
|
if (
|
|
137
121
|
typeof configModule.value === 'object' &&
|
|
138
122
|
configModule.value !== null &&
|
|
139
|
-
'
|
|
123
|
+
'tailwindConfig' in configModule.value
|
|
140
124
|
) {
|
|
141
|
-
return configModule.value.
|
|
125
|
+
return configModule.value.tailwindConfig as TailwindConfig;
|
|
142
126
|
}
|
|
143
127
|
|
|
144
128
|
throw new Error(
|