On this page

class Entrypoint extends ChunkGroup
Source Code: lib/Entrypoint.js#L22

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
Returns:Entrypoint
Source Code: lib/ChunkGroup.js#L106
Type:Chunk[]
entrypoint.getModuleIndex(module): number | undefined
Attributes
module:Module
Returns:number | undefined
entrypoint.getModuleIndex2(module): number | undefined
Attributes
module:Module
Returns:number | undefined
Source Code: lib/ChunkGroup.js#L94
Type:number
Source Code: lib/ChunkGroup.js#L125
Type:number
Source Code: lib/ChunkGroup.js#L167
Type:string | null

Returns the configured name of the chunk group, if one was assigned. Updates the configured name of the chunk group.

Source Code: lib/ChunkGroup.js#L96
Source Code: lib/ChunkGroup.js#L108
Source Code: lib/ChunkGroup.js#L407
Source Code: lib/ChunkGroup.js#L436

Exposes the group's async dependency blocks as an iterable.

Source Code: lib/ChunkGroup.js#L325
Source Code: lib/ChunkGroup.js#L186
Type:string

Returns 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#L195
Type:string

Returns an identifier derived from the ids of the chunks currently in the group.

Source Code: lib/ChunkGroup.js#L379
entrypoint.addAsyncEntrypoint(entrypoint): boolean
Source Code: lib/ChunkGroup.js#L401
Attributes
entrypoint:Entrypoint
Returns:boolean

Registers an async entrypoint that is rooted in this chunk group.

entrypoint.addBlock(block): boolean
Source Code: lib/ChunkGroup.js#L445
Attributes

Associates an async dependency block with this chunk group.

entrypoint.addChild(group): boolean
Source Code: lib/ChunkGroup.js#L307
Attributes
Returns:boolean

Adds a child chunk group to the current group.

entrypoint.addDependOn(entrypoint): void
Source Code: lib/Entrypoint.js#L111
Attributes
entrypoint:Entrypoint
entrypoint.addOptions(options): void
Source Code: lib/ChunkGroup.js#L135
Attributes

Merges 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
Source Code: lib/ChunkGroup.js#L461
Attributes

Records where this chunk group originated from in user code. The origin is used for diagnostics, ordering, and reporting.

entrypoint.addParent(parentChunk): boolean
Source Code: lib/ChunkGroup.js#L350
Attributes
parentChunk:ChunkGroup
Returns:boolean

Records a parent chunk group relationship.

entrypoint.checkConstraints(): void
Source Code: lib/ChunkGroup.js#L671
entrypoint.compareTo(chunkGraph, otherGroup): -1 | 0 | 1
Source Code: lib/ChunkGroup.js#L539
Attributes
chunkGraph:ChunkGraph
otherGroup:ChunkGroup
Returns:-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
Source Code: lib/Entrypoint.js#L119
Attributes
entrypoint:Entrypoint
Returns:boolean
entrypoint.getBlocks(): AsyncDependenciesBlock[]
Source Code: lib/ChunkGroup.js#L415

Returns the async dependency blocks that create or reference this group.

entrypoint.getChildOrderOptions(childGroup, chunkGraph): Record<string, number>
Source Code: lib/ChunkGroup.js#L558
Attributes
childGroup:ChunkGroup
chunkGraph:ChunkGraph
Returns: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[]
Source Code: lib/ChunkGroup.js#L317
Returns:ChunkGroup[]

Returns the child chunk groups reachable from this group.

entrypoint.getChildrenByOrders(moduleGraph, chunkGraph): Record<string, ChunkGroup[]>
Source Code: lib/ChunkGroup.js#L602
Attributes
moduleGraph:ModuleGraph
chunkGraph:ChunkGraph
Returns: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
Source Code: lib/Entrypoint.js#L90
Returns:Chunk

Returns the chunk which contains the entrypoint modules (or at least the execution of them)

entrypoint.getFiles(): string[]
Source Code: lib/ChunkGroup.js#L473
Returns:string[]

Collects the emitted files produced by every chunk in the group.

entrypoint.getModulePostOrderIndex(module): number | undefined
Source Code: lib/ChunkGroup.js#L666
Attributes
module:Module
Returns:number | undefined

Returns the module's bottom-up traversal index within this group.

entrypoint.getModulePreOrderIndex(module): number | undefined
Source Code: lib/ChunkGroup.js#L647
Attributes
module:Module
Returns:number | undefined

Returns the module's top-down traversal index within this group.

entrypoint.getNumberOfBlocks(): number
Source Code: lib/ChunkGroup.js#L419
Returns:number
entrypoint.getNumberOfChildren(): number
Source Code: lib/ChunkGroup.js#L321
Returns:number
entrypoint.getNumberOfParents(): number
Source Code: lib/ChunkGroup.js#L366
Returns:number
entrypoint.getParents(): ChunkGroup[]
Source Code: lib/ChunkGroup.js#L362
Returns:ChunkGroup[]

Returns the parent chunk groups that can lead to this group.

entrypoint.getRuntimeChunk(): Chunk | null
Source Code: lib/Entrypoint.js#L68
Returns:Chunk | null

Fetches the chunk reference containing the webpack bootstrap code

entrypoint.hasBlock(block): boolean
Source Code: lib/ChunkGroup.js#L428
Attributes

Checks whether an async dependency block is associated with this group.

entrypoint.hasParent(parent): boolean
Source Code: lib/ChunkGroup.js#L375
Attributes
parent:ChunkGroup
Returns:boolean

Checks whether the provided group is registered as a parent.

entrypoint.insertChunk(chunk, before): boolean
Source Code: lib/ChunkGroup.js#L224
Attributes
chunk:Chunk
before:Chunk
Returns:boolean

Inserts a chunk directly before another chunk that already belongs to the group, preserving the rest of the ordering.

entrypoint.isInitial(): boolean
Source Code: lib/ChunkGroup.js#L298
Returns:boolean

Indicates whether this chunk group is loaded as part of the initial page load instead of being created lazily.

entrypoint.pushChunk(chunk): boolean
Source Code: lib/ChunkGroup.js#L245
Attributes
chunk:Chunk
Returns:boolean

Appends a chunk to the group when it is not already a member.

entrypoint.remove(): void
Source Code: lib/ChunkGroup.js#L492

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
Source Code: lib/ChunkGroup.js#L335
Attributes
Returns:boolean

Removes a child chunk group and clears the corresponding parent link on the removed child.

entrypoint.removeChunk(chunk): boolean
Source Code: lib/ChunkGroup.js#L284
Attributes
chunk:Chunk
Returns:boolean

Removes a chunk from this group.

entrypoint.removeParent(chunkGroup): boolean
Source Code: lib/ChunkGroup.js#L388
Attributes
chunkGroup:ChunkGroup
Returns:boolean

Removes a parent chunk group and clears the reverse child relationship.

entrypoint.replaceChunk(oldChunk, newChunk): boolean | undefined
Source Code: lib/ChunkGroup.js#L261
Attributes
oldChunk:Chunk
newChunk:Chunk
Returns:boolean | undefined

Replaces one member chunk with another while preserving the group's ordering and avoiding duplicates.

entrypoint.setEntrypointChunk(chunk): void
Source Code: lib/Entrypoint.js#L81
Attributes
chunk:Chunk

Sets the chunk with the entrypoint modules for an entrypoint.

entrypoint.setModulePostOrderIndex(module, index): void
Source Code: lib/ChunkGroup.js#L657
Attributes
module:Module
index:number

Stores the module's bottom-up traversal index within this group.

entrypoint.setModulePreOrderIndex(module, index): void
Source Code: lib/ChunkGroup.js#L638
Attributes
module:Module
index:number

Stores the module's top-down traversal index within this group.

entrypoint.setRuntimeChunk(chunk): void
Source Code: lib/Entrypoint.js#L60
Attributes
chunk:Chunk

Sets the runtimeChunk for an entrypoint.

entrypoint.sortItems(): void
Source Code: lib/ChunkGroup.js#L528
entrypoint.unshiftChunk(chunk): boolean
Source Code: lib/ChunkGroup.js#L205
Attributes
chunk:Chunk
Returns:boolean

Moves a chunk to the front of the group or inserts it when it is not already present.