* Updates the hash with the data contributed by this instance. * @param {Hash} hash hash (will be modified) * @param {ChunkGraph} chunkGraph the chunk graph * @returns {void}
(hash, chunkGraph)
| 632 | * @returns {void} |
| 633 | */ |
| 634 | updateHash(hash, chunkGraph) { |
| 635 | hash.update( |
| 636 | `${this.id} ${this.ids ? this.ids.join() : ""} ${this.name || ""} ` |
| 637 | ); |
| 638 | const xor = new StringXor(); |
| 639 | for (const m of chunkGraph.getChunkModulesIterable(this)) { |
| 640 | xor.add(chunkGraph.getModuleHash(m, this.runtime)); |
| 641 | } |
| 642 | xor.updateHash(hash); |
| 643 | const entryModules = |
| 644 | chunkGraph.getChunkEntryModulesWithChunkGroupIterable(this); |
| 645 | for (const [m, chunkGroup] of entryModules) { |
| 646 | hash.update( |
| 647 | `entry${chunkGraph.getModuleId(m)}${ |
| 648 | /** @type {ChunkGroup} */ (chunkGroup).id |
| 649 | }` |
| 650 | ); |
| 651 | } |
| 652 | } |
| 653 | |
| 654 | /** |
| 655 | * Gets all async chunks. |
no test coverage detected