Skip to content

Commit a2cb0ef

Browse files
committed
updates react.shared-subset to react.react-server
1 parent 357370d commit a2cb0ef

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

packages/next-swc/crates/next-core/src/next_import_map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ async fn rsc_aliases(
660660

661661
if runtime == NextRuntime::Edge {
662662
if matches!(ty, ServerContextType::AppRSC { .. }) {
663-
alias["react"] = format!("next/dist/compiled/react{react_channel}/react.shared-subset");
663+
alias["react"] = format!("next/dist/compiled/react{react_channel}/react.react-server");
664664
}
665665
// Use server rendering stub for RSC and SSR
666666
// x-ref: https://github.com/facebook/react/pull/25436

packages/next/src/build/create-compiler-aliases.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ export function createRSCAliases(
290290
if (layer === WEBPACK_LAYERS.reactServerComponents) {
291291
alias[
292292
'react$'
293-
] = `next/dist/compiled/react${bundledReactChannel}/react.shared-subset`
293+
] = `next/dist/compiled/react${bundledReactChannel}/react.react-server`
294294
}
295295
// Use server rendering stub for RSC and SSR
296296
// x-ref: https://github.com/facebook/react/pull/25436

packages/next/webpack.config.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const appExternals = [
3232
function makeAppAliases(reactChannel = '') {
3333
return {
3434
react$: `next/dist/compiled/react${reactChannel}`,
35-
'react/shared-subset$': `next/dist/compiled/react${reactChannel}/react.shared-subset`,
35+
'react/react.react-server$': `next/dist/compiled/react${reactChannel}/react.react-server`,
3636
'react-dom/server-rendering-stub$': `next/dist/compiled/react-dom${reactChannel}/server-rendering-stub`,
3737
'react-dom$': `next/dist/compiled/react-dom${reactChannel}/server-rendering-stub`,
3838
'react/jsx-runtime$': `next/dist/compiled/react${reactChannel}/jsx-runtime`,
@@ -235,10 +235,10 @@ module.exports = ({ dev, turbo, bundleType, experimental }) => {
235235
alias: {
236236
react$: `next/dist/compiled/react${
237237
experimental ? '-experimental' : ''
238-
}/react.shared-subset`,
238+
}/react.react-server`,
239239
'next/dist/compiled/react$': `next/dist/compiled/react${
240240
experimental ? '-experimental' : ''
241-
}/react.shared-subset`,
241+
}/react.react-server`,
242242
},
243243
},
244244
layer: 'react-server',
@@ -250,10 +250,10 @@ module.exports = ({ dev, turbo, bundleType, experimental }) => {
250250
alias: {
251251
react$: `next/dist/compiled/react${
252252
experimental ? '-experimental' : ''
253-
}/react.shared-subset`,
253+
}/react.react-server`,
254254
'next/dist/compiled/react$': `next/dist/compiled/react${
255255
experimental ? '-experimental' : ''
256-
}/react.shared-subset`,
256+
}/react.react-server`,
257257
},
258258
},
259259
},

0 commit comments

Comments
 (0)