On this page

A Chunk is a unit of encapsulation for Modules. Chunks are "rendered" into bundles that get emitted when the build completes.

  • {Chunk}
new HotUpdateChunk(): HotUpdateChunk
Returns:
{HotUpdateChunk}
  • auxiliaryFiles {Set}
  • chunkReason <string>
  • contentHash {Record<string, string>}
  • cssFilenameTemplate <string> | <object>
  • debugId <number>
  • entryModule {Module}
  • extraAsync <boolean>
  • filenameTemplate <string> | <object>
  • files {Set}
  • groupsIterable {SortableSet}
  • hash <string>
  • id <string> | <number>
  • idNameHints {SortableSet}
  • ids {ChunkId[]}
  • modulesIterable {Iterable} A Chunk is a unit of encapsulation for Modules. Chunks are "rendered" into bundles that get emitted when the build completes.
  • name <string>
  • preventIntegration <boolean>
  • rendered <boolean>
  • renderedHash <string>
  • runtime {RuntimeSpec}
webpack.HotUpdateChunk.addGroup(chunkGroup): void
  • chunkGroup {ChunkGroup} the chunkGroup the chunk is being added
  • Returns: {void}

webpack.HotUpdateChunk.addModule(module): void
  • module {Module} the module
  • Returns: <boolean> true, if the chunk could be added

webpack.HotUpdateChunk.canBeInitial(): boolean
Returns:<boolean>
whether or not this chunk can be an initial chunk

webpack.HotUpdateChunk.canBeIntegrated(otherChunk): void
  • otherChunk {Chunk} the other chunk
  • Returns: <boolean> true, if chunks could be integrated

webpack.HotUpdateChunk.compareTo(otherChunk): void
  • otherChunk {Chunk} the chunk to compare with
  • Returns: {-1|0|1} the comparison result

webpack.HotUpdateChunk.containsModule(module): void
  • module {Module} the module
  • Returns: <boolean> true, if the chunk contains the module

webpack.HotUpdateChunk.disconnectFromGroups(): void
Returns:
{void}

webpack.HotUpdateChunk.getAllAsyncChunks(): Set<Chunk>
Returns:
{Set } a set of all the async chunks

webpack.HotUpdateChunk.getAllInitialChunks(): Set<Chunk>
Returns:
{Set } a set of all the initial chunks (including itself)

webpack.HotUpdateChunk.getAllReferencedAsyncEntrypoints(): Set<Entrypoint>
Returns:
{Set } a set of all the referenced entrypoints

webpack.HotUpdateChunk.getAllReferencedChunks(): Set<Chunk>
Returns:
{Set } a set of all the referenced chunks (including itself)

webpack.HotUpdateChunk.getChildIdsByOrders(chunkGraph, filterFn?): void
  • chunkGraph {ChunkGraph} the chunk graph
  • filterFn <object> function used to filter chunks
  • Returns: {Record<string, ChunkId[]>} a record object of names to lists of child ids(?)

webpack.HotUpdateChunk.getChildIdsByOrdersMap(chunkGraph, includeDirectChildren?, filterFn?): void
  • chunkGraph {ChunkGraph} the chunk graph
  • includeDirectChildren <boolean> include direct children (by default only children of async children are included)
  • filterFn <object> function used to filter chunks
  • Returns: {ChunkChildIdsByOrdersMapByData} a record object of names to lists of child ids(?) by chunk id

webpack.HotUpdateChunk.getChildrenOfTypeInOrder(chunkGraph, type): void
  • chunkGraph {ChunkGraph} the chunk graph
  • type <string> option name
  • Returns: {ChunkChildOfTypeInOrder[]} referenced chunks for a specific type

webpack.HotUpdateChunk.getChunkMaps(realHash): ChunkMaps
Stability: 0Deprecated
Attributes
realHash:<boolean>
Returns:
{ChunkMaps}

webpack.HotUpdateChunk.getChunkModuleMaps(filterFn): ChunkModuleMaps
Attributes
filterFn:<object>
function used to filter modules
Returns:
{ChunkModuleMaps} module map information

webpack.HotUpdateChunk.getEntryOptions(): EntryOptions
Returns:
{EntryOptions} the entry options for this chunk

webpack.HotUpdateChunk.getModules(): Module[]
Returns:
{Module[]} the modules for this chunk

webpack.HotUpdateChunk.getNumberOfGroups(): number
Returns:<number>
the amount of groups that the said chunk is in

webpack.HotUpdateChunk.getNumberOfModules(): number
Returns:<number>
the number of module which are contained in this chunk

webpack.HotUpdateChunk.hasAsyncChunks(): boolean
Returns:<boolean>
true, if the chunk references async chunks

webpack.HotUpdateChunk.hasChildByOrder(chunkGraph, type, includeDirectChildren?, filterFn?): void
  • chunkGraph {ChunkGraph} the chunk graph
  • type <string> option name
  • includeDirectChildren <boolean> include direct children (by default only children of async children are included)
  • filterFn <object> function used to filter chunks
  • Returns: <boolean> true when the child is of type order, otherwise false

webpack.HotUpdateChunk.hasEntryModule(): boolean
Returns:<boolean>
true, if the chunk contains an entry module

webpack.HotUpdateChunk.hasModuleInGraph(filterFn, filterChunkFn?): boolean
Attributes
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.HotUpdateChunk.hasRuntime(): boolean
Returns:<boolean>
whether or not the Chunk will have a runtime

webpack.HotUpdateChunk.integrate(otherChunk): void
  • otherChunk {Chunk} the other chunk
  • Returns: <boolean> true, if the specified chunk has been integrated

webpack.HotUpdateChunk.integratedSize(otherChunk, options): void
  • otherChunk {Chunk} the other chunk
  • options {ChunkSizeOptions} options object
  • Returns: <number> total size of the chunk or false if the chunk can't be integrated

webpack.HotUpdateChunk.isEmpty(): boolean
Returns:<boolean>
true, if this chunk contains no module

webpack.HotUpdateChunk.isInGroup(chunkGroup): void
  • chunkGroup {ChunkGroup} the chunkGroup to check
  • Returns: <boolean> returns true if chunk has chunkGroup reference and exists in chunkGroup

webpack.HotUpdateChunk.isOnlyInitial(): boolean
Returns:<boolean>
whether this chunk can only be an initial chunk

webpack.HotUpdateChunk.modulesSize(): number
Returns:<number>
total size of all modules in this chunk

webpack.HotUpdateChunk.moveModule(module, otherChunk): void
  • module {Module} the module
  • otherChunk {Chunk} the target chunk
  • Returns: {void}

webpack.HotUpdateChunk.remove(): void
Returns:
{void}

webpack.HotUpdateChunk.removeGroup(chunkGroup): void
  • chunkGroup {ChunkGroup} the chunkGroup the chunk is being removed from
  • Returns: {void}

webpack.HotUpdateChunk.removeModule(module): void
  • module {Module} the module
  • Returns: {void}

webpack.HotUpdateChunk.size(options?): void
  • options {ChunkSizeOptions} options object
  • Returns: <number> total size of this chunk

webpack.HotUpdateChunk.split(newChunk): void
  • newChunk {Chunk} the new chunk that will be split out of
  • Returns: {void}

webpack.HotUpdateChunk.updateHash(hash, chunkGraph): void
  • hash {Hash} hash (will be modified)
  • chunkGraph {ChunkGraph} the chunk graph
  • Returns: {void}