On this page

These types are not exported by webpack, but they are available to TypeScript consumers.

  • buffer {Buffer} buffer
  • hash {string|Buffer[]} hash
  • maps {Map<string, BufferEntry>} maps
  • size <number> size
  • source <boolean> source

Attributes
chunkGraph:<ChunkGraph>
moduleGraph:<ModuleGraph>

Attributes
automaticNameDelimiter:<string>
chunksFilter:<object>
enforce:<boolean>
enforceSizeThreshold:<SplitChunksSizes>
filename:<string> | <object>
getName:<object>
idHint:<string>
maxAsyncRequests:<number>
maxAsyncSize:<SplitChunksSizes>
maxInitialRequests:<number>
maxInitialSize:<SplitChunksSizes>
minChunks:<number>
minRemainingSize:<SplitChunksSizes>
minSizeReduction:<SplitChunksSizes>
priority:<number>
reuseExistingChunk:<boolean>
usedExports:<boolean>


Attributes
result:
{T}
Returns:
{void}

Attributes
result:<null>
Returns:
{void}

Attributes
result:
{T}
Returns:
{void}

Attributes
toString:<object>

Attributes
automaticNameDelimiter:<string>
chunksFilter:<object>
maxAsyncSize:<SplitChunksSizes>
maxInitialSize:<SplitChunksSizes>

Options object for persistent file-based caching.

Attributes
allowCollectingMemory:<boolean>
Allows to collect unused memory allocated during deserialization. This requires copying data into smaller buffers and has a performance cost.
buildDependencies:<object>
Dependencies the build depends on (in multiple categories, default categories: 'defaultWebpack').
cacheDirectory:<string>
Base directory for the cache (defaults to node_modules/.cache/webpack).
cacheLocation:<string>
Locations for the cache (defaults to cacheDirectory / name).
compression:
{false|"gzip"|"brotli"} Compression type used for the cache files.
hashAlgorithm:<string>
Algorithm used for generation the hash (see node.js crypto package).
idleTimeout:<number>
Time in ms after which idle period the cache storing should happen.
idleTimeoutAfterLargeChanges:<number>
Time in ms after which idle period the cache storing should happen when larger changes has been detected (cumulative build time > 2 x avg cache store time).
idleTimeoutForInitialStore:<number>
Time in ms after which idle period the initial cache storing should happen.
immutablePaths:<string> | <RegExp[]>
List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.
managedPaths:<string> | <RegExp[]>
List of paths that are managed by a package manager and can be trusted to not be modified otherwise.
maxAge:<number>
Time for which unused cache entries stay in the filesystem cache at minimum (in milliseconds).
maxMemoryGenerations:<number>
Number of generations unused cache entries stay in memory cache at minimum (0 = no memory cache used, 1 = may be removed after unused for a single compilation, ..., Infinity: kept forever). Cache entries will be deserialized from disk when removed from memory cache.
memoryCacheUnaffected:<boolean>
Additionally cache computation of modules that are unchanged and reference only unchanged modules in memory.
Name for the cache. Different names will lead to different coexisting caches.
profile:<boolean>
Track and log detailed timing information for individual cache items.
readonly:<boolean>
Enable/disable readonly mode.
store:
{"pack"} When to store data to the filesystem. (pack: Store data when compiler is idle in a single file).
type:
{"filesystem"} Filesystem caching.
version:<string>
Version of the cache data. Different versions won't allow to reuse the cache and override existing content. Update the version when config changed in a way which doesn't allow to reuse cache. This will invalidate the cache.


Options object for in-memory caching.

Attributes
cacheUnaffected:<boolean>
Additionally cache computation of modules that are unchanged and reference only unchanged modules.
maxGenerations:<number>
Number of generations unused cache entries stay in memory cache at minimum (1 = may be removed after unused for a single compilation, ..., Infinity: kept forever).
type:
{"memory"} In memory caching.

  • inheritance {Tuple<CssLayer, Supports, Media>[]} - The inheritance chain
  • source <CachedSource> - The cached source
  • undoPath <string> - The undo path to the CSS file

  • buildInfo {BuildInfo}
  • memCache {WeakTupleMap<any[], any>}
  • references {WeakMap<Dependency, Module>}

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

Attributes
automaticNameDelimiter:<string>
Sets the name delimiter for created chunks.
Select chunks for determining cache group content (defaults to "initial", "initial" and "all" requires adding these chunks to the HTML).
enforce:<boolean>
Ignore minimum size, minimum chunks and maximum requests and always create chunks for this cache group.
enforceSizeThreshold:<number> | <object>
Size threshold at which splitting is enforced and other restrictions (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.
filename:<string> | <object>
Sets the template for the filename for created chunks.
idHint:<string>
Sets the hint for chunk id.
Assign modules to a cache group by module layer.
maxAsyncRequests:<number>
Maximum number of requests which are accepted for on-demand loading.
maxAsyncSize:<number> | <object>
Maximal size hint for the on-demand chunks.
maxInitialRequests:<number>
Maximum number of initial chunks which are accepted for an entry point.
maxInitialSize:<number> | <object>
Maximal size hint for the initial chunks.
maxSize:<number> | <object>
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> | <object>
Minimal size for the chunks the stay after moving the modules to a new chunk.
minSize:<number> | <object>
Minimal size for the created chunk.
minSizeReduction:<number> | <object>
Minimum size reduction due to the created chunk.
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.
Assign modules to a cache group by module name.
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.

  • direct {WeakMap<ResolveOptionsWithDependencyType, ResolverWithOptions>}
  • stringified {Map<string, ResolverWithOptions>}


Type:
{KnownUnsafeCacheData|Record<string, any>}

Type:
{string|Set }