react-email 4.2.1 → 4.2.2

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # react-email
2
2
 
3
+ ## 4.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - eb7f0ac: dev server erroring when trying to startup with port already being used
8
+
3
9
  ## 4.2.1
4
10
 
5
11
  ## 4.2.0
package/dist/index.js CHANGED
@@ -106,7 +106,7 @@ import prompts from "prompts";
106
106
  // package.json
107
107
  var package_default = {
108
108
  name: "react-email",
109
- version: "4.2.1",
109
+ version: "4.2.2",
110
110
  description: "A live preview of your emails right in your browser.",
111
111
  bin: {
112
112
  email: "./dist/index.js"
@@ -934,7 +934,6 @@ var startDevServer = async (emailsDirRelativePath, staticBaseDirRelativePath, po
934
934
  }
935
935
  const previewServerLocation = await getPreviewServerLocation();
936
936
  const previewServer = createJiti2(previewServerLocation);
937
- const { default: next } = await previewServer.import("next");
938
937
  devServer = http.createServer((req, res) => {
939
938
  if (!req.url) {
940
939
  res.end(404);
@@ -1005,6 +1004,12 @@ var startDevServer = async (emailsDirRelativePath, staticBaseDirRelativePath, po
1005
1004
  process.cwd()
1006
1005
  )
1007
1006
  };
1007
+ const next = await previewServer.import(
1008
+ "next",
1009
+ {
1010
+ default: true
1011
+ }
1012
+ );
1008
1013
  const app = next({
1009
1014
  // passing in env here does not get the environment variables there
1010
1015
  dev: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-email",
3
- "version": "4.2.1",
3
+ "version": "4.2.2",
4
4
  "description": "A live preview of your emails right in your browser.",
5
5
  "bin": {
6
6
  "email": "./dist/index.js"
@@ -43,9 +43,6 @@ export const startDevServer = async (
43
43
  const previewServerLocation = await getPreviewServerLocation();
44
44
  const previewServer = createJiti(previewServerLocation);
45
45
 
46
- const { default: next } =
47
- await previewServer.import<typeof import('next')>('next');
48
-
49
46
  devServer = http.createServer((req, res) => {
50
47
  if (!req.url) {
51
48
  res.end(404);
@@ -137,6 +134,13 @@ export const startDevServer = async (
137
134
  ),
138
135
  };
139
136
 
137
+ const next = await previewServer.import<typeof import('next')['default']>(
138
+ 'next',
139
+ {
140
+ default: true,
141
+ },
142
+ );
143
+
140
144
  const app = next({
141
145
  // passing in env here does not get the environment variables there
142
146
  dev: false,