Skip to content

Commit

Permalink
use webpack alias
Browse files Browse the repository at this point in the history
  • Loading branch information
shuding committed Nov 5, 2021
1 parent cf77f25 commit 3e146d9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
8 changes: 8 additions & 0 deletions packages/next/build/webpack-config.ts
Expand Up @@ -676,6 +676,14 @@ export default async function getBaseWebpackConfig(
false,
}
: {}),

...(webServerRuntime
? {
'react-dom/server': dev
? 'react-dom/cjs/react-dom-server.browser.development'
: 'react-dom/cjs/react-dom-server.browser.production.min',
}
: {}),
},
...(targetWeb
? {
Expand Down
13 changes: 0 additions & 13 deletions packages/next/server/react-dom-server.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/next/server/render.tsx
Expand Up @@ -2,7 +2,7 @@ import { IncomingMessage, ServerResponse } from 'http'
import { ParsedUrlQuery } from 'querystring'
import type { Writable as WritableType } from 'stream'
import React from 'react'
import ReactDOMServer from './react-dom-server'
import ReactDOMServer from 'react-dom/server'
import { StyleRegistry, createStyleRegistry } from 'styled-jsx'
import { UnwrapPromise } from '../lib/coalesced-function'
import {
Expand Down

0 comments on commit 3e146d9

Please sign in to comment.