react-email 3.0.4 → 3.0.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.
Files changed (216) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cli/index.js +90 -94
  3. package/dist/cli/index.mjs +69 -58
  4. package/dist/index.d.mts +20 -0
  5. package/dist/index.d.ts +20 -0
  6. package/dist/index.js +96 -0
  7. package/dist/index.mjs +21 -0
  8. package/dist/package/index.d.mts +33 -0
  9. package/dist/package/index.d.ts +33 -0
  10. package/dist/package/index.js +62 -0
  11. package/dist/package/index.mjs +7 -0
  12. package/dist/preview/.next/BUILD_ID +1 -1
  13. package/dist/preview/.next/app-build-manifest.json +31 -31
  14. package/dist/preview/.next/app-path-routes-manifest.json +1 -1
  15. package/dist/preview/.next/build-manifest.json +14 -14
  16. package/dist/preview/.next/cache/.rscinfo +1 -1
  17. package/dist/preview/.next/cache/eslint/.cache_1vyas3k +1 -0
  18. package/dist/preview/.next/cache/webpack/client-production/0.pack +0 -0
  19. package/dist/preview/.next/cache/webpack/client-production/index.pack +0 -0
  20. package/dist/preview/.next/cache/webpack/edge-server-production/index.pack +0 -0
  21. package/dist/preview/.next/cache/webpack/server-production/0.pack +0 -0
  22. package/dist/preview/.next/cache/webpack/server-production/index.pack +0 -0
  23. package/dist/preview/.next/diagnostics/framework.json +1 -1
  24. package/dist/preview/.next/next-minimal-server.js.nft.json +1 -1
  25. package/dist/preview/.next/next-server.js.nft.json +1 -1
  26. package/dist/preview/.next/prerender-manifest.json +1 -1
  27. package/dist/preview/.next/required-server-files.json +1 -1
  28. package/dist/preview/.next/server/app/_not-found/page.js +1 -1
  29. package/dist/preview/.next/server/app/_not-found/page.js.nft.json +1 -1
  30. package/dist/preview/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  31. package/dist/preview/.next/server/app/favicon.ico/route.js +1 -1
  32. package/dist/preview/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  33. package/dist/preview/.next/server/app/page.js +1 -1
  34. package/dist/preview/.next/server/app/page.js.nft.json +1 -1
  35. package/dist/preview/.next/server/app/page_client-reference-manifest.js +1 -1
  36. package/dist/preview/.next/server/app/preview/[...slug]/page.js +6 -6
  37. package/dist/preview/.next/server/app/preview/[...slug]/page.js.nft.json +1 -1
  38. package/dist/preview/.next/server/app/preview/[...slug]/page_client-reference-manifest.js +1 -1
  39. package/dist/preview/.next/server/app-paths-manifest.json +1 -1
  40. package/dist/preview/.next/server/chunks/300.js +13 -0
  41. package/dist/preview/.next/server/chunks/420.js +1 -0
  42. package/dist/preview/.next/server/chunks/625.js +5 -0
  43. package/dist/preview/.next/server/chunks/631.js +6 -0
  44. package/dist/preview/.next/server/chunks/720.js +10 -0
  45. package/dist/preview/.next/server/middleware-build-manifest.js +1 -1
  46. package/dist/preview/.next/server/next-font-manifest.js +1 -1
  47. package/dist/preview/.next/server/next-font-manifest.json +1 -1
  48. package/dist/preview/.next/server/pages/500.html +1 -1
  49. package/dist/preview/.next/server/pages/_app.js +1 -1
  50. package/dist/preview/.next/server/pages/_app.js.nft.json +1 -1
  51. package/dist/preview/.next/server/pages/_document.js +1 -1
  52. package/dist/preview/.next/server/pages/_document.js.nft.json +1 -1
  53. package/dist/preview/.next/server/pages/_error.js +1 -1
  54. package/dist/preview/.next/server/pages/_error.js.nft.json +1 -1
  55. package/dist/preview/.next/server/server-reference-manifest.js +1 -1
  56. package/dist/preview/.next/server/server-reference-manifest.json +1 -1
  57. package/dist/preview/.next/static/6K68y2QEZ1dLbv-Xhi30p/_buildManifest.js +1 -0
  58. package/dist/preview/.next/static/chunks/12-b9450aa0845e7574.js +1 -0
  59. package/dist/preview/.next/static/chunks/154-69b91a0c2fd801b8.js +1 -0
  60. package/dist/preview/.next/static/chunks/447-886131c35ca42b91.js +1 -0
  61. package/dist/preview/.next/static/chunks/5fec7a0a-5179023f3f5a9421.js +1 -0
  62. package/dist/preview/.next/static/chunks/797-46f6c20952f0a280.js +2 -0
  63. package/dist/preview/.next/static/chunks/{677-dd9544a8249ca33a.js → 860-38d96c8819ba6f19.js} +1 -1
  64. package/dist/preview/.next/static/chunks/app/_not-found/page-96d3eac723be3ee2.js +1 -0
  65. package/dist/preview/.next/static/chunks/app/layout-e1b6f1534cbbe5bd.js +1 -0
  66. package/dist/preview/.next/static/chunks/app/page-2c3e297e38c526ef.js +1 -0
  67. package/dist/preview/.next/static/chunks/app/preview/[...slug]/page-2b4988ba6daf34e1.js +1 -0
  68. package/dist/preview/.next/static/chunks/framework-e7cae9cecd5c9ba2.js +1 -0
  69. package/dist/preview/.next/static/chunks/main-app-2c7f96205a73f128.js +1 -0
  70. package/dist/preview/.next/static/chunks/main-df761fde212f9cda.js +1 -0
  71. package/dist/preview/.next/static/chunks/pages/_app-203a61b355820ccf.js +1 -0
  72. package/dist/preview/.next/static/chunks/pages/_error-1764ca54938748c8.js +1 -0
  73. package/dist/preview/.next/static/chunks/{webpack-08c76d9f8dd5b0f0.js → webpack-9255716c9496e606.js} +1 -1
  74. package/dist/preview/.next/static/css/{eecb5c96aca6bd9e.css → ec5d7e66bd3b6cb8.css} +1 -1
  75. package/dist/preview/.next/trace +20 -2
  76. package/dist/preview/.next/types/app/layout.ts +1 -1
  77. package/dist/preview/.next/types/app/preview/[...slug]/page.ts +1 -1
  78. package/dist/preview/.next/types/cache-life.d.ts +2 -0
  79. package/next-env.d.ts +1 -1
  80. package/package.json +6 -6
  81. package/src/actions/get-email-path-from-slug.ts +3 -2
  82. package/src/actions/get-emails-directory-metadata.spec.ts +1 -0
  83. package/src/actions/get-emails-directory-metadata.ts +62 -59
  84. package/src/actions/render-email-by-path.tsx +16 -5
  85. package/src/app/preview/[...slug]/page.tsx +19 -9
  86. package/src/app/preview/[...slug]/preview.tsx +6 -7
  87. package/src/contexts/emails.tsx +2 -56
  88. package/src/hooks/use-email-rendering-result.ts +44 -0
  89. package/src/hooks/use-rendering-metadata.ts +5 -5
  90. package/src/package/body/dist/index.d.mts +6 -0
  91. package/src/package/body/dist/index.d.ts +6 -0
  92. package/src/package/body/dist/index.js +79 -0
  93. package/src/package/body/dist/index.mjs +45 -0
  94. package/src/package/button/dist/index.d.mts +6 -0
  95. package/src/package/button/dist/index.d.ts +6 -0
  96. package/src/package/button/dist/index.js +252 -0
  97. package/src/package/button/dist/index.mjs +218 -0
  98. package/src/package/code-block/dist/index.d.mts +4906 -0
  99. package/src/package/code-block/dist/index.d.ts +4906 -0
  100. package/src/package/code-block/dist/index.js +18205 -0
  101. package/src/package/code-block/dist/index.mjs +18133 -0
  102. package/src/package/code-inline/dist/index.d.mts +11 -0
  103. package/src/package/code-inline/dist/index.d.ts +11 -0
  104. package/src/package/code-inline/dist/index.js +106 -0
  105. package/src/package/code-inline/dist/index.mjs +72 -0
  106. package/src/package/column/dist/index.d.mts +6 -0
  107. package/src/package/column/dist/index.d.ts +6 -0
  108. package/src/package/column/dist/index.js +79 -0
  109. package/src/package/column/dist/index.mjs +45 -0
  110. package/src/package/components/dist/index.d.mts +20 -0
  111. package/src/package/components/dist/index.d.ts +20 -0
  112. package/src/package/components/dist/index.js +62 -0
  113. package/src/package/components/dist/index.mjs +21 -0
  114. package/src/package/container/dist/index.d.mts +6 -0
  115. package/src/package/container/dist/index.d.ts +6 -0
  116. package/src/package/container/dist/index.js +93 -0
  117. package/src/package/container/dist/index.mjs +59 -0
  118. package/src/package/font/dist/index.d.mts +25 -0
  119. package/src/package/font/dist/index.d.ts +25 -0
  120. package/src/package/font/dist/index.js +55 -0
  121. package/src/package/font/dist/index.mjs +28 -0
  122. package/src/package/head/dist/index.d.mts +6 -0
  123. package/src/package/head/dist/index.d.ts +6 -0
  124. package/src/package/head/dist/index.js +83 -0
  125. package/src/package/head/dist/index.mjs +49 -0
  126. package/src/package/heading/dist/index.d.mts +43 -0
  127. package/src/package/heading/dist/index.d.ts +43 -0
  128. package/src/package/heading/dist/index.js +113 -0
  129. package/src/package/heading/dist/index.mjs +79 -0
  130. package/src/package/hr/dist/index.d.mts +6 -0
  131. package/src/package/hr/dist/index.d.ts +6 -0
  132. package/src/package/hr/dist/index.js +89 -0
  133. package/src/package/hr/dist/index.mjs +55 -0
  134. package/src/package/html/dist/index.d.mts +6 -0
  135. package/src/package/html/dist/index.d.ts +6 -0
  136. package/src/package/html/dist/index.js +79 -0
  137. package/src/package/html/dist/index.mjs +45 -0
  138. package/src/package/img/dist/index.d.mts +6 -0
  139. package/src/package/img/dist/index.d.ts +6 -0
  140. package/src/package/img/dist/index.js +94 -0
  141. package/src/package/img/dist/index.mjs +60 -0
  142. package/src/package/link/dist/index.d.mts +6 -0
  143. package/src/package/link/dist/index.d.ts +6 -0
  144. package/src/package/link/dist/index.js +90 -0
  145. package/src/package/link/dist/index.mjs +56 -0
  146. package/src/package/markdown/dist/index.d.mts +15 -0
  147. package/src/package/markdown/dist/index.d.ts +15 -0
  148. package/src/package/markdown/dist/index.js +92 -0
  149. package/src/package/markdown/dist/index.mjs +58 -0
  150. package/src/package/preview/dist/index.d.mts +12 -0
  151. package/src/package/preview/dist/index.d.ts +12 -0
  152. package/src/package/preview/dist/index.js +108 -0
  153. package/src/package/preview/dist/index.mjs +73 -0
  154. package/src/package/render/dist/browser/index.d.mts +24 -0
  155. package/src/package/render/dist/browser/index.d.ts +24 -0
  156. package/src/package/render/dist/browser/index.js +250 -0
  157. package/src/package/render/dist/browser/index.mjs +214 -0
  158. package/src/package/render/dist/index.d.mts +23 -0
  159. package/src/package/render/dist/index.d.ts +23 -0
  160. package/src/package/render/dist/index.js +768 -0
  161. package/src/package/render/dist/index.mjs +733 -0
  162. package/src/package/render/dist/node/index.d.mts +27 -0
  163. package/src/package/render/dist/node/index.d.ts +27 -0
  164. package/src/package/render/dist/node/index.js +212 -0
  165. package/src/package/render/dist/node/index.mjs +176 -0
  166. package/src/package/row/dist/index.d.mts +10 -0
  167. package/src/package/row/dist/index.d.ts +10 -0
  168. package/src/package/row/dist/index.js +93 -0
  169. package/src/package/row/dist/index.mjs +59 -0
  170. package/src/package/section/dist/index.d.mts +6 -0
  171. package/src/package/section/dist/index.d.ts +6 -0
  172. package/src/package/section/dist/index.js +93 -0
  173. package/src/package/section/dist/index.mjs +59 -0
  174. package/src/package/tailwind/dist/index.d.ts +19 -0
  175. package/src/package/tailwind/dist/index.js +48 -0
  176. package/src/package/tailwind/dist/index.mjs +17167 -0
  177. package/src/package/tailwind/dist/tailwindcss/config.d.ts +376 -0
  178. package/src/package/tailwind/dist/tailwindcss/generated/.gitkeep +0 -0
  179. package/src/package/tailwind/dist/tailwindcss/generated/colors.d.ts +298 -0
  180. package/src/package/tailwind/dist/tailwindcss/generated/corePluginList.d.ts +1 -0
  181. package/src/package/tailwind/dist/tailwindcss/generated/default-theme.d.ts +397 -0
  182. package/src/package/tailwind/dist/tailwindcss/index.d.ts +11 -0
  183. package/src/package/text/dist/index.d.mts +6 -0
  184. package/src/package/text/dist/index.d.ts +6 -0
  185. package/src/package/text/dist/index.js +89 -0
  186. package/src/package/text/dist/index.mjs +55 -0
  187. package/src/utils/types/hot-reload-event.ts +3 -6
  188. package/dist/preview/.next/cache/eslint/.cache_117y9un +0 -1
  189. package/dist/preview/.next/cache/webpack/client-production/1.pack +0 -0
  190. package/dist/preview/.next/cache/webpack/client-production/2.pack +0 -0
  191. package/dist/preview/.next/cache/webpack/client-production/index.pack.old +0 -0
  192. package/dist/preview/.next/cache/webpack/server-production/1.pack +0 -0
  193. package/dist/preview/.next/cache/webpack/server-production/index.pack.old +0 -0
  194. package/dist/preview/.next/server/chunks/185.js +0 -1
  195. package/dist/preview/.next/server/chunks/270.js +0 -10
  196. package/dist/preview/.next/server/chunks/323.js +0 -4
  197. package/dist/preview/.next/server/chunks/867.js +0 -7
  198. package/dist/preview/.next/server/chunks/887.js +0 -5
  199. package/dist/preview/.next/server/chunks/931.js +0 -6
  200. package/dist/preview/.next/server/chunks/945.js +0 -13
  201. package/dist/preview/.next/static/chunks/131-f4d810c5beddfab6.js +0 -2
  202. package/dist/preview/.next/static/chunks/174-3e37f7e70124a32b.js +0 -1
  203. package/dist/preview/.next/static/chunks/406-3d68715e81289266.js +0 -1
  204. package/dist/preview/.next/static/chunks/41423bf1-6f7e6cd2fc1291c3.js +0 -1
  205. package/dist/preview/.next/static/chunks/968-7fddcc3bfb4ada61.js +0 -1
  206. package/dist/preview/.next/static/chunks/app/_not-found/page-53e238cd8965175e.js +0 -1
  207. package/dist/preview/.next/static/chunks/app/layout-94f263ae274f6f80.js +0 -1
  208. package/dist/preview/.next/static/chunks/app/page-68f0897ebaef4c9c.js +0 -1
  209. package/dist/preview/.next/static/chunks/app/preview/[...slug]/page-823cfe936f21397d.js +0 -1
  210. package/dist/preview/.next/static/chunks/framework-9780ea70a2600e73.js +0 -1
  211. package/dist/preview/.next/static/chunks/main-app-d2690e9b3dbe4561.js +0 -1
  212. package/dist/preview/.next/static/chunks/main-f2abbba525af0515.js +0 -1
  213. package/dist/preview/.next/static/chunks/pages/_app-ac8e4ba1a8597f2e.js +0 -1
  214. package/dist/preview/.next/static/chunks/pages/_error-88e591eedab147f8.js +0 -1
  215. package/dist/preview/.next/static/yKpx8LQApEcHL50eu16RD/_buildManifest.js +0 -1
  216. /package/dist/preview/.next/static/{yKpx8LQApEcHL50eu16RD → 6K68y2QEZ1dLbv-Xhi30p}/_ssgManifest.js +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # react-email
