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/RuntimePlugin.js |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/node_modules/webpack/lib/RuntimePlugin.js b/node_modules/webpack/lib/RuntimePlugin.js
index ca2b3af..e836bc5 100644
--- a/node_modules/webpack/lib/RuntimePlugin.js
+++ b/node_modules/webpack/lib/RuntimePlugin.js
@@ -111,10 +111,13 @@
 	[RuntimeGlobals.shareScopeMap]: [RuntimeGlobals.hasOwnProperty]
 };
 
+const FULLHASH_REGEXP = /\[(?:full)?hash(?::\d+)?\]/;
+
 const PLUGIN_NAME = "RuntimePlugin";
 
 class RuntimePlugin {
 	/**
+	 * Applies the plugin by registering its hooks on the compiler.
 	 * @param {Compiler} compiler the Compiler
 	 * @returns {void}
 	 */
@@ -122,6 +125,7 @@
 		compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => {
 			const globalChunkLoading = compilation.outputOptions.chunkLoading;
 			/**
+			 * Checks whether this runtime plugin is chunk loading disabled for chunk.
 			 * @param {Chunk} chunk chunk
 			 * @returns {boolean} true, when chunk loading is disabled for the chunk
 			 */
@@ -266,7 +270,7 @@
 
 						if (
 							typeof publicPath !== "string" ||
-							/\[(full)?hash\]/.test(publicPath)
+							/\[(?:full)?hash\]/.test(publicPath)
 						) {
 							module.fullHash = true;
 						}
@@ -314,9 +318,7 @@
 				.tap(PLUGIN_NAME, (chunk, set, { chunkGraph }) => {
 					if (
 						typeof compilation.outputOptions.chunkFilename === "string" &&
-						/\[(full)?hash(:\d+)?\]/.test(
-							compilation.outputOptions.chunkFilename
-						)
+						FULLHASH_REGEXP.test(compilation.outputOptions.chunkFilename)
 					) {
 						set.add(RuntimeGlobals.getFullHash);
 					}
@@ -342,9 +344,7 @@
 				.tap(PLUGIN_NAME, (chunk, set, { chunkGraph }) => {
 					if (
 						typeof compilation.outputOptions.cssChunkFilename === "string" &&
-						/\[(full)?hash(:\d+)?\]/.test(
-							compilation.outputOptions.cssChunkFilename
-						)
+						FULLHASH_REGEXP.test(compilation.outputOptions.cssChunkFilename)
 					) {
 						set.add(RuntimeGlobals.getFullHash);
 					}
@@ -374,7 +374,7 @@
 				.for(RuntimeGlobals.getChunkUpdateScriptFilename)
 				.tap(PLUGIN_NAME, (chunk, set) => {
 					if (
-						/\[(full)?hash(:\d+)?\]/.test(
+						FULLHASH_REGEXP.test(
 							compilation.outputOptions.hotUpdateChunkFilename
 						)
 					) {
@@ -396,7 +396,7 @@
 				.for(RuntimeGlobals.getUpdateManifestFilename)
 				.tap(PLUGIN_NAME, (chunk, set) => {
 					if (
-						/\[(full)?hash(:\d+)?\]/.test(
+						FULLHASH_REGEXP.test(
 							compilation.outputOptions.hotUpdateMainFilename
 						)
 					) {

--
Gitblit v1.9.3