From 2cc85c64f1c64a2dbaeae276a3e2ca8420de76b7 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期三, 22 四月 2026 18:09:58 +0800
Subject: [PATCH] 上报转运调试
---
node_modules/webpack/lib/optimize/FlagIncludedChunksPlugin.js | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/node_modules/webpack/lib/optimize/FlagIncludedChunksPlugin.js b/node_modules/webpack/lib/optimize/FlagIncludedChunksPlugin.js
index 78e74d4..b8370ca 100644
--- a/node_modules/webpack/lib/optimize/FlagIncludedChunksPlugin.js
+++ b/node_modules/webpack/lib/optimize/FlagIncludedChunksPlugin.js
@@ -16,7 +16,7 @@
class FlagIncludedChunksPlugin {
/**
- * Apply the plugin
+ * Applies the plugin by registering its hooks on the compiler.
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
@@ -42,7 +42,17 @@
// precalculate the modulo values for each bit
const modulo = 1 / (1 / modulesCount) ** (1 / 31);
- const modulos = Array.from({ length: 31 }, (x, i) => (modulo ** i) | 0);
+ /** @type {number[]} */
+ const modulos = Array.from(
+ { length: 31 },
+ /**
+ * Handles the callback logic for this hook.
+ * @param {number} x x
+ * @param {number} i i
+ * @returns {number} result
+ */
+ (x, i) => (modulo ** i) | 0
+ );
// iterate all modules to generate bit values
let i = 0;
@@ -72,6 +82,7 @@
(chunkModulesHash.get(chunkA));
const chunkAModulesCount = chunkGraph.getNumberOfChunkModules(chunkA);
if (chunkAModulesCount === 0) continue;
+ /** @type {undefined | Module} */
let bestModule;
for (const module of chunkGraph.getChunkModulesIterable(chunkA)) {
if (
--
Gitblit v1.9.3