On this page

new ChunkGraph(moduleGraph, hashFunction?): ChunkGraph
Attributes
moduleGraph:<ModuleGraph>
the module graph
hashFunction:
{HashFunction} the hash function to use
Returns:<ChunkGraph>
Attributes
moduleGraph:<ModuleGraph>
webpack.ChunkGraph.addChunkRuntimeRequirements(chunk, items): void
Attributes
chunk:<Chunk>
the chunk
items:
{Set } runtime requirements to be added (ownership of this Set is given to ChunkGraph)
Returns:
{void}

webpack.ChunkGraph.addDependentHashModuleToChunk(chunk, module): void
Attributes
chunk:<Chunk>
the new chunk
the module that require a full hash
Returns:
{void}

webpack.ChunkGraph.addFullHashModuleToChunk(chunk, module): void
Attributes
chunk:<Chunk>
the new chunk
the module that require a full hash
Returns:
{void}

webpack.ChunkGraph.addModuleRuntimeRequirements(module, runtime, items, transferOwnership?): void
Attributes
module:<Module>
the module
runtime:
{RuntimeSpec} the runtime
items:
{Set } runtime requirements to be added (ownership of this Set is given to ChunkGraph when transferOwnership not false)
transferOwnership:<boolean>
true: transfer ownership of the items object, false: items is immutable and shared and won't be modified
Returns:
{void}

webpack.ChunkGraph.addTreeRuntimeRequirements(chunk, items): void
Attributes
chunk:<Chunk>
the chunk
items:
{Iterable } runtime requirements to be added
Returns:
{void}

webpack.ChunkGraph.attachDependentHashModules(chunk, modules): void
Attributes
chunk:<Chunk>
the chunk
modules:
{Iterable } the modules that require a full hash
Returns:
{void}

webpack.ChunkGraph.attachFullHashModules(chunk, modules): void
Attributes
chunk:<Chunk>
the chunk
modules:
{Iterable } the modules that require a full hash
Returns:
{void}

webpack.ChunkGraph.attachModules(chunk, modules): void
Attributes
chunk:<Chunk>
the chunk
modules:
{Iterable } the modules
Returns:
{void}

webpack.ChunkGraph.attachRuntimeModules(chunk, modules): void
Attributes
chunk:<Chunk>
the chunk
modules:
{Iterable } the runtime modules
Returns:
{void}

webpack.ChunkGraph.canChunksBeIntegrated(chunkA, chunkB): boolean
Attributes
chunkA:<Chunk>
chunk
chunkB:<Chunk>
chunk
Returns:<boolean>
true, if chunks could be integrated

webpack.ChunkGraph.compareChunks(chunkA, chunkB): -1 | 0 | 1
Attributes
chunkA:<Chunk>
first chunk
chunkB:<Chunk>
second chunk
Returns:
{-1|0|1} this is a comparator function like sort and returns -1, 0, or 1 based on sort order

webpack.ChunkGraph.connectBlockAndChunkGroup(depBlock, chunkGroup): void
Attributes
the async block
chunkGroup:<ChunkGroup>
the chunk group
Returns:
{void}

webpack.ChunkGraph.connectChunkAndEntryModule(chunk, module, entrypoint): void
Attributes
chunk:<Chunk>
the new chunk
module:<Module>
the entry module
entrypoint:<Entrypoint>
the chunk group which must be loaded before the module is executed
Returns:
{void}

webpack.ChunkGraph.connectChunkAndModule(chunk, module): void
Attributes
chunk:<Chunk>
the new chunk
module:<Module>
the module
Returns:
{void}

webpack.ChunkGraph.connectChunkAndRuntimeModule(chunk, module): void
Attributes
chunk:<Chunk>
the new chunk
the runtime module
Returns:
{void}

webpack.ChunkGraph.disconnectChunk(chunk): void
Attributes
chunk:<Chunk>
the chunk which will be disconnected
Returns:
{void}

webpack.ChunkGraph.disconnectChunkAndEntryModule(chunk, module): void
Attributes
chunk:<Chunk>
the new chunk
module:<Module>
the entry module
Returns:
{void}

webpack.ChunkGraph.disconnectChunkAndModule(chunk, module): void
Attributes
chunk:<Chunk>
the chunk
module:<Module>
the module
Returns:
{void}

webpack.ChunkGraph.disconnectChunkAndRuntimeModule(chunk, module): void
Attributes
chunk:<Chunk>
the new chunk
the runtime module
Returns:
{void}

webpack.ChunkGraph.disconnectChunkGroup(chunkGroup): void
Attributes
chunkGroup:<ChunkGroup>
the chunk group
Returns:
{void}

webpack.ChunkGraph.disconnectEntries(chunk): void
Attributes
chunk:<Chunk>
the chunk, for which all entries will be removed
Returns:
{void}

webpack.ChunkGraph.disconnectEntryModule(module): void
Attributes
module:<Module>
the entry module, it will no longer be entry
Returns:
{void}

webpack.ChunkGraph.getBlockChunkGroup(depBlock): ChunkGroup
Attributes
the async block
Returns:<ChunkGroup>
the chunk group

webpack.ChunkGraph.getChunkConditionMap(chunk, filterFn): ChunkConditionMap
Attributes
chunk:<Chunk>
the chunk
filterFn:<object>
function used to filter chunks
Returns:
{ChunkConditionMap} chunk condition map

webpack.ChunkGraph.getChunkDependentHashModulesIterable(chunk): Iterable<RuntimeModule, any, any>
Attributes
chunk:<Chunk>
the chunk
Returns:
{Iterable<RuntimeModule, any, any>} iterable of modules (do not modify)

webpack.ChunkGraph.getChunkEntryDependentChunksIterable(chunk): Iterable<Chunk>
Attributes
chunk:<Chunk>
the chunk
Returns:
{Iterable } iterable of chunks

webpack.ChunkGraph.getChunkEntryModulesIterable(chunk): Iterable<Module>
Attributes
chunk:<Chunk>
the chunk
Returns:
{Iterable } iterable of modules (do not modify)

webpack.ChunkGraph.getChunkEntryModulesWithChunkGroupIterable(chunk): Iterable<Tuple<Module, Entrypoint>>
Attributes
chunk:<Chunk>
the chunk
Returns:
{Iterable<Tuple<Module, Entrypoint>>} iterable of modules (do not modify)

webpack.ChunkGraph.getChunkFullHashModulesIterable(chunk): Iterable<RuntimeModule, any, any>
Attributes
chunk:<Chunk>
the chunk
Returns:
{Iterable<RuntimeModule, any, any>} iterable of modules (do not modify)

webpack.ChunkGraph.getChunkFullHashModulesSet(chunk): ReadonlySet<RuntimeModule>
Attributes
chunk:<Chunk>
the chunk
Returns:
{ReadonlySet } set of modules (do not modify)

webpack.ChunkGraph.getChunkModuleIdMap(chunk, filterFn, includeAllChunks?): ChunkModuleIdMapEs5Alias_2
Attributes
chunk:<Chunk>
the chunk
filterFn:<object>
function used to filter modules
includeAllChunks:<boolean>
all chunks or only async chunks
Returns:
{ChunkModuleIdMapEs5Alias_2} chunk to module ids object

webpack.ChunkGraph.getChunkModuleRenderedHashMap(chunk, filterFn, hashLength?, includeAllChunks?): ChunkModuleHashMap
Attributes
chunk:<Chunk>
the chunk
filterFn:<object>
function used to filter modules
hashLength:<number>
length of the hash
includeAllChunks:<boolean>
all chunks or only async chunks
Returns:
{ChunkModuleHashMap} chunk to module id to module hash object

webpack.ChunkGraph.getChunkModules(chunk): Module[]
Attributes
chunk:<Chunk>
the chunk
Returns:<Module[]>
return the modules for this chunk (cached, do not modify)

webpack.ChunkGraph.getChunkModulesIterable(chunk): Iterable<Module>
Attributes
chunk:<Chunk>
the chunk
Returns:
{Iterable } return the modules for this chunk

webpack.ChunkGraph.getChunkModulesIterableBySourceType(chunk, sourceType): Iterable<Module, any, any>
Attributes
chunk:<Chunk>
the chunk
sourceType:<string>
source type
Returns:
{Iterable<Module, any, any>} return the modules for this chunk

webpack.ChunkGraph.getChunkModuleSourceTypes(chunk, module): ReadonlySet<string>
Attributes
chunk:<Chunk>
chunk
module:<Module>
chunk module
Returns:
{ReadonlySet } source types

webpack.ChunkGraph.getChunkModulesSize(chunk): number
Attributes
chunk:<Chunk>
the chunk
Returns:<number>
total size of all modules in the chunk

webpack.ChunkGraph.getChunkModulesSizes(chunk): Record<string, number>
Attributes
chunk:<Chunk>
the chunk
Returns:
{Record<string, number>} total sizes of all modules in the chunk by source type

webpack.ChunkGraph.getChunkRootModules(chunk): Module[]
Attributes
chunk:<Chunk>
the chunk
Returns:<Module[]>
root modules of the chunks (ordered by identifier)

webpack.ChunkGraph.getChunkRuntimeModulesInOrder(chunk): RuntimeModule[]
Attributes
chunk:<Chunk>
the chunk
array of modules in order of execution

webpack.ChunkGraph.getChunkRuntimeModulesIterable(chunk): Iterable<RuntimeModule>
Attributes
chunk:<Chunk>
the chunk
Returns:
{Iterable } iterable of modules (do not modify)

webpack.ChunkGraph.getChunkRuntimeRequirements(chunk): ReadonlySet<string>
Attributes
chunk:<Chunk>
the chunk
Returns:
{ReadonlySet } runtime requirements

webpack.ChunkGraph.getChunkSize(chunk, options?): number
Attributes
chunk:<Chunk>
the chunk
options:
{ChunkSizeOptions} options object
Returns:<number>
total size of the chunk

webpack.ChunkGraph.getIntegratedChunksSize(chunkA, chunkB, options?): number
Attributes
chunkA:<Chunk>
chunk
chunkB:<Chunk>
chunk
options:
{ChunkSizeOptions} options object
Returns:<number>
total size of the chunk or false if chunks can't be integrated

webpack.ChunkGraph.getModuleChunks(module): Chunk[]
Attributes
module:<Module>
the module
Returns:<Chunk[]>
array of chunks (cached, do not modify)

webpack.ChunkGraph.getModuleChunksIterable(module): Iterable<Chunk>
Attributes
module:<Module>
the module
Returns:
{Iterable } iterable of chunks (do not modify)

webpack.ChunkGraph.getModuleGraphHash(module, runtime, withConnections?): string
Attributes
module:<Module>
the module
runtime:
{RuntimeSpec} the runtime
withConnections:<boolean>
include connections
Returns:<string>
hash

webpack.ChunkGraph.getModuleGraphHashBigInt(module, runtime, withConnections?): bigint
Attributes
module:<Module>
the module
runtime:
{RuntimeSpec} the runtime
withConnections:<boolean>
include connections
Returns:<bigint>
hash

webpack.ChunkGraph.getModuleHash(module, runtime): string
Attributes
module:<Module>
the module
runtime:
{RuntimeSpec} the runtime
Returns:<string>
hash

webpack.ChunkGraph.getModuleId(module): string | number
Attributes
module:<Module>
the module
Returns:<string> | <number>
the id of the module

