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/runtime/GetChunkFilenameRuntimeModule.js | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/node_modules/webpack/lib/runtime/GetChunkFilenameRuntimeModule.js b/node_modules/webpack/lib/runtime/GetChunkFilenameRuntimeModule.js
index 10e859c..f07c3cc 100644
--- a/node_modules/webpack/lib/runtime/GetChunkFilenameRuntimeModule.js
+++ b/node_modules/webpack/lib/runtime/GetChunkFilenameRuntimeModule.js
@@ -13,6 +13,7 @@
/** @typedef {import("../Chunk").ChunkId} ChunkId */
/** @typedef {import("../ChunkGraph")} ChunkGraph */
/** @typedef {import("../Compilation")} Compilation */
+/** @typedef {import("../Compilation").HashWithLengthFunction} HashWithLengthFunction */
/** @typedef {import("../TemplatedPathPlugin").TemplatePath} TemplatePath */
class GetChunkFilenameRuntimeModule extends RuntimeModule {
@@ -25,14 +26,20 @@
*/
constructor(contentType, name, global, getFilenameForChunk, allChunks) {
super(`get ${name} chunk filename`);
+ /** @type {string} */
this.contentType = contentType;
+ /** @type {string} */
this.global = global;
+ /** @type {(chunk: Chunk) => TemplatePath | false} */
this.getFilenameForChunk = getFilenameForChunk;
+ /** @type {boolean} */
this.allChunks = allChunks;
+ /** @type {boolean} */
this.dependentHash = true;
}
/**
+ * Generates runtime code for this runtime module.
* @returns {string | null} runtime code
*/
generate() {
@@ -138,7 +145,7 @@
};
/**
* @param {string} value string
- * @returns {(length: number) => string} string to put in quotes with length
+ * @returns {HashWithLengthFunction} string to put in quotes with length
*/
const unquotedStringifyWithLength = (value) => (length) =>
unquotedStringify(`${value}`.slice(0, length));
@@ -230,7 +237,7 @@
/**
* @param {(chunk: Chunk) => string | number} fn function from chunk to value
- * @returns {(length: number) => string} function which generates code with static mapping of results of fn for including in quoted string for specific length
+ * @returns {HashWithLengthFunction} function which generates code with static mapping of results of fn for including in quoted string for specific length
*/
const mapExprWithLength = (fn) => (length) =>
`" + ${createMap((c) => `${fn(c)}`.slice(0, length))} + "`;
--
Gitblit v1.9.3