On this page

new ChunkGraph(moduleGraph, hashFunction?): void
  • moduleGraph {ModuleGraph} the module graph
  • hashFunction {HashFunction} the hash function to use
  • Returns: {ChunkGraph}
  • moduleGraph {ModuleGraph}
webpack.ChunkGraph.addChunkRuntimeRequirements(chunk, items): void
  • 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
  • chunk {Chunk} the new chunk
  • module {RuntimeModule} the module that require a full hash
  • Returns: {void}

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

webpack.ChunkGraph.addModuleRuntimeRequirements(module, runtime, items, transferOwnership?): void
  • 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
  • chunk {Chunk} the chunk
  • items {Iterable} runtime requirements to be added
  • Returns: {void}

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

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

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

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

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

webpack.ChunkGraph.compareChunks(chunkA, chunkB): void
  • 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
  • depBlock {AsyncDependenciesBlock} the async block
  • chunkGroup {ChunkGroup} the chunk group
  • Returns: {void}

webpack.ChunkGraph.connectChunkAndEntryModule(chunk, module, entrypoint): void
  • 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
  • chunk {Chunk} the new chunk
  • module {Module} the module
  • Returns: {void}

webpack.ChunkGraph.connectChunkAndRuntimeModule(chunk, module): void
  • chunk {Chunk} the new chunk
  • module {RuntimeModule} the runtime module
  • Returns: {void}

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

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

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

webpack.ChunkGraph.disconnectChunkAndRuntimeModule(chunk, module): void
  • chunk {Chunk} the new chunk
  • module {RuntimeModule} the runtime module
  • Returns: {void}

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

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

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

webpack.ChunkGraph.getBlockChunkGroup(depBlock): void
  • depBlock {AsyncDependenciesBlock} the async block
  • Returns: {ChunkGroup} the chunk group

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

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

webpack.ChunkGraph.getChunkEntryDependentChunksIterable(chunk): void
  • chunk {Chunk} the chunk
  • Returns: {Iterable} iterable of chunks

webpack.ChunkGraph.getChunkEntryModulesIterable(chunk): void
  • chunk {Chunk} the chunk
  • Returns: {Iterable} iterable of modules (do not modify)

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

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

webpack.ChunkGraph.getChunkFullHashModulesSet(chunk): void
  • chunk {Chunk} the chunk
  • Returns: {ReadonlySet} set of modules (do not modify)

webpack.ChunkGraph.getChunkModuleIdMap(chunk, filterFn, includeAllChunks?): void
  • 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?): void
  • 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): void
  • chunk {Chunk} the chunk
  • Returns: {Module[]} return the modules for this chunk (cached, do not modify)

webpack.ChunkGraph.getChunkModulesIterable(chunk): void
  • chunk {Chunk} the chunk
  • Returns: {Iterable} return the modules for this chunk

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

webpack.ChunkGraph.getChunkModuleSourceTypes(chunk, module): void
  • chunk {Chunk} chunk
  • module {Module} chunk module
  • Returns: {ReadonlySet} source types

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

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

webpack.ChunkGraph.getChunkRootModules(chunk): void
  • chunk {Chunk} the chunk
  • Returns: {Module[]} root modules of the chunks (ordered by identifier)

webpack.ChunkGraph.getChunkRuntimeModulesInOrder(chunk): void
  • chunk {Chunk} the chunk
  • Returns: {RuntimeModule[]} array of modules in order of execution

webpack.ChunkGraph.getChunkRuntimeModulesIterable(chunk): void
  • chunk {Chunk} the chunk
  • Returns: {Iterable} iterable of modules (do not modify)

webpack.ChunkGraph.getChunkRuntimeRequirements(chunk): void
  • chunk {Chunk} the chunk
  • Returns: {ReadonlySet} runtime requirements

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

webpack.ChunkGraph.getIntegratedChunksSize(chunkA, chunkB, options?): void
  • 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): void
  • module {Module} the module
  • Returns: {Chunk[]} array of chunks (cached, do not modify)

webpack.ChunkGraph.getModuleChunksIterable(module): void
  • module {Module} the module
  • Returns: {Iterable} iterable of chunks (do not modify)

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

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

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

webpack.ChunkGraph.getModuleId(module): void

webpack.ChunkGraph.getModuleRuntimeRequirements(module, runtime): void
  • module {Module} the module
  • runtime {RuntimeSpec} the runtime
  • Returns: {ReadonlySet} runtime requirements

webpack.ChunkGraph.getModuleRuntimes(module): void
  • module {Module} the module
  • Returns: {RuntimeSpecSet} runtimes

webpack.ChunkGraph.getModuleSourceTypes(module): void
  • module {Module} module
  • Returns: {ReadonlySet} source types

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

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

webpack.ChunkGraph.getNumberOfEntryModules(chunk): void
  • chunk {Chunk} the chunk
  • Returns: <number> the amount of entry modules in chunk

webpack.ChunkGraph.getNumberOfModuleChunks(module): void
  • module {Module} the module
  • Returns: <number> the number of chunk which contain the module

webpack.ChunkGraph.getNumberOfRuntimeModules(chunk): void
  • chunk {Chunk} the chunk
  • Returns: <number> the amount of entry modules in chunk

webpack.ChunkGraph.getOrderedChunkModules(chunk, comparator): void
  • 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): void
  • chunk {Chunk} the chunk
  • comparator <object> comparator function
  • Returns: {Iterable} return the modules for this chunk

webpack.ChunkGraph.getOrderedChunkModulesIterableBySourceType(chunk, sourceType, comparator): void
  • 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): void
  • module {Module} the module
  • sortFn <object> sort function
  • Returns: {Iterable} iterable of chunks (do not modify)

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

webpack.ChunkGraph.getRuntimeChunkDependentChunksIterable(chunk): void
  • 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): void
  • chunk {Chunk} the chunk
  • Returns: {ReadonlySet} runtime requirements

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

webpack.ChunkGraph.hasModuleHashes(module, runtime): void
  • 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?): void
  • 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
  • chunkA {Chunk} the target chunk
  • chunkB {Chunk} the chunk to integrate
  • Returns: {void}

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

webpack.ChunkGraph.isEntryModuleInChunk(module, chunk): void
  • 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): void
  • module {Module} the checked module
  • chunk {Chunk} the checked chunk
  • Returns: <boolean> true, if the chunk contains the module

webpack.ChunkGraph.isModuleInChunkGroup(module, chunkGroup): void
  • 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
  • oldModule {Module} the replaced module
  • newModule {Module} the replacing module
  • Returns: {void}

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

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

webpack.ChunkGraph.setModuleId(module, id): void
  • 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
  • chunk {Chunk} the chunk to upgrade
  • Returns: {void}

webpack.ChunkGraph.clearChunkGraphForChunk(chunk): void
  • chunk {Chunk} the chunk
  • Returns: {void}

webpack.ChunkGraph.clearChunkGraphForModule(module): void
  • module {Module} the module
  • Returns: {void}

webpack.ChunkGraph.getChunkGraphForChunk(chunk, deprecateMessage, deprecationCode): void
  • 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): void
  • 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
  • chunk {Chunk} the chunk
  • chunkGraph {ChunkGraph} the chunk graph
  • Returns: {void}

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