Skip to content

Commit

Permalink
fix: update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ClarkXia committed Oct 31, 2024
1 parent ca654d8 commit 00063e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/rspack-config/src/splitChunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 00063e8

Please sign in to comment.