Skip to content

Commit

Permalink
webpack chunk strategy optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
ashrafali-v committed Jul 29, 2022
1 parent ea08fe2 commit 7980377
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/core/build/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const plugins = ({ base, is_test_env, env }) => {
minChunkSize: 102400, // ~100kb
}),
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 15,
maxChunks: 10,
}),
new CircularDependencyPlugin({ exclude: /node_modules/, failOnError: true }),
...(IS_RELEASE
Expand Down
3 changes: 1 addition & 2 deletions packages/core/build/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ module.exports = function (env) {
chunks: 'all',
minSize: 102400,
minSizeReduction: 102400,
maxSize: 204800,
//enforceSizeThreshold: 240000,
minChunks: 1,
maxAsyncRequests: 5,
maxInitialRequests: 3,
Expand All @@ -49,6 +47,7 @@ module.exports = function (env) {
default: {
minChunks: 2,
minSize: 102400,
enforceSizeThreshold: 500000,
priority: -20,
reuseExistingChunk: true,
},
Expand Down

0 comments on commit 7980377

Please sign in to comment.