From 3eb019365f40f70fcf19713b03181861dabfb22f Mon Sep 17 00:00:00 2001 From: Jimmy Lai Date: Wed, 6 Sep 2023 15:18:35 +0200 Subject: [PATCH 1/2] tweak config --- packages/next/src/build/webpack-config.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/next/src/build/webpack-config.ts b/packages/next/src/build/webpack-config.ts index e5e65b9a9cc13..3690de41534e3 100644 --- a/packages/next/src/build/webpack-config.ts +++ b/packages/next/src/build/webpack-config.ts @@ -1731,6 +1731,9 @@ export default async function getBaseWebpackConfig( reuseExistingChunk: true, test: /[\\/]node_modules[\\/]/, minSize: 0, + minChunks: 0, + maxAsyncRequests: 300, + maxInitialRequests: 300, name: (module: webpack.Module) => { const moduleId = module.nameForCondition()! const rootModule = extractRootNodeModule(moduleId) @@ -1743,6 +1746,9 @@ export default async function getBaseWebpackConfig( } }, }, + // disable the default chunk groups + default: false, + defaultVendors: false, }, } } From 3971cb3f8559c8eea44e5a5a29f92d4b7e085be6 Mon Sep 17 00:00:00 2001 From: Jimmy Lai Date: Wed, 6 Sep 2023 15:25:45 +0200 Subject: [PATCH 2/2] oops --- packages/next/src/build/webpack-config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/next/src/build/webpack-config.ts b/packages/next/src/build/webpack-config.ts index 3690de41534e3..f1f053d05eb9b 100644 --- a/packages/next/src/build/webpack-config.ts +++ b/packages/next/src/build/webpack-config.ts @@ -1731,7 +1731,7 @@ export default async function getBaseWebpackConfig( reuseExistingChunk: true, test: /[\\/]node_modules[\\/]/, minSize: 0, - minChunks: 0, + minChunks: 1, maxAsyncRequests: 300, maxInitialRequests: 300, name: (module: webpack.Module) => {