Search Docs
Object
{ strategy: 'split-by-experience' }
performance.chunkSplit 用于配置 Modern.js 的拆包策略。配置项的类型 ChunkSplit 如下:
performance.chunkSplit
ChunkSplit
type ForceSplitting = RegExp[] | Record<string, RegExp>; interface BaseChunkSplit { strategy?: | 'split-by-module' | 'split-by-experience' | 'all-in-one' | 'single-vendor'; override?: SplitChunks; forceSplitting?: ForceSplitting; } interface SplitBySize { strategy?: 'split-by-size'; minSize?: number; maxSize?: number; override?: SplitChunks; forceSplitting?: ForceSplitting; } interface SplitCustom { strategy?: 'custom'; splitChunks?: SplitChunks; forceSplitting?: ForceSplitting; } export type ChunkSplit = BaseChunkSplit | SplitBySize | SplitCustom;
该配置项的使用方式与 Rsbuild 完全一致。详细信息请参考 Rsbuild - performance.chunkSplit。