mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Move react{-dom,} to the common chunk in production too (#3690)
Without this, react-dom gets included in multiple pages.
This commit is contained in:
parent
efed85e495
commit
8942d20b8c
|
@ -250,11 +250,11 @@ export default async function getBaseWebpackConfig (dir, {dev = false, isServer
|
|||
// We need to move react-dom explicitly into common chunks.
|
||||
// Otherwise, if some other page or module uses it, it might
|
||||
// included in that bundle too.
|
||||
if (dev && module.context && module.context.indexOf(`${sep}react${sep}`) >= 0) {
|
||||
if (module.context && module.context.indexOf(`${sep}react${sep}`) >= 0) {
|
||||
return true
|
||||
}
|
||||
|
||||
if (dev && module.context && module.context.indexOf(`${sep}react-dom${sep}`) >= 0) {
|
||||
if (module.context && module.context.indexOf(`${sep}react-dom${sep}`) >= 0) {
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue