Skip to main content
webpack / Chunk

Class: Chunk

Defined in: webpack/types.d.ts:1290

Extended by

Constructors

Constructor

new Chunk(name?, backCompat?): Chunk
Defined in: webpack/types.d.ts:1291

Parameters

name?
string
backCompat?
boolean

Returns

Chunk

Properties

auxiliaryFiles

auxiliaryFiles: Set<string>
Defined in: webpack/types.d.ts:1306

chunkReason?

optional chunkReason: string
Defined in: webpack/types.d.ts:1311

contentHash

contentHash: Record<string, string>
Defined in: webpack/types.d.ts:1309

cssFilenameTemplate?

optional cssFilenameTemplate: string | (pathData, assetInfo?) => string
Defined in: webpack/types.d.ts:1301

debugId

debugId: number
Defined in: webpack/types.d.ts:1294

extraAsync

extraAsync: boolean
Defined in: webpack/types.d.ts:1312

filenameTemplate?

optional filenameTemplate: string | (pathData, assetInfo?) => string
Defined in: webpack/types.d.ts:1298

files

files: Set<string>
Defined in: webpack/types.d.ts:1305

hash?

optional hash: string
Defined in: webpack/types.d.ts:1308

id

id: string | number
Defined in: webpack/types.d.ts:1292

idNameHints

idNameHints: SortableSet<string>
Defined in: webpack/types.d.ts:1296

ids

ids: ChunkId[]
Defined in: webpack/types.d.ts:1293

name?

optional name: string
Defined in: webpack/types.d.ts:1295

preventIntegration

preventIntegration: boolean
Defined in: webpack/types.d.ts:1297

rendered

rendered: boolean
Defined in: webpack/types.d.ts:1307

renderedHash?

optional renderedHash: string
Defined in: webpack/types.d.ts:1310

runtime

runtime: RuntimeSpec
Defined in: webpack/types.d.ts:1304

Accessors

entryModule

Get Signature

get entryModule(): Module
Defined in: webpack/types.d.ts:1317
Deprecated
Returns
Module

groupsIterable

Get Signature

get groupsIterable(): SortableSet<ChunkGroup>
Defined in: webpack/types.d.ts:1352
Returns
SortableSet<ChunkGroup>

modulesIterable

Get Signature

get modulesIterable(): Iterable<Module>
Defined in: webpack/types.d.ts:1322
Returns
Iterable<Module>

Methods

addGroup()

addGroup(chunkGroup): void
Defined in: webpack/types.d.ts:1348

Parameters

chunkGroup
ChunkGroup

Returns

void

addModule()

addModule(module): boolean
Defined in: webpack/types.d.ts:1319

Parameters

module
Module

Returns

boolean

canBeInitial()

canBeInitial(): boolean
Defined in: webpack/types.d.ts:1345

Returns

boolean

canBeIntegrated()

canBeIntegrated(otherChunk): boolean
Defined in: webpack/types.d.ts:1329

Parameters

otherChunk
Chunk

Returns

boolean

compareTo()

compareTo(otherChunk): -1 | 0 | 1
Defined in: webpack/types.d.ts:1323

Parameters

otherChunk
Chunk

Returns

-1 | 0 | 1

containsModule()

containsModule(module): boolean
Defined in: webpack/types.d.ts:1324

Parameters

module
Module

Returns

boolean

disconnectFromGroups()

disconnectFromGroups(): void
Defined in: webpack/types.d.ts:1353

Returns

void

getAllAsyncChunks()

getAllAsyncChunks(): Set<Chunk>
Defined in: webpack/types.d.ts:1356

Returns

Set<Chunk>

getAllInitialChunks()

getAllInitialChunks(): Set<Chunk>
Defined in: webpack/types.d.ts:1357

Returns

Set<Chunk>

getAllReferencedAsyncEntrypoints()

getAllReferencedAsyncEntrypoints(): Set<Entrypoint>
Defined in: webpack/types.d.ts:1359

Returns

Set<Entrypoint>

getAllReferencedChunks()

getAllReferencedChunks(): Set<Chunk>
Defined in: webpack/types.d.ts:1358

Returns

Set<Chunk>

getChildIdsByOrders()

getChildIdsByOrders(chunkGraph, filterFn?): Record<string, ChunkId[]>
Defined in: webpack/types.d.ts:1361

Parameters

chunkGraph
ChunkGraph
filterFn?
(c, chunkGraph) => boolean

Returns

Record<string, ChunkId[]>

getChildIdsByOrdersMap()