2
2
 
3
+ ## 3.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 7337d04: Fix emails being re-rendered each time there is navigation in the preview server
8
+
3
9
  ## 3.0.4
4
10
 
5
11
  ### Patch Changes
package/dist/cli/index.js CHANGED
@@ -340,7 +340,7 @@ var import_commander = require("commander");
340
340
  // package.json
341
341
  var package_default = {
342
342
  name: "react-email",
343
- version: "3.0.4",
343
+ version: "3.0.5",
344
344
  description: "A live preview of your emails right in your browser.",
345
345
  bin: {
346
346
  email: "./dist/cli/index.js"
@@ -370,14 +370,14 @@ var package_default = {
370
370
  "@babel/core": "7.24.5",
371
371
  "@babel/parser": "7.24.5",
372
372
  chalk: "4.1.2",
373
- chokidar: "^4.0.1",
373
+ chokidar: "4.0.3",
374
374
  commander: "11.1.0",
375
375
  debounce: "2.0.0",
376
376
  esbuild: "0.19.11",
377
377
  glob: "10.3.4",
378
378
  "log-symbols": "4.1.0",
379
379
  "mime-types": "2.1.35",
380
- next: "15.0.4",
380
+ next: "15.1.2",
381
381
  "normalize-path": "3.0.0",
382
382
  ora: "5.4.1",
383
383
  "socket.io": "4.8.0"
@@ -394,13 +394,13 @@ var package_default = {
394
394
  "@types/babel__core": "7.20.5",
395
395
  "@types/fs-extra": "11.0.1",
396
396
  "@types/mime-types": "2.1.4",
397
- "@types/node": "18.0.0",
397
+ "@types/node": "22.10.2",
398
398
  "@types/normalize-path": "3.0.2",
399
399
  "@types/react": "^19",
400
400
  "@types/react-dom": "^19",
401
401
  "@types/webpack": "5.28.5",
402
402
  "@vercel/style-guide": "5.1.0",
403
- autoprefixer: "10.4.14",
403
+ autoprefixer: "10.4.20",
404
404
  clsx: "2.1.0",
405
405
  eslint: "8.50.0",
406
406
  "eslint-config-prettier": "9.0.0",
@@ -508,7 +508,8 @@ var getTreeLines = function() {
508
508
  childDirents.sort(function(a, b) {
509
509
  if (a.isDirectory() && b.isFile()) {
510
510
  return -1;
511
- } else if (a.isFile() && b.isDirectory()) {
511
+ }
512
+ if (a.isFile() && b.isDirectory()) {
512
513
  return 1;
513
514
  }
514
515
  return b.name > a.name ? -1 : 1;
@@ -569,12 +570,12 @@ var tree = function() {
569
570
  };
570
571
  }();
571
572
  // src/cli/utils/preview/hot-reloading/setup-hot-reloading.ts
572
- var import_node_path5 = __toESM(require("path"));
573
+ var import_node_path6 = __toESM(require("path"));
573
574
  var import_socket = require("socket.io");
574
575
  var import_chokidar = require("chokidar");
575
576
  var import_debounce = __toESM(require("debounce"));
576
577
  // src/cli/utils/preview/hot-reloading/create-dependency-graph.ts
577
- var import_node_path4 = __toESM(require("path"));
578
+ var import_node_path5 = __toESM(require("path"));
578
579
  var import_node_fs3 = require("fs");
579
580
  // src/cli/utils/preview/hot-reloading/get-imported-modules.ts
580
581
  var import_core = require("@babel/core");
@@ -621,7 +622,7 @@ var getImportedModules = function(contents) {
621
622
  return importedPaths;
622
623
  };
623
624
  // src/cli/utils/preview/start-dev-server.ts
624
- var import_node_path3 = __toESM(require("path"));
625
+ var import_node_path4 = __toESM(require("path"));
625
626
  var import_node_http = __toESM(require("http"));
626
627
  var import_node_url = __toESM(require("url"));
627
628
  var import_next = __toESM(require("next"));
@@ -718,11 +719,11 @@ var serveStaticFile = function() {
718
719
  };
719
720
  }();
720
721
  // src/cli/utils/preview/get-env-variables-for-preview-app.ts
721
- var import_path = __toESM(require("path"));
722
+ var import_node_path3 = __toESM(require("path"));
722
723
  var getEnvVariablesForPreviewApp = function(relativePathToEmailsDirectory, cwd) {
723
724
  return {
724
725
  EMAILS_DIR_RELATIVE_PATH: relativePathToEmailsDirectory,
725
- EMAILS_DIR_ABSOLUTE_PATH: import_path.default.resolve(cwd, relativePathToEmailsDirectory),
726
+ EMAILS_DIR_ABSOLUTE_PATH: import_node_path3.default.resolve(cwd, relativePathToEmailsDirectory),
726
727
  USER_PROJECT_LOCATION: cwd
727
728
  };
728
729
  };
@@ -744,9 +745,9 @@ var safeAsyncServerListen = function(server, port) {
744
745
  });
745
746
  });
746
747
  };
747
- var isDev = !__filename.endsWith(import_node_path3.default.join("cli", "index.js"));
748
- var cliPacakgeLocation = isDev ? import_node_path3.default.resolve(__dirname, "../../../..") : import_node_path3.default.resolve(__dirname, "../..");
749
- var previewServerLocation = isDev ? import_node_path3.default.resolve(__dirname, "../../../..") : import_node_path3.default.resolve(__dirname, "../preview");
748
+ var isDev = !__filename.endsWith(import_node_path4.default.join("cli", "index.js"));
749
+ var cliPacakgeLocation = isDev ? import_node_path4.default.resolve(__dirname, "../../../..") : import_node_path4.default.resolve(__dirname, "../..");
750
+ var previewServerLocation = isDev ? import_node_path4.default.resolve(__dirname, "../../../..") : import_node_path4.default.resolve(__dirname, "../preview");
750
751
  var startDevServer = function() {
751
752
  var _ref = _async_to_generator(function(emailsDirRelativePath, staticBaseDirRelativePath, port) {
752
753
  var portAlreadyInUse, nextPortToTry, spinner, timeBeforeNextReady, app, isNextReady, nextReadyPromise, nextHandleRequest, secondsToNextReady;
@@ -824,7 +825,7 @@ var startDevServer = function() {
824
825
  process.env = _object_spread(_object_spread_props(_object_spread({}, process.env), {
825
826
  NODE_ENV: "development"
826
827
  }), getEnvVariablesForPreviewApp(// If we don't do normalization here, stuff like https://github.com/resend/react-email/issues/1354 happens.
827
- import_node_path3.default.normalize(emailsDirRelativePath), process.cwd()));
828
+ import_node_path4.default.normalize(emailsDirRelativePath), process.cwd()));
828
829
  app = (0, import_next.default)({
829
830
  // passing in env here does not get the environment variables there
830
831
  dev: isDev,
@@ -932,7 +933,7 @@ var readAllFilesInsideDirectory = function() {
932
933
  ];
933
934
  _value = _step.value;
934
935
  dirent = _value;
935
- pathToDirent = import_node_path4.default.join(directory, dirent.name);
936
+ pathToDirent = import_node_path5.default.join(directory, dirent.name);
936
937
  if (!dirent.isDirectory()) return [
937
938
  3,
938
939
  6
@@ -1019,7 +1020,7 @@ var readAllFilesInsideDirectory = function() {
1019
1020
  };
1020
1021
  }();
1021
1022
  var isJavascriptModule = function(filePath) {
1022
- var extensionName = import_node_path4.default.extname(filePath);
1023
+ var extensionName = import_node_path5.default.extname(filePath);
1023
1024
  return [
1024
1025
  ".js",
1025
1026
  ".ts",
@@ -1032,15 +1033,20 @@ var isJavascriptModule = function(filePath) {
1032
1033
  var checkFileExtensionsUntilItExists = function(pathWithoutExtension) {
1033
1034
  if ((0, import_node_fs3.existsSync)("".concat(pathWithoutExtension, ".ts"))) {
1034
1035
  return "".concat(pathWithoutExtension, ".ts");
1035
- } else if ((0, import_node_fs3.existsSync)("".concat(pathWithoutExtension, ".tsx"))) {
1036
+ }
1037
+ if ((0, import_node_fs3.existsSync)("".concat(pathWithoutExtension, ".tsx"))) {
1036
1038
  return "".concat(pathWithoutExtension, ".tsx");
1037
- } else if ((0, import_node_fs3.existsSync)("".concat(pathWithoutExtension, ".js"))) {
1039
+ }
1040
+ if ((0, import_node_fs3.existsSync)("".concat(pathWithoutExtension, ".js"))) {
1038
1041
  return "".concat(pathWithoutExtension, ".js");
1039
- } else if ((0, import_node_fs3.existsSync)("".concat(pathWithoutExtension, ".jsx"))) {
1042
+ }
1043
+ if ((0, import_node_fs3.existsSync)("".concat(pathWithoutExtension, ".jsx"))) {
1040
1044
  return "".concat(pathWithoutExtension, ".jsx");
1041
- } else if ((0, import_node_fs3.existsSync)("".concat(pathWithoutExtension, ".mjs"))) {
1045
+ }
1046
+ if ((0, import_node_fs3.existsSync)("".concat(pathWithoutExtension, ".mjs"))) {
1042
1047
  return "".concat(pathWithoutExtension, ".mjs");
1043
- } else if ((0, import_node_fs3.existsSync)("".concat(pathWithoutExtension, ".cjs"))) {
1048
+ }
1049
+ if ((0, import_node_fs3.existsSync)("".concat(pathWithoutExtension, ".cjs"))) {
1044
1050
  return "".concat(pathWithoutExtension, ".cjs");
1045
1051
  }
1046
1052
  };
@@ -1083,14 +1089,14 @@ var createDependencyGraph = function() {
1083
1089
  importedPaths = getImportedModules(contents);
1084
1090
  importedPathsRelativeToDirectory = importedPaths.map(function(dependencyPath) {
1085
1091
  var isModulePath = !dependencyPath.startsWith(".");
1086
- if (!isModulePath && !import_node_path4.default.isAbsolute(dependencyPath)) {
1087
- var pathToDependencyFromDirectory = import_node_path4.default.resolve(/*
1092
+ if (!isModulePath && !import_node_path5.default.isAbsolute(dependencyPath)) {
1093
+ var pathToDependencyFromDirectory = import_node_path5.default.resolve(/*
1088
1094
  path.resolve resolves paths differently from what imports on javascript do.
1089
1095
 
1090
1096
  So if we wouldn't do this, for an email at "/path/to/email.tsx" with a dependecy path of "./other-email"
1091
1097
  would end up going into /path/to/email.tsx/other-email instead of /path/to/other-email which is the
1092
1098
  one the import is meant to go to
1093
- */ import_node_path4.default.dirname(filePath), dependencyPath);
1099
+ */ import_node_path5.default.dirname(filePath), dependencyPath);
1094
1100
  var isDirectory = false;
1095
1101
  try {
1096
1102
  isDirectory = (0, import_node_fs3.statSync)(pathToDependencyFromDirectory).isDirectory();
@@ -1109,7 +1115,7 @@ var createDependencyGraph = function() {
1109
1115
  if (pathWithExtension1) {
1110
1116
  pathToDependencyFromDirectory = pathWithExtension1;
1111
1117
  } else if (isDev) {
1112
- console.warn("Could not determine the file extension for the file at ".concat(pathWithExtension1));
1118
+ console.warn("Could not determine the file extension for the file at ".concat(pathToDependencyFromDirectory));
1113
1119
  }
1114
1120
  }
1115
1121
  return pathToDependencyFromDirectory;
@@ -1118,10 +1124,10 @@ var createDependencyGraph = function() {
1118
1124
  }
1119
1125
  });
1120
1126
  moduleDependencies = importedPathsRelativeToDirectory.filter(function(dependencyPath) {
1121
- return !dependencyPath.startsWith(".") && !import_node_path4.default.isAbsolute(dependencyPath);
1127
+ return !dependencyPath.startsWith(".") && !import_node_path5.default.isAbsolute(dependencyPath);
1122
1128
  });
1123
1129
  nonNodeModuleImportPathsRelativeToDirectory = importedPathsRelativeToDirectory.filter(function(dependencyPath) {
1124
- return dependencyPath.startsWith(".") || import_node_path4.default.isAbsolute(dependencyPath);
1130
+ return dependencyPath.startsWith(".") || import_node_path5.default.isAbsolute(dependencyPath);
1125
1131
  });
1126
1132
  return [
1127
1133
  2,
@@ -1659,7 +1665,7 @@ var setupHotreloading = function() {
1659
1665
  });
1660
1666
  changes = [];
1661
1667
  }, 150);
1662
- absolutePathToEmailsDirectory = import_node_path5.default.resolve(process.cwd(), emailDirRelativePath);
1668
+ absolutePathToEmailsDirectory = import_node_path6.default.resolve(process.cwd(), emailDirRelativePath);
1663
1669
  return [
1664
1670
  4,
1665
1671
  createDependencyGraph(absolutePathToEmailsDirectory)
@@ -1675,7 +1681,7 @@ var setupHotreloading = function() {
1675
1681
  });
1676
1682
  getFilesOutsideEmailsDirectory = function() {
1677
1683
  return Object.keys(dependencyGraph).filter(function(p) {
1678
- return import_node_path5.default.relative(absolutePathToEmailsDirectory, p).startsWith("..");
1684
+ return import_node_path6.default.relative(absolutePathToEmailsDirectory, p).startsWith("..");
1679
1685
  });
1680
1686
  };
1681
1687
  filesOutsideEmailsDirectory = getFilesOutsideEmailsDirectory();
@@ -1728,13 +1734,13 @@ var setupHotreloading = function() {
1728
1734
  return _ts_generator(this, function(_state) {
1729
1735
  switch(_state.label){
1730
1736
  case 0:
1731
- file = relativePathToChangeTarget.split(import_node_path5.default.sep);
1737
+ file = relativePathToChangeTarget.split(import_node_path6.default.sep);
1732
1738
  if (file.length === 0) {
1733
1739
  return [
1734
1740
  2
1735
1741
  ];
1736
1742
  }
1737
- pathToChangeTarget = import_node_path5.default.resolve(absolutePathToEmailsDirectory, relativePathToChangeTarget);
1743
+ pathToChangeTarget = import_node_path6.default.resolve(absolutePathToEmailsDirectory, relativePathToChangeTarget);
1738
1744
  return [
1739
1745
  4,
1740
1746
  updateDependencyGraph(event, pathToChangeTarget)
@@ -1797,7 +1803,7 @@ var setupHotreloading = function() {
1797
1803
  dependentPath = _step2.value;
1798
1804
  changes.push({
1799
1805
  event: "change",
1800
- filename: import_node_path5.default.relative(absolutePathToEmailsDirectory, dependentPath)
1806
+ filename: import_node_path6.default.relative(absolutePathToEmailsDirectory, dependentPath)
1801
1807
  });
1802
1808
  }
1803
1809
  } catch (err) {
@@ -1859,7 +1865,7 @@ var dev = function() {
1859
1865
  return [
1860
1866
  4,
1861
1867
  startDevServer(emailsDirRelativePath, emailsDirRelativePath, // defaults to ./emails/static for the static files that are served to the preview
1862
- parseInt(port))
1868
+ Number.parseInt(port))
1863
1869
  ];
1864
1870
  case 2:
1865
1871
  devServer2 = _state.sent();
@@ -1894,7 +1900,7 @@ var dev = function() {
1894
1900
  }();
1895
1901
  // src/cli/commands/export.ts
1896
1902
  var import_node_fs7 = __toESM(require("fs"));
1897
- var import_node_path8 = __toESM(require("path"));
1903
+ var import_node_path9 = __toESM(require("path"));
1898
1904
  var import_glob = require("glob");
1899
1905
  var import_esbuild = require("esbuild");
1900
1906
  var import_ora2 = __toESM(require("ora"));
@@ -1902,11 +1908,12 @@ var import_log_symbols3 = __toESM(require("log-symbols"));
1902
1908
  var import_normalize_path = __toESM(require("normalize-path"));
1903
1909
  // src/actions/get-emails-directory-metadata.ts
1904
1910
  var import_node_fs5 = __toESM(require("fs"));
1905
- var import_node_path6 = __toESM(require("path"));
1911
+ var import_node_path7 = __toESM(require("path"));
1912
+ var import_react = require("react");
1906
1913
  var isFileAnEmail = function(fullPath) {
1907
1914
  var stat = import_node_fs5.default.statSync(fullPath);
1908
1915
  if (stat.isDirectory()) return false;
1909
- var ext = import_node_path6.default.parse(fullPath).ext;
1916
+ var ext = import_node_path7.default.parse(fullPath).ext;
1910
1917
  if (![
1911
1918
  ".js",
1912
1919
  ".tsx",
@@ -1923,12 +1930,12 @@ var mergeDirectoriesWithSubDirectories = function(emailsDirectoryMetadata) {
1923
1930
  while(currentResultingMergedDirectory.emailFilenames.length === 0 && currentResultingMergedDirectory.subDirectories.length === 1){
1924
1931
  var onlySubDirectory = currentResultingMergedDirectory.subDirectories[0];
1925
1932
  currentResultingMergedDirectory = _object_spread_props(_object_spread({}, onlySubDirectory), {
1926
- directoryName: import_node_path6.default.join(currentResultingMergedDirectory.directoryName, onlySubDirectory.directoryName)
1933
+ directoryName: import_node_path7.default.join(currentResultingMergedDirectory.directoryName, onlySubDirectory.directoryName)
1927
1934
  });
1928
1935
  }
1929
1936
  return currentResultingMergedDirectory;
1930
1937
  };
1931
- var getEmailsDirectoryMetadata = function() {
1938
+ var getEmailsDirectoryMetadata = (0, import_react.cache)(function() {
1932
1939
  var _ref = _async_to_generator(function(absolutePathToEmailsDirectory) {
1933
1940
  var keepFileExtensions, isSubDirectory, baseDirectoryPath, dirents, emailFilenames, subDirectories, emailsMetadata;
1934
1941
  var _arguments = arguments;
@@ -1948,16 +1955,16 @@ var getEmailsDirectoryMetadata = function() {
1948
1955
  case 1:
1949
1956
  dirents = _state.sent();
1950
1957
  emailFilenames = dirents.filter(function(dirent) {
1951
- return isFileAnEmail(import_node_path6.default.join(absolutePathToEmailsDirectory, dirent.name));
1958
+ return isFileAnEmail(import_node_path7.default.join(absolutePathToEmailsDirectory, dirent.name));
1952
1959
  }).map(function(dirent) {
1953
- return keepFileExtensions ? dirent.name : dirent.name.replace(import_node_path6.default.extname(dirent.name), "");
1960
+ return keepFileExtensions ? dirent.name : dirent.name.replace(import_node_path7.default.extname(dirent.name), "");
1954
1961
  });
1955
1962
  return [
1956
1963
  4,
1957
1964
  Promise.all(dirents.filter(function(dirent) {
1958
1965
  return dirent.isDirectory() && !dirent.name.startsWith("_") && dirent.name !== "static";
1959
1966
  }).map(function(dirent) {
1960
- var direntAbsolutePath = import_node_path6.default.join(absolutePathToEmailsDirectory, dirent.name);
1967
+ var direntAbsolutePath = import_node_path7.default.join(absolutePathToEmailsDirectory, dirent.name);
1961
1968
  return getEmailsDirectoryMetadata(direntAbsolutePath, keepFileExtensions, true, baseDirectoryPath);
1962
1969
  }))
1963
1970
  ];
@@ -1965,8 +1972,8 @@ var getEmailsDirectoryMetadata = function() {
1965
1972
  subDirectories = _state.sent();
1966
1973
  emailsMetadata = {
1967
1974
  absolutePath: absolutePathToEmailsDirectory,
1968
- relativePath: import_node_path6.default.relative(baseDirectoryPath, absolutePathToEmailsDirectory),
1969
- directoryName: absolutePathToEmailsDirectory.split(import_node_path6.default.sep).pop(),
1975
+ relativePath: import_node_path7.default.relative(baseDirectoryPath, absolutePathToEmailsDirectory),
1976
+ directoryName: absolutePathToEmailsDirectory.split(import_node_path7.default.sep).pop(),
1970
1977
  emailFilenames: emailFilenames,
1971
1978
  subDirectories: subDirectories
1972
1979
  };
@@ -1977,12 +1984,12 @@ var getEmailsDirectoryMetadata = function() {
1977
1984
  }
1978
1985
  });
1979
1986
  });
1980
- return function getEmailsDirectoryMetadata(absolutePathToEmailsDirectory) {
1987
+ return function(absolutePathToEmailsDirectory) {
1981
1988
  return _ref.apply(this, arguments);
1982
1989
  };
1983
- }();
1990
+ }());
1984
1991
  // src/utils/esbuild/renderring-utilities-exporter.ts
1985
- var import_node_path7 = __toESM(require("path"));
1992
+ var import_node_path8 = __toESM(require("path"));
1986
1993
  var import_node_fs6 = require("fs");
1987
1994
  // src/utils/esbuild/escape-string-for-regex.ts
1988
1995
  function escapeStringForRegex(string) {
@@ -2016,7 +2023,7 @@ var renderingUtilitiesExporter = function(emailTemplates) {
2016
2023
  (_tmp.contents = _1.apply(_, [
2017
2024
  _state.sent(),
2018
2025
  ";\n export { render } from 'react-email-module-that-will-export-render'\n export { createElement as reactEmailCreateReactElement } from 'react';\n "
2019
- ]), _tmp.loader = import_node_path7.default.extname(pathToFile).slice(1), _tmp)
2026
+ ]), _tmp.loader = import_node_path8.default.extname(pathToFile).slice(1), _tmp)
2020
2027
  ];
2021
2028
  }
2022
2029
  });
@@ -2078,7 +2085,7 @@ var renderingUtilitiesExporter = function(emailTemplates) {
2078
2085
  var getEmailTemplatesFromDirectory = function(emailDirectory) {
2079
2086
  var templatePaths = [];
2080
2087
  emailDirectory.emailFilenames.forEach(function(filename) {
2081
- return templatePaths.push(import_node_path8.default.join(emailDirectory.absolutePath, filename));
2088
+ return templatePaths.push(import_node_path9.default.join(emailDirectory.absolutePath, filename));
2082
2089
  });
2083
2090
  emailDirectory.subDirectories.forEach(function(directory) {
2084
2091
  var _templatePaths;
@@ -2103,7 +2110,7 @@ var exportTemplates = function() {
2103
2110
  }
2104
2111
  return [
2105
2112
  4,
2106
- getEmailsDirectoryMetadata(import_node_path8.default.resolve(process.cwd(), emailsDirectoryPath), true)
2113
+ getEmailsDirectoryMetadata(import_node_path9.default.resolve(process.cwd(), emailsDirectoryPath), true)
2107
2114
  ];
2108
2115
  case 1:
2109
2116
  emailsDirectoryMetadata = _state.sent();
@@ -2298,12 +2305,12 @@ var exportTemplates = function() {
2298
2305
  spinner.text = "Copying static files";
2299
2306
  spinner.render();
2300
2307
  }
2301
- staticDirectoryPath = import_node_path8.default.join(emailsDirectoryPath, "static");
2308
+ staticDirectoryPath = import_node_path9.default.join(emailsDirectoryPath, "static");
2302
2309
  if (!import_node_fs7.default.existsSync(staticDirectoryPath)) return [
2303
2310
  3,
2304
2311
  25
2305
2312
  ];
2306
- pathToDumpStaticFilesInto = import_node_path8.default.join(pathToWhereEmailMarkupShouldBeDumped, "static");
2313
+ pathToDumpStaticFilesInto = import_node_path9.default.join(pathToWhereEmailMarkupShouldBeDumped, "static");
2307
2314
  if (!import_node_fs7.default.existsSync(pathToDumpStaticFilesInto)) return [
2308
2315
  3,
2309
2316
  22
@@ -2382,7 +2389,7 @@ var exportTemplates = function() {
2382
2389
  }();
2383
2390
  // src/cli/commands/build.ts
2384
2391
  var import_node_fs8 = __toESM(require("fs"));
2385
- var import_node_path9 = __toESM(require("path"));
2392
+ var import_node_path10 = __toESM(require("path"));
2386
2393
  var import_ora3 = __toESM(require("ora"));
2387
2394
  var import_node_child_process = require("child_process");
2388
2395
  var import_log_symbols4 = __toESM(require("log-symbols"));
@@ -2415,7 +2422,7 @@ var setNextEnvironmentVariablesForBuild = function() {
2415
2422
  nextConfigContents = "\nconst path = require('path');\nconst emailsDirRelativePath = path.normalize('".concat(emailsDirRelativePath, "');\nconst userProjectLocation = path.resolve(process.cwd(), '../');\n/** @type {import('next').NextConfig} */\nmodule.exports = {\n env: {\n NEXT_PUBLIC_IS_BUILDING: 'true',\n EMAILS_DIR_RELATIVE_PATH: emailsDirRelativePath,\n EMAILS_DIR_ABSOLUTE_PATH: path.resolve(userProjectLocation, emailsDirRelativePath),\n USER_PROJECT_LOCATION: userProjectLocation\n },\n // this is needed so that the code for building emails works properly\n webpack: (\n /** @type {import('webpack').Configuration & { externals: string[] }} */\n config,\n { isServer }\n ) => {\n if (isServer) {\n config.externals.push('esbuild');\n }\n\n return config;\n },\n typescript: {\n ignoreBuildErrors: true\n },\n eslint: {\n ignoreDuringBuilds: true\n },\n experimental: {\n webpackBuildWorker: true\n },\n}");
2416
2423
  return [
2417
2424
  4,
2418
- import_node_fs8.default.promises.writeFile(import_node_path9.default.resolve(builtPreviewAppPath, "./next.config.js"), nextConfigContents, "utf8")
2425
+ import_node_fs8.default.promises.writeFile(import_node_path10.default.resolve(builtPreviewAppPath, "./next.config.js"), nextConfigContents, "utf8")
2419
2426
  ];
2420
2427
  case 1:
2421
2428
  _state.sent();
@@ -2433,7 +2440,7 @@ var getEmailSlugsFromEmailDirectory = function(emailDirectory, emailsDirectoryAb
2433
2440
  var directoryPathRelativeToEmailsDirectory = emailDirectory.absolutePath.replace(emailsDirectoryAbsolutePath, "").trim();
2434
2441
  var slugs = [];
2435
2442
  emailDirectory.emailFilenames.forEach(function(filename) {
2436
- return slugs.push(import_node_path9.default.join(directoryPathRelativeToEmailsDirectory, filename).split(import_node_path9.default.sep).filter(function(segment) {
2443
+ return slugs.push(import_node_path10.default.join(directoryPathRelativeToEmailsDirectory, filename).split(import_node_path10.default.sep).filter(function(segment) {
2437
2444
  return segment.length > 0;
2438
2445
  }));
2439
2446
  });
@@ -2491,19 +2498,19 @@ var forceSSGForEmailPreviews = function() {
2491
2498
  }();
2492
2499
  return [
2493
2500
  4,
2494
- removeForceDynamic(import_node_path9.default.resolve(builtPreviewAppPath, "./src/app/layout.tsx"))
2501
+ removeForceDynamic(import_node_path10.default.resolve(builtPreviewAppPath, "./src/app/layout.tsx"))
2495
2502
  ];
2496
2503
  case 2:
2497
2504
  _state.sent();
2498
2505
  return [
2499
2506
  4,
2500
- removeForceDynamic(import_node_path9.default.resolve(builtPreviewAppPath, "./src/app/preview/[...slug]/page.tsx"))
2507
+ removeForceDynamic(import_node_path10.default.resolve(builtPreviewAppPath, "./src/app/preview/[...slug]/page.tsx"))
2501
2508
  ];
2502
2509
  case 3:
2503
2510
  _state.sent();
2504
2511
  return [
2505
2512
  4,
2506
- import_node_fs8.default.promises.appendFile(import_node_path9.default.resolve(builtPreviewAppPath, "./src/app/preview/[...slug]/page.tsx"), "\n\nexport function generateStaticParams() { \n return Promise.resolve(\n ".concat(JSON.stringify(parameters), "\n );\n}"), "utf8")
2513
+ import_node_fs8.default.promises.appendFile(import_node_path10.default.resolve(builtPreviewAppPath, "./src/app/preview/[...slug]/page.tsx"), "\n\nexport function generateStaticParams() { \n return Promise.resolve(\n ".concat(JSON.stringify(parameters), "\n );\n}"), "utf8")
2507
2514
  ];
2508
2515
  case 4:
2509
2516
  _state.sent();
@@ -2523,7 +2530,7 @@ var updatePackageJson = function() {
2523
2530
  return _ts_generator(this, function(_state) {
2524
2531
  switch(_state.label){
2525
2532
  case 0:
2526
- packageJsonPath = import_node_path9.default.resolve(builtPreviewAppPath, "./package.json");
2533
+ packageJsonPath = import_node_path10.default.resolve(builtPreviewAppPath, "./package.json");
2527
2534
  _ = JSON.parse;
2528
2535
  return [
2529
2536
  4,
@@ -2559,36 +2566,25 @@ var npmInstall = function() {
2559
2566
  return _ts_generator(this, function(_state) {
2560
2567
  return [
2561
2568
  2,
2562
- new Promise(function() {
2563
- var _ref = _async_to_generator(function(resolve, reject) {
2564
- var childProc;
2565
- return _ts_generator(this, function(_state) {
2566
- childProc = (0, import_node_child_process.spawn)(packageManager, [
2567
- "install",
2568
- "--silent",
2569
- "--include=dev"
2570
- ], {
2571
- cwd: builtPreviewAppPath,
2572
- shell: true
2573
- });
2574
- childProc.stdout.pipe(process.stdout);
2575
- childProc.stderr.pipe(process.stderr);
2576
- childProc.on("close", function(code) {
2577
- if (code === 0) {
2578
- resolve();
2579
- } else {
2580
- reject(new Error("Unable to install the dependencies and it exited with code: ".concat(code)));
2581
- }
2582
- });
2583
- return [
2584
- 2
2585
- ];
2586
- });
2569
+ new Promise(function(resolve, reject) {
2570
+ var childProc = (0, import_node_child_process.spawn)(packageManager, [
2571
+ "install",
2572
+ "--silent",
2573
+ "--include=dev"
2574
+ ], {
2575
+ cwd: builtPreviewAppPath,
2576
+ shell: true
2587
2577
  });
2588
- return function(resolve, reject) {
2589
- return _ref.apply(this, arguments);
2590
- };
2591
- }())
2578
+ childProc.stdout.pipe(process.stdout);
2579
+ childProc.stderr.pipe(process.stderr);
2580
+ childProc.on("close", function(code) {
2581
+ if (code === 0) {
2582
+ resolve();
2583
+ } else {
2584
+ reject(new Error("Unable to install the dependencies and it exited with code: ".concat(code)));
2585
+ }
2586
+ });
2587
+ })
2592
2588
  ];
2593
2589
  });
2594
2590
  });
@@ -2620,9 +2616,9 @@ var build2 = function() {
2620
2616
  if (!import_node_fs8.default.existsSync(emailsDirRelativePath)) {
2621
2617
  process.exit(1);
2622
2618
  }
2623
- emailsDirPath = import_node_path9.default.join(process.cwd(), emailsDirRelativePath);
2624
- staticPath = import_node_path9.default.join(emailsDirPath, "static");
2625
- builtPreviewAppPath = import_node_path9.default.join(process.cwd(), ".react-email");
2619
+ emailsDirPath = import_node_path10.default.join(process.cwd(), emailsDirRelativePath);
2620
+ staticPath = import_node_path10.default.join(emailsDirPath, "static");
2621
+ builtPreviewAppPath = import_node_path10.default.join(process.cwd(), ".react-email");
2626
2622
  if (!import_node_fs8.default.existsSync(builtPreviewAppPath)) return [
2627
2623
  3,
2628
2624
  3
@@ -2655,7 +2651,7 @@ var build2 = function() {
2655
2651
  6
2656
2652
  ];
2657
2653
  spinner.text = "Copying `static` folder into `.react-email/public/static`";
2658
- builtStaticDirectory = import_node_path9.default.resolve(builtPreviewAppPath, "./public/static");
2654
+ builtStaticDirectory = import_node_path10.default.resolve(builtPreviewAppPath, "./public/static");
2659
2655
  return [
2660
2656
  4,
2661
2657
  import_node_fs8.default.promises.cp(staticPath, builtStaticDirectory, {
@@ -2729,7 +2725,7 @@ var build2 = function() {
2729
2725
  }();
2730
2726
  // src/cli/commands/start.ts
2731
2727
  var import_node_fs9 = __toESM(require("fs"));
2732
- var import_node_path10 = __toESM(require("path"));
2728
+ var import_node_path11 = __toESM(require("path"));
2733
2729
  var import_node_child_process2 = require("child_process");
2734
2730
  var start = function() {
2735
2731
  var _ref = _async_to_generator(function() {
@@ -2737,7 +2733,7 @@ var start = function() {
2737
2733
  return _ts_generator(this, function(_state) {
2738
2734
  try {
2739
2735
  usersProjectLocation = process.cwd();
2740
- builtPreviewPath = import_node_path10.default.resolve(usersProjectLocation, "./.react-email");
2736
+ builtPreviewPath = import_node_path11.default.resolve(usersProjectLocation, "./.react-email");
2741
2737
  if (!import_node_fs9.default.existsSync(builtPreviewPath)) {
2742
2738
  console.error("Could not find .react-email, maybe you haven't ran email build?");
2743
2739
  process.exit(1);