webpack.ChunkGraph.getModuleRuntimeRequirements(module, runtime): ReadonlySet<string>
Attributes
module:<Module>
the module
runtime:
{RuntimeSpec} the runtime
Returns:
{ReadonlySet } runtime requirements

webpack.ChunkGraph.getModuleRuntimes(module): RuntimeSpecSet
Attributes
module:<Module>
the module
runtimes

webpack.ChunkGraph.getModuleSourceTypes(module): ReadonlySet<string>
Attributes
module:<Module>
module
Returns:
{ReadonlySet } source types

webpack.ChunkGraph.getNumberOfChunkFullHashModules(chunk): number
Attributes
chunk:<Chunk>
the chunk
Returns:<number>
the number of full hash modules which are contained in this chunk

webpack.ChunkGraph.getNumberOfChunkModules(chunk): number
Attributes
chunk:<Chunk>
the chunk
Returns:<number>
the number of modules which are contained in this chunk

webpack.ChunkGraph.getNumberOfEntryModules(chunk): number
Attributes
chunk:<Chunk>
the chunk
Returns:<number>
the amount of entry modules in chunk

webpack.ChunkGraph.getNumberOfModuleChunks(module): number
Attributes
module:<Module>
the module
Returns:<number>
the number of chunk which contain the module

webpack.ChunkGraph.getNumberOfRuntimeModules(chunk): number
Attributes
chunk:<Chunk>
the chunk
Returns:<number>
the amount of entry modules in chunk

webpack.ChunkGraph.getOrderedChunkModules(chunk, comparator): Module[]
Attributes
chunk:<Chunk>
the chunk
comparator:<object>
comparator function
Returns:<Module[]>
return the modules for this chunk (cached, do not modify)

webpack.ChunkGraph.getOrderedChunkModulesIterable(chunk, comparator): Iterable<Module>
Attributes
chunk:<Chunk>
the chunk
comparator:<object>
comparator function
Returns:
{Iterable } return the modules for this chunk

webpack.ChunkGraph.getOrderedChunkModulesIterableBySourceType(chunk, sourceType, comparator): Iterable<Module, any, any>
Attributes
chunk:<Chunk>
the chunk
sourceType:<string>
source type
comparator:<object>
comparator function
Returns:
{Iterable<Module, any, any>} return the modules for this chunk

webpack.ChunkGraph.getOrderedModuleChunksIterable(module, sortFn): Iterable<Chunk>
Attributes
module:<Module>
the module
sortFn:<object>
sort function
Returns:
{Iterable } iterable of chunks (do not modify)

webpack.ChunkGraph.getRenderedModuleHash(module, runtime): string
Attributes
module:<Module>
the module
runtime:
{RuntimeSpec} the runtime
Returns:<string>
hash

webpack.ChunkGraph.getRuntimeChunkDependentChunksIterable(chunk): Iterable<Chunk>
Attributes
chunk:<Chunk>
the chunk
Returns:
{Iterable } iterable of chunks and include chunks from children entrypoints

webpack.ChunkGraph.getRuntimeId(runtime): RuntimeId
Attributes
runtime:<string>
runtime
Returns:
{RuntimeId} the id of the runtime

webpack.ChunkGraph.getTreeRuntimeRequirements(chunk): ReadonlySet<string>
Attributes
chunk:<Chunk>
the chunk
Returns:
{ReadonlySet } runtime requirements

webpack.ChunkGraph.hasChunkEntryDependentChunks(chunk): boolean
Attributes
chunk:<Chunk>
the chunk
Returns:<boolean>
true, when it has dependent chunks

webpack.ChunkGraph.hasModuleHashes(module, runtime): boolean
Attributes
module:<Module>
the module
runtime:
{RuntimeSpec} the runtime
Returns:<boolean>
true, if the module has hashes for this runtime

webpack.ChunkGraph.hasModuleInGraph(chunk, filterFn, filterChunkFn?): boolean
Attributes
chunk:<Chunk>
the chunk
filterFn:<object>
predicate function used to filter modules
filterChunkFn:<object>
predicate function used to filter chunks
Returns:<boolean>
return true if module exists in graph

webpack.ChunkGraph.integrateChunks(chunkA, chunkB): void
Attributes
chunkA:<Chunk>
the target chunk
chunkB:<Chunk>
the chunk to integrate
Returns:
{void}

webpack.ChunkGraph.isEntryModule(module): boolean
Attributes
module:<Module>
the checked module
Returns:<boolean>
true, if the module is entry of any chunk

webpack.ChunkGraph.isEntryModuleInChunk(module, chunk): boolean
Attributes
module:<Module>
the checked module
chunk:<Chunk>
the checked chunk
Returns:<boolean>
true, if the chunk contains the module as entry

webpack.ChunkGraph.isModuleInChunk(module, chunk): boolean
Attributes
module:<Module>
the checked module
chunk:<Chunk>
the checked chunk
Returns:<boolean>
true, if the chunk contains the module

webpack.ChunkGraph.isModuleInChunkGroup(module, chunkGroup): boolean
Attributes
module:<Module>
the checked module
chunkGroup:<ChunkGroup>
the checked chunk group
Returns:<boolean>
true, if the chunk contains the module

webpack.ChunkGraph.replaceModule(oldModule, newModule): void
Attributes
oldModule:<Module>
the replaced module
newModule:<Module>
the replacing module
Returns:
{void}

webpack.ChunkGraph.setChunkModuleSourceTypes(chunk, module, sourceTypes): void
Attributes
chunk:<Chunk>
chunk
module:<Module>
chunk module
sourceTypes:
{ReadonlySet } source types
Returns:
{void}

webpack.ChunkGraph.setModuleHashes(module, runtime, hash, renderedHash): void
Attributes
module:<Module>
the module
runtime:
{RuntimeSpec} the runtime
the full hash
renderedHash:<string>
the shortened hash for rendering
Returns:
{void}

webpack.ChunkGraph.setModuleId(module, id): void
Attributes
module:<Module>
the module
id:
{ModuleId} the id of the module
Returns:
{void}

webpack.ChunkGraph.setRuntimeId(runtime, id): void
Attributes
runtime:<string>
runtime
id:
{RuntimeId} the id of the runtime
Returns:
{void}

webpack.ChunkGraph.upgradeDependentToFullHashModules(chunk): void
Attributes
chunk:<Chunk>
the chunk to upgrade
Returns:
{void}

webpack.ChunkGraph.clearChunkGraphForChunk(chunk): void
Attributes
chunk:<Chunk>
the chunk
Returns:
{void}

webpack.ChunkGraph.clearChunkGraphForModule(module): void
Attributes
module:<Module>
the module
Returns:
{void}

webpack.ChunkGraph.getChunkGraphForChunk(chunk, deprecateMessage, deprecationCode): ChunkGraph
Attributes
chunk:<Chunk>
the chunk
deprecateMessage:<string>
message for the deprecation message
deprecationCode:<string>
code for the deprecation
Returns:<ChunkGraph>
the chunk graph

webpack.ChunkGraph.getChunkGraphForModule(module, deprecateMessage, deprecationCode): ChunkGraph
Attributes
module:<Module>
the module
deprecateMessage:<string>
message for the deprecation message
deprecationCode:<string>
code for the deprecation
Returns:<ChunkGraph>
the chunk graph

webpack.ChunkGraph.setChunkGraphForChunk(chunk, chunkGraph): void
Attributes
chunk:<Chunk>
the chunk
chunkGraph:<ChunkGraph>
the chunk graph
Returns:
{void}

webpack.ChunkGraph.setChunkGraphForModule(module, chunkGraph): void
Attributes
module:<Module>
the module
chunkGraph:<ChunkGraph>
the chunk graph
Returns:
{void}