MCPcopy
hub / github.com/webpack/webpack / patchChunksAfterReasonRemoval

Method patchChunksAfterReasonRemoval

lib/Compilation.js:4616–4627  ·  view source on GitHub ↗

* Patch chunks after reason removal. * @param {Module} module module to patch tie * @param {Chunk} chunk chunk to patch tie * @returns {void}

(module, chunk)

Source from the content-addressed store, hash-verified

4614 * @returns {void}
4615 */
4616 patchChunksAfterReasonRemoval(module, chunk) {
4617 if (!module.hasReasons(this.moduleGraph, chunk.runtime)) {
4618 this.removeReasonsOfDependencyBlock(module, module);
4619 }
4620 if (
4621 !module.hasReasonForChunk(chunk, this.moduleGraph, this.chunkGraph) &&
4622 this.chunkGraph.isModuleInChunk(module, chunk)
4623 ) {
4624 this.chunkGraph.disconnectChunkAndModule(chunk, module);
4625 this.removeChunkFromDependencies(module, chunk);
4626 }
4627 }
4628
4629 /**
4630 * Removes chunk from dependencies.

Callers 2

iteratorDependencyMethod · 0.95

Calls 6

hasReasonsMethod · 0.80
hasReasonForChunkMethod · 0.80
isModuleInChunkMethod · 0.80

Tested by

no test coverage detected