On this page

Options object for describing behavior of a cache group selecting modules that should be cached together.

Type:string

Sets the name delimiter for created chunks.

Type:RegExp | "async" | "all" | "initial" | ((chunk: Chunk) => boolean | undefined)

Select chunks for determining cache group content (defaults to "initial", "initial" and "all" requires adding these chunks to the HTML).

Type:boolean

Ignore minimum size, minimum chunks and maximum requests and always create chunks for this cache group.

Type:number | { [index: string]: number }

Size threshold at which splitting is enforced and other restrictions (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.

Sets the template for the filename for created chunks.

Type:string

Sets the hint for chunk id.

Type:string | RegExp | ((layer: string | null) => boolean)

Assign modules to a cache group by module layer.

Type:number

Maximum number of requests which are accepted for on-demand loading.

Type:number | { [index: string]: number }

Maximal size hint for the on-demand chunks.

Type:number

Maximum number of initial chunks which are accepted for an entry point.

Type:number | { [index: string]: number }

Maximal size hint for the initial chunks.

Type:number | { [index: string]: number }

Maximal size hint for the created chunks.

Type:number

Minimum number of times a module has to be duplicated until it's considered for splitting.

Type:number | { [index: string]: number }

Minimal size for the chunks the stay after moving the modules to a new chunk.

Type:number | { [index: string]: number }

Minimal size for the created chunk.

Type:number | { [index: string]: number }

Minimum size reduction due to the created chunk.

Type:string | false | ((module: Module, chunks: Chunk[], key: string) => string | undefined)

Give chunks for this cache group a name (chunks with equal name are merged).

Type:number

Priority of this cache group.

Type:boolean

Try to reuse existing chunk (with name) when it has matching modules.

Type:string | RegExp | ((module: Module, context: CacheGroupsContext) => boolean)

Assign modules to a cache group by module name.

Type:string | RegExp | ((type: string) => boolean)

Assign modules to a cache group by module type.

Type:boolean

Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal.