Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
fix for vercel/next.js#25484 using
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavkgrd committed Aug 27, 2021
1 parent e3f903f commit 87d32e2
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,33 @@ module.exports = withSentryConfig(
webpack: (config) => {
config.output.hotUpdateMainFilename =
'static/webpack/[fullhash].[runtime].hot-update.json';

config.optimization.splitChunks = {
chunks: 'async',
minSize: 20000,
minRemainingSize: 0,
minChunks: 1,
maxAsyncRequests: 30,
maxInitialRequests: 30,
enforceSizeThreshold: 50000,
cacheGroups: {
defaultVendors: false,
default: false,
framework: {
chunks: 'all',
name: 'framework',
test: /(?<!node_modules.*)[\\/]node_modules[\\/](react|react-dom|scheduler|prop-types|use-subscription)[\\/]/,
priority: 40,
enforce: true,
},
commons: {
name: 'commons',
chunks: 'initial',
minChunks: 20,
priority: 20,
},
},
};
return config;
},

Expand Down

0 comments on commit 87d32e2

Please sign in to comment.