Skip to content

Commit

Permalink
Use react-dom directly instead of server-rendering-stub
Browse files Browse the repository at this point in the history
No longer needed now that facebook/react#28271 exists
  • Loading branch information
eps1lon committed Apr 29, 2024
1 parent a5e15d7 commit 5963cc9
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
5 changes: 0 additions & 5 deletions packages/next/src/build/create-compiler-aliases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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'

Expand Down
1 change: 0 additions & 1 deletion packages/next/types/react-dom.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
declare module 'react-dom/server-rendering-stub'
declare module 'react-dom/server.browser'

declare module 'react-dom/server.edge' {
Expand Down
3 changes: 1 addition & 2 deletions packages/next/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand Down

0 comments on commit 5963cc9

Please sign in to comment.