aboutsummaryrefslogtreecommitdiff
path: root/vnext/webpack.config.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-09-18 15:03:20 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:53 +0300
commit5142179acd1600dd09b70cf11db2a55e018a9ff7 (patch)
tree6620974d00b17780fbeec1f1e38a56e815093c94 /vnext/webpack.config.js
parent6fbd2409121ffb0b74e89ce5a6b167bb4b39f9eb (diff)
dynamic import
Diffstat (limited to 'vnext/webpack.config.js')
-rw-r--r--vnext/webpack.config.js27
1 files changed, 19 insertions, 8 deletions
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$/),