MCPcopy
hub / github.com/webpack/webpack / getChunkRuntimeModulesInOrder

Method getChunkRuntimeModulesInOrder

lib/ChunkGraph.js:1434–1447  ·  lib/ChunkGraph.js::ChunkGraph.getChunkRuntimeModulesInOrder

* Gets chunk runtime modules in order. * @param {Chunk} chunk the chunk * @returns {RuntimeModule[]} array of modules in order of execution

(chunk)

Source from the content-addressed store, hash-verified

1432 * @returns {RuntimeModule[]} array of modules in order of execution
1433 */
1434 getChunkRuntimeModulesInOrder(chunk) {
1435 const cgc = this._getChunkGraphChunk(chunk);
1436 const array = [...cgc.runtimeModules];
1437 array.sort(
1438 concatComparators(
1439 compareSelect(
1440 (r) => /** @type {RuntimeModule} */ (r).stage,
1441 compareIds
1442 ),
1443 compareModulesByIdentifier
1444 )
1445 );
1446 return array;
1447 }
1448
1449 /**
1450 * Gets chunk full hash modules iterable.

Callers 5

executeModuleMethod · 0.95
applyMethod · 0.80
applyMethod · 0.80
renderMainMethod · 0.80
applyMethod · 0.80

Calls 4

_getChunkGraphChunkMethod · 0.95
concatComparatorsFunction · 0.85
compareSelectFunction · 0.85
sortMethod · 0.80

Tested by

no test coverage detected