MCPcopy
hub / github.com/webpack/webpack / isModuleUsed

Method isModuleUsed

lib/ExportsInfo.js:576–582  ·  view source on GitHub ↗

* Checks whether this exports info is module used. * @param {RuntimeSpec} runtime the runtime * @returns {boolean} true, when the module is used in any way

(runtime)

Source from the content-addressed store, hash-verified

574 * @returns {boolean} true, when the module is used in any way
575 */
576 isModuleUsed(runtime) {
577 if (this.isUsed(runtime)) return true;
578 if (this._sideEffectsOnlyInfo.getUsed(runtime) !== UsageState.Unused) {
579 return true;
580 }
581 return false;
582 }
583
584 /**
585 * Returns set of used exports, or true (when namespace object is used), or false (when unused), or null (when unknown).

Callers 1

applyMethod · 0.80

Calls 2

isUsedMethod · 0.95
getUsedMethod · 0.45

Tested by

no test coverage detected