class Entrypoint extends ChunkGroup
Entrypoint serves as an encapsulation primitive for chunks that are a part of a single ChunkGroup. They represent all bundles that need to be loaded for a single instance of a page. Multi-page application architectures will typically yield multiple Entrypoint objects inside of the compilation, whereas a Single Page App may only contain one with many lazy-loaded chunks.
new Entrypoint(): Entrypoint
EntrypointChunk[]entrypoint.getModuleIndex(module): number | undefined
entrypoint.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>entrypoint.addAsyncEntrypoint(entrypoint): boolean
EntrypointbooleanRegisters an async entrypoint that is rooted in this chunk group.
entrypoint.addBlock(block): boolean
AsyncDependenciesBlockbooleanAssociates an async dependency block with this chunk group.
entrypoint.addChild(group): boolean
ChunkGroupbooleanAdds a child chunk group to the current group.
entrypoint.addDependOn(entrypoint): void
Entrypointentrypoint.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.
entrypoint.addOrigin(module, loc, request): void
Records where this chunk group originated from in user code. The origin is used for diagnostics, ordering, and reporting.
entrypoint.addParent(parentChunk): boolean
ChunkGroupbooleanRecords a parent chunk group relationship.
entrypoint.checkConstraints(): void
entrypoint.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.
entrypoint.dependOn(entrypoint): boolean
Entrypointbooleanentrypoint.getBlocks(): AsyncDependenciesBlock[]
AsyncDependenciesBlock[]Returns the async dependency blocks that create or reference this group.
entrypoint.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.
entrypoint.getChildren(): ChunkGroup[]
ChunkGroup[]Returns the child chunk groups reachable from this group.
entrypoint.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.
entrypoint.getEntrypointChunk(): Chunk
ChunkReturns the chunk which contains the entrypoint modules (or at least the execution of them)
entrypoint.getFiles(): string[]
string[]Collects the emitted files produced by every chunk in the group.
entrypoint.getModulePostOrderIndex(module): number | undefined
Returns the module's bottom-up traversal index within this group.
entrypoint.getModulePreOrderIndex(module): number | undefined
Returns the module's top-down traversal index within this group.
entrypoint.getNumberOfBlocks(): number
numberentrypoint.getNumberOfChildren(): number
numberentrypoint.getNumberOfParents(): number
numberentrypoint.getParents(): ChunkGroup[]
ChunkGroup[]Returns the parent chunk groups that can lead to this group.
entrypoint.getRuntimeChunk(): Chunk | null
Fetches the chunk reference containing the webpack bootstrap code
entrypoint.hasBlock(block): boolean
AsyncDependenciesBlockbooleanChecks whether an async dependency block is associated with this group.
entrypoint.hasParent(parent): boolean
ChunkGroupbooleanChecks whether the provided group is registered as a parent.
entrypoint.insertChunk(chunk, before): boolean
Inserts a chunk directly before another chunk that already belongs to the group, preserving the rest of the ordering.
entrypoint.isInitial(): boolean
booleanIndicates whether this chunk group is loaded as part of the initial page load instead of being created lazily.
entrypoint.pushChunk(chunk): boolean
Appends a chunk to the group when it is not already a member.
entrypoint.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.
entrypoint.removeChild(group): boolean
ChunkGroupbooleanRemoves a child chunk group and clears the corresponding parent link on the removed child.
entrypoint.removeChunk(chunk): boolean
Removes a chunk from this group.
entrypoint.removeParent(chunkGroup): boolean
ChunkGroupbooleanRemoves a parent chunk group and clears the reverse child relationship.
entrypoint.replaceChunk(oldChunk, newChunk): boolean | undefined
Replaces one member chunk with another while preserving the group's ordering and avoiding duplicates.
entrypoint.setEntrypointChunk(chunk): void
ChunkSets the chunk with the entrypoint modules for an entrypoint.
entrypoint.setModulePostOrderIndex(module, index): void
Stores the module's bottom-up traversal index within this group.
entrypoint.setModulePreOrderIndex(module, index): void
Stores the module's top-down traversal index within this group.
entrypoint.setRuntimeChunk(chunk): void
ChunkSets the runtimeChunk for an entrypoint.
entrypoint.sortItems(): void
entrypoint.unshiftChunk(chunk): boolean
Moves a chunk to the front of the group or inserts it when it is not already present.