getChildIdsByOrdersMap(chunkGraph, includeDirectChildren?, filterFn?): ChunkChildIdsByOrdersMapByData
Defined in: webpack/types.d.ts:1369

Parameters

chunkGraph
ChunkGraph
includeDirectChildren?
boolean
filterFn?
(c, chunkGraph) => boolean

Returns

ChunkChildIdsByOrdersMapByData

getChildrenOfTypeInOrder()

getChildrenOfTypeInOrder(chunkGraph, type): ChunkChildOfTypeInOrder[]
Defined in: webpack/types.d.ts:1365

Parameters

chunkGraph
ChunkGraph
type
string

Returns

ChunkChildOfTypeInOrder[]

getChunkMaps()

getChunkMaps(realHash): ChunkMaps
Defined in: webpack/types.d.ts:1343

Parameters

realHash
boolean

Returns

ChunkMaps

Deprecated


getChunkModuleMaps()

getChunkModuleMaps(filterFn): ChunkModuleMaps
Defined in: webpack/types.d.ts:1334

Parameters

filterFn
(m) => boolean

Returns

ChunkModuleMaps

getEntryOptions()

getEntryOptions(): EntryOptions
Defined in: webpack/types.d.ts:1347

Returns

EntryOptions

getModules()

getModules(): Module[]
Defined in: webpack/types.d.ts:1325

Returns

Module[]

getNumberOfGroups()

getNumberOfGroups(): number
Defined in: webpack/types.d.ts:1351

Returns

number

getNumberOfModules()

getNumberOfModules(): number
Defined in: webpack/types.d.ts:1321

Returns

number

hasAsyncChunks()

hasAsyncChunks(): boolean
Defined in: webpack/types.d.ts:1360

Returns

boolean

hasChildByOrder()

hasChildByOrder(chunkGraph, type, includeDirectChildren?, filterFn?): boolean
Defined in: webpack/types.d.ts:1374

Parameters

chunkGraph
ChunkGraph
type
string
includeDirectChildren?
boolean
filterFn?
(c, chunkGraph) => boolean

Returns

boolean

hasEntryModule()

hasEntryModule(): boolean
Defined in: webpack/types.d.ts:1318

Returns

boolean

hasModuleInGraph()

hasModuleInGraph(filterFn, filterChunkFn?): boolean
Defined in: webpack/types.d.ts:1335

Parameters

filterFn
(m) => boolean
filterChunkFn?
(c, chunkGraph) => boolean

Returns

boolean

hasRuntime()

hasRuntime(): boolean
Defined in: webpack/types.d.ts:1344

Returns

boolean

integrate()

integrate(otherChunk): boolean
Defined in: webpack/types.d.ts:1328

Parameters

otherChunk
Chunk

Returns

boolean

integratedSize()

integratedSize(otherChunk, options): number
Defined in: webpack/types.d.ts:1333

Parameters

otherChunk
Chunk
options
ChunkSizeOptions

Returns

number

isEmpty()

isEmpty(): boolean
Defined in: webpack/types.d.ts:1330

Returns

boolean

isInGroup()

isInGroup(chunkGroup): boolean
Defined in: webpack/types.d.ts:1350

Parameters

chunkGroup
ChunkGroup

Returns

boolean

isOnlyInitial()

isOnlyInitial(): boolean
Defined in: webpack/types.d.ts:1346

Returns

boolean

modulesSize()

modulesSize(): number
Defined in: webpack/types.d.ts:1331

Returns

number

moveModule()

moveModule(module, otherChunk): void
Defined in: webpack/types.d.ts:1327

Parameters

module
Module
otherChunk
Chunk

Returns

void

remove()

remove(): void
Defined in: webpack/types.d.ts:1326

Returns

void

removeGroup()

removeGroup(chunkGroup): void
Defined in: webpack/types.d.ts:1349

Parameters

chunkGroup
ChunkGroup

Returns

void

removeModule()

removeModule(module): void
Defined in: webpack/types.d.ts:1320

Parameters

module
Module

Returns

void

size()

size(options?): number
Defined in: webpack/types.d.ts:1332

Parameters

options?
ChunkSizeOptions

Returns

number

split()

split(newChunk): void
Defined in: webpack/types.d.ts:1354

Parameters

newChunk
Chunk

Returns

void

updateHash()

updateHash(hash, chunkGraph): void
Defined in: webpack/types.d.ts:1355

Parameters

hash
Hash
chunkGraph
ChunkGraph

Returns

void