diff --git a/packages/next/src/build/create-compiler-aliases.ts b/packages/next/src/build/create-compiler-aliases.ts index cddfadbd34a46..f4f9714a991b6 100644 --- a/packages/next/src/build/create-compiler-aliases.ts +++ b/packages/next/src/build/create-compiler-aliases.ts @@ -273,19 +273,30 @@ export function createRSCAliases( if (layer === WEBPACK_LAYERS.serverSideRendering) { alias = Object.assign(alias, { 'react/jsx-runtime$': `next/dist/server/future/route-modules/app-page/vendored/${layer}/react-jsx-runtime`, + 'next/dist/compiled/react/jsx-runtime$': `next/dist/server/future/route-modules/app-page/vendored/${layer}/react-jsx-runtime`, 'react/jsx-dev-runtime$': `next/dist/server/future/route-modules/app-page/vendored/${layer}/react-jsx-dev-runtime`, + 'next/dist/compiled/react/jsx-dev-runtime$': `next/dist/server/future/route-modules/app-page/vendored/${layer}/react-jsx-dev-runtime`, react$: `next/dist/server/future/route-modules/app-page/vendored/${layer}/react`, + 'next/dist/compiled/react$': `next/dist/server/future/route-modules/app-page/vendored/${layer}/react`, 'react-dom$': `next/dist/server/future/route-modules/app-page/vendored/${layer}/react-dom`, + 'next/dist/compiled/react-dom$': `next/dist/server/future/route-modules/app-page/vendored/${layer}/react-dom`, 'react-server-dom-webpack/client.edge$': `next/dist/server/future/route-modules/app-page/vendored/${layer}/react-server-dom-webpack-client-edge`, + 'next/dist/compiled/react-server-dom-webpack/client.edge$': `next/dist/server/future/route-modules/app-page/vendored/${layer}/react-server-dom-webpack-client-edge`, }) } else if (layer === WEBPACK_LAYERS.reactServerComponents) { alias = Object.assign(alias, { 'react/jsx-runtime$': `next/dist/server/future/route-modules/app-page/vendored/${layer}/react-jsx-runtime`, + 'next/dist/compiled/react/jsx-runtime$': `next/dist/server/future/route-modules/app-page/vendored/${layer}/react-jsx-runtime`, 'react/jsx-dev-runtime$': `next/dist/server/future/route-modules/app-page/vendored/${layer}/react-jsx-dev-runtime`, + 'next/dist/compiled/react/jsx-dev-runtime$': `next/dist/server/future/route-modules/app-page/vendored/${layer}/react-jsx-dev-runtime`, react$: `next/dist/server/future/route-modules/app-page/vendored/${layer}/react`, + 'next/dist/compiled/react$': `next/dist/server/future/route-modules/app-page/vendored/${layer}/react`, 'react-dom$': `next/dist/server/future/route-modules/app-page/vendored/${layer}/react-dom`, + 'next/dist/compiled/react-dom$': `next/dist/server/future/route-modules/app-page/vendored/${layer}/react-dom`, 'react-server-dom-webpack/server.edge$': `next/dist/server/future/route-modules/app-page/vendored/${layer}/react-server-dom-webpack-server-edge`, + 'next/dist/compiled/react-server-dom-webpack/server.edge$': `next/dist/server/future/route-modules/app-page/vendored/${layer}/react-server-dom-webpack-server-edge`, 'react-server-dom-webpack/server.node$': `next/dist/server/future/route-modules/app-page/vendored/${layer}/react-server-dom-webpack-server-node`, + 'next/dist/compiled/react-server-dom-webpack/server.node$': `next/dist/server/future/route-modules/app-page/vendored/${layer}/react-server-dom-webpack-server-node`, }) } }