MCPcopy
hub / github.com/webpack/webpack / disconnectChunk

Method disconnectChunk

lib/ChunkGraph.js:420–429  ·  view source on GitHub ↗

* Processes the provided chunk. * @param {Chunk} chunk the chunk which will be disconnected * @returns {void}

(chunk)

Source from the content-addressed store, hash-verified

418 * @returns {void}
419 */
420 disconnectChunk(chunk) {
421 const cgc = this._getChunkGraphChunk(chunk);
422 for (const module of cgc.modules) {
423 const cgm = this._getChunkGraphModule(module);
424 cgm.chunks.delete(chunk);
425 }
426 cgc.modules.clear();
427 chunk.disconnectFromGroups();
428 ChunkGraph.clearChunkGraphForChunk(chunk);
429 }
430
431 /**
432 * Processes the provided chunk.

Callers 4

cleanupUnconnectedGroupsFunction · 0.80
removeMethod · 0.80
cleanUpChunksMethod · 0.80
handlerMethod · 0.80

Calls 6

_getChunkGraphChunkMethod · 0.95
_getChunkGraphModuleMethod · 0.95
disconnectFromGroupsMethod · 0.80
deleteMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected