MCPcopy
hub / github.com/webpack/webpack / isDeferred

Method isDeferred

lib/ModuleGraph.js:912–925  ·  view source on GitHub ↗

* Checks whether this module graph is deferred. * @param {Module} module the module * @returns {boolean} true, if the module is used as a deferred module at least once

(module)

Source from the content-addressed store, hash-verified

910 * @returns {boolean} true, if the module is used as a deferred module at least once
911 */
912 isDeferred(module) {
913 if (this.isAsync(module)) return false;
914 const connections = this.getIncomingConnections(module);
915 for (const connection of connections) {
916 if (
917 !connection.dependency ||
918 !(connection.dependency instanceof HarmonyImportDependency)
919 ) {
920 continue;
921 }
922 if (ImportPhaseUtils.isDefer(connection.dependency.phase)) return true;
923 }
924 return false;
925 }
926
927 /**
928 * Updates async using the provided module.

Callers 3

applyMethod · 0.80
_getModulesWithInfoMethod · 0.80
updateHashMethod · 0.80

Calls 2

isAsyncMethod · 0.95

Tested by

no test coverage detected