Options
All
  • Public
  • Public/Protected
  • All
Menu

Options object for splitting chunks into smaller chunks.

Hierarchy

  • OptimizationSplitChunksOptions

Index

Properties

automaticNameDelimiter?: string

Sets the name delimiter for created chunks.

cacheGroups?: {}

Assign modules to a cache group (modules from different cache groups are tried to keep in separate chunks, default categories: 'default', 'defaultVendors').

Type declaration

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

Select chunks for determining shared modules (defaults to "async", "initial" and "all" requires adding these chunks to the HTML).

defaultSizeTypes?: string[]

Sets the size types which are used when a number is used for sizes.

enforceSizeThreshold?: number | {}

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

fallbackCacheGroup?: { automaticNameDelimiter?: string; chunks?: RegExp | "all" | "async" | "initial" | ((chunk: Chunk) => boolean); maxAsyncSize?: number | {}; maxInitialSize?: number | {}; maxSize?: number | {}; minSize?: number | {}; minSizeReduction?: number | {} }

Options for modules not selected by any other cache group.

Type declaration

  • Optional automaticNameDelimiter?: string

    Sets the name delimiter for created chunks.

  • Optional chunks?: RegExp | "all" | "async" | "initial" | ((chunk: Chunk) => boolean)

    Select chunks for determining shared modules (defaults to "async", "initial" and "all" requires adding these chunks to the HTML).

  • Optional maxAsyncSize?: number | {}

    Maximal size hint for the on-demand chunks.

  • Optional maxInitialSize?: number | {}

    Maximal size hint for the initial chunks.

  • Optional maxSize?: number | {}

    Maximal size hint for the created chunks.

  • Optional minSize?: number | {}

    Minimal size for the created chunk.

  • Optional minSizeReduction?: number | {}

    Minimum size reduction due to the created chunk.

filename?: string | ((pathData: "/home/runner/work/forge/forge/node_modules/webpack/types".PathData, assetInfo?: AssetInfo) => string)

Sets the template for the filename for created chunks.

hidePathInfo?: boolean

Prevents exposing path info when creating names for parts splitted by maxSize.

maxAsyncRequests?: number

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

maxAsyncSize?: number | {}

Maximal size hint for the on-demand chunks.

maxInitialRequests?: number

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

maxInitialSize?: number | {}

Maximal size hint for the initial chunks.

maxSize?: number | {}

Maximal size hint for the created chunks.

minChunks?: number

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

minRemainingSize?: number | {}

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

minSize?: number | {}

Minimal size for the created chunks.

minSizeReduction?: number | {}

Minimum size reduction due to the created chunk.

name?: string | false | Function

Give chunks created a name (chunks with equal name are merged).

usedExports?: boolean

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