Webpack 4 chunk configuration.

This commit is contained in:
Alexis Lahouze 2018-06-09 23:54:01 +02:00
parent df85d72217
commit d6f895c535
1 changed files with 6 additions and 4 deletions

View File

@ -100,6 +100,12 @@ module.exports = {
}]
},
optimization: {
splitChunks: {
name: true
}
},
plugins: [
// Workaround for angular/angular#11580
new webpack.ContextReplacementPlugin(
@ -109,10 +115,6 @@ module.exports = {
{} // a map of your routes
),
new webpack.optimize.CommonsChunkPlugin({
name: ['app', 'vendor', 'polyfills']
}),
new HtmlWebpackPlugin({
template: 'src/index.ejs'
})