MCPcopy
hub / github.com/webpack/webpack / connectChunkAndRuntimeModule

Method connectChunkAndRuntimeModule

lib/ChunkGraph.js:1190–1198  ·  view source on GitHub ↗

* Connects chunk and runtime module. * @param {Chunk} chunk the new chunk * @param {RuntimeModule} module the runtime module * @returns {void}

(chunk, module)

Source from the content-addressed store, hash-verified

1188 * @returns {void}
1189 */
1190 connectChunkAndRuntimeModule(chunk, module) {
1191 const cgm = this._getChunkGraphModule(module);
1192 const cgc = this._getChunkGraphChunk(chunk);
1193 if (cgm.runtimeInChunks === undefined) {
1194 cgm.runtimeInChunks = new Set();
1195 }
1196 cgm.runtimeInChunks.add(chunk);
1197 cgc.runtimeModules.add(module);
1198 }
1199
1200 /**
1201 * Adds full hash module to chunk.

Callers 1

addRuntimeModuleMethod · 0.80

Calls 3

_getChunkGraphModuleMethod · 0.95
_getChunkGraphChunkMethod · 0.95
addMethod · 0.45

Tested by

no test coverage detected