MCPcopy
hub / github.com/webpack/webpack / pushChunk

Method pushChunk

lib/ChunkGroup.js:244–251  ·  view source on GitHub ↗

* Appends a chunk to the group when it is not already a member. * @param {Chunk} chunk chunk being pushed into ChunkGroupS * @returns {boolean} returns true if chunk addition was successful.

(chunk)

Source from the content-addressed store, hash-verified

242 * @returns {boolean} returns true if chunk addition was successful.
243 */
244 pushChunk(chunk) {
245 const oldIdx = this.chunks.indexOf(chunk);
246 if (oldIdx >= 0) {
247 return false;
248 }
249 this.chunks.push(chunk);
250 return true;
251 }
252
253 /**
254 * Replaces one member chunk with another while preserving the group's

Callers 4

addChunkInGroupMethod · 0.95
sealMethod · 0.80
addAsyncEntrypointMethod · 0.80
executeModuleMethod · 0.80

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected