diff --git a/packages/next-swc/crates/next-core/src/next_import_map.rs b/packages/next-swc/crates/next-core/src/next_import_map.rs index e80def16aed70..1d79dbc59e9b9 100644 --- a/packages/next-swc/crates/next-core/src/next_import_map.rs +++ b/packages/next-swc/crates/next-core/src/next_import_map.rs @@ -733,10 +733,6 @@ async fn rsc_aliases( alias["react"] = format!("next/dist/compiled/react{react_channel}/react.react-server"); alias["react-dom"] = format!("next/dist/compiled/react-dom{react_channel}/react-dom.react-server"); - } else { - // x-ref: https://github.com/facebook/react/pull/25436 - alias["react-dom"] = - format!("next/dist/compiled/react-dom{react_channel}/server-rendering-stub"); } } diff --git a/packages/next/src/build/create-compiler-aliases.ts b/packages/next/src/build/create-compiler-aliases.ts index 58730bb56479e..06451f01788f9 100644 --- a/packages/next/src/build/create-compiler-aliases.ts +++ b/packages/next/src/build/create-compiler-aliases.ts @@ -296,11 +296,6 @@ export function createRSCAliases( alias[ 'react-dom$' ] = `next/dist/compiled/react-dom${bundledReactChannel}/react-dom.react-server` - } else { - // x-ref: https://github.com/facebook/react/pull/25436 - alias[ - 'react-dom$' - ] = `next/dist/compiled/react-dom${bundledReactChannel}/server-rendering-stub` } } diff --git a/packages/next/src/server/future/route-modules/app-page/vendored/ssr/entrypoints.ts b/packages/next/src/server/future/route-modules/app-page/vendored/ssr/entrypoints.ts index 70f432fff4e88..4064bf693e272 100644 --- a/packages/next/src/server/future/route-modules/app-page/vendored/ssr/entrypoints.ts +++ b/packages/next/src/server/future/route-modules/app-page/vendored/ssr/entrypoints.ts @@ -1,5 +1,5 @@ import * as React from 'react' -import * as ReactDOM from 'react-dom/server-rendering-stub' +import * as ReactDOM from 'react-dom' import * as ReactJsxDevRuntime from 'react/jsx-dev-runtime' import * as ReactJsxRuntime from 'react/jsx-runtime' diff --git a/packages/next/types/react-dom.d.ts b/packages/next/types/react-dom.d.ts index a6b75b20a2b33..db0e969c00a28 100644 --- a/packages/next/types/react-dom.d.ts +++ b/packages/next/types/react-dom.d.ts @@ -1,4 +1,3 @@ -declare module 'react-dom/server-rendering-stub' declare module 'react-dom/server.browser' declare module 'react-dom/server.edge' { diff --git a/packages/next/webpack.config.js b/packages/next/webpack.config.js index 6aa204e738680..5737ff591aac0 100644 --- a/packages/next/webpack.config.js +++ b/packages/next/webpack.config.js @@ -33,8 +33,7 @@ function makeAppAliases(reactChannel = '') { return { react$: `next/dist/compiled/react${reactChannel}`, 'react/react.react-server$': `next/dist/compiled/react${reactChannel}/react.react-server`, - 'react-dom/server-rendering-stub$': `next/dist/compiled/react-dom${reactChannel}/server-rendering-stub`, - 'react-dom$': `next/dist/compiled/react-dom${reactChannel}/server-rendering-stub`, + 'react-dom$': `next/dist/compiled/react-dom${reactChannel}`, 'react/jsx-runtime$': `next/dist/compiled/react${reactChannel}/jsx-runtime`, 'react/jsx-dev-runtime$': `next/dist/compiled/react${reactChannel}/jsx-dev-runtime`, 'react-dom/client$': `next/dist/compiled/react-dom${reactChannel}/client`,