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/web/JsonpChunkLoadingPlugin.js | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/node_modules/webpack/lib/web/JsonpChunkLoadingPlugin.js b/node_modules/webpack/lib/web/JsonpChunkLoadingPlugin.js
index 7bf7bf8..17f2617 100644
--- a/node_modules/webpack/lib/web/JsonpChunkLoadingPlugin.js
+++ b/node_modules/webpack/lib/web/JsonpChunkLoadingPlugin.js
@@ -14,9 +14,15 @@
const PLUGIN_NAME = "JsonpChunkLoadingPlugin";
+/**
+ * Enables browser-side JavaScript chunk loading through the JSONP runtime and
+ * adds the supporting runtime requirements for matching chunks.
+ */
class JsonpChunkLoadingPlugin {
/**
- * Apply the plugin
+ * Registers compilation hooks that attach the JSONP chunk-loading runtime
+ * module and its dependent runtime globals to chunks using `chunkLoading:
+ * "jsonp"`.
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
@@ -24,6 +30,8 @@
compiler.hooks.thisCompilation.tap(PLUGIN_NAME, (compilation) => {
const globalChunkLoading = compilation.outputOptions.chunkLoading;
/**
+ * Determines whether the chunk resolves JavaScript chunks through the
+ * JSONP loading backend.
* @param {Chunk} chunk chunk
* @returns {boolean} true, if wasm loading is enabled for the chunk
*/
@@ -35,8 +43,11 @@
: globalChunkLoading;
return chunkLoading === "jsonp";
};
+ /** @type {WeakSet<Chunk>} */
const onceForChunkSet = new WeakSet();
/**
+ * Adds the JSONP runtime module to a chunk once, along with the core
+ * runtime globals it relies on.
* @param {Chunk} chunk chunk
* @param {RuntimeRequirements} set runtime requirements
*/
--
Gitblit v1.9.3