Commit 54ab3bc5 authored by Andrew Cherniavskii's avatar Andrew Cherniavskii Committed by Tim Neutkens

Fix code splitting on Windows (#4685)

Closes #4684
parent e98a877e
...@@ -207,8 +207,9 @@ export default async function getBaseWebpackConfig (dir: string, {dev = false, i ...@@ -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 // Because _app.js is used on every page we don't want to
// duplicate them in other bundles. // duplicate them in other bundles.
const chunks = module.getChunks() const chunks = module.getChunks()
const appBundlePath = path.normalize('bundles/pages/_app.js')
const inAppBundle = chunks.some(chunk => chunk.entryModule const inAppBundle = chunks.some(chunk => chunk.entryModule
? chunk.entryModule.name === 'bundles/pages/_app.js' ? chunk.entryModule.name === appBundlePath
: null : null
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment