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

Set the default minChunks values to the length of pages. (#350)

Earlier it was for all length of entry points.
But we add two more entry points for errors.
Because of that, moving common modules to commons.js won't work.
This commit is contained in:
Arunoda Susiripala 2016-12-06 14:55:01 +05:30 committed by Guillermo Rauch
parent edfdc482e3
commit 7086287eaf

View file

@ -44,7 +44,8 @@ export default async function createCompiler (dir, { hotReload = false, dev = fa
}),
new webpack.optimize.CommonsChunkPlugin({
name: 'commons',
filename: 'commons.js'
filename: 'commons.js',
minChunks: pages.length
})
]