webpack 5.74.0 → 5.76.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 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]
@@ -159,11 +158,11 @@ or are automatically applied via regex from your webpack configuration.
159
158
 
160
159
  #### Transpiling
161
160
 
162
- | Name | Status | Install Size | Description |
163
- | :--------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------: | :------------: | :------------------------------------------------------------------------------------------------ |
164
- | <a href="https://github.com/babel/babel-loader"><img width="48" height="48" title="babel-loader" src="https://worldvectorlogo.com/logos/babel-10.svg"></a> | ![babel-npm] | ![babel-size] | Loads ES2015+ code and transpiles to ES5 using <a href="https://github.com/babel/babel">Babel</a> |
165
- | <a href="https://github.com/TypeStrong/ts-loader"><img width="48" height="48" src="https://cdn.rawgit.com/Microsoft/TypeScript/master/doc/logo.svg"></a> | ![type-npm] | ![type-size] | Loads TypeScript like JavaScript |
166
- | <a href="https://github.com/webpack-contrib/coffee-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/coffeescript.svg"></a> | ![coffee-npm] | ![coffee-size] | Loads CoffeeScript like JavaScript |
161
+ | Name | Status | Install Size | Description |
162
+ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------: | :------------: | :------------------------------------------------------------------------------------------------ |
163
+ | <a href="https://github.com/babel/babel-loader"><img width="48" height="48" title="babel-loader" src="https://worldvectorlogo.com/logos/babel-10.svg"></a> | ![babel-npm] | ![babel-size] | Loads ES2015+ code and transpiles to ES5 using <a href="https://github.com/babel/babel">Babel</a> |
164
+ | <a href="https://github.com/TypeStrong/ts-loader"><img width="48" height="48" src="https://raw.githubusercontent.com/microsoft/TypeScript-Website/f407e1ae19e5e990d9901ac8064a32a8cc60edf0/packages/typescriptlang-org/static/branding/ts-logo-128.svg"></a> | ![type-npm] | ![type-size] | Loads TypeScript like JavaScript |
165
+ | <a href="https://github.com/webpack-contrib/coffee-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/coffeescript.svg"></a> | ![coffee-npm] | ![coffee-size] | Loads CoffeeScript like JavaScript |
167
166
 
168
167
  [babel-npm]: https://img.shields.io/npm/v/babel-loader.svg
169
168
  [babel-size]: https://packagephobia.com/badge?p=babel-loader
@@ -176,7 +175,7 @@ or are automatically applied via regex from your webpack configuration.
176
175
 
177
176
  | Name | Status | Install Size | Description |
178
177
  | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------: | :--------------: | :-------------------------------------------------------------------------------------- |
179
- | <a href="https://github.com/webpack-contrib/html-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/html5.svg"></a> | ![html-npm] | ![html-size] | Exports HTML as string, requires references to static resources |
178
+ | <a href="https://github.com/webpack-contrib/html-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/html5-2.svg"></a> | ![html-npm] | ![html-size] | Exports HTML as string, requires references to static resources |
180
179
  | <a href="https://github.com/pugjs/pug-loader"><img width="48" height="48" src="https://cdn.rawgit.com/pugjs/pug-logo/master/SVG/pug-final-logo-_-colour-128.svg"></a> | ![pug-npm] | ![pug-size] | Loads Pug templates and returns a function |
181
180
  | <a href="https://github.com/webdiscus/pug-loader"><img width="48" height="48" src="https://cdn.rawgit.com/pugjs/pug-logo/master/SVG/pug-final-logo-_-colour-128.svg"></a> | ![pug3-npm] | ![pug3-size] | Compiles Pug to a function or HTML string, useful for use with Vue, React, Angular |
182
181
  | <a href="https://github.com/peerigon/markdown-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/markdown.svg"></a> | ![md-npm] | ![md-size] | Compiles Markdown to HTML |
@@ -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/bin/webpack.js CHANGED
File without changes
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("warning", "[HMR] Cannot find update. Need to do a full reload!");
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.location.reload();
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. Need to do a full reload!"
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.location.reload();
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
  }
@@ -33,7 +33,7 @@ const wrapComment = str => {
33
33
  .split("\n")
34
34
  .join("\n * ")
35
35
  .replace(/\s+\n/g, "\n")
36
- .trimRight()}\n */`;
36
+ .trimEnd()}\n */`;
37
37
  };
38
38
 
