diff --git a/packages/next/src/build/webpack/alias/react-dom-server-browser-experimental.js b/packages/next/src/build/webpack/alias/react-dom-server-browser-experimental.js index a5d6643a6c240..1dc8962e2c89c 100644 --- a/packages/next/src/build/webpack/alias/react-dom-server-browser-experimental.js +++ b/packages/next/src/build/webpack/alias/react-dom-server-browser-experimental.js @@ -1,11 +1,5 @@ -var l, s -if (process.env.NODE_ENV === 'production') { - l = require('next/dist/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.min.js') - s = require('next/dist/compiled/react-dom-experimental/cjs/react-dom-server.browser.production.min.js') -} else { - l = require('next/dist/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js') - s = require('next/dist/compiled/react-dom-experimental/cjs/react-dom-server.browser.development.js') -} +const l = require('next/dist/compiled/react-dom-experimental/server.browser') +const s = require('next/dist/compiled/react-dom-experimental/server.browser') exports.version = l.version exports.renderToString = l.renderToString diff --git a/packages/next/src/build/webpack/alias/react-dom-server-browser.js b/packages/next/src/build/webpack/alias/react-dom-server-browser.js index f462b442ae41e..1dc8962e2c89c 100644 --- a/packages/next/src/build/webpack/alias/react-dom-server-browser.js +++ b/packages/next/src/build/webpack/alias/react-dom-server-browser.js @@ -1,11 +1,5 @@ -var l, s -if (process.env.NODE_ENV === 'production') { - l = require('next/dist/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.min.js') - s = require('next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js') -} else { - l = require('next/dist/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js') - s = require('next/dist/compiled/react-dom/cjs/react-dom-server.browser.development.js') -} +const l = require('next/dist/compiled/react-dom-experimental/server.browser') +const s = require('next/dist/compiled/react-dom-experimental/server.browser') exports.version = l.version exports.renderToString = l.renderToString diff --git a/packages/next/src/build/webpack/alias/react-dom-server-edge-experimental.js b/packages/next/src/build/webpack/alias/react-dom-server-edge-experimental.js index b14af3c288f1c..b4694eabd4e04 100644 --- a/packages/next/src/build/webpack/alias/react-dom-server-edge-experimental.js +++ b/packages/next/src/build/webpack/alias/react-dom-server-edge-experimental.js @@ -5,12 +5,7 @@ function error() { throw new Error(ERROR_MESSAGE) } -var b -if (process.env.NODE_ENV === 'production') { - b = require('next/dist/compiled/react-dom-experimental/cjs/react-dom-server.edge.production.min.js') -} else { - b = require('next/dist/compiled/react-dom-experimental/cjs/react-dom-server.edge.development.js') -} +const b = require('next/dist/compiled/react-dom-experimental/server.edge') exports.version = b.version exports.renderToReadableStream = b.renderToReadableStream diff --git a/packages/next/src/build/webpack/alias/react-dom-server-edge.js b/packages/next/src/build/webpack/alias/react-dom-server-edge.js index f6b6056bc271e..6b16f98bf1793 100644 --- a/packages/next/src/build/webpack/alias/react-dom-server-edge.js +++ b/packages/next/src/build/webpack/alias/react-dom-server-edge.js @@ -5,12 +5,7 @@ function error() { throw new Error(ERROR_MESSAGE) } -var b -if (process.env.NODE_ENV === 'production') { - b = require('next/dist/compiled/react-dom/cjs/react-dom-server.edge.production.min.js') -} else { - b = require('next/dist/compiled/react-dom/cjs/react-dom-server.edge.development.js') -} +const b = require('next/dist/compiled/react-dom/server.edge') exports.version = b.version exports.renderToReadableStream = b.renderToReadableStream