* Updates the hash with the data contributed by this instance. * @param {Hash} hash the hash used to track dependencies * @param {UpdateHashContext} context context * @returns {void}
(hash, context)
| 1332 | * @returns {void} |
| 1333 | */ |
| 1334 | updateHash(hash, context) { |
| 1335 | const { chunkGraph } = context; |
| 1336 | hash.update( |
| 1337 | `${this._resolveExternalType(this.externalType)}${JSON.stringify( |
| 1338 | this.request |
| 1339 | )}${this.isOptional(chunkGraph.moduleGraph)}` |
| 1340 | ); |
| 1341 | const meta = /** @type {ImportDependencyMeta | undefined} */ ( |
| 1342 | this.dependencyMeta |
| 1343 | ); |
| 1344 | if (meta) { |
| 1345 | if (meta.phase) { |
| 1346 | hash.update(`|phase=${ImportPhaseUtils.stringify(meta.phase)}`); |
| 1347 | } |
| 1348 | if (meta.attributes) { |
| 1349 | hash.update(`|attributes=${JSON.stringify(meta.attributes)}`); |
| 1350 | } |
| 1351 | } |
| 1352 | super.updateHash(hash, context); |
| 1353 | } |
| 1354 | |
| 1355 | /** |
| 1356 | * Serializes this instance into the provided serializer context. |
nothing calls this directly
no test coverage detected