MCPcopy
hub / github.com/webpack/webpack / computeReferences

Method computeReferences

lib/Compilation.js:2860–2871  ·  view source on GitHub ↗
(module)

Source from the content-addressed store, hash-verified

2858 * @returns {WeakReferences | undefined} references
2859 */
2860 const computeReferences = (module) => {
2861 /** @type {WeakReferences | undefined} */
2862 let references;
2863 for (const connection of moduleGraph.getOutgoingConnections(module)) {
2864 const d = connection.dependency;
2865 const m = connection.module;
2866 if (!d || !m || unsafeCacheDependencies.has(d)) continue;
2867 if (references === undefined) references = new WeakMap();
2868 references.set(d, m);
2869 }
2870 return references;
2871 };
2872
2873 /**
2874 * Compares references.

Callers

nothing calls this directly

Calls 10

getModuleIdMethod · 0.80
getBlockChunkGroupMethod · 0.80
keysMethod · 0.65
applyMethod · 0.65
hasMethod · 0.45
setMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected