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>
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}

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

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

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}

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

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

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

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

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

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

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

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

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}

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

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

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

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

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

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

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

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

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

getBlockChunkGroup(depBlock): ChunkGroup | undefined
Attributes
the async block
the chunk group

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

getModuleId(module): string | number | null
Attributes
module:<Module>
the module
the id of the module

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

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

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

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

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

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

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

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

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)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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}

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

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

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

Attributes
chunk:<Chunk>
the chunk
Returns:
{void}

Attributes
module:<Module>
the module
Returns:
{void}

Attributes
chunk:<Chunk>
the chunk
deprecateMessage:<string>
message for the deprecation message
deprecationCode:<string>
code for the deprecation
Returns:<ChunkGraph>
the chunk graph

Attributes
module:<Module>
the module
deprecateMessage:<string>
message for the deprecation message
deprecationCode:<string>
code for the deprecation
Returns:<ChunkGraph>
the chunk graph

Attributes
chunk:<Chunk>
the chunk
chunkGraph:<ChunkGraph>
the chunk graph
Returns:
{void}

Attributes
module:<Module>
the module
chunkGraph:<ChunkGraph>
the chunk graph
Returns:
{void}