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/node/CommonJsChunkLoadingPlugin.js |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/node_modules/webpack/lib/node/CommonJsChunkLoadingPlugin.js b/node_modules/webpack/lib/node/CommonJsChunkLoadingPlugin.js
index fe5fe0b..e241836 100644
--- a/node_modules/webpack/lib/node/CommonJsChunkLoadingPlugin.js
+++ b/node_modules/webpack/lib/node/CommonJsChunkLoadingPlugin.js
@@ -13,6 +13,7 @@
 /** @typedef {import("../Module").RuntimeRequirements} RuntimeRequirements */
 
 /**
+ * Defines the common js chunk loading plugin options type used by this module.
  * @typedef {object} CommonJsChunkLoadingPluginOptions
  * @property {boolean=} asyncChunkLoading enable async chunk loading
  */
@@ -21,31 +22,34 @@
 
 class CommonJsChunkLoadingPlugin {
 	/**
+	 * Creates an instance of CommonJsChunkLoadingPlugin.
 	 * @param {CommonJsChunkLoadingPluginOptions=} options options
 	 */
 	constructor(options = {}) {
-		this._asyncChunkLoading = options.asyncChunkLoading;
+		/** @type {CommonJsChunkLoadingPluginOptions} */
+		this.options = options;
 	}
 
 	/**
-	 * Apply the plugin
+	 * Applies the plugin by registering its hooks on the compiler.
 	 * @param {Compiler} compiler the compiler instance
 	 * @returns {void}
 	 */
 	apply(compiler) {
-		const ChunkLoadingRuntimeModule = this._asyncChunkLoading
+		const ChunkLoadingRuntimeModule = this.options.asyncChunkLoading
 			? require("./ReadFileChunkLoadingRuntimeModule")
 			: require("./RequireChunkLoadingRuntimeModule");
-		const chunkLoadingValue = this._asyncChunkLoading
+		const chunkLoadingValue = this.options.asyncChunkLoading
 			? "async-node"
 			: "require";
 		new StartupChunkDependenciesPlugin({
 			chunkLoading: chunkLoadingValue,
-			asyncChunkLoading: this._asyncChunkLoading
+			asyncChunkLoading: this.options.asyncChunkLoading
 		}).apply(compiler);
 		compiler.hooks.thisCompilation.tap(PLUGIN_NAME, (compilation) => {
 			const globalChunkLoading = compilation.outputOptions.chunkLoading;
 			/**
+			 * Checks whether this common js chunk loading plugin is enabled for chunk.
 			 * @param {Chunk} chunk chunk
 			 * @returns {boolean} true, if wasm loading is enabled for the chunk
 			 */
@@ -57,8 +61,10 @@
 						: globalChunkLoading;
 				return chunkLoading === chunkLoadingValue;
 			};
+			/** @type {WeakSet<Chunk>} */
 			const onceForChunkSet = new WeakSet();
 			/**
+			 * Handles the hook callback for this code path.
 			 * @param {Chunk} chunk chunk
 			 * @param {RuntimeRequirements} set runtime requirements
 			 */

--
Gitblit v1.9.3