* Removes reasons of dependency block. * @param {Module} module module relationship for removal * @param {DependenciesBlockLike} block dependencies block * @returns {void}
(module, block)
| 4583 | * @returns {void} |
| 4584 | */ |
| 4585 | removeReasonsOfDependencyBlock(module, block) { |
| 4586 | if (block.blocks) { |
| 4587 | for (const b of block.blocks) { |
| 4588 | this.removeReasonsOfDependencyBlock(module, b); |
| 4589 | } |
| 4590 | } |
| 4591 | |
| 4592 | if (block.dependencies) { |
| 4593 | for (const dep of block.dependencies) { |
| 4594 | const originalModule = this.moduleGraph.getModule(dep); |
| 4595 | if (originalModule) { |
| 4596 | this.moduleGraph.removeConnection(dep); |
| 4597 | |
| 4598 | if (this.chunkGraph) { |
| 4599 | for (const chunk of this.chunkGraph.getModuleChunks( |
| 4600 | originalModule |
| 4601 | )) { |
| 4602 | this.patchChunksAfterReasonRemoval(originalModule, chunk); |
| 4603 | } |
| 4604 | } |
| 4605 | } |
| 4606 | } |
| 4607 | } |
| 4608 | } |
| 4609 | |
| 4610 | /** |
| 4611 | * Patch chunks after reason removal. |
no test coverage detected