diff --git a/next.config.js b/next.config.js index f67eedac45..5df08d00d7 100644 --- a/next.config.js +++ b/next.config.js @@ -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: /(?