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/FlagDependencyExportsPlugin.js | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/node_modules/webpack/lib/FlagDependencyExportsPlugin.js b/node_modules/webpack/lib/FlagDependencyExportsPlugin.js
index b26e3b0..e186f33 100644
--- a/node_modules/webpack/lib/FlagDependencyExportsPlugin.js
+++ b/node_modules/webpack/lib/FlagDependencyExportsPlugin.js
@@ -14,6 +14,7 @@
/** @typedef {import("./Dependency").ExportSpec} ExportSpec */
/** @typedef {import("./Dependency").ExportsSpec} ExportsSpec */
/** @typedef {import("./ExportsInfo")} ExportsInfo */
+/** @typedef {import("./ExportsInfo").ExportInfoName} ExportInfoName */
/** @typedef {import("./ExportsInfo").RestoreProvidedData} RestoreProvidedData */
/** @typedef {import("./Module")} Module */
/** @typedef {import("./Module").BuildInfo} BuildInfo */
@@ -23,7 +24,7 @@
class FlagDependencyExportsPlugin {
/**
- * Apply the plugin
+ * Applies the plugin by registering its hooks on the compiler.
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
@@ -50,7 +51,9 @@
// Step 1: Try to restore cached provided export info from cache
logger.time("restore cached provided exports");
asyncLib.each(
- modules,
+ /** @type {import("neo-async").IterableCollection<Module>} */ (
+ /** @type {unknown} */ (modules)
+ ),
(module, callback) => {
const exportsInfo = moduleGraph.getExportsInfo(module);
// If the module doesn't have an exportsType, it's a module
@@ -126,6 +129,7 @@
let changed = false;
/**
+ * Process dependencies block.
* @param {DependenciesBlock} depBlock the dependencies block
* @returns {void}
*/
@@ -139,6 +143,7 @@
};
/**
+ * Process dependency.
* @param {Dependency} dep the dependency
* @returns {void}
*/
@@ -149,6 +154,7 @@
};
/**
+ * Process exports spec.
* @param {Dependency} dep dependency
* @param {ExportsSpec} exportDesc info
* @returns {void}
@@ -188,11 +194,14 @@
*/
const mergeExports = (exportsInfo, exports) => {
for (const exportNameOrSpec of exports) {
+ /** @type {ExportInfoName} */
let name;
let canMangle = globalCanMangle;
let terminalBinding = globalTerminalBinding;
+ /** @type {ExportSpec["exports"]} */
let exports;
let from = globalFrom;
+ /** @type {ExportSpec["export"]} */
let fromExport;
let priority = globalPriority;
let hidden = false;
@@ -270,6 +279,7 @@
// Recalculate target exportsInfo
const target = exportInfo.getTarget(moduleGraph);
+ /** @type {undefined | ExportsInfo} */
let targetExportsInfo;
if (target) {
const targetModuleExportsInfo =
--
Gitblit v1.9.3