MCPcopy
hub / github.com/webpack/webpack / process

Function process

lib/buildChunkGraph.js:1290–1314  ·  view source on GitHub ↗
(current, visited)

Source from the content-addressed store, hash-verified

1288 * @param {BlocksWithNestedBlocks} visited visited dependencies blocks
1289 */
1290 const process = (current, visited) => {
1291 const blockModules =
1292 /** @type {BlockModulesInFlattenTuples} */
1293 (getBlockModules(current, runtime));
1294 for (let i = 0, len = blockModules.length; i < len; i += 3) {
1295 const activeState = /** @type {ConnectionState} */ (
1296 blockModules[i + 1]
1297 );
1298 if (activeState === false) {
1299 continue;
1300 }
1301 const refModule = /** @type {Module} */ (blockModules[i]);
1302 if (visited.has(refModule)) {
1303 continue;
1304 }
1305
1306 visited.add(refModule);
1307
1308 if (refModule) {
1309 chunkGroup.setModulePreOrderIndex(refModule, preOrderIndex++);
1310 process(refModule, visited);
1311 chunkGroup.setModulePostOrderIndex(refModule, postOrderIndex++);
1312 }
1313 }
1314 };
1315 process(block, new Set());
1316 }
1317 }

Callers 1

visitModulesFunction · 0.70

Calls 5

getBlockModulesFunction · 0.85
hasMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected