use chunks:all in webpack splitChunks (#193)

* use chunks:all in webpack splitChunks

* tweak webpack settings
This commit is contained in:
Nolan Lawson 2018-04-20 23:35:07 -07:00 committed by GitHub
parent 1f6e7066ed
commit bf36667002
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 4 deletions

View File

@ -65,12 +65,16 @@ module.exports = {
} }
}), }),
new OptimizeCSSAssetsPlugin({}) new OptimizeCSSAssetsPlugin({})
] ],
splitChunks: {
chunks: 'async',
minSize: 5000,
maxAsyncRequests: Infinity,
maxInitialRequests: Infinity
}
}, },
plugins: [ plugins: [
new LodashModuleReplacementPlugin({ new LodashModuleReplacementPlugin()
caching: true
})
].concat(isDev ? [ ].concat(isDev ? [
new webpack.HotModuleReplacementPlugin({ new webpack.HotModuleReplacementPlugin({
requestTimeout: 120000 requestTimeout: 120000