MCPcopy
hub / github.com/webpack/webpack / handler

Method handler

lib/esm/ModuleChunkLoadingPlugin.js:47–57  ·  view source on GitHub ↗
(chunk, set)

Source from the content-addressed store, hash-verified

45 * @param {RuntimeRequirements} set runtime requirements
46 */
47 const handler = (chunk, set) => {
48 if (onceForChunkSet.has(chunk)) return;
49 onceForChunkSet.add(chunk);
50 if (!isEnabledForChunk(chunk)) return;
51 set.add(RuntimeGlobals.moduleFactoriesAddOnly);
52 set.add(RuntimeGlobals.hasOwnProperty);
53 compilation.addRuntimeModule(
54 chunk,
55 new ModuleChunkLoadingRuntimeModule(set)
56 );
57 };
58 compilation.hooks.runtimeRequirementInTree
59 .for(RuntimeGlobals.ensureChunkHandlers)
60 .tap(PLUGIN_NAME, handler);

Callers

nothing calls this directly

Calls 3

addRuntimeModuleMethod · 0.80
hasMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected