MCPcopy
hub / github.com/webpack/webpack / identifier

Method identifier

lib/ExternalModule.js:859–875  ·  view source on GitHub ↗

* Returns the unique identifier used to reference this module. * @returns {string} a unique identifier of the module

()

Source from the content-addressed store, hash-verified

857 * @returns {string} a unique identifier of the module
858 */
859 identifier() {
860 let id = `external ${this._resolveExternalType(
861 this.externalType
862 )} ${JSON.stringify(this.request)}`;
863 const meta = /** @type {ImportDependencyMeta | undefined} */ (
864 this.dependencyMeta
865 );
866 if (meta) {
867 if (meta.phase) {
868 id += `|phase=${ImportPhaseUtils.stringify(meta.phase)}`;
869 }
870 if (meta.attributes) {
871 id += `|attributes=${JSON.stringify(meta.attributes)}`;
872 }
873 }
874 return id;
875 }
876
877 /**
878 * Returns a human-readable identifier for this module.

Callers 2

_getSourceDataMethod · 0.95
codeGenerationMethod · 0.95

Calls 1

_resolveExternalTypeMethod · 0.95

Tested by

no test coverage detected