1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Fix code splitting on Windows (#4685)

Closes #4684
This commit is contained in:
Andrew Cherniavskii 2018-06-28 15:19:39 +02:00 committed by Tim Neutkens
parent e98a877ee4
commit 54ab3bc5be

View file

@ -207,8 +207,9 @@ export default async function getBaseWebpackConfig (dir: string, {dev = false, i
// Because _app.js is used on every page we don't want to
// duplicate them in other bundles.
const chunks = module.getChunks()
const appBundlePath = path.normalize('bundles/pages/_app.js')
const inAppBundle = chunks.some(chunk => chunk.entryModule
? chunk.entryModule.name === 'bundles/pages/_app.js'
? chunk.entryModule.name === appBundlePath
: null
)