From 00063e85b5b6079a1cd43326b5d60a249c96d11a Mon Sep 17 00:00:00 2001 From: ClarkXia Date: Thu, 31 Oct 2024 11:08:42 +0800 Subject: [PATCH] fix: update comment --- packages/rspack-config/src/splitChunks.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/rspack-config/src/splitChunks.ts b/packages/rspack-config/src/splitChunks.ts index 5224596212..9d2787ee95 100644 --- a/packages/rspack-config/src/splitChunks.ts +++ b/packages/rspack-config/src/splitChunks.ts @@ -87,7 +87,9 @@ export const getVendorStrategy = (options: Configuration['splitChunks']) => { const getSplitChunks = (_: string, strategy: string | boolean) => { if (strategy === false) { - return { minChunks: Infinity, cacheGroups: { default: false } }; + // Set minChunks to a large number to disable the splitChunks feature. + // the value of Infinity is not work properly for this version of rspack. + return { minChunks: 100000, cacheGroups: { default: false } }; } else if (typeof strategy === 'string' && ['page-vendors', 'vendors'].includes(strategy)) { const splitChunksOptions = strategy === 'page-vendors' ? { chunks: 'all' } : {}; return getVendorStrategy(splitChunksOptions);