Skip to content

Commit

Permalink
fix: splitChunk config in speedup mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ClarkXia committed Oct 31, 2024
1 parent 9e7615b commit da64db6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/breezy-ants-clap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@ice/rspack-config': patch
---

fix: update splitChunk config
2 changes: 1 addition & 1 deletion packages/rspack-config/src/splitChunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const getVendorStrategy = (options: Configuration['splitChunks']) => {
const getSplitChunks = (_: string, strategy: string | boolean) => {
if (strategy === false) {
// Empty splitChunks configuration if strategy is false.
return {};
return { minChunks: Infinity, 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 da64db6

Please sign in to comment.