From 9bce51f651aad297ef9eb6df832bfdaf1de05d84 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期三, 22 四月 2026 14:27:54 +0800
Subject: [PATCH] 青岛推送

---
 node_modules/webpack/lib/ModuleInfoHeaderPlugin.js |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/node_modules/webpack/lib/ModuleInfoHeaderPlugin.js b/node_modules/webpack/lib/ModuleInfoHeaderPlugin.js
index eaccdb2..9e338ee 100644
--- a/node_modules/webpack/lib/ModuleInfoHeaderPlugin.js
+++ b/node_modules/webpack/lib/ModuleInfoHeaderPlugin.js
@@ -21,6 +21,7 @@
 /** @typedef {import("./RequestShortener")} RequestShortener */
 
 /**
+ * Join iterable with comma.
  * @template T
  * @param {Iterable<T>} iterable iterable
  * @returns {string} joined with comma
@@ -42,6 +43,7 @@
 };
 
 /**
+ * Print exports info to source.
  * @param {ConcatSource} source output
  * @param {string} indent spacing
  * @param {ExportsInfo} exportsInfo data
@@ -63,6 +65,7 @@
 	let alreadyPrintedExports = 0;
 
 	// determine exports to print
+	/** @type {ExportInfo[]} */
 	const printedExports = [];
 	for (const exportInfo of exportsInfo.orderedExports) {
 		if (!alreadyPrinted.has(exportInfo)) {
@@ -145,20 +148,24 @@
 	}
 };
 
-/** @type {WeakMap<RequestShortener, WeakMap<Module, { header: RawSource | undefined, full: WeakMap<Source, CachedSource> }>>} */
+/** @typedef {{ header: RawSource | undefined, full: WeakMap<Source, CachedSource> }} CacheEntry */
+/** @type {WeakMap<RequestShortener, WeakMap<Module, CacheEntry>>} */
 const caches = new WeakMap();
 
 const PLUGIN_NAME = "ModuleInfoHeaderPlugin";
 
 class ModuleInfoHeaderPlugin {
 	/**
+	 * Creates an instance of ModuleInfoHeaderPlugin.
 	 * @param {boolean=} verbose add more information like exports, runtime requirements and bailouts
 	 */
 	constructor(verbose = true) {
+		/** @type {boolean} */
 		this._verbose = verbose;
 	}
 
 	/**
+	 * Applies the plugin by registering its hooks on the compiler.
 	 * @param {Compiler} compiler the compiler
 	 * @returns {void}
 	 */
@@ -175,6 +182,7 @@
 					{ chunk, chunkGraph, moduleGraph, runtimeTemplate }
 				) => {
 					const { requestShortener } = runtimeTemplate;
+					/** @type {undefined | CacheEntry} */
 					let cacheEntry;
 					let cache = caches.get(requestShortener);
 					if (cache === undefined) {
@@ -256,6 +264,7 @@
 				PLUGIN_NAME,
 				(moduleSource, module, { runtimeTemplate }) => {
 					const { requestShortener } = runtimeTemplate;
+					/** @type {undefined | CacheEntry} */
 					let cacheEntry;
 					let cache = caches.get(requestShortener);
 					if (cache === undefined) {
@@ -297,6 +306,7 @@
 	}
 
 	/**
+	 * Returns the header.
 	 * @param {Module} module the module
 	 * @param {RequestShortener} requestShortener request shortener
 	 * @returns {RawSource} the header

--
Gitblit v1.9.3