webpack 5.74.0 → 5.75.0
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.
Potentially problematic release.
This version of webpack might be problematic. Click here for more details.
- package/README.md +0 -3
- package/hot/dev-server.js +17 -4
- package/lib/BannerPlugin.js +1 -1
- package/lib/Compilation.js +4 -1
- package/lib/EvalSourceMapDevToolPlugin.js +7 -3
- package/lib/Template.js +1 -1
- package/lib/WebpackOptionsApply.js +22 -0
- package/lib/buildChunkGraph.js +2 -1
- package/lib/config/defaults.js +2 -2
- package/lib/config/normalization.js +2 -3
- package/lib/css/CssParser.js +1 -1
- package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +1 -1
- package/lib/dependencies/WorkerPlugin.js +2 -0
- package/lib/ids/IdHelpers.js +1 -1
- package/lib/index.js +3 -0
- package/lib/runtime/LoadScriptRuntimeModule.js +2 -2
- package/lib/stats/DefaultStatsPrinterPlugin.js +1 -1
- package/lib/wasm-sync/WebAssemblyParser.js +1 -1
- package/package.json +4 -4
- package/schemas/WebpackOptions.json +8 -2
- package/types.d.ts +136 -125
package/README.md
CHANGED
@@ -8,7 +8,6 @@
|
|
8
8
|
[![npm][npm]][npm-url]
|
9
9
|
|
10
10
|
[![node][node]][node-url]
|
11
|
-
[![deps][deps]][deps-url]
|
12
11
|
[![builds2][builds2]][builds2-url]
|
13
12
|
[![coverage][cover]][cover-url]
|
14
13
|
[![licenses][licenses]][licenses-url]
|
@@ -706,8 +705,6 @@ src="https://static.monei.net/monei-logo.svg" height="30" alt="MONEI"></a>
|
|
706
705
|
[npm-url]: https://npmjs.com/package/webpack
|
707
706
|
[node]: https://img.shields.io/node/v/webpack.svg
|
708
707
|
[node-url]: https://nodejs.org
|
709
|
-
[deps]: https://img.shields.io/david/webpack/webpack.svg
|
710
|
-
[deps-url]: https://david-dm.org/webpack/webpack
|
711
708
|
[prs]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg
|
712
709
|
[prs-url]: https://webpack.js.org/contribute/
|
713
710
|
[builds2]: https://dev.azure.com/webpack/webpack/_apis/build/status/webpack.webpack
|
package/hot/dev-server.js
CHANGED
@@ -14,12 +14,20 @@ if (module.hot) {
|
|
14
14
|
.check(true)
|
15
15
|
.then(function (updatedModules) {
|
16
16
|
if (!updatedModules) {
|
17
|
-
log(
|
17
|
+
log(
|
18
|
+
"warning",
|
19
|
+
"[HMR] Cannot find update. " +
|
20
|
+
(typeof window !== "undefined"
|
21
|
+
? "Need to do a full reload!"
|
22
|
+
: "Please reload manually!")
|
23
|
+
);
|
18
24
|
log(
|
19
25
|
"warning",
|
20
26
|
"[HMR] (Probably because of restarting the webpack-dev-server)"
|
21
27
|
);
|
22
|
-
window
|
28
|
+
if (typeof window !== "undefined") {
|
29
|
+
window.location.reload();
|
30
|
+
}
|
23
31
|
return;
|
24
32
|
}
|
25
33
|
|
@@ -38,10 +46,15 @@ if (module.hot) {
|
|
38
46
|
if (["abort", "fail"].indexOf(status) >= 0) {
|
39
47
|
log(
|
40
48
|
"warning",
|
41
|
-
"[HMR] Cannot apply update.
|
49
|
+
"[HMR] Cannot apply update. " +
|
50
|
+
(typeof window !== "undefined"
|
51
|
+
? "Need to do a full reload!"
|
52
|
+
: "Please reload manually!")
|
42
53
|
);
|
43
54
|
log("warning", "[HMR] " + log.formatError(err));
|
44
|
-
window
|
55
|
+
if (typeof window !== "undefined") {
|
56
|
+
window.location.reload();
|
57
|
+
}
|
45
58
|
} else {
|
46
59
|
log("warning", "[HMR] Update failed: " + log.formatError(err));
|
47
60
|
}
|
package/lib/BannerPlugin.js
CHANGED
package/lib/Compilation.js
CHANGED
@@ -1938,7 +1938,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
1938
1938
|
|
1939
1939
|
// This avoids deadlocks for circular dependencies
|
1940
1940
|
if (this.processDependenciesQueue.isProcessing(module)) {
|
1941
|
-
return callback();
|
1941
|
+
return callback(null, module);
|
1942
1942
|
}
|
1943
1943
|
|
1944
1944
|
this.processModuleDependencies(module, err => {
|
@@ -3192,6 +3192,9 @@ Or do you want to use the entrypoints '${name}' and '${runtime}' independently o
|
|
3192
3192
|
}
|
3193
3193
|
|
3194
3194
|
_runCodeGenerationJobs(jobs, callback) {
|
3195
|
+
if (jobs.length === 0) {
|
3196
|
+
return callback();
|
3197
|
+
}
|
3195
3198
|
let statModulesFromCache = 0;
|
3196
3199
|
let statModulesGenerated = 0;
|
3197
3200
|
const { chunkGraph, moduleGraph, dependencyTemplates, runtimeTemplate } =
|
@@ -18,6 +18,7 @@ const { makePathsAbsolute } = require("./util/identifier");
|
|
18
18
|
/** @typedef {import("../declarations/WebpackOptions").DevTool} DevToolOptions */
|
19
19
|
/** @typedef {import("../declarations/plugins/SourceMapDevToolPlugin").SourceMapDevToolPluginOptions} SourceMapDevToolPluginOptions */
|
20
20
|
/** @typedef {import("./Compiler")} Compiler */
|
21
|
+
/** @typedef {import("./NormalModule").SourceMap} SourceMap */
|
21
22
|
|
22
23
|
/** @type {WeakMap<Source, Source>} */
|
23
24
|
const cache = new WeakMap();
|
@@ -105,15 +106,15 @@ class EvalSourceMapDevToolPlugin {
|
|
105
106
|
return result(source);
|
106
107
|
}
|
107
108
|
|
108
|
-
/** @type {
|
109
|
+
/** @type {SourceMap} */
|
109
110
|
let sourceMap;
|
110
111
|
let content;
|
111
112
|
if (source.sourceAndMap) {
|
112
113
|
const sourceAndMap = source.sourceAndMap(options);
|
113
|
-
sourceMap = sourceAndMap.map;
|
114
|
+
sourceMap = /** @type {SourceMap} */ (sourceAndMap.map);
|
114
115
|
content = sourceAndMap.source;
|
115
116
|
} else {
|
116
|
-
sourceMap = source.map(options);
|
117
|
+
sourceMap = /** @type {SourceMap} */ (source.map(options));
|
117
118
|
content = source.source();
|
118
119
|
}
|
119
120
|
if (!sourceMap) {
|
@@ -152,6 +153,9 @@ class EvalSourceMapDevToolPlugin {
|
|
152
153
|
}
|
153
154
|
);
|
154
155
|
sourceMap.sources = moduleFilenames;
|
156
|
+
if (options.noSources) {
|
157
|
+
sourceMap.sourcesContent = undefined;
|
158
|
+
}
|
155
159
|
sourceMap.sourceRoot = options.sourceRoot || "";
|
156
160
|
const moduleId = chunkGraph.getModuleId(m);
|
157
161
|
sourceMap.file = `${moduleId}.js`;
|
package/lib/Template.js
CHANGED
@@ -217,7 +217,7 @@ class Template {
|
|
217
217
|
if (Array.isArray(s)) {
|
218
218
|
return s.map(Template.indent).join("\n");
|
219
219
|
} else {
|
220
|
-
const str = s.
|
220
|
+
const str = s.trimEnd();
|
221
221
|
if (!str) return "";
|
222
222
|
const ind = str[0] === "\n" ? "" : "\t";
|
223
223
|
return ind + str.replace(/\n([^\n])/g, "\n\t$1");
|
@@ -160,6 +160,28 @@ class WebpackOptionsApply extends OptionsApply {
|
|
160
160
|
}
|
161
161
|
: /^(\/\/|https?:\/\/|std:)/
|
162
162
|
).apply(compiler);
|
163
|
+
} else if (options.externalsPresets.node) {
|
164
|
+
if (options.experiments.css) {
|
165
|
+
//@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
|
166
|
+
const ExternalsPlugin = require("./ExternalsPlugin");
|
167
|
+
new ExternalsPlugin(
|
168
|
+
"module",
|
169
|
+
({ request, dependencyType }, callback) => {
|
170
|
+
if (dependencyType === "url") {
|
171
|
+
if (/^(\/\/|https?:\/\/)/.test(request))
|
172
|
+
return callback(null, `asset ${request}`);
|
173
|
+
} else if (dependencyType === "css-import") {
|
174
|
+
if (/^(\/\/|https?:\/\/)/.test(request))
|
175
|
+
return callback(null, `css-import ${request}`);
|
176
|
+
} else if (/^(\/\/|https?:\/\/|std:)/.test(request)) {
|
177
|
+
if (/^\.css(\?|$)/.test(request))
|
178
|
+
return callback(null, `css-import ${request}`);
|
179
|
+
return callback(null, `module ${request}`);
|
180
|
+
}
|
181
|
+
callback();
|
182
|
+
}
|
183
|
+
).apply(compiler);
|
184
|
+
}
|
163
185
|
}
|
164
186
|
|
165
187
|
new ChunkPrefetchPreloadPlugin().apply(compiler);
|
package/lib/buildChunkGraph.js
CHANGED
@@ -508,8 +508,9 @@ const visitModules = (
|
|
508
508
|
new AsyncDependencyToInitialChunkError(chunkName, module, b.loc)
|
509
509
|
);
|
510
510
|
c = chunkGroup;
|
511
|
+
} else {
|
512
|
+
c.addOptions(b.groupOptions);
|
511
513
|
}
|
512
|
-
c.addOptions(b.groupOptions);
|
513
514
|
c.addOrigin(module, b.loc, b.request);
|
514
515
|
}
|
515
516
|
blockConnections.set(b, []);
|
package/lib/config/defaults.js
CHANGED
@@ -485,7 +485,7 @@ const applyJavascriptParserOptionsDefaults = (
|
|
485
485
|
* @param {boolean} options.cache is caching enabled
|
486
486
|
* @param {boolean} options.syncWebAssembly is syncWebAssembly enabled
|
487
487
|
* @param {boolean} options.asyncWebAssembly is asyncWebAssembly enabled
|
488
|
-
* @param {CssExperimentOptions} options.css is css enabled
|
488
|
+
* @param {CssExperimentOptions|false} options.css is css enabled
|
489
489
|
* @param {boolean} options.futureDefaults is future defaults enabled
|
490
490
|
* @param {boolean} options.isNode is node target platform
|
491
491
|
* @returns {void}
|
@@ -1122,7 +1122,7 @@ const applyPerformanceDefaults = (performance, { production }) => {
|
|
1122
1122
|
* @param {Object} options options
|
1123
1123
|
* @param {boolean} options.production is production
|
1124
1124
|
* @param {boolean} options.development is development
|
1125
|
-
* @param {CssExperimentOptions} options.css is css enabled
|
1125
|
+
* @param {CssExperimentOptions|false} options.css is css enabled
|
1126
1126
|
* @param {boolean} options.records using records
|
1127
1127
|
* @returns {void}
|
1128
1128
|
*/
|
@@ -178,11 +178,10 @@ const getNormalizedWebpackOptions = config => {
|
|
178
178
|
),
|
179
179
|
lazyCompilation: optionalNestedConfig(
|
180
180
|
experiments.lazyCompilation,
|
181
|
-
options =>
|
182
|
-
options === true ? {} : options === false ? undefined : options
|
181
|
+
options => (options === true ? {} : options)
|
183
182
|
),
|
184
183
|
css: optionalNestedConfig(experiments.css, options =>
|
185
|
-
options === true ? {} : options
|
184
|
+
options === true ? {} : options
|
186
185
|
)
|
187
186
|
})),
|
188
187
|
externals: config.externals,
|
package/lib/css/CssParser.js
CHANGED
@@ -38,7 +38,7 @@ module.exports = class ImportMetaContextDependencyParserPlugin {
|
|
38
38
|
apply(parser) {
|
39
39
|
parser.hooks.evaluateIdentifier
|
40
40
|
.for("import.meta.webpackContext")
|
41
|
-
.tap("
|
41
|
+
.tap("ImportMetaContextDependencyParserPlugin", expr => {
|
42
42
|
return evaluateToIdentifier(
|
43
43
|
"import.meta.webpackContext",
|
44
44
|
"import.meta",
|
@@ -190,8 +190,10 @@ class WorkerPlugin {
|
|
190
190
|
} = arg2 && arg2.type === "ObjectExpression"
|
191
191
|
? parseObjectExpression(parser, arg2)
|
192
192
|
: {
|
193
|
+
/** @type {Record<string, Expression | Pattern>} */
|
193
194
|
expressions: {},
|
194
195
|
otherElements: [],
|
196
|
+
/** @type {Record<string, any>} */
|
195
197
|
values: {},
|
196
198
|
spread: false,
|
197
199
|
insertType: arg2 ? "spread" : "argument",
|
package/lib/ids/IdHelpers.js
CHANGED
package/lib/index.js
CHANGED
@@ -495,6 +495,9 @@ module.exports = mergeExports(fn, {
|
|
495
495
|
wasm: {
|
496
496
|
get AsyncWebAssemblyModulesPlugin() {
|
497
497
|
return require("./wasm-async/AsyncWebAssemblyModulesPlugin");
|
498
|
+
},
|
499
|
+
get EnableWasmLoadingPlugin() {
|
500
|
+
return require("./wasm/EnableWasmLoadingPlugin");
|
498
501
|
}
|
499
502
|
},
|
500
503
|
|
@@ -146,8 +146,8 @@ class LoadScriptRuntimeModule extends HelperRuntimeModule {
|
|
146
146
|
)});`,
|
147
147
|
"if(prev) return prev(event);"
|
148
148
|
])
|
149
|
-
)
|
150
|
-
|
149
|
+
) +
|
150
|
+
";",
|
151
151
|
`var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), ${loadTimeout});`,
|
152
152
|
"script.onerror = onScriptComplete.bind(null, script.onerror);",
|
153
153
|
"script.onload = onScriptComplete.bind(null, script.onload);",
|
@@ -1153,7 +1153,7 @@ const SIMPLE_ELEMENT_JOINERS = {
|
|
1153
1153
|
chunkOrigin: items => "> " + joinOneLine(items),
|
1154
1154
|
"errors[].error": joinError(true),
|
1155
1155
|
"warnings[].error": joinError(false),
|
1156
|
-
loggingGroup: items => joinExplicitNewLine(items, "").
|
1156
|
+
loggingGroup: items => joinExplicitNewLine(items, "").trimEnd(),
|
1157
1157
|
moduleTraceItem: items => " @ " + joinOneLine(items),
|
1158
1158
|
moduleTraceDependency: joinOneLine
|
1159
1159
|
};
|
@@ -17,7 +17,7 @@ const WebAssemblyImportDependency = require("../dependencies/WebAssemblyImportDe
|
|
17
17
|
/** @typedef {import("../Parser").ParserState} ParserState */
|
18
18
|
/** @typedef {import("../Parser").PreparsedAst} PreparsedAst */
|
19
19
|
|
20
|
-
const JS_COMPAT_TYPES = new Set(["i32", "f32", "f64"]);
|
20
|
+
const JS_COMPAT_TYPES = new Set(["i32", "i64", "f32", "f64"]);
|
21
21
|
|
22
22
|
/**
|
23
23
|
* @param {t.Signature} signature the func signature
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "webpack",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.75.0",
|
4
4
|
"author": "Tobias Koppers @sokra",
|
5
5
|
"description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.",
|
6
6
|
"license": "MIT",
|
@@ -84,7 +84,7 @@
|
|
84
84
|
"mini-svg-data-uri": "^1.2.3",
|
85
85
|
"nyc": "^15.1.0",
|
86
86
|
"open-cli": "^6.0.1",
|
87
|
-
"prettier": "^2.
|
87
|
+
"prettier": "^2.7.1",
|
88
88
|
"pretty-format": "^27.0.2",
|
89
89
|
"pug": "^3.0.0",
|
90
90
|
"pug-loader": "^2.4.0",
|
@@ -98,9 +98,9 @@
|
|
98
98
|
"style-loader": "^2.0.0",
|
99
99
|
"terser": "^5.7.0",
|
100
100
|
"toml": "^3.0.0",
|
101
|
-
"tooling": "webpack/tooling#v1.
|
101
|
+
"tooling": "webpack/tooling#v1.22.0",
|
102
102
|
"ts-loader": "^8.0.2",
|
103
|
-
"typescript": "^4.
|
103
|
+
"typescript": "^4.8.4",
|
104
104
|
"url-loader": "^4.1.0",
|
105
105
|
"wast-loader": "^1.11.0",
|
106
106
|
"webassembly-feature": "1.3.0",
|
@@ -897,7 +897,10 @@
|
|
897
897
|
},
|
898
898
|
"css": {
|
899
899
|
"description": "Enable css support.",
|
900
|
-
"
|
900
|
+
"anyOf": [
|
901
|
+
{
|
902
|
+
"enum": [false]
|
903
|
+
},
|
901
904
|
{
|
902
905
|
"$ref": "#/definitions/CssExperimentOptions"
|
903
906
|
}
|
@@ -913,7 +916,10 @@
|
|
913
916
|
},
|
914
917
|
"lazyCompilation": {
|
915
918
|
"description": "Compile entrypoints and import()s only when they are accessed.",
|
916
|
-
"
|
919
|
+
"anyOf": [
|
920
|
+
{
|
921
|
+
"enum": [false]
|
922
|
+
},
|
917
923
|
{
|
918
924
|
"$ref": "#/definitions/LazyCompilationOptions"
|
919
925
|
}
|
package/types.d.ts
CHANGED
@@ -731,12 +731,12 @@ declare class Chunk {
|
|
731
731
|
renderedHash?: string;
|
732
732
|
chunkReason?: string;
|
733
733
|
extraAsync: boolean;
|
734
|
-
|
734
|
+
get entryModule(): Module;
|
735
735
|
hasEntryModule(): boolean;
|
736
736
|
addModule(module: Module): boolean;
|
737
737
|
removeModule(module: Module): void;
|
738
738
|
getNumberOfModules(): number;
|
739
|
-
|
739
|
+
get modulesIterable(): Iterable<Module>;
|
740
740
|
compareTo(otherChunk: Chunk): 0 | 1 | -1;
|
741
741
|
containsModule(module: Module): boolean;
|
742
742
|
getModules(): Module[];
|
@@ -762,7 +762,7 @@ declare class Chunk {
|
|
762
762
|
removeGroup(chunkGroup: ChunkGroup): void;
|
763
763
|
isInGroup(chunkGroup: ChunkGroup): boolean;
|
764
764
|
getNumberOfGroups(): number;
|
765
|
-
|
765
|
+
get groupsIterable(): Iterable<ChunkGroup>;
|
766
766
|
disconnectFromGroups(): void;
|
767
767
|
split(newChunk: Chunk): void;
|
768
768
|
updateHash(hash: Hash, chunkGraph: ChunkGraph): void;
|
@@ -982,12 +982,12 @@ declare abstract class ChunkGroup {
|
|
982
982
|
/**
|
983
983
|
* get a uniqueId for ChunkGroup, made up of its member Chunk debugId's
|
984
984
|
*/
|
985
|
-
|
985
|
+
get debugId(): string;
|
986
986
|
|
987
987
|
/**
|
988
988
|
* get a unique id for ChunkGroup, made up of its member Chunk id's
|
989
989
|
*/
|
990
|
-
|
990
|
+
get id(): string;
|
991
991
|
|
992
992
|
/**
|
993
993
|
* Performs an unshift of a specific chunk
|
@@ -1009,20 +1009,20 @@ declare abstract class ChunkGroup {
|
|
1009
1009
|
addChild(group: ChunkGroup): boolean;
|
1010
1010
|
getChildren(): ChunkGroup[];
|
1011
1011
|
getNumberOfChildren(): number;
|
1012
|
-
|
1012
|
+
get childrenIterable(): SortableSet<ChunkGroup>;
|
1013
1013
|
removeChild(group: ChunkGroup): boolean;
|
1014
1014
|
addParent(parentChunk: ChunkGroup): boolean;
|
1015
1015
|
getParents(): ChunkGroup[];
|
1016
1016
|
getNumberOfParents(): number;
|
1017
1017
|
hasParent(parent: ChunkGroup): boolean;
|
1018
|
-
|
1018
|
+
get parentsIterable(): SortableSet<ChunkGroup>;
|
1019
1019
|
removeParent(chunkGroup: ChunkGroup): boolean;
|
1020
1020
|
addAsyncEntrypoint(entrypoint: Entrypoint): boolean;
|
1021
|
-
|
1021
|
+
get asyncEntrypointsIterable(): SortableSet<ChunkGroup>;
|
1022
1022
|
getBlocks(): any[];
|
1023
1023
|
getNumberOfBlocks(): number;
|
1024
1024
|
hasBlock(block?: any): boolean;
|
1025
|
-
|
1025
|
+
get blocksIterable(): Iterable<AsyncDependenciesBlock>;
|
1026
1026
|
addBlock(block: AsyncDependenciesBlock): boolean;
|
1027
1027
|
addOrigin(module: Module, loc: DependencyLocation, request: string): void;
|
1028
1028
|
getFiles(): string[];
|
@@ -1175,7 +1175,7 @@ declare abstract class ChunkTemplate {
|
|
1175
1175
|
hash: { tap: (options?: any, fn?: any) => void };
|
1176
1176
|
hashForChunk: { tap: (options?: any, fn?: any) => void };
|
1177
1177
|
}>;
|
1178
|
-
|
1178
|
+
get outputOptions(): Output;
|
1179
1179
|
}
|
1180
1180
|
|
1181
1181
|
/**
|
@@ -1492,7 +1492,7 @@ declare class Compilation {
|
|
1492
1492
|
>;
|
1493
1493
|
statsFactory: SyncHook<[StatsFactory, NormalizedStatsOptions]>;
|
1494
1494
|
statsPrinter: SyncHook<[StatsPrinter, NormalizedStatsOptions]>;
|
1495
|
-
|
1495
|
+
get normalModuleLoader(): SyncHook<[object, NormalModule]>;
|
1496
1496
|
}>;
|
1497
1497
|
name?: string;
|
1498
1498
|
startTime: any;
|
@@ -2653,8 +2653,8 @@ declare class Dependency {
|
|
2653
2653
|
constructor();
|
2654
2654
|
weak: boolean;
|
2655
2655
|
optional: boolean;
|
2656
|
-
|
2657
|
-
|
2656
|
+
get type(): string;
|
2657
|
+
get category(): string;
|
2658
2658
|
loc: DependencyLocation;
|
2659
2659
|
setLoc(
|
2660
2660
|
startLine?: any,
|
@@ -2716,7 +2716,7 @@ declare class Dependency {
|
|
2716
2716
|
serialize(__0: { write: any }): void;
|
2717
2717
|
deserialize(__0: { read: any }): void;
|
2718
2718
|
module: any;
|
2719
|
-
|
2719
|
+
get disconnect(): any;
|
2720
2720
|
static NO_EXPORTS_REFERENCED: string[][];
|
2721
2721
|
static EXPORTS_OBJECT_REFERENCED: string[][];
|
2722
2722
|
static TRANSITIVE: typeof TRANSITIVE;
|
@@ -3133,6 +3133,17 @@ declare class EnableLibraryPlugin {
|
|
3133
3133
|
static setEnabled(compiler: Compiler, type: string): void;
|
3134
3134
|
static checkEnabled(compiler: Compiler, type: string): void;
|
3135
3135
|
}
|
3136
|
+
declare class EnableWasmLoadingPlugin {
|
3137
|
+
constructor(type: string);
|
3138
|
+
type: string;
|
3139
|
+
|
3140
|
+
/**
|
3141
|
+
* Apply the plugin
|
3142
|
+
*/
|
3143
|
+
apply(compiler: Compiler): void;
|
3144
|
+
static setEnabled(compiler: Compiler, type: string): void;
|
3145
|
+
static checkEnabled(compiler: Compiler, type: string): void;
|
3146
|
+
}
|
3136
3147
|
type Entry =
|
3137
3148
|
| string
|
3138
3149
|
| (() => string | EntryObject | string[] | Promise<EntryStatic>)
|
@@ -3543,12 +3554,12 @@ declare interface ExperimentsNormalizedExtra {
|
|
3543
3554
|
/**
|
3544
3555
|
* Enable css support.
|
3545
3556
|
*/
|
3546
|
-
css?: CssExperimentOptions;
|
3557
|
+
css?: false | CssExperimentOptions;
|
3547
3558
|
|
3548
3559
|
/**
|
3549
3560
|
* Compile entrypoints and import()s only when they are accessed.
|
3550
3561
|
*/
|
3551
|
-
lazyCompilation?: LazyCompilationOptions;
|
3562
|
+
lazyCompilation?: false | LazyCompilationOptions;
|
3552
3563
|
}
|
3553
3564
|
declare abstract class ExportInfo {
|
3554
3565
|
name: string;
|
@@ -3581,7 +3592,7 @@ declare abstract class ExportInfo {
|
|
3581
3592
|
canMangleUse?: boolean;
|
3582
3593
|
exportsInfoOwned: boolean;
|
3583
3594
|
exportsInfo?: ExportsInfo;
|
3584
|
-
|
3595
|
+
get canMangle(): boolean;
|
3585
3596
|
setUsedInUnknownWay(runtime: RuntimeSpec): boolean;
|
3586
3597
|
setUsedWithoutInfo(runtime: RuntimeSpec): boolean;
|
3587
3598
|
setHasUseInfo(): void;
|
@@ -3702,11 +3713,11 @@ declare interface ExportSpec {
|
|
3702
3713
|
}
|
3703
3714
|
type ExportedVariableInfo = string | ScopeInfo | VariableInfo;
|
3704
3715
|
declare abstract class ExportsInfo {
|
3705
|
-
|
3706
|
-
|
3707
|
-
|
3708
|
-
|
3709
|
-
|
3716
|
+
get ownedExports(): Iterable<ExportInfo>;
|
3717
|
+
get orderedOwnedExports(): Iterable<ExportInfo>;
|
3718
|
+
get exports(): Iterable<ExportInfo>;
|
3719
|
+
get orderedExports(): Iterable<ExportInfo>;
|
3720
|
+
get otherExportsInfo(): ExportInfo;
|
3710
3721
|
setRedirectNamedTo(exportsInfo?: any): boolean;
|
3711
3722
|
setHasProvideInfo(): void;
|
3712
3723
|
setHasUseInfo(): void;
|
@@ -4549,12 +4560,12 @@ declare class Hash {
|
|
4549
4560
|
constructor();
|
4550
4561
|
|
4551
4562
|
/**
|
4552
|
-
* Update hash {@link https
|
4563
|
+
* Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
|
4553
4564
|
*/
|
4554
4565
|
update(data: string | Buffer, inputEncoding?: string): Hash;
|
4555
4566
|
|
4556
4567
|
/**
|
4557
|
-
* Calculates the digest {@link https
|
4568
|
+
* Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
|
4558
4569
|
*/
|
4559
4570
|
digest(encoding?: string): string | Buffer;
|
4560
4571
|
}
|
@@ -6157,7 +6168,7 @@ declare interface LazyCompilationOptions {
|
|
6157
6168
|
}
|
6158
6169
|
declare class LazySet<T> {
|
6159
6170
|
constructor(iterable?: Iterable<T>);
|
6160
|
-
|
6171
|
+
get size(): number;
|
6161
6172
|
add(item: T): LazySet<T>;
|
6162
6173
|
addAll(iterable: LazySet<T> | Iterable<T>): LazySet<T>;
|
6163
6174
|
clear(): void;
|
@@ -6669,9 +6680,9 @@ declare abstract class MainTemplate {
|
|
6669
6680
|
localVars: SyncWaterfallHook<[string, Chunk, string]>;
|
6670
6681
|
requireExtensions: SyncWaterfallHook<[string, Chunk, string]>;
|
6671
6682
|
requireEnsure: SyncWaterfallHook<[string, Chunk, string, string]>;
|
6672
|
-
|
6673
|
-
|
6674
|
-
|
6683
|
+
get jsonpScript(): SyncWaterfallHook<[string, Chunk]>;
|
6684
|
+
get linkPrefetch(): SyncWaterfallHook<[string, Chunk]>;
|
6685
|
+
get linkPreload(): SyncWaterfallHook<[string, Chunk]>;
|
6675
6686
|
}>;
|
6676
6687
|
renderCurrentHashCode: (hash: string, length?: number) => string;
|
6677
6688
|
getPublicPath: (options: object) => string;
|
@@ -6680,8 +6691,8 @@ declare abstract class MainTemplate {
|
|
6680
6691
|
path?: any,
|
6681
6692
|
options?: any
|
6682
6693
|
) => { path: string; info: AssetInfo };
|
6683
|
-
|
6684
|
-
|
6694
|
+
get requireFn(): "__webpack_require__";
|
6695
|
+
get outputOptions(): Output;
|
6685
6696
|
}
|
6686
6697
|
declare interface MapOptions {
|
6687
6698
|
columns?: boolean;
|
@@ -6756,29 +6767,29 @@ declare class Module extends DependenciesBlock {
|
|
6756
6767
|
presentationalDependencies?: Dependency[];
|
6757
6768
|
codeGenerationDependencies?: Dependency[];
|
6758
6769
|
id: string | number;
|
6759
|
-
|
6760
|
-
|
6770
|
+
get hash(): string;
|
6771
|
+
get renderedHash(): string;
|
6761
6772
|
profile: null | ModuleProfile;
|
6762
6773
|
index: number;
|
6763
6774
|
index2: number;
|
6764
6775
|
depth: number;
|
6765
6776
|
issuer: null | Module;
|
6766
|
-
|
6767
|
-
|
6777
|
+
get usedExports(): null | boolean | SortableSet<string>;
|
6778
|
+
get optimizationBailout(): (
|
6768
6779
|
| string
|
6769
6780
|
| ((requestShortener: RequestShortener) => string)
|
6770
6781
|
)[];
|
6771
|
-
|
6782
|
+
get optional(): boolean;
|
6772
6783
|
addChunk(chunk?: any): boolean;
|
6773
6784
|
removeChunk(chunk?: any): void;
|
6774
6785
|
isInChunk(chunk?: any): boolean;
|
6775
6786
|
isEntryModule(): boolean;
|
6776
6787
|
getChunks(): Chunk[];
|
6777
6788
|
getNumberOfChunks(): number;
|
6778
|
-
|
6789
|
+
get chunksIterable(): Iterable<Chunk>;
|
6779
6790
|
isProvided(exportName: string): null | boolean;
|
6780
|
-
|
6781
|
-
|
6791
|
+
get exportsArgument(): string;
|
6792
|
+
get moduleArgument(): string;
|
6782
6793
|
getExportsType(
|
6783
6794
|
moduleGraph: ModuleGraph,
|
6784
6795
|
strict: boolean
|
@@ -6872,10 +6883,10 @@ declare class Module extends DependenciesBlock {
|
|
6872
6883
|
missingDependencies: LazySet<string>,
|
6873
6884
|
buildDependencies: LazySet<string>
|
6874
6885
|
): void;
|
6875
|
-
|
6876
|
-
|
6877
|
-
|
6878
|
-
|
6886
|
+
get hasEqualsChunks(): any;
|
6887
|
+
get isUsed(): any;
|
6888
|
+
get errors(): any;
|
6889
|
+
get warnings(): any;
|
6879
6890
|
used: any;
|
6880
6891
|
}
|
6881
6892
|
declare class ModuleConcatenationPlugin {
|
@@ -7144,7 +7155,7 @@ declare class ModuleGraphConnection {
|
|
7144
7155
|
) => ConnectionState
|
7145
7156
|
): void;
|
7146
7157
|
addExplanation(explanation: string): void;
|
7147
|
-
|
7158
|
+
get explanation(): string;
|
7148
7159
|
active: void;
|
7149
7160
|
isActive(runtime: RuntimeSpec): boolean;
|
7150
7161
|
isTargetActive(runtime: RuntimeSpec): boolean;
|
@@ -7401,7 +7412,7 @@ declare abstract class ModuleTemplate {
|
|
7401
7412
|
package: { tap: (options?: any, fn?: any) => void };
|
7402
7413
|
hash: { tap: (options?: any, fn?: any) => void };
|
7403
7414
|
}>;
|
7404
|
-
|
7415
|
+
get runtimeTemplate(): any;
|
7405
7416
|
}
|
7406
7417
|
declare class MultiCompiler {
|
7407
7418
|
constructor(
|
@@ -7419,8 +7430,8 @@ declare class MultiCompiler {
|
|
7419
7430
|
compilers: Compiler[];
|
7420
7431
|
dependencies: WeakMap<Compiler, string[]>;
|
7421
7432
|
running: boolean;
|
7422
|
-
|
7423
|
-
|
7433
|
+
get options(): WebpackOptionsNormalized[] & MultiCompilerOptions;
|
7434
|
+
get outputPath(): string;
|
7424
7435
|
inputFileSystem: InputFileSystem;
|
7425
7436
|
outputFileSystem: OutputFileSystem;
|
7426
7437
|
watchFileSystem: WatchFileSystem;
|
@@ -7449,7 +7460,7 @@ declare interface MultiCompilerOptions {
|
|
7449
7460
|
}
|
7450
7461
|
declare abstract class MultiStats {
|
7451
7462
|
stats: Stats[];
|
7452
|
-
|
7463
|
+
get hash(): string;
|
7453
7464
|
hasErrors(): boolean;
|
7454
7465
|
hasWarnings(): boolean;
|
7455
7466
|
toJson(options?: any): StatsCompilation;
|
@@ -10378,13 +10389,13 @@ declare class RuntimeSpecMap<T> {
|
|
10378
10389
|
update(runtime?: any, fn?: any): void;
|
10379
10390
|
keys(): RuntimeSpec[];
|
10380
10391
|
values(): IterableIterator<T>;
|
10381
|
-
|
10392
|
+
get size(): number;
|
10382
10393
|
}
|
10383
10394
|
declare class RuntimeSpecSet {
|
10384
10395
|
constructor(iterable?: any);
|
10385
10396
|
add(runtime?: any): void;
|
10386
10397
|
has(runtime?: any): boolean;
|
10387
|
-
|
10398
|
+
get size(): number;
|
10388
10399
|
[Symbol.iterator](): IterableIterator<RuntimeSpec>;
|
10389
10400
|
}
|
10390
10401
|
declare abstract class RuntimeTemplate {
|
@@ -10809,7 +10820,7 @@ declare abstract class RuntimeValue {
|
|
10809
10820
|
readonly version?: string;
|
10810
10821
|
}) => CodeValuePrimitive;
|
10811
10822
|
options: true | RuntimeValueOptions;
|
10812
|
-
|
10823
|
+
get fileDependencies(): true | string[];
|
10813
10824
|
exec(
|
10814
10825
|
parser: JavascriptParser,
|
10815
10826
|
valueCacheVersions: Map<string, string | Set<string>>,
|
@@ -11262,7 +11273,7 @@ declare abstract class StackedMap<K, V> {
|
|
11262
11273
|
asSet(): Set<K>;
|
11263
11274
|
asPairArray(): [K, Cell<V>][];
|
11264
11275
|
asMap(): Map<K, Cell<V>>;
|
11265
|
-
|
11276
|
+
get size(): number;
|
11266
11277
|
createChild(): StackedMap<K, V>;
|
11267
11278
|
}
|
11268
11279
|
type StartupRenderContext = RenderContext & { inlined: boolean };
|
@@ -11292,9 +11303,9 @@ type Statement =
|
|
11292
11303
|
declare class Stats {
|
11293
11304
|
constructor(compilation: Compilation);
|
11294
11305
|
compilation: Compilation;
|
11295
|
-
|
11296
|
-
|
11297
|
-
|
11306
|
+
get hash(): string;
|
11307
|
+
get startTime(): any;
|
11308
|
+
get endTime(): any;
|
11298
11309
|
hasWarnings(): boolean;
|
11299
11310
|
hasErrors(): boolean;
|
11300
11311
|
toJson(options?: string | StatsOptions): StatsCompilation;
|
@@ -11835,7 +11846,7 @@ declare class SyncModuleIdsPlugin {
|
|
11835
11846
|
/**
|
11836
11847
|
* operation mode (defaults to merge)
|
11837
11848
|
*/
|
11838
|
-
mode?: "read" | "
|
11849
|
+
mode?: "read" | "merge" | "create" | "update";
|
11839
11850
|
});
|
11840
11851
|
|
11841
11852
|
/**
|
@@ -12686,75 +12697,75 @@ declare namespace exports {
|
|
12686
12697
|
export let matchObject: (obj?: any, str?: any) => boolean;
|
12687
12698
|
}
|
12688
12699
|
export namespace RuntimeGlobals {
|
12689
|
-
export let require:
|
12690
|
-
export let requireScope:
|
12691
|
-
export let exports:
|
12692
|
-
export let thisAsExports:
|
12693
|
-
export let returnExportsFromRuntime:
|
12694
|
-
export let module:
|
12695
|
-
export let moduleId:
|
12696
|
-
export let moduleLoaded:
|
12697
|
-
export let publicPath:
|
12698
|
-
export let entryModuleId:
|
12699
|
-
export let moduleCache:
|
12700
|
-
export let moduleFactories:
|
12701
|
-
export let moduleFactoriesAddOnly:
|
12702
|
-
export let ensureChunk:
|
12703
|
-
export let ensureChunkHandlers:
|
12704
|
-
export let ensureChunkIncludeEntries:
|
12705
|
-
export let prefetchChunk:
|
12706
|
-
export let prefetchChunkHandlers:
|
12707
|
-
export let preloadChunk:
|
12708
|
-
export let preloadChunkHandlers:
|
12709
|
-
export let definePropertyGetters:
|
12710
|
-
export let makeNamespaceObject:
|
12711
|
-
export let createFakeNamespaceObject:
|
12712
|
-
export let compatGetDefaultExport:
|
12713
|
-
export let harmonyModuleDecorator:
|
12714
|
-
export let nodeModuleDecorator:
|
12715
|
-
export let getFullHash:
|
12716
|
-
export let wasmInstances:
|
12717
|
-
export let instantiateWasm:
|
12718
|
-
export let uncaughtErrorHandler:
|
12719
|
-
export let scriptNonce:
|
12720
|
-
export let loadScript:
|
12721
|
-
export let createScript:
|
12722
|
-
export let createScriptUrl:
|
12723
|
-
export let getTrustedTypesPolicy:
|
12724
|
-
export let chunkName:
|
12725
|
-
export let runtimeId:
|
12726
|
-
export let getChunkScriptFilename:
|
12727
|
-
export let getChunkCssFilename:
|
12728
|
-
export let hasCssModules:
|
12729
|
-
export let getChunkUpdateScriptFilename:
|
12730
|
-
export let getChunkUpdateCssFilename:
|
12731
|
-
export let startup:
|
12732
|
-
export let startupNoDefault:
|
12733
|
-
export let startupOnlyAfter:
|
12734
|
-
export let startupOnlyBefore:
|
12735
|
-
export let chunkCallback:
|
12736
|
-
export let startupEntrypoint:
|
12737
|
-
export let onChunksLoaded:
|
12738
|
-
export let externalInstallChunk:
|
12739
|
-
export let interceptModuleExecution:
|
12740
|
-
export let global:
|
12741
|
-
export let shareScopeMap:
|
12742
|
-
export let initializeSharing:
|
12743
|
-
export let currentRemoteGetScope:
|
12744
|
-
export let getUpdateManifestFilename:
|
12745
|
-
export let hmrDownloadManifest:
|
12746
|
-
export let hmrDownloadUpdateHandlers:
|
12747
|
-
export let hmrModuleData:
|
12748
|
-
export let hmrInvalidateModuleHandlers:
|
12749
|
-
export let hmrRuntimeStatePrefix:
|
12750
|
-
export let amdDefine:
|
12751
|
-
export let amdOptions:
|
12752
|
-
export let system:
|
12753
|
-
export let hasOwnProperty:
|
12754
|
-
export let systemContext:
|
12755
|
-
export let baseURI:
|
12756
|
-
export let relativeUrl:
|
12757
|
-
export let asyncModule:
|
12700
|
+
export let require: "__webpack_require__";
|
12701
|
+
export let requireScope: "__webpack_require__.*";
|
12702
|
+
export let exports: "__webpack_exports__";
|
12703
|
+
export let thisAsExports: "top-level-this-exports";
|
12704
|
+
export let returnExportsFromRuntime: "return-exports-from-runtime";
|
12705
|
+
export let module: "module";
|
12706
|
+
export let moduleId: "module.id";
|
12707
|
+
export let moduleLoaded: "module.loaded";
|
12708
|
+
export let publicPath: "__webpack_require__.p";
|
12709
|
+
export let entryModuleId: "__webpack_require__.s";
|
12710
|
+
export let moduleCache: "__webpack_require__.c";
|
12711
|
+
export let moduleFactories: "__webpack_require__.m";
|
12712
|
+
export let moduleFactoriesAddOnly: "__webpack_require__.m (add only)";
|
12713
|
+
export let ensureChunk: "__webpack_require__.e";
|
12714
|
+
export let ensureChunkHandlers: "__webpack_require__.f";
|
12715
|
+
export let ensureChunkIncludeEntries: "__webpack_require__.f (include entries)";
|
12716
|
+
export let prefetchChunk: "__webpack_require__.E";
|
12717
|
+
export let prefetchChunkHandlers: "__webpack_require__.F";
|
12718
|
+
export let preloadChunk: "__webpack_require__.G";
|
12719
|
+
export let preloadChunkHandlers: "__webpack_require__.H";
|
12720
|
+
export let definePropertyGetters: "__webpack_require__.d";
|
12721
|
+
export let makeNamespaceObject: "__webpack_require__.r";
|
12722
|
+
export let createFakeNamespaceObject: "__webpack_require__.t";
|
12723
|
+
export let compatGetDefaultExport: "__webpack_require__.n";
|
12724
|
+
export let harmonyModuleDecorator: "__webpack_require__.hmd";
|
12725
|
+
export let nodeModuleDecorator: "__webpack_require__.nmd";
|
12726
|
+
export let getFullHash: "__webpack_require__.h";
|
12727
|
+
export let wasmInstances: "__webpack_require__.w";
|
12728
|
+
export let instantiateWasm: "__webpack_require__.v";
|
12729
|
+
export let uncaughtErrorHandler: "__webpack_require__.oe";
|
12730
|
+
export let scriptNonce: "__webpack_require__.nc";
|
12731
|
+
export let loadScript: "__webpack_require__.l";
|
12732
|
+
export let createScript: "__webpack_require__.ts";
|
12733
|
+
export let createScriptUrl: "__webpack_require__.tu";
|
12734
|
+
export let getTrustedTypesPolicy: "__webpack_require__.tt";
|
12735
|
+
export let chunkName: "__webpack_require__.cn";
|
12736
|
+
export let runtimeId: "__webpack_require__.j";
|
12737
|
+
export let getChunkScriptFilename: "__webpack_require__.u";
|
12738
|
+
export let getChunkCssFilename: "__webpack_require__.k";
|
12739
|
+
export let hasCssModules: "has css modules";
|
12740
|
+
export let getChunkUpdateScriptFilename: "__webpack_require__.hu";
|
12741
|
+
export let getChunkUpdateCssFilename: "__webpack_require__.hk";
|
12742
|
+
export let startup: "__webpack_require__.x";
|
12743
|
+
export let startupNoDefault: "__webpack_require__.x (no default handler)";
|
12744
|
+
export let startupOnlyAfter: "__webpack_require__.x (only after)";
|
12745
|
+
export let startupOnlyBefore: "__webpack_require__.x (only before)";
|
12746
|
+
export let chunkCallback: "webpackChunk";
|
12747
|
+
export let startupEntrypoint: "__webpack_require__.X";
|
12748
|
+
export let onChunksLoaded: "__webpack_require__.O";
|
12749
|
+
export let externalInstallChunk: "__webpack_require__.C";
|
12750
|
+
export let interceptModuleExecution: "__webpack_require__.i";
|
12751
|
+
export let global: "__webpack_require__.g";
|
12752
|
+
export let shareScopeMap: "__webpack_require__.S";
|
12753
|
+
export let initializeSharing: "__webpack_require__.I";
|
12754
|
+
export let currentRemoteGetScope: "__webpack_require__.R";
|
12755
|
+
export let getUpdateManifestFilename: "__webpack_require__.hmrF";
|
12756
|
+
export let hmrDownloadManifest: "__webpack_require__.hmrM";
|
12757
|
+
export let hmrDownloadUpdateHandlers: "__webpack_require__.hmrC";
|
12758
|
+
export let hmrModuleData: "__webpack_require__.hmrD";
|
12759
|
+
export let hmrInvalidateModuleHandlers: "__webpack_require__.hmrI";
|
12760
|
+
export let hmrRuntimeStatePrefix: "__webpack_require__.hmrS";
|
12761
|
+
export let amdDefine: "__webpack_require__.amdD";
|
12762
|
+
export let amdOptions: "__webpack_require__.amdO";
|
12763
|
+
export let system: "__webpack_require__.System";
|
12764
|
+
export let hasOwnProperty: "__webpack_require__.o";
|
12765
|
+
export let systemContext: "__webpack_require__.y";
|
12766
|
+
export let baseURI: "__webpack_require__.b";
|
12767
|
+
export let relativeUrl: "__webpack_require__.U";
|
12768
|
+
export let asyncModule: "__webpack_require__.a";
|
12758
12769
|
}
|
12759
12770
|
export const UsageState: Readonly<{
|
12760
12771
|
Unused: 0;
|
@@ -12891,7 +12902,7 @@ declare namespace exports {
|
|
12891
12902
|
export { ElectronTargetPlugin };
|
12892
12903
|
}
|
12893
12904
|
export namespace wasm {
|
12894
|
-
export { AsyncWebAssemblyModulesPlugin };
|
12905
|
+
export { AsyncWebAssemblyModulesPlugin, EnableWasmLoadingPlugin };
|
12895
12906
|
}
|
12896
12907
|
export namespace library {
|
12897
12908
|
export { AbstractLibraryPlugin, EnableLibraryPlugin };
|