From d6f895c535c75765b81ae38496f5d963d7e059b8 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Sat, 9 Jun 2018 23:54:01 +0200 Subject: [PATCH] Webpack 4 chunk configuration. --- config/webpack.common.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/config/webpack.common.js b/config/webpack.common.js index 5a0641e..e252374 100644 --- a/config/webpack.common.js +++ b/config/webpack.common.js @@ -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' })