Represents a connected group of chunks along with the parent/child relationships, async blocks, and traversal metadata webpack tracks for it.
Extended by Entrypoint.
new ChunkGroup(): ChunkGroup
ChunkGroupChunk[]chunkGroup.getModuleIndex(module): number | undefined
chunkGroup.getModuleIndex2(module): number | undefined
numbernumberReturns the configured name of the chunk group, if one was assigned. Updates the configured name of the chunk group.
Source Code: lib/ChunkGroup.js#L96ChunkGroupOptionsOriginRecord[]SortableSet<ChunkGroup>Exposes the group's async dependency blocks as an iterable.
Source Code: lib/ChunkGroup.js#L325SortableSet<ChunkGroup>stringReturns a debug-only identifier derived from the group's member chunk debug ids. This is primarily useful in diagnostics and assertions.
Source Code: lib/ChunkGroup.js#L195stringReturns an identifier derived from the ids of the chunks currently in the group.
Source Code: lib/ChunkGroup.js#L379SortableSet<ChunkGroup>chunkGroup.addAsyncEntrypoint(entrypoint): boolean
EntrypointbooleanRegisters an async entrypoint that is rooted in this chunk group.
chunkGroup.addBlock(block): boolean
AsyncDependenciesBlockbooleanAssociates an async dependency block with this chunk group.
chunkGroup.addChild(group): boolean
ChunkGroupbooleanAdds a child chunk group to the current group.
chunkGroup.addOptions(options): void
ChunkGroupOptionsMerges additional options into the chunk group. Order-based options are combined by taking the higher priority, while unsupported conflicts surface as an explicit error.
chunkGroup.addOrigin(module, loc, request): void
Records where this chunk group originated from in user code. The origin is used for diagnostics, ordering, and reporting.
chunkGroup.addParent(parentChunk): boolean
ChunkGroupbooleanRecords a parent chunk group relationship.
chunkGroup.checkConstraints(): void
chunkGroup.compareTo(chunkGraph, otherGroup): -1 | 0 | 1
Sorting predicate which allows current ChunkGroup to be compared against another. Sorting values are based off of number of chunks in ChunkGroup.
chunkGroup.getBlocks(): AsyncDependenciesBlock[]
AsyncDependenciesBlock[]Returns the async dependency blocks that create or reference this group.
chunkGroup.getChildOrderOptions(childGroup, chunkGraph): Record<string, number>
Aggregates per-block *Order options for the blocks that bridge this
chunk group to the given child chunk group. *Order options are tied to
the originating import() call and must not be sourced from the child's
shared options, otherwise a webpackPrefetch/Preload directive from one
parent would leak into other parents that share the child by name.
chunkGroup.getChildren(): ChunkGroup[]
ChunkGroup[]Returns the child chunk groups reachable from this group.
chunkGroup.getChildrenByOrders(moduleGraph, chunkGraph): Record<string, ChunkGroup[]>
Groups child chunk groups by their *Order options and sorts each group
by descending order and deterministic chunk-group comparison.
chunkGroup.getFiles(): string[]
string[]Collects the emitted files produced by every chunk in the group.
chunkGroup.getModulePostOrderIndex(module): number | undefined
Returns the module's bottom-up traversal index within this group.
chunkGroup.getModulePreOrderIndex(module): number | undefined
Returns the module's top-down traversal index within this group.
chunkGroup.getNumberOfBlocks(): number
numberchunkGroup.getNumberOfChildren(): number
numberchunkGroup.getNumberOfParents(): number
numberchunkGroup.getParents(): ChunkGroup[]
ChunkGroup[]Returns the parent chunk groups that can lead to this group.
chunkGroup.hasBlock(block): boolean
AsyncDependenciesBlockbooleanChecks whether an async dependency block is associated with this group.
chunkGroup.hasParent(parent): boolean
ChunkGroupbooleanChecks whether the provided group is registered as a parent.
chunkGroup.insertChunk(chunk, before): boolean
Inserts a chunk directly before another chunk that already belongs to the group, preserving the rest of the ordering.
chunkGroup.isInitial(): boolean
booleanIndicates whether this chunk group is loaded as part of the initial page load instead of being created lazily.
chunkGroup.pushChunk(chunk): boolean
Appends a chunk to the group when it is not already a member.
chunkGroup.remove(): void
Disconnects this group from its parents, children, and chunks. Child groups are reconnected to this group's parents so the surrounding graph remains intact after removal.
chunkGroup.removeChild(group): boolean
ChunkGroupbooleanRemoves a child chunk group and clears the corresponding parent link on the removed child.
chunkGroup.removeChunk(chunk): boolean
Removes a chunk from this group.
chunkGroup.removeParent(chunkGroup): boolean
ChunkGroupbooleanRemoves a parent chunk group and clears the reverse child relationship.
chunkGroup.replaceChunk(oldChunk, newChunk): boolean | undefined
Replaces one member chunk with another while preserving the group's ordering and avoiding duplicates.
chunkGroup.setModulePostOrderIndex(module, index): void
Stores the module's bottom-up traversal index within this group.
chunkGroup.setModulePreOrderIndex(module, index): void
Stores the module's top-down traversal index within this group.
chunkGroup.sortItems(): void
chunkGroup.unshiftChunk(chunk): boolean
Moves a chunk to the front of the group or inserts it when it is not already present.