MCPcopy
hub / github.com/webpack/webpack / connectChunkAndEntryModule

Method connectChunkAndEntryModule

lib/ChunkGraph.js:1174–1182  ·  view source on GitHub ↗

* Connects chunk and entry module. * @param {Chunk} chunk the new chunk * @param {Module} module the entry module * @param {Entrypoint} entrypoint the chunk group which must be loaded before the module is executed * @returns {void}

(chunk, module, entrypoint)

Source from the content-addressed store, hash-verified

1172 * @returns {void}
1173 */
1174 connectChunkAndEntryModule(chunk, module, entrypoint) {
1175 const cgm = this._getChunkGraphModule(module);
1176 const cgc = this._getChunkGraphChunk(chunk);
1177 if (cgm.entryInChunks === undefined) {
1178 cgm.entryInChunks = new Set();
1179 }
1180 cgm.entryInChunks.add(chunk);
1181 cgc.entryModules.set(module, entrypoint);
1182 }
1183
1184 /**
1185 * Connects chunk and runtime module.

Callers 4

executeModuleMethod · 0.95
integrateChunksMethod · 0.95
processQueueFunction · 0.80
sealMethod · 0.80

Calls 4

_getChunkGraphModuleMethod · 0.95
_getChunkGraphChunkMethod · 0.95
addMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected