From 5142179acd1600dd09b70cf11db2a55e018a9ff7 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 18 Sep 2018 15:03:20 +0300 Subject: dynamic import --- vnext/webpack.config.js | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) (limited to 'vnext/webpack.config.js') diff --git a/vnext/webpack.config.js b/vnext/webpack.config.js index 4e55bbab..de878586 100644 --- a/vnext/webpack.config.js +++ b/vnext/webpack.config.js @@ -76,15 +76,26 @@ module.exports = { new OptimizeCSSAssetsPlugin({}) ], splitChunks: { - cacheGroups: { - vendor: { - test: /node_modules/, - chunks: 'initial', - name: 'vendor', - enforce: true - }, - } + chunks: 'all', + minSize: 30000, + maxSize: 0, + minChunks: 1, + maxAsyncRequests: 5, + maxInitialRequests: 3, + automaticNameDelimiter: '~', + name: true, + cacheGroups: { + vendors: { + test: /[\\/]node_modules[\\/]/, + priority: -10 + }, + default: { + minChunks: 2, + priority: -20, + reuseExistingChunk: true } + } + } }, plugins: [ new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), -- cgit v1.2.3