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/optimize/RuntimeChunkPlugin.js | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/node_modules/webpack/lib/optimize/RuntimeChunkPlugin.js b/node_modules/webpack/lib/optimize/RuntimeChunkPlugin.js
index a0ccb85..5180ab2 100644
--- a/node_modules/webpack/lib/optimize/RuntimeChunkPlugin.js
+++ b/node_modules/webpack/lib/optimize/RuntimeChunkPlugin.js
@@ -14,18 +14,19 @@
class RuntimeChunkPlugin {
/**
+ * Creates an instance of RuntimeChunkPlugin.
* @param {{ name?: RuntimeChunkFunction }=} options options
*/
- constructor(options) {
+ constructor(options = {}) {
+ /** @type {{ name: string | RuntimeChunkFunction }} */
this.options = {
- /** @type {RuntimeChunkFunction} */
name: (entrypoint) => `runtime~${entrypoint.name}`,
...options
};
}
/**
- * Apply the plugin
+ * Applies the plugin by registering its hooks on the compiler.
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
@@ -38,9 +39,7 @@
(compilation.entries.get(entryName));
if (data.options.runtime === undefined && !data.options.dependOn) {
// Determine runtime chunk name
- let name =
- /** @type {string | RuntimeChunkFunction} */
- (this.options.name);
+ let name = this.options.name;
if (typeof name === "function") {
name = name({ name: entryName });
}
--
Gitblit v1.9.3