From 264a4334175fe7d32bdb97d8adb3c52bbd45037d Mon Sep 17 00:00:00 2001 From: eps1lon Date: Sun, 21 Apr 2024 14:50:52 +0200 Subject: [PATCH] More to alias --- packages/next/src/build/create-compiler-aliases.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) 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`, }) } }