MCPcopy
hub / github.com/webpack/webpack / getChunkConditionMap

Method getChunkConditionMap

lib/ChunkGraph.js:904–911  ·  view source on GitHub ↗

* Gets chunk condition map. * @param {Chunk} chunk the chunk * @param {ChunkFilterPredicate} filterFn function used to filter chunks * @returns {ChunkConditionMap} chunk condition map

(chunk, filterFn)

Source from the content-addressed store, hash-verified

902 * @returns {ChunkConditionMap} chunk condition map
903 */
904 getChunkConditionMap(chunk, filterFn) {
905 /** @type {ChunkConditionMap} */
906 const map = Object.create(null);
907 for (const c of chunk.getAllReferencedChunks()) {
908 map[/** @type {ChunkId} */ (c.id)] = filterFn(c, this);
909 }
910 return map;
911 }
912
913 /**
914 * Checks whether this chunk graph contains the chunk.

Callers 6

generateMethod · 0.80
generateMethod · 0.80
generateMethod · 0.80
generateMethod · 0.80
generateMethod · 0.80
generateMethod · 0.80

Calls 2

createMethod · 0.45

Tested by

no test coverage detected