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/dependencies/WorkerDependency.js | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/node_modules/webpack/lib/dependencies/WorkerDependency.js b/node_modules/webpack/lib/dependencies/WorkerDependency.js
index 17bece8..d01bf0b 100644
--- a/node_modules/webpack/lib/dependencies/WorkerDependency.js
+++ b/node_modules/webpack/lib/dependencies/WorkerDependency.js
@@ -23,20 +23,28 @@
/** @typedef {import("../util/Hash")} Hash */
/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */
+/**
+ * Represents the worker dependency runtime component.
+ * @typedef {object} WorkerDependencyOptions
+ * @property {string=} publicPath public path for the worker
+ * @property {boolean=} needNewUrl true when need generate `new URL(...)`, otherwise false
+ */
+
class WorkerDependency extends ModuleDependency {
/**
+ * Creates an instance of WorkerDependency.
* @param {string} request request
* @param {Range} range range
- * @param {object} workerDependencyOptions options
- * @param {string=} workerDependencyOptions.publicPath public path for the worker
- * @param {boolean=} workerDependencyOptions.needNewUrl need generate `new URL(...)`
+ * @param {WorkerDependencyOptions} workerDependencyOptions options
*/
constructor(request, range, workerDependencyOptions) {
super(request);
this.range = range;
// If options are updated, don't forget to update the hash and serialization functions
+ /** @type {WorkerDependencyOptions} */
this.options = workerDependencyOptions;
/** Cache the hash */
+ /** @type {undefined | string} */
this._hashUpdate = undefined;
}
@@ -59,7 +67,7 @@
}
/**
- * Update the hash
+ * Updates the hash with the data contributed by this instance.
* @param {Hash} hash hash to be updated
* @param {UpdateHashContext} context context
* @returns {void}
@@ -72,6 +80,7 @@
}
/**
+ * Serializes this instance into the provided serializer context.
* @param {ObjectSerializerContext} context context
*/
serialize(context) {
@@ -81,6 +90,7 @@
}
/**
+ * Restores this instance from the provided deserializer context.
* @param {ObjectDeserializerContext} context context
*/
deserialize(context) {
@@ -94,6 +104,7 @@
ModuleDependency.Template
) {
/**
+ * Applies the plugin by registering its hooks on the compiler.
* @param {Dependency} dependency the dependency for which the template should be applied
* @param {ReplaceSource} source the current replace source which can be modified
* @param {DependencyTemplateContext} templateContext the context object
--
Gitblit v1.9.3