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

Hierarchy

  • OptimizationSplitChunksCacheGroup

Properties

automaticNameDelimiter?: string

Sets the name delimiter for created chunks.

chunks?: "all" | "initial" | "async" | ((chunk) => boolean)

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

Type declaration

    • (chunk): boolean
    • Parameters

      Returns boolean

enforce?: boolean

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

enforceSizeThreshold?: number | {
    [index: string]: number;
}

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

Type declaration

  • [index: string]: number
filename?: string | ((pathData, assetInfo?) => string)

Sets the template for the filename for created chunks.

Type declaration

    • (pathData, assetInfo?): string
    • Parameters

      Returns string

idHint?: string

Sets the hint for chunk id.

layer?: string | Function | RegExp

Assign modules to a cache group by module layer.

maxAsyncRequests?: number

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

maxAsyncSize?: number | {
    [index: string]: number;
}

Maximal size hint for the on-demand chunks.

Type declaration

  • [index: string]: number
maxInitialRequests?: number

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

maxInitialSize?: number | {
    [index: string]: number;
}

Maximal size hint for the initial chunks.

Type declaration

  • [index: string]: number
maxSize?: number | {
    [index: string]: number;
}

Maximal size hint for the created chunks.

Type declaration

  • [index: string]: number
minChunks?: number

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

minRemainingSize?: number | {
    [index: string]: number;
}

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

Type declaration

  • [index: string]: number
minSize?: number | {
    [index: string]: number;
}

Minimal size for the created chunk.

Type declaration

  • [index: string]: number
minSizeReduction?: number | {
    [index: string]: number;
}

Minimum size reduction due to the created chunk.

Type declaration

  • [index: string]: number
name?: string | false | Function

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

priority?: number

Priority of this cache group.

reuseExistingChunk?: boolean

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

test?: string | Function | RegExp

Assign modules to a cache group by module name.

type?: string | Function | RegExp

Assign modules to a cache group by module type.

usedExports?: boolean

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

Generated using TypeDoc