MCPcopy
hub / github.com/webpack/webpack / getChunkModulesIterableBySourceType

Method getChunkModulesIterableBySourceType

lib/ChunkGraph.js:681–687  ·  view source on GitHub ↗

* Gets chunk modules iterable by source type. * @param {Chunk} chunk the chunk * @param {string} sourceType source type * @returns {Iterable<Module> | undefined} return the modules for this chunk

(chunk, sourceType)

Source from the content-addressed store, hash-verified

679 * @returns {Iterable<Module> | undefined} return the modules for this chunk
680 */
681 getChunkModulesIterableBySourceType(chunk, sourceType) {
682 const cgc = this._getChunkGraphChunk(chunk);
683 const modulesWithSourceType = cgc.modules
684 .getFromUnorderedCache(cgc._modulesBySourceType)
685 .get(sourceType);
686 return modulesWithSourceType;
687 }
688
689 /**
690 * Sets chunk module source types.

Callers 9

generateMethod · 0.80
_chunkHasJsFunction · 0.80
chunkHasRuntimeOrJsFunction · 0.80
applyMethod · 0.80
generateMethod · 0.80
chunkHasCssMethod · 0.80
chunkHasJsFunction · 0.80
chunkHasCssFunction · 0.80

Calls 3

_getChunkGraphChunkMethod · 0.95
getFromUnorderedCacheMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected