On this page

Attributes
new ChunkGroup(): ChunkGroup
Returns:<ChunkGroup>
  • asyncEntrypointsIterable {SortableSet}
  • blocksIterable {Iterable}
  • childrenIterable {SortableSet}
  • chunks <Chunk[]>
  • debugId <string> get a uniqueId for ChunkGroup, made up of its member Chunk debugId's
  • getModuleIndex <object>
  • getModuleIndex2 <object>
  • groupDebugId <number>
  • id <string> get a unique id for ChunkGroup, made up of its member Chunk id's
  • index <number>
  • name <string> | <null> returns the name of current ChunkGroup sets a new name for current ChunkGroup
  • options {ChunkGroupOptions}
  • origins {OriginRecord[]}
  • parentsIterable {SortableSet}
addAsyncEntrypoint(entrypoint): boolean
Attributes
entrypoint:<Entrypoint>
Returns:<boolean>

addBlock(block): boolean
Attributes
Returns:<boolean>

addChild(group): boolean
Attributes
Returns:<boolean>

addOptions(options): void
  • options {ChunkGroupOptions}
  • Returns: {void}

when a new chunk is added to a chunkGroup, addingOptions will occur.


addOrigin(module, loc, request): void
Attributes
module:<Module> | <null>
loc:
{DependencyLocation}
request:<string>
Returns:
{void}

addParent(parentChunk): boolean
Attributes
parentChunk:<ChunkGroup>
Returns:<boolean>

checkConstraints(): void
Returns:
{void}

compareTo(chunkGraph, otherGroup): -1 | 0 | 1
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.


getBlocks(): AsyncDependenciesBlock[]

getChildren(): ChunkGroup[]

getChildrenByOrders(moduleGraph, chunkGraph): Record<string, ChunkGroup[]>
Attributes
moduleGraph:<ModuleGraph>
chunkGraph:<ChunkGraph>
Returns:
{Record<string, ChunkGroup[]>}

getFiles(): string[]
Returns:<string[]>

getModulePostOrderIndex(module): number | undefined
Attributes
module:<Module>

Gets the bottom-up index of a module in this ChunkGroup


getModulePreOrderIndex(module): number | undefined
Attributes
module:<Module>

Gets the top-down index of a module in this ChunkGroup


getNumberOfBlocks(): number
Returns:<number>

getNumberOfChildren(): number
Returns:<number>

getNumberOfParents(): number
Returns:<number>

getParents(): ChunkGroup[]

hasBlock(block): boolean
Attributes
Returns:<boolean>

hasParent(parent): boolean
Attributes
Returns:<boolean>

insertChunk(chunk, before): boolean
Attributes
chunk:<Chunk>
before:<Chunk>
Returns:<boolean>

inserts a chunk before another existing chunk in group


isInitial(): boolean
Returns:<boolean>

pushChunk(chunk): boolean
Attributes
chunk:<Chunk>
Returns:<boolean>

add a chunk into ChunkGroup. Is pushed on or prepended


remove(): void
Returns:
{void}

removeChild(group): boolean
Attributes
Returns:<boolean>

removeChunk(chunk): boolean
Attributes
chunk:<Chunk>
Returns:<boolean>

removeParent(chunkGroup): boolean
Attributes
chunkGroup:<ChunkGroup>
Returns:<boolean>

replaceChunk(oldChunk, newChunk): boolean | undefined
Attributes
oldChunk:<Chunk>
newChunk:<Chunk>

setModulePostOrderIndex(module, index): void
Attributes
module:<Module>
index:<number>
Returns:
{void}

Sets the bottom-up index of a module in this ChunkGroup


setModulePreOrderIndex(module, index): void
Attributes
module:<Module>
index:<number>
Returns:
{void}

Sets the top-down index of a module in this ChunkGroup


sortItems(): void
Returns:
{void}

unshiftChunk(chunk): boolean
Attributes
chunk:<Chunk>
Returns:<boolean>

Performs an unshift of a specific chunk