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/ExternalModuleInitFragment.js | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/node_modules/webpack/lib/dependencies/ExternalModuleInitFragment.js b/node_modules/webpack/lib/dependencies/ExternalModuleInitFragment.js
index 148ea83..6278438 100644
--- a/node_modules/webpack/lib/dependencies/ExternalModuleInitFragment.js
+++ b/node_modules/webpack/lib/dependencies/ExternalModuleInitFragment.js
@@ -12,7 +12,9 @@
/** @typedef {import("../Generator").GenerateContext} GenerateContext */
/** @typedef {import("../serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */
/** @typedef {import("../serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */
-/** @typedef {Map<string, Set<string>>} ImportSpecifiers */
+/** @typedef {{ name: string, value?: string }[]} ArrayImportSpecifiers */
+/** @typedef {Set<string>} ImportSpecifier */
+/** @typedef {Map<string, ImportSpecifier>} ImportSpecifiers */
/**
* @extends {InitFragment<GenerateContext>}
@@ -20,7 +22,7 @@
class ExternalModuleInitFragment extends InitFragment {
/**
* @param {string} importedModule imported module
- * @param {{ name: string, value?: string }[] | ImportSpecifiers} specifiers import specifiers
+ * @param {ArrayImportSpecifiers | ImportSpecifiers} specifiers import specifiers
* @param {string=} defaultImport default import
*/
constructor(importedModule, specifiers, defaultImport) {
@@ -37,6 +39,7 @@
for (const { name, value } of specifiers) {
let specifiers = this.specifiers.get(name);
if (!specifiers) {
+ /** @type {ImportSpecifier} */
specifiers = new Set();
this.specifiers.set(name, specifiers);
}
@@ -72,10 +75,12 @@
}
/**
+ * Returns the source code that will be included as initialization code.
* @param {GenerateContext} context context
* @returns {string | Source | undefined} the source code that will be included as initialization code
*/
getContent({ runtimeRequirements }) {
+ /** @type {string[]} */
const namedImports = [];
for (const [name, specifiers] of this.specifiers) {
@@ -103,6 +108,7 @@
}
/**
+ * Serializes this instance into the provided serializer context.
* @param {ObjectSerializerContext} context context
*/
serialize(context) {
@@ -114,6 +120,7 @@
}
/**
+ * Restores this instance from the provided deserializer context.
* @param {ObjectDeserializerContext} context context
*/
deserialize(context) {
--
Gitblit v1.9.3