39
39
  class BannerPlugin {
@@ -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 {{ [key: string]: TODO; }} */
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`;
@@ -330,6 +330,8 @@ class NormalModule extends Module {
330
330
  this._isEvaluatingSideEffects = false;
331
331
  /** @type {WeakSet<ModuleGraph> | undefined} */
332
332
  this._addedSideEffectsBailout = undefined;
333
+ /** @type {Map<string, any>} */
334
+ this._codeGeneratorData = new Map();
333
335
  }
334
336
 
335
337
  /**
@@ -1188,11 +1190,9 @@ class NormalModule extends Module {
1188
1190
  runtimeRequirements.add(RuntimeGlobals.thisAsExports);
1189
1191
  }
1190
1192
 
1191
- /** @type {Map<string, any>} */
1192
- let data;
1193
+ /** @type {function(): Map<string, any>} */
1193
1194
  const getData = () => {
1194
- if (data === undefined) data = new Map();
1195
- return data;
1195
+ return this._codeGeneratorData;
1196
1196
  };
1197
1197
 
1198
1198
  const sources = new Map();
@@ -1223,7 +1223,7 @@ class NormalModule extends Module {
1223
1223
  const resultEntry = {
1224
1224
  sources,
1225
1225
  runtimeRequirements,
1226
- data
1226
+ data: this._codeGeneratorData
1227
1227
  };
1228
1228
  return resultEntry;
1229
1229
  }
@@ -1371,6 +1371,7 @@ class NormalModule extends Module {
1371
1371
  write(this.error);
1372
1372
  write(this._lastSuccessfulBuildMeta);
1373
1373
  write(this._forceBuild);
1374
+ write(this._codeGeneratorData);
1374
1375
  super.serialize(context);
1375
1376
  }
1376
1377
 
@@ -1403,6 +1404,7 @@ class NormalModule extends Module {
1403
1404
  this.error = read();
1404
1405
  this._lastSuccessfulBuildMeta = read();
1405
1406
  this._forceBuild = read();
1407
+ this._codeGeneratorData = read();
1406
1408
  super.deserialize(context);
1407
1409
  }
1408
1410
  }
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.trimRight();
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);
@@ -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, []);
@@ -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 === false ? undefined : options
184
+ options === true ? {} : options
186
185
  )
187
186
  })),
188
187
  externals: config.externals,
@@ -196,7 +196,7 @@ class CssParser extends Parser {
196
196
  }
197
197
  if (pos === input.length) break;
198
198
  }
199
- return [pos, text.trimRight()];
199
+ return [pos, text.trimEnd()];
200
200
  };
201
201
  const eatExportName = eatUntil(":};/");
202
202
  const eatExportValue = eatUntil("};/");
@@ -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("HotModuleReplacementPlugin", expr => {
41
+ .tap("ImportMetaContextDependencyParserPlugin", expr => {
42
42
  return evaluateToIdentifier(
43
43
  "import.meta.webpackContext",
44
44
  "import.meta",
@@ -137,7 +137,7 @@ class ImportParserPlugin {
137
137
  if (importOptions.webpackInclude !== undefined) {
138
138
  if (
139
139
  !importOptions.webpackInclude ||
140
- importOptions.webpackInclude.constructor.name !== "RegExp"
140
+ !(importOptions.webpackInclude instanceof RegExp)
141
141
  ) {
142
142
  parser.state.module.addWarning(
143
143
  new UnsupportedFeatureWarning(
@@ -146,13 +146,13 @@ class ImportParserPlugin {
146
146
  )
147
147
  );
148
148
  } else {
149
- include = new RegExp(importOptions.webpackInclude);
149
+ include = importOptions.webpackInclude;
150
150
  }
151
151
  }
152
152
  if (importOptions.webpackExclude !== undefined) {
153
153
  if (
154
154
  !importOptions.webpackExclude ||
155
- importOptions.webpackExclude.constructor.name !== "RegExp"
155
+ !(importOptions.webpackExclude instanceof RegExp)
156
156
  ) {
157
157
  parser.state.module.addWarning(
158
158
  new UnsupportedFeatureWarning(
@@ -161,7 +161,7 @@ class ImportParserPlugin {
161
161
  )
162
162
  );
163
163
  } else {
164
- exclude = new RegExp(importOptions.webpackExclude);
164
+ exclude = importOptions.webpackExclude;
165
165
  }
166
166
  }
167
167
  if (importOptions.webpackExports !== undefined) {
@@ -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",
@@ -387,7 +387,7 @@ const assignDeterministicIds = (
387
387
 
388
388
  // max 5% fill rate
389
389
  const optimalRange = Math.min(
390
- Math.ceil(items.length * 20) + extraSpace,
390
+ items.length * 20 + extraSpace,
391
391
  Number.MAX_SAFE_INTEGER
392
392
  );
393
393
 
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
 
@@ -3635,17 +3635,27 @@ class JavascriptParser extends Parser {
3635
3635
  return EMPTY_COMMENT_OPTIONS;
3636
3636
  }
3637
3637
  let options = {};
3638
+ /** @type {unknown[]} */
3638
3639
  let errors = [];
3639
3640
  for (const comment of comments) {
3640
3641
  const { value } = comment;
3641
3642
  if (value && webpackCommentRegExp.test(value)) {
3642
3643
  // try compile only if webpack options comment is present
3643
3644
  try {
3644
- const val = vm.runInNewContext(`(function(){return {${value}};})()`);
3645
- Object.assign(options, val);
3645
+ for (let [key, val] of Object.entries(
3646
+ vm.runInNewContext(`(function(){return {${value}};})()`)
3647
+ )) {
3648
+ if (typeof val === "object" && val !== null) {
3649
+ if (val.constructor.name === "RegExp") val = new RegExp(val);
3650
+ else val = JSON.parse(JSON.stringify(val));
3651
+ }
3652
+ options[key] = val;
3653
+ }
3646
3654
  } catch (e) {
3647
- e.comment = comment;
3648
- errors.push(e);
3655
+ const newErr = new Error(String(e.message));
3656
+ newErr.stack = String(e.stack);
3657
+ Object.assign(newErr, { comment });
3658
+ errors.push(newErr);
3649
3659
  }
3650
3660
  }
3651
3661
  }
@@ -178,10 +178,43 @@ class RealContentHashPlugin {
178
178
  }
179
179
  }
180
180
  if (hashToAssets.size === 0) return;
181
- const hashRegExp = new RegExp(
182
- Array.from(hashToAssets.keys(), quoteMeta).join("|"),
183
- "g"
181
+ const hashRegExps = Array.from(hashToAssets.keys(), quoteMeta).map(
182
+ hash => new RegExp(hash, "g")
184
183
  );
184
+
185
+ /**
186
+ * @param {string} str string to be matched against all hashRegExps
187
+ * @returns {string[] | null} matches found
188
+ */
189
+ const hashMatch = str => {
190
+ /** @type {string[]} */
191
+ const results = [];
192
+ for (const hashRegExp of hashRegExps) {
193
+ const matches = str.match(hashRegExp);
194
+ if (matches) {
195
+ matches.forEach(match => results.push(match));
196
+ }
197
+ }
198
+ if (results.length) {
199
+ return results;
200
+ } else {
201
+ return null;
202
+ }
203
+ };
204
+
205
+ /**
206
+ * @param {string} str string to be replaced with all hashRegExps
207
+ * @param {function(string): string} fn replacement function to use when a hash is found
208
+ * @returns {string} replaced content
209
+ */
210
+ const hashReplace = (str, fn) => {
211
+ let result = str;
212
+ for (const hashRegExp of hashRegExps) {
213
+ result = result.replace(hashRegExp, fn);
214
+ }
215
+ return result;
216
+ };
217
+
185
218
  await Promise.all(
186
219
  assetsWithInfo.map(async asset => {
187
220
  const { name, source, content, hashes } = asset;
@@ -198,7 +231,7 @@ class RealContentHashPlugin {
198
231
  await cacheAnalyse.providePromise(name, etag, () => {
199
232
  const referencedHashes = new Set();
200
233
  let ownHashes = new Set();
201
- const inContent = content.match(hashRegExp);
234
+ const inContent = hashMatch(content);
202
235
  if (inContent) {
203
236
  for (const hash of inContent) {
204
237
  if (hashes.has(hash)) {
@@ -298,7 +331,7 @@ ${referencingAssets
298
331
  identifier,
299
332
  etag,
300
333
  () => {
301
- const newContent = asset.content.replace(hashRegExp, hash =>
334
+ const newContent = hashReplace(asset.content, hash =>
302
335
  hashToNewHash.get(hash)
303
336
  );
304
337
  return new RawSource(newContent);
@@ -323,15 +356,12 @@ ${referencingAssets
323
356
  identifier,
324
357
  etag,
325
358
  () => {
326
- const newContent = asset.content.replace(
327
- hashRegExp,
328
- hash => {
329
- if (asset.ownHashes.has(hash)) {
330
- return "";
331
- }
332
- return hashToNewHash.get(hash);
359
+ const newContent = hashReplace(asset.content, hash => {
360
+ if (asset.ownHashes.has(hash)) {
361
+ return "";
333
362
  }
334
- );
363
+ return hashToNewHash.get(hash);
364
+ });
335
365
  return new RawSource(newContent);
336
366
  }
337
367
  );
@@ -342,7 +372,6 @@ ${referencingAssets
342
372
  for (const oldHash of hashesInOrder) {
343
373
  const assets = hashToAssets.get(oldHash);
344
374
  assets.sort(comparator);
345
- const hash = createHash(this._hashFunction);
346
375
  await Promise.all(
347
376
  assets.map(asset =>
348
377
  asset.ownHashes.has(oldHash)
@@ -363,6 +392,7 @@ ${referencingAssets
363
392
  });
364
393
  let newHash = hooks.updateHash.call(assetsContent, oldHash);
365
394
  if (!newHash) {
395
+ const hash = createHash(this._hashFunction);
366
396
  for (const content of assetsContent) {
367
397
  hash.update(content);
368
398
  }
@@ -374,7 +404,7 @@ ${referencingAssets
374
404
  await Promise.all(
375
405
  assetsWithInfo.map(async asset => {
376
406
  await computeNewContent(asset);
377
- const newName = asset.name.replace(hashRegExp, hash =>
407
+ const newName = hashReplace(asset.name, hash =>
378
408
  hashToNewHash.get(hash)
379
409
  );
380
410
 
@@ -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, "").trimRight(),
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.74.0",
3
+ "version": "5.76.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",
@@ -76,7 +76,7 @@
76
76
  "less": "^4.0.0",
77
77
  "less-loader": "^8.0.0",
78
78
  "lint-staged": "^11.0.0",
79
- "loader-utils": "^2.0.0",
79
+ "loader-utils": "^2.0.3",
80
80
  "lodash": "^4.17.19",
81
81
  "lodash-es": "^4.17.15",
82
82
  "memfs": "^3.2.0",
@@ -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.2.0",
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.21.0",
101
+ "tooling": "webpack/tooling#v1.22.0",
102
102
  "ts-loader": "^8.0.2",
103
- "typescript": "^4.5.5",
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
- "oneOf": [
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
- "oneOf": [
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
- readonly entryModule?: Module;
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
- readonly modulesIterable: Iterable<Module>;
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
- readonly groupsIterable: Iterable<ChunkGroup>;
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
- readonly debugId: string;
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
- readonly id: string;
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
- readonly childrenIterable: SortableSet<ChunkGroup>;
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
- readonly parentsIterable: SortableSet<ChunkGroup>;
1018
+ get parentsIterable(): SortableSet<ChunkGroup>;
1019
1019
  removeParent(chunkGroup: ChunkGroup): boolean;
1020
1020
  addAsyncEntrypoint(entrypoint: Entrypoint): boolean;
1021
- readonly asyncEntrypointsIterable: SortableSet<ChunkGroup>;
1021
+ get asyncEntrypointsIterable(): SortableSet<ChunkGroup>;
1022
1022
  getBlocks(): any[];
1023
1023
  getNumberOfBlocks(): number;
1024
1024
  hasBlock(block?: any): boolean;
1025
- readonly blocksIterable: Iterable<AsyncDependenciesBlock>;
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
- readonly outputOptions: Output;
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
- readonly normalModuleLoader: SyncHook<[object, NormalModule]>;
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
- readonly type: string;
2657
- readonly category: string;
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
- readonly disconnect: any;
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
- readonly canMangle?: boolean;
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
- readonly ownedExports: Iterable<ExportInfo>;
3706
- readonly orderedOwnedExports: Iterable<ExportInfo>;
3707
- readonly exports: Iterable<ExportInfo>;
3708
- readonly orderedExports: Iterable<ExportInfo>;
3709
- readonly otherExportsInfo: ExportInfo;
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 ://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
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 ://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
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
- readonly size: number;
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;
@@ -6584,6 +6595,12 @@ declare interface LoaderRunnerLoaderContext<OptionsType> {
6584
6595
  * Example: "/abc/resource.js?query#frag"
6585
6596
  */
6586
6597
  resource: string;
6598
+
6599
+ /**
6600
+ * Target of compilation.
6601
+ * Example: "web"
6602
+ */
6603
+ target: string;
6587
6604
  }
6588
6605
  declare class LoaderTargetPlugin {
6589
6606
  constructor(target: string);
@@ -6669,9 +6686,9 @@ declare abstract class MainTemplate {
6669
6686
  localVars: SyncWaterfallHook<[string, Chunk, string]>;
6670
6687
  requireExtensions: SyncWaterfallHook<[string, Chunk, string]>;
6671
6688
  requireEnsure: SyncWaterfallHook<[string, Chunk, string, string]>;
6672
- readonly jsonpScript: SyncWaterfallHook<[string, Chunk]>;
6673
- readonly linkPrefetch: SyncWaterfallHook<[string, Chunk]>;
6674
- readonly linkPreload: SyncWaterfallHook<[string, Chunk]>;
6689
+ get jsonpScript(): SyncWaterfallHook<[string, Chunk]>;
6690
+ get linkPrefetch(): SyncWaterfallHook<[string, Chunk]>;
6691
+ get linkPreload(): SyncWaterfallHook<[string, Chunk]>;
6675
6692
  }>;
6676
6693
  renderCurrentHashCode: (hash: string, length?: number) => string;
6677
6694
  getPublicPath: (options: object) => string;
@@ -6680,8 +6697,8 @@ declare abstract class MainTemplate {
6680
6697
  path?: any,
6681
6698
  options?: any
6682
6699
  ) => { path: string; info: AssetInfo };
6683
- readonly requireFn: "__webpack_require__";
6684
- readonly outputOptions: Output;
6700
+ get requireFn(): "__webpack_require__";
6701
+ get outputOptions(): Output;
6685
6702
  }
6686
6703
  declare interface MapOptions {
6687
6704
  columns?: boolean;
@@ -6756,29 +6773,29 @@ declare class Module extends DependenciesBlock {
6756
6773
  presentationalDependencies?: Dependency[];
6757
6774
  codeGenerationDependencies?: Dependency[];
6758
6775
  id: string | number;
6759
- readonly hash: string;
6760
- readonly renderedHash: string;
6776
+ get hash(): string;
6777
+ get renderedHash(): string;
6761
6778
  profile: null | ModuleProfile;
6762
6779
  index: number;
6763
6780
  index2: number;
6764
6781
  depth: number;
6765
6782
  issuer: null | Module;
6766
- readonly usedExports: null | boolean | SortableSet<string>;
6767
- readonly optimizationBailout: (
6783
+ get usedExports(): null | boolean | SortableSet<string>;
6784
+ get optimizationBailout(): (
6768
6785
  | string
6769
6786
  | ((requestShortener: RequestShortener) => string)
6770
6787
  )[];
6771
- readonly optional: boolean;
6788
+ get optional(): boolean;
6772
6789
  addChunk(chunk?: any): boolean;
6773
6790
  removeChunk(chunk?: any): void;
6774
6791
  isInChunk(chunk?: any): boolean;
6775
6792
  isEntryModule(): boolean;
6776
6793
  getChunks(): Chunk[];
6777
6794
  getNumberOfChunks(): number;
6778
- readonly chunksIterable: Iterable<Chunk>;
6795
+ get chunksIterable(): Iterable<Chunk>;
6779
6796
  isProvided(exportName: string): null | boolean;
6780
- readonly exportsArgument: string;
6781
- readonly moduleArgument: string;
6797
+ get exportsArgument(): string;
6798
+ get moduleArgument(): string;
6782
6799
  getExportsType(
6783
6800
  moduleGraph: ModuleGraph,
6784
6801
  strict: boolean
@@ -6872,10 +6889,10 @@ declare class Module extends DependenciesBlock {
6872
6889
  missingDependencies: LazySet<string>,
6873
6890
  buildDependencies: LazySet<string>
6874
6891
  ): void;
6875
- readonly hasEqualsChunks: any;
6876
- readonly isUsed: any;
6877
- readonly errors: any;
6878
- readonly warnings: any;
6892
+ get hasEqualsChunks(): any;
6893
+ get isUsed(): any;
6894
+ get errors(): any;
6895
+ get warnings(): any;
6879
6896
  used: any;
6880
6897
  }
6881
6898
  declare class ModuleConcatenationPlugin {
@@ -7144,7 +7161,7 @@ declare class ModuleGraphConnection {
7144
7161
  ) => ConnectionState
7145
7162
  ): void;
7146
7163
  addExplanation(explanation: string): void;
7147
- readonly explanation: string;
7164
+ get explanation(): string;
7148
7165
  active: void;
7149
7166
  isActive(runtime: RuntimeSpec): boolean;
7150
7167
  isTargetActive(runtime: RuntimeSpec): boolean;
@@ -7401,7 +7418,7 @@ declare abstract class ModuleTemplate {
7401
7418
  package: { tap: (options?: any, fn?: any) => void };
7402
7419
  hash: { tap: (options?: any, fn?: any) => void };
7403
7420
  }>;
7404
- readonly runtimeTemplate: any;
7421
+ get runtimeTemplate(): any;
7405
7422
  }
7406
7423
  declare class MultiCompiler {
7407
7424
  constructor(
@@ -7419,8 +7436,8 @@ declare class MultiCompiler {
7419
7436
  compilers: Compiler[];
7420
7437
  dependencies: WeakMap<Compiler, string[]>;
7421
7438
  running: boolean;
7422
- readonly options: WebpackOptionsNormalized[] & MultiCompilerOptions;
7423
- readonly outputPath: string;
7439
+ get options(): WebpackOptionsNormalized[] & MultiCompilerOptions;
7440
+ get outputPath(): string;
7424
7441
  inputFileSystem: InputFileSystem;
7425
7442
  outputFileSystem: OutputFileSystem;
7426
7443
  watchFileSystem: WatchFileSystem;
@@ -7449,7 +7466,7 @@ declare interface MultiCompilerOptions {
7449
7466
  }
7450
7467
  declare abstract class MultiStats {
7451
7468
  stats: Stats[];
7452
- readonly hash: string;
7469
+ get hash(): string;
7453
7470
  hasErrors(): boolean;
7454
7471
  hasWarnings(): boolean;
7455
7472
  toJson(options?: any): StatsCompilation;
@@ -10378,13 +10395,13 @@ declare class RuntimeSpecMap<T> {
10378
10395
  update(runtime?: any, fn?: any): void;
10379
10396
  keys(): RuntimeSpec[];
10380
10397
  values(): IterableIterator<T>;
10381
- readonly size?: number;
10398
+ get size(): number;
10382
10399
  }
10383
10400
  declare class RuntimeSpecSet {
10384
10401
  constructor(iterable?: any);
10385
10402
  add(runtime?: any): void;
10386
10403
  has(runtime?: any): boolean;
10387
- readonly size: number;
10404
+ get size(): number;
10388
10405
  [Symbol.iterator](): IterableIterator<RuntimeSpec>;
10389
10406
  }
10390
10407
  declare abstract class RuntimeTemplate {
@@ -10809,7 +10826,7 @@ declare abstract class RuntimeValue {
10809
10826
  readonly version?: string;
10810
10827
  }) => CodeValuePrimitive;
10811
10828
  options: true | RuntimeValueOptions;
10812
- readonly fileDependencies?: true | string[];
10829
+ get fileDependencies(): true | string[];
10813
10830
  exec(
10814
10831
  parser: JavascriptParser,
10815
10832
  valueCacheVersions: Map<string, string | Set<string>>,
@@ -11262,7 +11279,7 @@ declare abstract class StackedMap<K, V> {
11262
11279
  asSet(): Set<K>;
11263
11280
  asPairArray(): [K, Cell<V>][];
11264
11281
  asMap(): Map<K, Cell<V>>;
11265
- readonly size: number;
11282
+ get size(): number;
11266
11283
  createChild(): StackedMap<K, V>;
11267
11284
  }
11268
11285
  type StartupRenderContext = RenderContext & { inlined: boolean };
@@ -11292,9 +11309,9 @@ type Statement =
11292
11309
  declare class Stats {
11293
11310
  constructor(compilation: Compilation);
11294
11311
  compilation: Compilation;
11295
- readonly hash?: string;
11296
- readonly startTime: any;
11297
- readonly endTime: any;
11312
+ get hash(): string;
11313
+ get startTime(): any;
11314
+ get endTime(): any;
11298
11315
  hasWarnings(): boolean;
11299
11316
  hasErrors(): boolean;
11300
11317
  toJson(options?: string | StatsOptions): StatsCompilation;
@@ -11835,7 +11852,7 @@ declare class SyncModuleIdsPlugin {
11835
11852
  /**
11836
11853
  * operation mode (defaults to merge)
11837
11854
  */
11838
- mode?: "read" | "create" | "merge" | "update";
11855
+ mode?: "read" | "merge" | "create" | "update";
11839
11856
  });
11840
11857
 
11841
11858
  /**
@@ -12686,75 +12703,75 @@ declare namespace exports {
12686
12703
  export let matchObject: (obj?: any, str?: any) => boolean;
12687
12704
  }
12688
12705
  export namespace RuntimeGlobals {
12689
- export let require: string;
12690
- export let requireScope: string;
12691
- export let exports: string;
12692
- export let thisAsExports: string;
12693
- export let returnExportsFromRuntime: string;
12694
- export let module: string;
12695
- export let moduleId: string;
12696
- export let moduleLoaded: string;
12697
- export let publicPath: string;
12698
- export let entryModuleId: string;
12699
- export let moduleCache: string;
12700
- export let moduleFactories: string;
12701
- export let moduleFactoriesAddOnly: string;
12702
- export let ensureChunk: string;
12703
- export let ensureChunkHandlers: string;
12704
- export let ensureChunkIncludeEntries: string;
12705
- export let prefetchChunk: string;
12706
- export let prefetchChunkHandlers: string;
12707
- export let preloadChunk: string;
12708
- export let preloadChunkHandlers: string;
12709
- export let definePropertyGetters: string;
12710
- export let makeNamespaceObject: string;
12711
- export let createFakeNamespaceObject: string;
12712
- export let compatGetDefaultExport: string;
12713
- export let harmonyModuleDecorator: string;
12714
- export let nodeModuleDecorator: string;
12715
- export let getFullHash: string;
12716
- export let wasmInstances: string;
12717
- export let instantiateWasm: string;
12718
- export let uncaughtErrorHandler: string;
12719
- export let scriptNonce: string;
12720
- export let loadScript: string;
12721
- export let createScript: string;
12722
- export let createScriptUrl: string;
12723
- export let getTrustedTypesPolicy: string;
12724
- export let chunkName: string;
12725
- export let runtimeId: string;
12726
- export let getChunkScriptFilename: string;
12727
- export let getChunkCssFilename: string;
12728
- export let hasCssModules: string;
12729
- export let getChunkUpdateScriptFilename: string;
12730
- export let getChunkUpdateCssFilename: string;
12731
- export let startup: string;
12732
- export let startupNoDefault: string;
12733
- export let startupOnlyAfter: string;
12734
- export let startupOnlyBefore: string;
12735
- export let chunkCallback: string;
12736
- export let startupEntrypoint: string;
12737
- export let onChunksLoaded: string;
12738
- export let externalInstallChunk: string;
12739
- export let interceptModuleExecution: string;
12740
- export let global: string;
12741
- export let shareScopeMap: string;
12742
- export let initializeSharing: string;
12743
- export let currentRemoteGetScope: string;
12744
- export let getUpdateManifestFilename: string;
12745
- export let hmrDownloadManifest: string;
12746
- export let hmrDownloadUpdateHandlers: string;
12747
- export let hmrModuleData: string;
12748
- export let hmrInvalidateModuleHandlers: string;
12749
- export let hmrRuntimeStatePrefix: string;
12750
- export let amdDefine: string;
12751
- export let amdOptions: string;
12752
- export let system: string;
12753
- export let hasOwnProperty: string;
12754
- export let systemContext: string;
12755
- export let baseURI: string;
12756
- export let relativeUrl: string;
12757
- export let asyncModule: string;
12706
+ export let require: "__webpack_require__";
12707
+ export let requireScope: "__webpack_require__.*";
12708
+ export let exports: "__webpack_exports__";
12709
+ export let thisAsExports: "top-level-this-exports";
12710
+ export let returnExportsFromRuntime: "return-exports-from-runtime";
12711
+ export let module: "module";
12712
+ export let moduleId: "module.id";
12713
+ export let moduleLoaded: "module.loaded";
12714
+ export let publicPath: "__webpack_require__.p";
12715
+ export let entryModuleId: "__webpack_require__.s";
12716
+ export let moduleCache: "__webpack_require__.c";
12717
+ export let moduleFactories: "__webpack_require__.m";
12718
+ export let moduleFactoriesAddOnly: "__webpack_require__.m (add only)";
12719
+ export let ensureChunk: "__webpack_require__.e";
12720
+ export let ensureChunkHandlers: "__webpack_require__.f";
12721
+ export let ensureChunkIncludeEntries: "__webpack_require__.f (include entries)";
12722
+ export let prefetchChunk: "__webpack_require__.E";
12723
+ export let prefetchChunkHandlers: "__webpack_require__.F";
12724
+ export let preloadChunk: "__webpack_require__.G";
12725
+ export let preloadChunkHandlers: "__webpack_require__.H";
12726
+ export let definePropertyGetters: "__webpack_require__.d";
12727
+ export let makeNamespaceObject: "__webpack_require__.r";
12728
+ export let createFakeNamespaceObject: "__webpack_require__.t";
12729
+ export let compatGetDefaultExport: "__webpack_require__.n";
12730
+ export let harmonyModuleDecorator: "__webpack_require__.hmd";
12731
+ export let nodeModuleDecorator: "__webpack_require__.nmd";
12732
+ export let getFullHash: "__webpack_require__.h";
12733
+ export let wasmInstances: "__webpack_require__.w";
12734
+ export let instantiateWasm: "__webpack_require__.v";
12735
+ export let uncaughtErrorHandler: "__webpack_require__.oe";
12736
+ export let scriptNonce: "__webpack_require__.nc";
12737
+ export let loadScript: "__webpack_require__.l";
12738
+ export let createScript: "__webpack_require__.ts";
12739
+ export let createScriptUrl: "__webpack_require__.tu";
12740
+ export let getTrustedTypesPolicy: "__webpack_require__.tt";
12741
+ export let chunkName: "__webpack_require__.cn";
12742
+ export let runtimeId: "__webpack_require__.j";
12743
+ export let getChunkScriptFilename: "__webpack_require__.u";
12744
+ export let getChunkCssFilename: "__webpack_require__.k";
12745
+ export let hasCssModules: "has css modules";
12746
+ export let getChunkUpdateScriptFilename: "__webpack_require__.hu";
12747
+ export let getChunkUpdateCssFilename: "__webpack_require__.hk";
12748
+ export let startup: "__webpack_require__.x";
12749
+ export let startupNoDefault: "__webpack_require__.x (no default handler)";
12750
+ export let startupOnlyAfter: "__webpack_require__.x (only after)";
12751
+ export let startupOnlyBefore: "__webpack_require__.x (only before)";
12752
+ export let chunkCallback: "webpackChunk";
12753
+ export let startupEntrypoint: "__webpack_require__.X";
12754
+ export let onChunksLoaded: "__webpack_require__.O";
12755
+ export let externalInstallChunk: "__webpack_require__.C";
12756
+ export let interceptModuleExecution: "__webpack_require__.i";
12757
+ export let global: "__webpack_require__.g";
12758
+ export let shareScopeMap: "__webpack_require__.S";
12759
+ export let initializeSharing: "__webpack_require__.I";
12760
+ export let currentRemoteGetScope: "__webpack_require__.R";
12761
+ export let getUpdateManifestFilename: "__webpack_require__.hmrF";
12762
+ export let hmrDownloadManifest: "__webpack_require__.hmrM";
12763
+ export let hmrDownloadUpdateHandlers: "__webpack_require__.hmrC";
12764
+ export let hmrModuleData: "__webpack_require__.hmrD";
12765
+ export let hmrInvalidateModuleHandlers: "__webpack_require__.hmrI";
12766
+ export let hmrRuntimeStatePrefix: "__webpack_require__.hmrS";
12767
+ export let amdDefine: "__webpack_require__.amdD";
12768
+ export let amdOptions: "__webpack_require__.amdO";
12769
+ export let system: "__webpack_require__.System";
12770
+ export let hasOwnProperty: "__webpack_require__.o";
12771
+ export let systemContext: "__webpack_require__.y";
12772
+ export let baseURI: "__webpack_require__.b";
12773
+ export let relativeUrl: "__webpack_require__.U";
12774
+ export let asyncModule: "__webpack_require__.a";
12758
12775
  }
12759
12776
  export const UsageState: Readonly<{
12760
12777
  Unused: 0;
@@ -12891,7 +12908,7 @@ declare namespace exports {
12891
12908
  export { ElectronTargetPlugin };
12892
12909
  }
12893
12910
  export namespace wasm {
12894
- export { AsyncWebAssemblyModulesPlugin };
12911
+ export { AsyncWebAssemblyModulesPlugin, EnableWasmLoadingPlugin };
12895
12912
  }
12896
12913
  export namespace library {
12897
12914
  export { AbstractLibraryPlugin, EnableLibraryPlugin };