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/hmr/lazyCompilationBackend.js | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/node_modules/webpack/lib/hmr/lazyCompilationBackend.js b/node_modules/webpack/lib/hmr/lazyCompilationBackend.js
index e8dd3e9..426ce24 100644
--- a/node_modules/webpack/lib/hmr/lazyCompilationBackend.js
+++ b/node_modules/webpack/lib/hmr/lazyCompilationBackend.js
@@ -19,11 +19,13 @@
/** @typedef {() => Server} CreateServerFunction */
/**
- * @param {Omit<LazyCompilationDefaultBackendOptions, "client"> & { client: NonNullable<LazyCompilationDefaultBackendOptions["client"]>}} options additional options for the backend
+ * Returns backend.
+ * @param {Omit<LazyCompilationDefaultBackendOptions, "client"> & { client: NonNullable<LazyCompilationDefaultBackendOptions["client"]> }} options additional options for the backend
* @returns {BackendHandler} backend
*/
module.exports = (options) => (compiler, callback) => {
const logger = compiler.getInfrastructureLogger("LazyCompilationBackend");
+ /** @type {Map<string, number>} */
const activeModules = new Map();
const prefix = "/lazy-compilation-using-";
@@ -117,6 +119,7 @@
server.on(
"listening",
/**
+ * Handles the callback logic for this hook.
* @param {Error} err error
* @returns {void}
*/
@@ -152,7 +155,7 @@
const key = `${encodeURIComponent(
originalModule.identifier().replace(/\\/g, "/").replace(/@/g, "_")
).replace(/%(2F|3A|24|26|2B|2C|3B|3D)/g, decodeURIComponent)}`;
- const active = activeModules.get(key) > 0;
+ const active = /** @type {number} */ (activeModules.get(key)) > 0;
return {
client: `${options.client}?${encodeURIComponent(urlBase + prefix)}`,
data: key,
--
Gitblit v1.9.3