new ChunkGraph(moduleGraph, hashFunction?): ChunkGraphAttributes
moduleGraph:
<ModuleGraph>the module graph
hashFunction:
{HashFunction} the hash function to use
Returns:
<ChunkGraph>Attributes
moduleGraph:
<ModuleGraph>addChunkRuntimeRequirements(chunk, items): voidAttributes
chunk:
<Chunk>the chunk
items:
{Set
} runtime requirements to be added (ownership of this Set is given to ChunkGraph)
Returns:
{void}
addDependentHashModuleToChunk(chunk, module): voidAttributes
chunk:
<Chunk>the new chunk
module:
<RuntimeModule>the module that require a full hash
Returns:
{void}
addFullHashModuleToChunk(chunk, module): voidAttributes
chunk:
<Chunk>the new chunk
module:
<RuntimeModule>the module that require a full hash
Returns:
{void}
addModuleRuntimeRequirements(module, runtime, items, transferOwnership?): voidAttributes
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): voidAttributes
chunk:
<Chunk>the chunk
items:
{Iterable
} runtime requirements to be added
Returns:
{void}
attachDependentHashModules(chunk, modules): voidAttributes
chunk:
<Chunk>the chunk
modules:
{Iterable
} the modules that require a full hash
Returns:
{void}
attachFullHashModules(chunk, modules): voidAttributes
chunk:
<Chunk>the chunk
modules:
{Iterable
} the modules that require a full hash
Returns:
{void}
attachModules(chunk, modules): voidAttributes
chunk:
<Chunk>the chunk
modules:
{Iterable
} the modules
Returns:
{void}
attachRuntimeModules(chunk, modules): voidAttributes
chunk:
<Chunk>the chunk
modules:
{Iterable
} the runtime modules
Returns:
{void}
canChunksBeIntegrated(chunkA, chunkB): booleanAttributes
Returns:
<boolean>true, if chunks could be integrated
compareChunks(chunkA, chunkB): -1 | 0 | 1Attributes
Returns:
{-1|0|1} this is a comparator function like sort and returns -1, 0, or 1 based on sort order
connectBlockAndChunkGroup(depBlock, chunkGroup): voidAttributes
depBlock:
<AsyncDependenciesBlock>the async block
chunkGroup:
<ChunkGroup>the chunk group
Returns:
{void}
connectChunkAndEntryModule(chunk, module, entrypoint): voidAttributes
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): voidAttributes
Returns:
{void}
connectChunkAndRuntimeModule(chunk, module): voidAttributes
chunk:
<Chunk>the new chunk
module:
<RuntimeModule>the runtime module
Returns:
{void}
disconnectChunk(chunk): voidAttributes
chunk:
<Chunk>the chunk which will be disconnected
Returns:
{void}
disconnectChunkAndEntryModule(chunk, module): voidAttributes
Returns:
{void}
disconnectChunkAndModule(chunk, module): voidAttributes
Returns:
{void}
disconnectChunkAndRuntimeModule(chunk, module): voidAttributes
chunk:
<Chunk>the new chunk
module:
<RuntimeModule>the runtime module
Returns:
{void}
disconnectChunkGroup(chunkGroup): voidAttributes
chunkGroup:
<ChunkGroup>the chunk group
Returns:
{void}
disconnectEntries(chunk): voidAttributes
chunk:
<Chunk>the chunk, for which all entries will be removed
Returns:
{void}
disconnectEntryModule(module): voidAttributes
module:
<Module>the entry module, it will no longer be entry
Returns:
{void}
getBlockChunkGroup(depBlock): ChunkGroup | undefinedAttributes
depBlock:
<AsyncDependenciesBlock>the async block
Returns:
<ChunkGroup>
|
<undefined>the chunk group
getChunkConditionMap(chunk, filterFn): ChunkConditionMapAttributes
Returns:
{ChunkConditionMap} chunk condition map
getChunkDependentHashModulesIterable(chunk): Iterable<RuntimeModule, any, any> | undefinedAttributes
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> | undefinedAttributes
chunk:
<Chunk>the chunk
Returns:
{Iterable<RuntimeModule, any, any>|undefined} iterable of modules (do not modify)
getChunkFullHashModulesSet(chunk): ReadonlySet<RuntimeModule> | undefinedAttributes
chunk:
<Chunk>the chunk
Returns:
{ReadonlySet
|undefined} set of modules (do not modify)
getChunkModuleIdMap(chunk, filterFn, includeAllChunks?): ChunkModuleIdMapEs5Alias_2Attributes
Returns:
{ChunkModuleIdMapEs5Alias_2} chunk to module ids object
getChunkModuleRenderedHashMap(chunk, filterFn, hashLength?, includeAllChunks?): ChunkModuleHashMapAttributes
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> | undefinedAttributes
Returns:
{Iterable<Module, any, any>|undefined} return the modules for this chunk
getChunkModuleSourceTypes(chunk, module): ReadonlySet<string>Attributes
Returns:
{ReadonlySet
} source types
getChunkModulesSize(chunk): numberAttributes
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
Returns:
<RuntimeModule[]>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?): numberAttributes
chunk:
<Chunk>the chunk
options:
{ChunkSizeOptions} options object
Returns:
<number>total size of the chunk
getIntegratedChunksSize(chunkA, chunkB, options?): numberAttributes
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?): stringAttributes
Returns:
<string>hash
getModuleGraphHashBigInt(module, runtime, withConnections?): bigintAttributes
Returns:
<bigint>hash
getModuleHash(module, runtime): stringAttributes
module:
<Module>the module
runtime:
{RuntimeSpec} the runtime
Returns:
<string>hash
getModuleId(module): string | number | nullAttributes
module:
<Module>the module
getModuleRuntimeRequirements(module, runtime): ReadonlySet<string>Attributes
module:
<Module>the module
runtime:
{RuntimeSpec} the runtime
Returns:
{ReadonlySet
} runtime requirements
getModuleRuntimes(module): RuntimeSpecSetAttributes
module:
<Module>the module
Returns:
<RuntimeSpecSet>runtimes
getModuleSourceTypes(module): ReadonlySet<string>Attributes
module:
<Module>module
Returns:
{ReadonlySet
} source types
getNumberOfChunkFullHashModules(chunk): numberAttributes
chunk:
<Chunk>the chunk
Returns:
<number>the number of full hash modules which are contained in this chunk
getNumberOfChunkModules(chunk): numberAttributes
chunk:
<Chunk>the chunk
Returns:
<number>the number of modules which are contained in this chunk
getNumberOfEntryModules(chunk): numberAttributes
chunk:
<Chunk>the chunk
Returns:
<number>the amount of entry modules in chunk
getNumberOfModuleChunks(module): numberAttributes
module:
<Module>the module
Returns:
<number>the number of chunk which contain the module
getNumberOfRuntimeModules(chunk): numberAttributes
chunk:
<Chunk>the chunk
Returns:
<number>the amount of entry modules in chunk
getOrderedChunkModules(chunk, comparator): Module[]Attributes
Returns:
<Module[]>return the modules for this chunk (cached, do not modify)
getOrderedChunkModulesIterable(chunk, comparator): Iterable<Module>Attributes
Returns:
{Iterable
} return the modules for this chunk
getOrderedChunkModulesIterableBySourceType(chunk, sourceType, comparator): Iterable<Module, any, any> | undefinedAttributes
Returns:
{Iterable<Module, any, any>|undefined} return the modules for this chunk
getOrderedModuleChunksIterable(module, sortFn): Iterable<Chunk>Attributes
Returns:
{Iterable
} iterable of chunks (do not modify)
getRenderedModuleHash(module, runtime): stringAttributes
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): RuntimeIdAttributes
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): booleanAttributes
chunk:
<Chunk>the chunk
Returns:
<boolean>true, when it has dependent chunks
hasModuleHashes(module, runtime): booleanAttributes
module:
<Module>the module
runtime:
{RuntimeSpec} the runtime
Returns:
<boolean>true, if the module has hashes for this runtime
hasModuleInGraph(chunk, filterFn, filterChunkFn?): booleanAttributes
Returns:
<boolean>return true if module exists in graph
integrateChunks(chunkA, chunkB): voidAttributes
Returns:
{void}
isEntryModule(module): booleanAttributes
module:
<Module>the checked module
Returns:
<boolean>true, if the module is entry of any chunk
isEntryModuleInChunk(module, chunk): booleanAttributes
Returns:
<boolean>true, if the chunk contains the module as entry
isModuleInChunk(module, chunk): booleanAttributes
Returns:
<boolean>true, if the chunk contains the module
isModuleInChunkGroup(module, chunkGroup): booleanAttributes
module:
<Module>the checked module
chunkGroup:
<ChunkGroup>the checked chunk group
Returns:
<boolean>true, if the chunk contains the module
replaceModule(oldModule, newModule): voidAttributes
Returns:
{void}
setChunkModuleSourceTypes(chunk, module, sourceTypes): voidAttributes
Returns:
{void}
setModuleHashes(module, runtime, hash, renderedHash): voidAttributes
Returns:
{void}
setModuleId(module, id): voidAttributes
module:
<Module>the module
id:
{ModuleId} the id of the module
Returns:
{void}
setRuntimeId(runtime, id): voidAttributes
runtime:
<string>runtime
id:
{RuntimeId} the id of the runtime
Returns:
{void}
upgradeDependentToFullHashModules(chunk): voidAttributes
chunk:
<Chunk>the chunk to upgrade
Returns:
{void}
Attributes
chunk:
<Chunk>the chunk
Returns:
{void}
Attributes
module:
<Module>the module
Returns:
{void}
Attributes
Returns:
<ChunkGraph>the chunk graph
Attributes
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}