MCPcopy
hub / github.com/webpack/webpack / getOrderedModuleChunksIterable

Method getOrderedModuleChunksIterable

lib/ChunkGraph.js:609–613  ·  view source on GitHub ↗

* Gets ordered module chunks iterable. * @param {Module} module the module * @param {(a: Chunk, b: Chunk) => -1 | 0 | 1} sortFn sort function * @returns {Iterable<Chunk>} iterable of chunks (do not modify)

(module, sortFn)

Source from the content-addressed store, hash-verified

607 * @returns {Iterable<Chunk>} iterable of chunks (do not modify)
608 */
609 getOrderedModuleChunksIterable(module, sortFn) {
610 const cgm = this._getChunkGraphModule(module);
611 cgm.chunks.sortWith(sortFn);
612 return cgm.chunks;
613 }
614
615 /**
616 * Gets module chunks.

Callers 2

chunksIterableMethod · 0.80

Calls 2

_getChunkGraphModuleMethod · 0.95
sortWithMethod · 0.80

Tested by

no test coverage detected