MCPcopy
hub / github.com/webpack/webpack / getUsageKey

Method getUsageKey

lib/ExportsInfo.js:730–743  ·  view source on GitHub ↗

* Returns key representing the usage. * @param {RuntimeSpec} runtime runtime * @returns {string} key representing the usage

(runtime)

Source from the content-addressed store, hash-verified

728 * @returns {string} key representing the usage
729 */
730 getUsageKey(runtime) {
731 /** @type {(string | number)[]} */
732 const key = [];
733 if (this._redirectTo !== undefined) {
734 key.push(this._redirectTo.getUsageKey(runtime));
735 } else {
736 key.push(this._otherExportsInfo.getUsed(runtime));
737 }
738 key.push(this._sideEffectsOnlyInfo.getUsed(runtime));
739 for (const exportInfo of this.orderedOwnedExports) {
740 key.push(exportInfo.getUsed(runtime));
741 }
742 return key.join("|");
743 }
744
745 /**
746 * Checks whether this exports info is equally used.

Callers 1

groupChunksByExportsMethod · 0.80

Calls 2

pushMethod · 0.45
getUsedMethod · 0.45

Tested by

no test coverage detected