Interface: ChunkSplitCustom
Performance.chunkSplit is used to configure the chunk splitting strategy.
Deprecated
Use the top-level Config.splitChunks option instead.
Properties
splitChunks?
optionalsplitChunks?:false|OptimizationSplitChunksOptions
Custom Rspack chunk splitting config can be specified.
Default Value
Example
- Split
@lynx-js/reactandreact-routerinto chunklib-react.
strategy
strategy:
"custom"
The ChunkSplitting strategy.
Remarks
-
split-by-experience(Rsbuild default): an empirical splitting strategy, automatically splits some commonly used npm packages into chunks of moderate size. -
split-by-module: split by NPM package granularity, each NPM package corresponds to a chunk. -
split-by-size: automatically split according to module size. -
all-in-one: bundle all codes into one chunk. -
single-vendor: bundle all NPM packages into a single chunk. -
custom: custom chunk splitting strategy.