diff --git a/.changeset/wet-beans-run.md b/.changeset/wet-beans-run.md new file mode 100644 index 0000000000..9068421226 --- /dev/null +++ b/.changeset/wet-beans-run.md @@ -0,0 +1,5 @@ +--- +"@react-email/render": patch +--- + +Remove uncessary destructuring of react-dom/server diff --git a/packages/render/src/browser/render-async.tsx b/packages/render/src/browser/render-async.tsx index 9795b5fcd9..707255ec03 100644 --- a/packages/render/src/browser/render-async.tsx +++ b/packages/render/src/browser/render-async.tsx @@ -10,7 +10,7 @@ export const renderAsync = async ( options?: Options, ) => { const suspendedElement = {element}; - const { default: reactDOMServer } = await import("react-dom/server"); + const reactDOMServer = await import("react-dom/server"); let html!: string; if (Object.hasOwn(reactDOMServer, "renderToReadableStream")) { diff --git a/packages/render/src/browser/render.tsx b/packages/render/src/browser/render.tsx index c05f7c242d..b411820d42 100644 --- a/packages/render/src/browser/render.tsx +++ b/packages/render/src/browser/render.tsx @@ -53,7 +53,7 @@ export const render = async ( options?: Options, ) => { const suspendedElement = {element}; - const { default: reactDOMServer } = await import("react-dom/server"); + const reactDOMServer = await import("react-dom/server"); let html!: string; if (Object.hasOwn(reactDOMServer, "renderToReadableStream")) { diff --git a/packages/render/src/node/render-async.tsx b/packages/render/src/node/render-async.tsx index a81a6694ae..3bde9abfb8 100644 --- a/packages/render/src/node/render-async.tsx +++ b/packages/render/src/node/render-async.tsx @@ -13,7 +13,7 @@ export const renderAsync = async ( options?: Options, ) => { const suspendedElement = {element}; - const { default: reactDOMServer } = await import("react-dom/server"); + const reactDOMServer = await import("react-dom/server"); let html!: string; if (Object.hasOwn(reactDOMServer, "renderToReadableStream")) { diff --git a/packages/render/src/node/render.tsx b/packages/render/src/node/render.tsx index 693e4582f1..a97eaa0720 100644 --- a/packages/render/src/node/render.tsx +++ b/packages/render/src/node/render.tsx @@ -10,7 +10,7 @@ export const render = async ( options?: Options, ) => { const suspendedElement = {element}; - const { default: reactDOMServer } = await import("react-dom/server"); + const reactDOMServer = await import("react-dom/server"); let html!: string; if (Object.hasOwn(reactDOMServer, "renderToReadableStream")) {