From 54ab3bc5be3f2e1313a3af6f6d7461cf1c61778d Mon Sep 17 00:00:00 2001 From: Andrew Cherniavskii Date: Thu, 28 Jun 2018 15:19:39 +0200 Subject: [PATCH] Fix code splitting on Windows (#4685) Closes #4684 --- build/webpack.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/webpack.js b/build/webpack.js index 96e3d7c8..ff5549ba 100644 --- a/build/webpack.js +++ b/build/webpack.js @@ -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 )