webpack 5.108.1 → 5.108.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/CleanPlugin.js +8 -25
- package/lib/Compilation.js +0 -1
- package/lib/DefinePlugin.js +8 -19
- package/lib/ExternalModule.js +64 -19
- package/lib/ExternalModuleFactoryPlugin.js +37 -1
- package/lib/LazyBarrel.js +4 -3
- package/lib/NormalModule.js +49 -59
- package/lib/bun/BunTargetPlugin.js +1 -7
- package/lib/container/ModuleFederationPlugin.js +9 -25
- package/lib/css/CssInjectStyleRuntimeModule.js +9 -24
- package/lib/css/CssLoadingRuntimeModule.js +12 -27
- package/lib/css/CssModulesPlugin.js +15 -31
- package/lib/css/CssParser.js +421 -381
- package/lib/css/syntax.js +768 -305
- package/lib/deno/DenoTargetPlugin.js +1 -7
- package/lib/dependencies/HarmonyAcceptDependency.js +8 -16
- package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +22 -0
- package/lib/dependencies/HarmonyImportDependency.js +2 -0
- package/lib/dependencies/ImportMetaPlugin.js +9 -25
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +10 -26
- package/lib/javascript/JavascriptModulesPlugin.js +38 -54
- package/lib/node/NodeTargetPlugin.js +1 -62
- package/lib/node/nodeBuiltins.js +80 -0
- package/lib/optimize/ConcatenatedModule.js +17 -27
- package/lib/optimize/RealContentHashPlugin.js +8 -24
- package/lib/runtime/LoadScriptRuntimeModule.js +9 -24
- package/lib/util/createHooksRegistry.js +35 -0
- package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +12 -29
- package/lib/web/JsonpChunkLoadingRuntimeModule.js +10 -25
- package/package.json +1 -1
- package/types.d.ts +84 -71
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
"use strict";
|
|
6
6
|
|
|
7
7
|
const { SyncWaterfallHook } = require("tapable");
|
|
8
|
-
|
|
8
|
+
/** @typedef {import("../Compilation")} Compilation */
|
|
9
9
|
const RuntimeGlobals = require("../RuntimeGlobals");
|
|
10
10
|
const Template = require("../Template");
|
|
11
|
+
const createHooksRegistry = require("../util/createHooksRegistry");
|
|
11
12
|
const HelperRuntimeModule = require("./HelperRuntimeModule");
|
|
12
13
|
|
|
13
14
|
/** @typedef {import("../Chunk")} Chunk */
|
|
@@ -17,30 +18,7 @@ const HelperRuntimeModule = require("./HelperRuntimeModule");
|
|
|
17
18
|
* @property {SyncWaterfallHook<[string, Chunk]>} createScript
|
|
18
19
|
*/
|
|
19
20
|
|
|
20
|
-
/** @type {WeakMap<Compilation, LoadScriptCompilationHooks>} */
|
|
21
|
-
const compilationHooksMap = new WeakMap();
|
|
22
|
-
|
|
23
21
|
class LoadScriptRuntimeModule extends HelperRuntimeModule {
|
|
24
|
-
/**
|
|
25
|
-
* @param {Compilation} compilation the compilation
|
|
26
|
-
* @returns {LoadScriptCompilationHooks} hooks
|
|
27
|
-
*/
|
|
28
|
-
static getCompilationHooks(compilation) {
|
|
29
|
-
if (!(compilation instanceof Compilation)) {
|
|
30
|
-
throw new TypeError(
|
|
31
|
-
"The 'compilation' argument must be an instance of Compilation"
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
let hooks = compilationHooksMap.get(compilation);
|
|
35
|
-
if (hooks === undefined) {
|
|
36
|
-
hooks = {
|
|
37
|
-
createScript: new SyncWaterfallHook(["source", "chunk"])
|
|
38
|
-
};
|
|
39
|
-
compilationHooksMap.set(compilation, hooks);
|
|
40
|
-
}
|
|
41
|
-
return hooks;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
22
|
/**
|
|
45
23
|
* @param {boolean=} withCreateScriptUrl use create script url for trusted types
|
|
46
24
|
* @param {boolean=} withFetchPriority use `fetchPriority` attribute
|
|
@@ -177,4 +155,11 @@ class LoadScriptRuntimeModule extends HelperRuntimeModule {
|
|
|
177
155
|
}
|
|
178
156
|
}
|
|
179
157
|
|
|
158
|
+
LoadScriptRuntimeModule.getCompilationHooks = createHooksRegistry(
|
|
159
|
+
() =>
|
|
160
|
+
/** @type {LoadScriptCompilationHooks} */ ({
|
|
161
|
+
createScript: new SyncWaterfallHook(["source", "chunk"])
|
|
162
|
+
})
|
|
163
|
+
);
|
|
164
|
+
|
|
180
165
|
module.exports = LoadScriptRuntimeModule;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
|
|
7
|
+
const memoize = require("./memoize");
|
|
8
|
+
|
|
9
|
+
const getCompilation = memoize(() => require("../Compilation"));
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @template T
|
|
13
|
+
* @param {() => T} createHooks factory that returns a fresh hooks object
|
|
14
|
+
* @returns {(compilation: import("../Compilation")) => T} getter that returns (or creates) hooks for the compilation
|
|
15
|
+
*/
|
|
16
|
+
const createHooksRegistry = (createHooks) => {
|
|
17
|
+
/** @type {WeakMap<import("../Compilation"), T>} */
|
|
18
|
+
const map = new WeakMap();
|
|
19
|
+
return (compilation) => {
|
|
20
|
+
const Compilation = getCompilation();
|
|
21
|
+
if (!(compilation instanceof Compilation)) {
|
|
22
|
+
throw new TypeError(
|
|
23
|
+
"The 'compilation' argument must be an instance of Compilation"
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
let hooks = map.get(compilation);
|
|
27
|
+
if (hooks === undefined) {
|
|
28
|
+
hooks = createHooks();
|
|
29
|
+
map.set(compilation, hooks);
|
|
30
|
+
}
|
|
31
|
+
return hooks;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
module.exports = createHooksRegistry;
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"use strict";
|
|
7
7
|
|
|
8
8
|
const { SyncWaterfallHook } = require("tapable");
|
|
9
|
-
const Compilation = require("../Compilation");
|
|
10
9
|
const Generator = require("../Generator");
|
|
11
10
|
const { WEBASSEMBLY_MODULE_TYPE_ASYNC } = require("../ModuleTypeConstants");
|
|
12
11
|
const WebAssemblyImportDependency = require("../dependencies/WebAssemblyImportDependency");
|
|
13
12
|
const { tryRunOrWebpackError } = require("../errors/HookWebpackError");
|
|
14
13
|
const { compareModulesByFullName } = require("../util/comparators");
|
|
14
|
+
const createHooksRegistry = require("../util/createHooksRegistry");
|
|
15
15
|
const memoize = require("../util/memoize");
|
|
16
16
|
const AsyncWasmModule = require("./AsyncWasmModule");
|
|
17
17
|
|
|
@@ -59,37 +59,9 @@ const getAsyncWebAssemblyParser = memoize(() =>
|
|
|
59
59
|
* @property {boolean=} mangleImports mangle imports
|
|
60
60
|
*/
|
|
61
61
|
|
|
62
|
-
/** @type {WeakMap<Compilation, CompilationHooks>} */
|
|
63
|
-
const compilationHooksMap = new WeakMap();
|
|
64
|
-
|
|
65
62
|
const PLUGIN_NAME = "AsyncWebAssemblyModulesPlugin";
|
|
66
63
|
|
|
67
64
|
class AsyncWebAssemblyModulesPlugin {
|
|
68
|
-
/**
|
|
69
|
-
* Returns the attached hooks.
|
|
70
|
-
* @param {Compilation} compilation the compilation
|
|
71
|
-
* @returns {CompilationHooks} the attached hooks
|
|
72
|
-
*/
|
|
73
|
-
static getCompilationHooks(compilation) {
|
|
74
|
-
if (!(compilation instanceof Compilation)) {
|
|
75
|
-
throw new TypeError(
|
|
76
|
-
"The 'compilation' argument must be an instance of Compilation"
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
let hooks = compilationHooksMap.get(compilation);
|
|
80
|
-
if (hooks === undefined) {
|
|
81
|
-
hooks = {
|
|
82
|
-
renderModuleContent: new SyncWaterfallHook([
|
|
83
|
-
"source",
|
|
84
|
-
"module",
|
|
85
|
-
"renderContext"
|
|
86
|
-
])
|
|
87
|
-
};
|
|
88
|
-
compilationHooksMap.set(compilation, hooks);
|
|
89
|
-
}
|
|
90
|
-
return hooks;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
65
|
/**
|
|
94
66
|
* Creates an instance of AsyncWebAssemblyModulesPlugin.
|
|
95
67
|
* @param {AsyncWebAssemblyModulesPluginOptions} options options
|
|
@@ -224,4 +196,15 @@ class AsyncWebAssemblyModulesPlugin {
|
|
|
224
196
|
}
|
|
225
197
|
}
|
|
226
198
|
|
|
199
|
+
AsyncWebAssemblyModulesPlugin.getCompilationHooks = createHooksRegistry(
|
|
200
|
+
() =>
|
|
201
|
+
/** @type {CompilationHooks} */ ({
|
|
202
|
+
renderModuleContent: new SyncWaterfallHook([
|
|
203
|
+
"source",
|
|
204
|
+
"module",
|
|
205
|
+
"renderContext"
|
|
206
|
+
])
|
|
207
|
+
})
|
|
208
|
+
);
|
|
209
|
+
|
|
227
210
|
module.exports = AsyncWebAssemblyModulesPlugin;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"use strict";
|
|
6
6
|
|
|
7
7
|
const { SyncWaterfallHook } = require("tapable");
|
|
8
|
-
|
|
8
|
+
/** @typedef {import("../Compilation")} Compilation */
|
|
9
9
|
const RuntimeGlobals = require("../RuntimeGlobals");
|
|
10
10
|
const RuntimeModule = require("../RuntimeModule");
|
|
11
11
|
const Template = require("../Template");
|
|
@@ -15,6 +15,7 @@ const {
|
|
|
15
15
|
const chunkHasJs = require("../javascript/JavascriptModulesPlugin").chunkHasJs;
|
|
16
16
|
const { getInitialChunkIds } = require("../javascript/StartupHelpers");
|
|
17
17
|
const compileBooleanMatcher = require("../util/compileBooleanMatcher");
|
|
18
|
+
const createHooksRegistry = require("../util/createHooksRegistry");
|
|
18
19
|
|
|
19
20
|
/** @typedef {import("../Chunk")} Chunk */
|
|
20
21
|
/** @typedef {import("../ChunkGraph")} ChunkGraph */
|
|
@@ -26,31 +27,7 @@ const compileBooleanMatcher = require("../util/compileBooleanMatcher");
|
|
|
26
27
|
* @property {SyncWaterfallHook<[string, Chunk]>} linkPrefetch
|
|
27
28
|
*/
|
|
28
29
|
|
|
29
|
-
/** @type {WeakMap<Compilation, JsonpCompilationPluginHooks>} */
|
|
30
|
-
const compilationHooksMap = new WeakMap();
|
|
31
|
-
|
|
32
30
|
class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
|
|
33
|
-
/**
|
|
34
|
-
* @param {Compilation} compilation the compilation
|
|
35
|
-
* @returns {JsonpCompilationPluginHooks} hooks
|
|
36
|
-
*/
|
|
37
|
-
static getCompilationHooks(compilation) {
|
|
38
|
-
if (!(compilation instanceof Compilation)) {
|
|
39
|
-
throw new TypeError(
|
|
40
|
-
"The 'compilation' argument must be an instance of Compilation"
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
let hooks = compilationHooksMap.get(compilation);
|
|
44
|
-
if (hooks === undefined) {
|
|
45
|
-
hooks = {
|
|
46
|
-
linkPreload: new SyncWaterfallHook(["source", "chunk"]),
|
|
47
|
-
linkPrefetch: new SyncWaterfallHook(["source", "chunk"])
|
|
48
|
-
};
|
|
49
|
-
compilationHooksMap.set(compilation, hooks);
|
|
50
|
-
}
|
|
51
|
-
return hooks;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
31
|
/**
|
|
55
32
|
* @param {ReadOnlyRuntimeRequirements} runtimeRequirements runtime requirements
|
|
56
33
|
*/
|
|
@@ -459,4 +436,12 @@ class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
|
|
|
459
436
|
}
|
|
460
437
|
}
|
|
461
438
|
|
|
439
|
+
JsonpChunkLoadingRuntimeModule.getCompilationHooks = createHooksRegistry(
|
|
440
|
+
() =>
|
|
441
|
+
/** @type {JsonpCompilationPluginHooks} */ ({
|
|
442
|
+
linkPreload: new SyncWaterfallHook(["source", "chunk"]),
|
|
443
|
+
linkPrefetch: new SyncWaterfallHook(["source", "chunk"])
|
|
444
|
+
})
|
|
445
|
+
);
|
|
446
|
+
|
|
462
447
|
module.exports = JsonpChunkLoadingRuntimeModule;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webpack",
|
|
3
|
-
"version": "5.108.
|
|
3
|
+
"version": "5.108.3",
|
|
4
4
|
"description": "Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.",
|
|
5
5
|
"homepage": "https://github.com/webpack/webpack",
|
|
6
6
|
"bugs": "https://github.com/webpack/webpack/issues",
|
package/types.d.ts
CHANGED
|
@@ -679,13 +679,9 @@ declare class AsyncWebAssemblyModulesPlugin {
|
|
|
679
679
|
renderContext: WebAssemblyRenderContext,
|
|
680
680
|
hooks: CompilationHooksAsyncWebAssemblyModulesPlugin
|
|
681
681
|
): Source;
|
|
682
|
-
|
|
683
|
-
/**
|
|
684
|
-
* Returns the attached hooks.
|
|
685
|
-
*/
|
|
686
|
-
static getCompilationHooks(
|
|
682
|
+
static getCompilationHooks: (
|
|
687
683
|
compilation: Compilation
|
|
688
|
-
)
|
|
684
|
+
) => CompilationHooksAsyncWebAssemblyModulesPlugin;
|
|
689
685
|
}
|
|
690
686
|
declare interface AsyncWebAssemblyModulesPluginOptions {
|
|
691
687
|
/**
|
|
@@ -2757,6 +2753,13 @@ declare interface ChunkRenderContextCssModulesPlugin {
|
|
|
2757
2753
|
*/
|
|
2758
2754
|
moduleSourceContent: Source;
|
|
2759
2755
|
}
|
|
2756
|
+
|
|
2757
|
+
/**
|
|
2758
|
+
* Renames an inlined module's top-level declaration (and all its references) when
|
|
2759
|
+
* its name is already taken in the shared startup scope, recording the chosen name
|
|
2760
|
+
* in `allUsedNames`. Lets inlined modules be emitted without a per-entry/per-chunk
|
|
2761
|
+
* IIFE by resolving name collisions instead of isolating each module.
|
|
2762
|
+
*/
|
|
2760
2763
|
declare interface ChunkRenderContextJavascriptModulesPlugin {
|
|
2761
2764
|
/**
|
|
2762
2765
|
* the chunk
|
|
@@ -2904,13 +2907,9 @@ declare class CleanPlugin {
|
|
|
2904
2907
|
* Applies the plugin by registering its hooks on the compiler.
|
|
2905
2908
|
*/
|
|
2906
2909
|
apply(compiler: Compiler): void;
|
|
2907
|
-
|
|
2908
|
-
/**
|
|
2909
|
-
* Returns the attached hooks.
|
|
2910
|
-
*/
|
|
2911
|
-
static getCompilationHooks(
|
|
2910
|
+
static getCompilationHooks: (
|
|
2912
2911
|
compilation: Compilation
|
|
2913
|
-
)
|
|
2912
|
+
) => CleanPluginCompilationHooks;
|
|
2914
2913
|
}
|
|
2915
2914
|
declare interface CleanPluginCompilationHooks {
|
|
2916
2915
|
/**
|
|
@@ -3974,6 +3973,13 @@ declare interface CompilationHooksCssModulesPlugin {
|
|
|
3974
3973
|
undefined | void | Module[]
|
|
3975
3974
|
>;
|
|
3976
3975
|
}
|
|
3976
|
+
|
|
3977
|
+
/**
|
|
3978
|
+
* Renames an inlined module's top-level declaration (and all its references) when
|
|
3979
|
+
* its name is already taken in the shared startup scope, recording the chosen name
|
|
3980
|
+
* in `allUsedNames`. Lets inlined modules be emitted without a per-entry/per-chunk
|
|
3981
|
+
* IIFE by resolving name collisions instead of isolating each module.
|
|
3982
|
+
*/
|
|
3977
3983
|
declare interface CompilationHooksJavascriptModulesPlugin {
|
|
3978
3984
|
renderModuleContent: SyncWaterfallHook<
|
|
3979
3985
|
[Source, Module, ModuleRenderContext],
|
|
@@ -4172,18 +4178,18 @@ declare class Compiler {
|
|
|
4172
4178
|
fileTimestamps?: Map<
|
|
4173
4179
|
string,
|
|
4174
4180
|
| null
|
|
4181
|
+
| "ignore"
|
|
4175
4182
|
| EntryTypesIndex
|
|
4176
4183
|
| OnlySafeTimeEntry
|
|
4177
4184
|
| ExistenceOnlyTimeEntryTypesIndex
|
|
4178
|
-
| "ignore"
|
|
4179
4185
|
>;
|
|
4180
4186
|
contextTimestamps?: Map<
|
|
4181
4187
|
string,
|
|
4182
4188
|
| null
|
|
4189
|
+
| "ignore"
|
|
4183
4190
|
| EntryTypesIndex
|
|
4184
4191
|
| OnlySafeTimeEntry
|
|
4185
4192
|
| ExistenceOnlyTimeEntryTypesIndex
|
|
4186
|
-
| "ignore"
|
|
4187
4193
|
>;
|
|
4188
4194
|
fsStartTime?: number;
|
|
4189
4195
|
resolverFactory: ResolverFactory;
|
|
@@ -5154,8 +5160,8 @@ declare interface ContextResolveData {
|
|
|
5154
5160
|
}
|
|
5155
5161
|
type ContextTimestamp =
|
|
5156
5162
|
| null
|
|
5157
|
-
| ContextFileSystemInfoEntry
|
|
5158
5163
|
| "ignore"
|
|
5164
|
+
| ContextFileSystemInfoEntry
|
|
5159
5165
|
| ExistenceOnlyTimeEntryFileSystemInfo;
|
|
5160
5166
|
declare interface ContextTimestampAndHash {
|
|
5161
5167
|
safeTime: number;
|
|
@@ -5399,9 +5405,9 @@ declare interface CssImportDependencyMeta {
|
|
|
5399
5405
|
type CssLayer = undefined | string;
|
|
5400
5406
|
declare class CssLoadingRuntimeModule extends RuntimeModule {
|
|
5401
5407
|
constructor(runtimeRequirements: ReadonlySet<string>);
|
|
5402
|
-
static getCompilationHooks(
|
|
5408
|
+
static getCompilationHooks: (
|
|
5403
5409
|
compilation: Compilation
|
|
5404
|
-
)
|
|
5410
|
+
) => CssLoadingRuntimeModulePluginHooks;
|
|
5405
5411
|
|
|
5406
5412
|
/**
|
|
5407
5413
|
* Runtime modules without any dependencies to other runtime modules
|
|
@@ -5599,13 +5605,6 @@ declare class CssModulesPlugin {
|
|
|
5599
5605
|
hooks: CompilationHooksCssModulesPlugin
|
|
5600
5606
|
): Source;
|
|
5601
5607
|
|
|
5602
|
-
/**
|
|
5603
|
-
* Returns the attached hooks.
|
|
5604
|
-
*/
|
|
5605
|
-
static getCompilationHooks(
|
|
5606
|
-
compilation: Compilation
|
|
5607
|
-
): CompilationHooksCssModulesPlugin;
|
|
5608
|
-
|
|
5609
5608
|
/**
|
|
5610
5609
|
* Renders css module source.
|
|
5611
5610
|
*/
|
|
@@ -5627,6 +5626,9 @@ declare class CssModulesPlugin {
|
|
|
5627
5626
|
* Returns true, when the chunk has css.
|
|
5628
5627
|
*/
|
|
5629
5628
|
static chunkHasCss(chunk: Chunk, chunkGraph: ChunkGraph): boolean;
|
|
5629
|
+
static getCompilationHooks: (
|
|
5630
|
+
compilation: Compilation
|
|
5631
|
+
) => CompilationHooksCssModulesPlugin;
|
|
5630
5632
|
}
|
|
5631
5633
|
declare abstract class CssParser extends ParserClass {
|
|
5632
5634
|
defaultMode: "global" | "auto" | "local" | "pure";
|
|
@@ -5752,11 +5754,6 @@ declare class DefinePlugin {
|
|
|
5752
5754
|
*/
|
|
5753
5755
|
apply(compiler: Compiler): void;
|
|
5754
5756
|
|
|
5755
|
-
/**
|
|
5756
|
-
* Returns the attached hooks.
|
|
5757
|
-
*/
|
|
5758
|
-
static getCompilationHooks(compilation: Compilation): DefinePluginHooks;
|
|
5759
|
-
|
|
5760
5757
|
/**
|
|
5761
5758
|
* Returns runtime value.
|
|
5762
5759
|
*/
|
|
@@ -5768,6 +5765,7 @@ declare class DefinePlugin {
|
|
|
5768
5765
|
}) => CodeValuePrimitive,
|
|
5769
5766
|
options?: true | string[] | RuntimeValueOptions
|
|
5770
5767
|
): RuntimeValue;
|
|
5768
|
+
static getCompilationHooks: (compilation: Compilation) => DefinePluginHooks;
|
|
5771
5769
|
}
|
|
5772
5770
|
declare interface DefinePluginHooks {
|
|
5773
5771
|
definitions: SyncWaterfallHook<
|
|
@@ -8136,11 +8134,7 @@ declare class ExternalModule extends Module {
|
|
|
8136
8134
|
unsafeCacheData: UnsafeCacheData,
|
|
8137
8135
|
normalModuleFactory: NormalModuleFactory
|
|
8138
8136
|
): void;
|
|
8139
|
-
|
|
8140
|
-
/**
|
|
8141
|
-
* Returns the attached hooks.
|
|
8142
|
-
*/
|
|
8143
|
-
static getCompilationHooks(compilation: Compilation): ExternalModuleHooks;
|
|
8137
|
+
static getCompilationHooks: (compilation: Compilation) => ExternalModuleHooks;
|
|
8144
8138
|
static ModuleExternalInitFragment: typeof ModuleExternalInitFragment;
|
|
8145
8139
|
static getExternalModuleNodeCommonjsInitFragment: (
|
|
8146
8140
|
runtimeTemplate: RuntimeTemplate,
|
|
@@ -8693,7 +8687,7 @@ declare abstract class FileSystemInfo {
|
|
|
8693
8687
|
path: string,
|
|
8694
8688
|
callback: (
|
|
8695
8689
|
err?: null | WebpackError,
|
|
8696
|
-
fileTimestamp?: null |
|
|
8690
|
+
fileTimestamp?: null | "ignore" | FileSystemInfoEntry
|
|
8697
8691
|
) => void
|
|
8698
8692
|
): void;
|
|
8699
8693
|
|
|
@@ -8791,8 +8785,8 @@ declare interface FileSystemInfoEntry {
|
|
|
8791
8785
|
}
|
|
8792
8786
|
type FileTimestamp =
|
|
8793
8787
|
| null
|
|
8794
|
-
| FileSystemInfoEntry
|
|
8795
8788
|
| "ignore"
|
|
8789
|
+
| FileSystemInfoEntry
|
|
8796
8790
|
| ExistenceOnlyTimeEntryFileSystemInfo;
|
|
8797
8791
|
type FilterItemTypes = string | RegExp | ((value: string) => boolean);
|
|
8798
8792
|
declare interface Flags {
|
|
@@ -10466,13 +10460,6 @@ declare class JavascriptModulesPlugin {
|
|
|
10466
10460
|
hooks: CompilationHooksJavascriptModulesPlugin
|
|
10467
10461
|
): string;
|
|
10468
10462
|
|
|
10469
|
-
/**
|
|
10470
|
-
* Returns the attached hooks.
|
|
10471
|
-
*/
|
|
10472
|
-
static getCompilationHooks(
|
|
10473
|
-
compilation: Compilation
|
|
10474
|
-
): CompilationHooksJavascriptModulesPlugin;
|
|
10475
|
-
|
|
10476
10463
|
/**
|
|
10477
10464
|
* Gets chunk filename template.
|
|
10478
10465
|
*/
|
|
@@ -10480,6 +10467,9 @@ declare class JavascriptModulesPlugin {
|
|
|
10480
10467
|
chunk: Chunk,
|
|
10481
10468
|
outputOptions: OutputNormalizedWithDefaults
|
|
10482
10469
|
): ChunkFilenameTemplate;
|
|
10470
|
+
static getCompilationHooks: (
|
|
10471
|
+
compilation: Compilation
|
|
10472
|
+
) => CompilationHooksJavascriptModulesPlugin;
|
|
10483
10473
|
static chunkHasJs: (chunk: Chunk, chunkGraph: ChunkGraph) => boolean;
|
|
10484
10474
|
}
|
|
10485
10475
|
declare class JavascriptParser extends ParserClass {
|
|
@@ -12881,9 +12871,9 @@ type JsonValueTypes =
|
|
|
12881
12871
|
| JsonValueTypes[];
|
|
12882
12872
|
declare class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
|
|
12883
12873
|
constructor(runtimeRequirements: ReadonlySet<string>);
|
|
12884
|
-
static getCompilationHooks(
|
|
12874
|
+
static getCompilationHooks: (
|
|
12885
12875
|
compilation: Compilation
|
|
12886
|
-
)
|
|
12876
|
+
) => JsonpCompilationPluginHooks;
|
|
12887
12877
|
|
|
12888
12878
|
/**
|
|
12889
12879
|
* Runtime modules without any dependencies to other runtime modules
|
|
@@ -14015,9 +14005,9 @@ declare interface LoadScriptCompilationHooks {
|
|
|
14015
14005
|
}
|
|
14016
14006
|
declare class LoadScriptRuntimeModule extends HelperRuntimeModule {
|
|
14017
14007
|
constructor(withCreateScriptUrl?: boolean, withFetchPriority?: boolean);
|
|
14018
|
-
static getCompilationHooks(
|
|
14008
|
+
static getCompilationHooks: (
|
|
14019
14009
|
compilation: Compilation
|
|
14020
|
-
)
|
|
14010
|
+
) => LoadScriptCompilationHooks;
|
|
14021
14011
|
|
|
14022
14012
|
/**
|
|
14023
14013
|
* Runtime modules without any dependencies to other runtime modules
|
|
@@ -14369,6 +14359,13 @@ type LogTypeEnum =
|
|
|
14369
14359
|
| "status";
|
|
14370
14360
|
declare const MEASURE_END_OPERATION: unique symbol;
|
|
14371
14361
|
declare const MEASURE_START_OPERATION: unique symbol;
|
|
14362
|
+
|
|
14363
|
+
/**
|
|
14364
|
+
* Renames an inlined module's top-level declaration (and all its references) when
|
|
14365
|
+
* its name is already taken in the shared startup scope, recording the chosen name
|
|
14366
|
+
* in `allUsedNames`. Lets inlined modules be emitted without a per-entry/per-chunk
|
|
14367
|
+
* IIFE by resolving name collisions instead of isolating each module.
|
|
14368
|
+
*/
|
|
14372
14369
|
declare interface MainRenderContext {
|
|
14373
14370
|
/**
|
|
14374
14371
|
* the chunk
|
|
@@ -15171,13 +15168,9 @@ declare class ModuleChunkLoadingRuntimeModule extends RuntimeModule {
|
|
|
15171
15168
|
* Creates an instance of ModuleChunkLoadingRuntimeModule.
|
|
15172
15169
|
*/
|
|
15173
15170
|
constructor(runtimeRequirements: ReadonlySet<string>);
|
|
15174
|
-
|
|
15175
|
-
/**
|
|
15176
|
-
* Returns hooks.
|
|
15177
|
-
*/
|
|
15178
|
-
static getCompilationHooks(
|
|
15171
|
+
static getCompilationHooks: (
|
|
15179
15172
|
compilation: Compilation
|
|
15180
|
-
)
|
|
15173
|
+
) => JsonpCompilationPluginHooks;
|
|
15181
15174
|
|
|
15182
15175
|
/**
|
|
15183
15176
|
* Runtime modules without any dependencies to other runtime modules
|
|
@@ -15375,13 +15368,9 @@ declare class ModuleFederationPlugin {
|
|
|
15375
15368
|
* Applies the plugin by registering its hooks on the compiler.
|
|
15376
15369
|
*/
|
|
15377
15370
|
apply(compiler: Compiler): void;
|
|
15378
|
-
|
|
15379
|
-
/**
|
|
15380
|
-
* Get the compilation hooks associated with this plugin.
|
|
15381
|
-
*/
|
|
15382
|
-
static getCompilationHooks(
|
|
15371
|
+
static getCompilationHooks: (
|
|
15383
15372
|
compilation: Compilation
|
|
15384
|
-
)
|
|
15373
|
+
) => CompilationHooksModuleFederationPlugin;
|
|
15385
15374
|
}
|
|
15386
15375
|
declare interface ModuleFederationPluginOptions {
|
|
15387
15376
|
/**
|
|
@@ -16200,6 +16189,13 @@ declare interface ModuleReferenceOptions {
|
|
|
16200
16189
|
*/
|
|
16201
16190
|
asiSafe?: boolean;
|
|
16202
16191
|
}
|
|
16192
|
+
|
|
16193
|
+
/**
|
|
16194
|
+
* Renames an inlined module's top-level declaration (and all its references) when
|
|
16195
|
+
* its name is already taken in the shared startup scope, recording the chosen name
|
|
16196
|
+
* in `allUsedNames`. Lets inlined modules be emitted without a per-entry/per-chunk
|
|
16197
|
+
* IIFE by resolving name collisions instead of isolating each module.
|
|
16198
|
+
*/
|
|
16203
16199
|
declare interface ModuleRenderContext {
|
|
16204
16200
|
/**
|
|
16205
16201
|
* the chunk
|
|
@@ -20597,13 +20593,9 @@ declare class RealContentHashPlugin {
|
|
|
20597
20593
|
* Applies the plugin by registering its hooks on the compiler.
|
|
20598
20594
|
*/
|
|
20599
20595
|
apply(compiler: Compiler): void;
|
|
20600
|
-
|
|
20601
|
-
/**
|
|
20602
|
-
* Returns the attached hooks.
|
|
20603
|
-
*/
|
|
20604
|
-
static getCompilationHooks(
|
|
20596
|
+
static getCompilationHooks: (
|
|
20605
20597
|
compilation: Compilation
|
|
20606
|
-
)
|
|
20598
|
+
) => CompilationHooksRealContentHashPlugin;
|
|
20607
20599
|
}
|
|
20608
20600
|
declare interface RealContentHashPluginOptions {
|
|
20609
20601
|
/**
|
|
@@ -20818,6 +20810,13 @@ declare interface RemotesConfig {
|
|
|
20818
20810
|
declare interface RemotesObject {
|
|
20819
20811
|
[index: string]: string | RemotesConfig | string[];
|
|
20820
20812
|
}
|
|
20813
|
+
|
|
20814
|
+
/**
|
|
20815
|
+
* Renames an inlined module's top-level declaration (and all its references) when
|
|
20816
|
+
* its name is already taken in the shared startup scope, recording the chosen name
|
|
20817
|
+
* in `allUsedNames`. Lets inlined modules be emitted without a per-entry/per-chunk
|
|
20818
|
+
* IIFE by resolving name collisions instead of isolating each module.
|
|
20819
|
+
*/
|
|
20821
20820
|
declare interface RenderBootstrapContext {
|
|
20822
20821
|
/**
|
|
20823
20822
|
* the chunk
|
|
@@ -20890,6 +20889,13 @@ declare interface RenderContextCssModulesPlugin {
|
|
|
20890
20889
|
*/
|
|
20891
20890
|
modules: CssModule[];
|
|
20892
20891
|
}
|
|
20892
|
+
|
|
20893
|
+
/**
|
|
20894
|
+
* Renames an inlined module's top-level declaration (and all its references) when
|
|
20895
|
+
* its name is already taken in the shared startup scope, recording the chosen name
|
|
20896
|
+
* in `allUsedNames`. Lets inlined modules be emitted without a per-entry/per-chunk
|
|
20897
|
+
* IIFE by resolving name collisions instead of isolating each module.
|
|
20898
|
+
*/
|
|
20893
20899
|
declare interface RenderContextJavascriptModulesPlugin {
|
|
20894
20900
|
/**
|
|
20895
20901
|
* the chunk
|
|
@@ -24037,6 +24043,13 @@ declare interface StarListSerializerContext {
|
|
|
24037
24043
|
obj?: LazyOptions
|
|
24038
24044
|
) => LazyFunction<any, any, any, LazyOptions>;
|
|
24039
24045
|
}
|
|
24046
|
+
|
|
24047
|
+
/**
|
|
24048
|
+
* Renames an inlined module's top-level declaration (and all its references) when
|
|
24049
|
+
* its name is already taken in the shared startup scope, recording the chosen name
|
|
24050
|
+
* in `allUsedNames`. Lets inlined modules be emitted without a per-entry/per-chunk
|
|
24051
|
+
* IIFE by resolving name collisions instead of isolating each module.
|
|
24052
|
+
*/
|
|
24040
24053
|
declare interface StartupRenderContext {
|
|
24041
24054
|
/**
|
|
24042
24055
|
* the chunk
|
|
@@ -25406,18 +25419,18 @@ declare interface WatchFileSystem {
|
|
|
25406
25419
|
timeInfoEntries1?: Map<
|
|
25407
25420
|
string,
|
|
25408
25421
|
| null
|
|
25422
|
+
| "ignore"
|
|
25409
25423
|
| EntryTypesIndex
|
|
25410
25424
|
| OnlySafeTimeEntry
|
|
25411
25425
|
| ExistenceOnlyTimeEntryTypesIndex
|
|
25412
|
-
| "ignore"
|
|
25413
25426
|
>,
|
|
25414
25427
|
timeInfoEntries2?: Map<
|
|
25415
25428
|
string,
|
|
25416
25429
|
| null
|
|
25430
|
+
| "ignore"
|
|
25417
25431
|
| EntryTypesIndex
|
|
25418
25432
|
| OnlySafeTimeEntry
|
|
25419
25433
|
| ExistenceOnlyTimeEntryTypesIndex
|
|
25420
|
-
| "ignore"
|
|
25421
25434
|
>,
|
|
25422
25435
|
changes?: Set<string>,
|
|
25423
25436
|
removals?: Set<string>
|
|
@@ -25504,10 +25517,10 @@ declare interface Watcher {
|
|
|
25504
25517
|
getFileTimeInfoEntries: () => Map<
|
|
25505
25518
|
string,
|
|
25506
25519
|
| null
|
|
25520
|
+
| "ignore"
|
|
25507
25521
|
| EntryTypesIndex
|
|
25508
25522
|
| OnlySafeTimeEntry
|
|
25509
25523
|
| ExistenceOnlyTimeEntryTypesIndex
|
|
25510
|
-
| "ignore"
|
|
25511
25524
|
>;
|
|
25512
25525
|
|
|
25513
25526
|
/**
|
|
@@ -25516,10 +25529,10 @@ declare interface Watcher {
|
|
|
25516
25529
|
getContextTimeInfoEntries: () => Map<
|
|
25517
25530
|
string,
|
|
25518
25531
|
| null
|
|
25532
|
+
| "ignore"
|
|
25519
25533
|
| EntryTypesIndex
|
|
25520
25534
|
| OnlySafeTimeEntry
|
|
25521
25535
|
| ExistenceOnlyTimeEntryTypesIndex
|
|
25522
|
-
| "ignore"
|
|
25523
25536
|
>;
|
|
25524
25537
|
|
|
25525
25538
|
/**
|
|
@@ -25548,10 +25561,10 @@ declare interface WatcherInfo {
|
|
|
25548
25561
|
fileTimeInfoEntries: Map<
|
|
25549
25562
|
string,
|
|
25550
25563
|
| null
|
|
25564
|
+
| "ignore"
|
|
25551
25565
|
| EntryTypesIndex
|
|
25552
25566
|
| OnlySafeTimeEntry
|
|
25553
25567
|
| ExistenceOnlyTimeEntryTypesIndex
|
|
25554
|
-
| "ignore"
|
|
25555
25568
|
>;
|
|
25556
25569
|
|
|
25557
25570
|
/**
|
|
@@ -25560,10 +25573,10 @@ declare interface WatcherInfo {
|
|
|
25560
25573
|
contextTimeInfoEntries: Map<
|
|
25561
25574
|
string,
|
|
25562
25575
|
| null
|
|
25576
|
+
| "ignore"
|
|
25563
25577
|
| EntryTypesIndex
|
|
25564
25578
|
| OnlySafeTimeEntry
|
|
25565
25579
|
| ExistenceOnlyTimeEntryTypesIndex
|
|
25566
|
-
| "ignore"
|
|
25567
25580
|
>;
|
|
25568
25581
|
}
|
|
25569
25582
|
declare abstract class Watching {
|