webpack 5.63.0 → 5.64.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.
Potentially problematic release.
This version of webpack might be problematic. Click here for more details.
- package/README.md +0 -6
- package/lib/CleanPlugin.js +16 -1
- package/lib/EntryOptionPlugin.js +1 -0
- package/lib/FileSystemInfo.js +45 -13
- package/lib/WatchIgnorePlugin.js +5 -6
- package/lib/buildChunkGraph.js +19 -9
- package/lib/config/defaults.js +2 -1
- package/lib/config/normalization.js +2 -0
- package/lib/debug/ProfilingPlugin.js +9 -7
- package/lib/dependencies/CommonJsImportsParserPlugin.js +2 -2
- package/lib/dependencies/URLPlugin.js +1 -1
- package/lib/util/ArrayHelpers.js +16 -0
- package/lib/util/create-schema-validation.js +9 -2
- package/lib/util/fs.js +1 -0
- package/lib/util/hash/md4.js +2 -2
- package/lib/util/hash/xxhash64.js +1 -1
- package/lib/webpack.js +9 -1
- package/module.d.ts +1 -1
- package/package.json +3 -3
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +16 -0
- package/schemas/plugins/DllReferencePlugin.check.js +1 -1
- package/schemas/plugins/HashedModuleIdsPlugin.check.js +1 -1
- package/schemas/plugins/ProgressPlugin.check.js +1 -1
- package/schemas/plugins/asset/AssetParserOptions.check.js +1 -1
- package/schemas/plugins/optimize/AggressiveSplittingPlugin.check.js +1 -1
- package/schemas/plugins/optimize/LimitChunkCountPlugin.check.js +1 -1
- package/schemas/plugins/optimize/MinChunkSizePlugin.check.js +1 -1
- package/types.d.ts +24 -0
package/README.md
CHANGED
@@ -9,8 +9,6 @@
|
|
9
9
|
|
10
10
|
[![node][node]][node-url]
|
11
11
|
[![deps][deps]][deps-url]
|
12
|
-
[![tests][tests]][tests-url]
|
13
|
-
[![builds][builds]][builds-url]
|
14
12
|
[![builds2][builds2]][builds2-url]
|
15
13
|
[![coverage][cover]][cover-url]
|
16
14
|
[![licenses][licenses]][licenses-url]
|
@@ -703,12 +701,8 @@ src="https://static.monei.net/monei-logo.svg" height="30" alt="MONEI"></a>
|
|
703
701
|
[node-url]: https://nodejs.org
|
704
702
|
[deps]: https://img.shields.io/david/webpack/webpack.svg
|
705
703
|
[deps-url]: https://david-dm.org/webpack/webpack
|
706
|
-
[tests]: https://img.shields.io/travis/webpack/webpack/main.svg
|
707
|
-
[tests-url]: https://travis-ci.org/webpack/webpack
|
708
704
|
[prs]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg
|
709
705
|
[prs-url]: https://webpack.js.org/contribute/
|
710
|
-
[builds-url]: https://ci.appveyor.com/project/sokra/webpack/branch/main
|
711
|
-
[builds]: https://ci.appveyor.com/api/projects/status/github/webpack/webpack?svg=true
|
712
706
|
[builds2]: https://dev.azure.com/webpack/webpack/_apis/build/status/webpack.webpack
|
713
707
|
[builds2-url]: https://dev.azure.com/webpack/webpack/_build/latest?definitionId=3
|
714
708
|
[licenses-url]: https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fwebpack%2Fwebpack?ref=badge_shield
|
package/lib/CleanPlugin.js
CHANGED
@@ -16,6 +16,7 @@ const processAsyncTree = require("./util/processAsyncTree");
|
|
16
16
|
/** @typedef {import("./Compiler")} Compiler */
|
17
17
|
/** @typedef {import("./logging/Logger").Logger} Logger */
|
18
18
|
/** @typedef {import("./util/fs").OutputFileSystem} OutputFileSystem */
|
19
|
+
/** @typedef {import("./util/fs").StatsCallback} StatsCallback */
|
19
20
|
|
20
21
|
/** @typedef {(function(string):boolean)|RegExp} IgnoreItem */
|
21
22
|
/** @typedef {function(IgnoreItem): void} AddToIgnoreCallback */
|
@@ -102,6 +103,20 @@ const getDiffToOldAssets = (currentAssets, oldAssets) => {
|
|
102
103
|
return diff;
|
103
104
|
};
|
104
105
|
|
106
|
+
/**
|
107
|
+
* @param {OutputFileSystem} fs filesystem
|
108
|
+
* @param {string} filename path to file
|
109
|
+
* @param {StatsCallback} callback callback for provided filename
|
110
|
+
* @returns {void}
|
111
|
+
*/
|
112
|
+
const doStat = (fs, filename, callback) => {
|
113
|
+
if ("lstat" in fs) {
|
114
|
+
fs.lstat(filename, callback);
|
115
|
+
} else {
|
116
|
+
fs.stat(filename, callback);
|
117
|
+
}
|
118
|
+
};
|
119
|
+
|
105
120
|
/**
|
106
121
|
* @param {OutputFileSystem} fs filesystem
|
107
122
|
* @param {string} outputPath output path
|
@@ -150,7 +165,7 @@ const applyDiff = (fs, outputPath, dry, logger, diff, isKept, callback) => {
|
|
150
165
|
log(`${filename} will be kept`);
|
151
166
|
return process.nextTick(callback);
|
152
167
|
}
|
153
|
-
fs
|
168
|
+
doStat(fs, path, (err, stats) => {
|
154
169
|
if (err) return handleError(err);
|
155
170
|
if (!stats.isDirectory()) {
|
156
171
|
push({
|
package/lib/EntryOptionPlugin.js
CHANGED
package/lib/FileSystemInfo.js
CHANGED
@@ -2016,8 +2016,7 @@ class FileSystemInfo {
|
|
2016
2016
|
}
|
2017
2017
|
return capturedItems;
|
2018
2018
|
};
|
2019
|
-
|
2020
|
-
const capturedFiles = captureNonManaged(files, managedFiles);
|
2019
|
+
const processCapturedFiles = capturedFiles => {
|
2021
2020
|
switch (mode) {
|
2022
2021
|
case 3:
|
2023
2022
|
this._fileTshsOptimization.optimize(snapshot, capturedFiles);
|
@@ -2094,12 +2093,11 @@ class FileSystemInfo {
|
|
2094
2093
|
}
|
2095
2094
|
break;
|
2096
2095
|
}
|
2096
|
+
};
|
2097
|
+
if (files) {
|
2098
|
+
processCapturedFiles(captureNonManaged(files, managedFiles));
|
2097
2099
|
}
|
2098
|
-
|
2099
|
-
const capturedDirectories = captureNonManaged(
|
2100
|
-
directories,
|
2101
|
-
managedContexts
|
2102
|
-
);
|
2100
|
+
const processCapturedDirectories = capturedDirectories => {
|
2103
2101
|
switch (mode) {
|
2104
2102
|
case 3:
|
2105
2103
|
this._contextTshsOptimization.optimize(snapshot, capturedDirectories);
|
@@ -2219,9 +2217,13 @@ class FileSystemInfo {
|
|
2219
2217
|
}
|
2220
2218
|
break;
|
2221
2219
|
}
|
2220
|
+
};
|
2221
|
+
if (directories) {
|
2222
|
+
processCapturedDirectories(
|
2223
|
+
captureNonManaged(directories, managedContexts)
|
2224
|
+
);
|
2222
2225
|
}
|
2223
|
-
|
2224
|
-
const capturedMissing = captureNonManaged(missing, managedMissing);
|
2226
|
+
const processCapturedMissing = capturedMissing => {
|
2225
2227
|
this._missingExistenceOptimization.optimize(snapshot, capturedMissing);
|
2226
2228
|
for (const path of capturedMissing) {
|
2227
2229
|
const cache = this._fileTimestamps.get(path);
|
@@ -2246,11 +2248,17 @@ class FileSystemInfo {
|
|
2246
2248
|
});
|
2247
2249
|
}
|
2248
2250
|
}
|
2251
|
+
};
|
2252
|
+
if (missing) {
|
2253
|
+
processCapturedMissing(captureNonManaged(missing, managedMissing));
|
2249
2254
|
}
|
2250
2255
|
this._managedItemInfoOptimization.optimize(snapshot, managedItems);
|
2251
2256
|
for (const path of managedItems) {
|
2252
2257
|
const cache = this._managedItems.get(path);
|
2253
2258
|
if (cache !== undefined) {
|
2259
|
+
if (cache !== "missing") {
|
2260
|
+
managedFiles.add(join(this.fs, path, "package.json"));
|
2261
|
+
}
|
2254
2262
|
managedItemInfo.set(path, cache);
|
2255
2263
|
} else {
|
2256
2264
|
jobs++;
|
@@ -2262,9 +2270,26 @@ class FileSystemInfo {
|
|
2262
2270
|
);
|
2263
2271
|
}
|
2264
2272
|
jobError();
|
2265
|
-
} else {
|
2273
|
+
} else if (entry) {
|
2274
|
+
if (entry !== "missing") {
|
2275
|
+
managedFiles.add(join(this.fs, path, "package.json"));
|
2276
|
+
}
|
2266
2277
|
managedItemInfo.set(path, entry);
|
2267
2278
|
jobDone();
|
2279
|
+
} else {
|
2280
|
+
// Fallback to normal snapshotting
|
2281
|
+
const process = (set, fn) => {
|
2282
|
+
if (set.size === 0) return;
|
2283
|
+
const captured = new Set();
|
2284
|
+
for (const file of set) {
|
2285
|
+
if (file.startsWith(path)) captured.add(file);
|
2286
|
+
}
|
2287
|
+
if (captured.size > 0) fn(captured);
|
2288
|
+
};
|
2289
|
+
process(managedFiles, processCapturedFiles);
|
2290
|
+
process(managedContexts, processCapturedDirectories);
|
2291
|
+
process(managedMissing, processCapturedMissing);
|
2292
|
+
jobDone();
|
2268
2293
|
}
|
2269
2294
|
});
|
2270
2295
|
}
|
@@ -3477,9 +3502,10 @@ class FileSystemInfo {
|
|
3477
3502
|
this._managedItems.set(path, "nested");
|
3478
3503
|
return callback(null, "nested");
|
3479
3504
|
}
|
3480
|
-
|
3481
|
-
|
3482
|
-
|
3505
|
+
this.logger.warn(
|
3506
|
+
`Managed item ${path} isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)`
|
3507
|
+
);
|
3508
|
+
return callback();
|
3483
3509
|
});
|
3484
3510
|
return;
|
3485
3511
|
}
|
@@ -3491,6 +3517,12 @@ class FileSystemInfo {
|
|
3491
3517
|
} catch (e) {
|
3492
3518
|
return callback(e);
|
3493
3519
|
}
|
3520
|
+
if (!data.name) {
|
3521
|
+
this.logger.warn(
|
3522
|
+
`${packageJsonPath} doesn't contain a "name" property (see snapshot.managedPaths option)`
|
3523
|
+
);
|
3524
|
+
return callback();
|
3525
|
+
}
|
3494
3526
|
const info = `${data.name || ""}@${data.version || ""}`;
|
3495
3527
|
this._managedItems.set(path, info);
|
3496
3528
|
callback(null, info);
|
package/lib/WatchIgnorePlugin.js
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
|
6
6
|
"use strict";
|
7
7
|
|
8
|
+
const { groupBy } = require("./util/ArrayHelpers");
|
8
9
|
const createSchemaValidation = require("./util/create-schema-validation");
|
9
10
|
|
10
11
|
/** @typedef {import("../declarations/plugins/WatchIgnorePlugin").WatchIgnorePluginOptions} WatchIgnorePluginOptions */
|
@@ -40,14 +41,12 @@ class IgnoringWatchFileSystem {
|
|
40
41
|
p instanceof RegExp ? p.test(path) : path.indexOf(p) === 0
|
41
42
|
);
|
42
43
|
|
43
|
-
const
|
44
|
-
|
45
|
-
const ignoredFiles = files.filter(ignored);
|
46
|
-
const ignoredDirs = dirs.filter(ignored);
|
44
|
+
const [ignoredFiles, notIgnoredFiles] = groupBy(files, ignored);
|
45
|
+
const [ignoredDirs, notIgnoredDirs] = groupBy(dirs, ignored);
|
47
46
|
|
48
47
|
const watcher = this.wfs.watch(
|
49
|
-
|
50
|
-
|
48
|
+
notIgnoredFiles,
|
49
|
+
notIgnoredDirs,
|
51
50
|
missing,
|
52
51
|
startTime,
|
53
52
|
options,
|
package/lib/buildChunkGraph.js
CHANGED
@@ -50,7 +50,8 @@ const { getEntryRuntime, mergeRuntime } = require("./util/runtime");
|
|
50
50
|
* @property {Set<ChunkGroupInfo>} availableChildren set of chunk groups which depend on the this chunk group as availableSource
|
51
51
|
* @property {number} preOrderIndex next pre order index
|
52
52
|
* @property {number} postOrderIndex next post order index
|
53
|
-
* @property {boolean}
|
53
|
+
* @property {boolean} chunkLoading has a chunk loading mechanism
|
54
|
+
* @property {boolean} asyncChunks create async chunks
|
54
55
|
*/
|
55
56
|
|
56
57
|
/**
|
@@ -306,10 +307,14 @@ const visitModules = (
|
|
306
307
|
availableChildren: undefined,
|
307
308
|
preOrderIndex: 0,
|
308
309
|
postOrderIndex: 0,
|
309
|
-
|
310
|
-
chunkGroup.options.chunkLoading
|
311
|
-
? false
|
312
|
-
: compilation.outputOptions.chunkLoading !== false
|
310
|
+
chunkLoading:
|
311
|
+
chunkGroup.options.chunkLoading !== undefined
|
312
|
+
? chunkGroup.options.chunkLoading !== false
|
313
|
+
: compilation.outputOptions.chunkLoading !== false,
|
314
|
+
asyncChunks:
|
315
|
+
chunkGroup.options.asyncChunks !== undefined
|
316
|
+
? chunkGroup.options.asyncChunks
|
317
|
+
: compilation.outputOptions.asyncChunks !== false
|
313
318
|
};
|
314
319
|
chunkGroup.index = nextChunkGroupIndex++;
|
315
320
|
if (chunkGroup.getNumberOfParents() > 0) {
|
@@ -424,10 +429,14 @@ const visitModules = (
|
|
424
429
|
availableChildren: undefined,
|
425
430
|
preOrderIndex: 0,
|
426
431
|
postOrderIndex: 0,
|
427
|
-
|
432
|
+
chunkLoading:
|
428
433
|
entryOptions.chunkLoading !== undefined
|
429
434
|
? entryOptions.chunkLoading !== false
|
430
|
-
: chunkGroupInfo.
|
435
|
+
: chunkGroupInfo.chunkLoading,
|
436
|
+
asyncChunks:
|
437
|
+
entryOptions.asyncChunks !== undefined
|
438
|
+
? entryOptions.asyncChunks
|
439
|
+
: chunkGroupInfo.asyncChunks
|
431
440
|
};
|
432
441
|
chunkGroupInfoMap.set(entrypoint, cgi);
|
433
442
|
|
@@ -451,7 +460,7 @@ const visitModules = (
|
|
451
460
|
chunkGroup: entrypoint,
|
452
461
|
chunkGroupInfo: cgi
|
453
462
|
});
|
454
|
-
} else if (!chunkGroupInfo.
|
463
|
+
} else if (!chunkGroupInfo.asyncChunks || !chunkGroupInfo.chunkLoading) {
|
455
464
|
// Just queue the block into the current chunk group
|
456
465
|
queue.push({
|
457
466
|
action: PROCESS_BLOCK,
|
@@ -484,7 +493,8 @@ const visitModules = (
|
|
484
493
|
availableChildren: undefined,
|
485
494
|
preOrderIndex: 0,
|
486
495
|
postOrderIndex: 0,
|
487
|
-
|
496
|
+
chunkLoading: chunkGroupInfo.chunkLoading,
|
497
|
+
asyncChunks: chunkGroupInfo.asyncChunks
|
488
498
|
};
|
489
499
|
allCreatedChunkGroups.add(c);
|
490
500
|
chunkGroupInfoMap.set(c, cgi);
|
package/lib/config/defaults.js
CHANGED
@@ -383,7 +383,7 @@ const applySnapshotDefaults = (snapshot, { production, futureDefaults }) => {
|
|
383
383
|
return [path.resolve(match[1], "unplugged")];
|
384
384
|
}
|
385
385
|
} else {
|
386
|
-
const match = /^(.+?[\\/]node_modules
|
386
|
+
const match = /^(.+?[\\/]node_modules[\\/])/.exec(
|
387
387
|
// eslint-disable-next-line node/no-extraneous-require
|
388
388
|
require.resolve("watchpack")
|
389
389
|
);
|
@@ -744,6 +744,7 @@ const applyOutputDefaults = (
|
|
744
744
|
"Chunk format can't be selected by default when no target is specified"
|
745
745
|
);
|
746
746
|
});
|
747
|
+
D(output, "asyncChunks", true);
|
747
748
|
F(output, "chunkLoading", () => {
|
748
749
|
if (tp) {
|
749
750
|
switch (output.chunkFormat) {
|
@@ -290,6 +290,7 @@ const getNormalizedWebpackOptions = config => {
|
|
290
290
|
/** @type {OutputNormalized} */
|
291
291
|
const result = {
|
292
292
|
assetModuleFilename: output.assetModuleFilename,
|
293
|
+
asyncChunks: output.asyncChunks,
|
293
294
|
charset: output.charset,
|
294
295
|
chunkFilename: output.chunkFilename,
|
295
296
|
chunkFormat: output.chunkFormat,
|
@@ -484,6 +485,7 @@ const getNormalizedEntryStatic = entry => {
|
|
484
485
|
runtime: value.runtime,
|
485
486
|
publicPath: value.publicPath,
|
486
487
|
chunkLoading: value.chunkLoading,
|
488
|
+
asyncChunks: value.asyncChunks,
|
487
489
|
wasmLoading: value.wasmLoading,
|
488
490
|
dependOn:
|
489
491
|
value.dependOn &&
|
@@ -203,15 +203,17 @@ class ProfilingPlugin {
|
|
203
203
|
|
204
204
|
// Compiler Hooks
|
205
205
|
Object.keys(compiler.hooks).forEach(hookName => {
|
206
|
-
compiler.hooks[hookName]
|
207
|
-
|
208
|
-
|
206
|
+
const hook = compiler.hooks[hookName];
|
207
|
+
if (hook) {
|
208
|
+
hook.intercept(makeInterceptorFor("Compiler", tracer)(hookName));
|
209
|
+
}
|
209
210
|
});
|
210
211
|
|
211
212
|
Object.keys(compiler.resolverFactory.hooks).forEach(hookName => {
|
212
|
-
compiler.resolverFactory.hooks[hookName]
|
213
|
-
|
214
|
-
|
213
|
+
const hook = compiler.resolverFactory.hooks[hookName];
|
214
|
+
if (hook) {
|
215
|
+
hook.intercept(makeInterceptorFor("Resolver", tracer)(hookName));
|
216
|
+
}
|
215
217
|
});
|
216
218
|
|
217
219
|
compiler.hooks.compilation.tap(
|
@@ -303,7 +305,7 @@ const interceptAllHooksFor = (instance, tracer, logLabel) => {
|
|
303
305
|
if (Reflect.has(instance, "hooks")) {
|
304
306
|
Object.keys(instance.hooks).forEach(hookName => {
|
305
307
|
const hook = instance.hooks[hookName];
|
306
|
-
if (!hook._fakeHook) {
|
308
|
+
if (hook && !hook._fakeHook) {
|
307
309
|
hook.intercept(makeInterceptorFor(logLabel, tracer)(hookName));
|
308
310
|
}
|
309
311
|
});
|
@@ -282,7 +282,7 @@ class CommonJsImportsParserPlugin {
|
|
282
282
|
dep.asiSafe = !parser.isAsiPosition(expr.range[0]);
|
283
283
|
dep.optional = !!parser.scope.inTry;
|
284
284
|
dep.loc = expr.loc;
|
285
|
-
parser.state.
|
285
|
+
parser.state.current.addDependency(dep);
|
286
286
|
return true;
|
287
287
|
}
|
288
288
|
};
|
@@ -299,7 +299,7 @@ class CommonJsImportsParserPlugin {
|
|
299
299
|
dep.asiSafe = !parser.isAsiPosition(expr.range[0]);
|
300
300
|
dep.optional = !!parser.scope.inTry;
|
301
301
|
dep.loc = expr.callee.loc;
|
302
|
-
parser.state.
|
302
|
+
parser.state.current.addDependency(dep);
|
303
303
|
parser.walkExpressions(expr.arguments);
|
304
304
|
return true;
|
305
305
|
}
|
package/lib/util/ArrayHelpers.js
CHANGED
@@ -12,3 +12,19 @@ exports.equals = (a, b) => {
|
|
12
12
|
}
|
13
13
|
return true;
|
14
14
|
};
|
15
|
+
|
16
|
+
/**
|
17
|
+
*
|
18
|
+
* @param {Array} arr Array of values to be partitioned
|
19
|
+
* @param {(value: any) => boolean} fn Partition function which partitions based on truthiness of result.
|
20
|
+
* @returns {[Array, Array]} returns the values of `arr` partitioned into two new arrays based on fn predicate.
|
21
|
+
*/
|
22
|
+
exports.groupBy = (arr = [], fn) => {
|
23
|
+
return arr.reduce(
|
24
|
+
(groups, value) => {
|
25
|
+
groups[fn(value) ? 0 : 1].push(value);
|
26
|
+
return groups;
|
27
|
+
},
|
28
|
+
[[], []]
|
29
|
+
);
|
30
|
+
};
|
@@ -9,11 +9,18 @@ const memoize = require("./memoize");
|
|
9
9
|
|
10
10
|
const getValidate = memoize(() => require("schema-utils").validate);
|
11
11
|
|
12
|
-
const createSchemaValidation = (check
|
12
|
+
const createSchemaValidation = (check, getSchema, options) => {
|
13
13
|
getSchema = memoize(getSchema);
|
14
14
|
return value => {
|
15
|
-
if (!check(value)) {
|
15
|
+
if (check && !check(value)) {
|
16
16
|
getValidate()(getSchema(), value, options);
|
17
|
+
if (check) {
|
18
|
+
require("util").deprecate(
|
19
|
+
() => {},
|
20
|
+
"webpack bug: Pre-compiled schema reports error while real schema is happy. This has performance drawbacks.",
|
21
|
+
"DEP_WEBPACK_PRE_COMPILED_SCHEMA_INVALID"
|
22
|
+
)();
|
23
|
+
}
|
17
24
|
}
|
18
25
|
};
|
19
26
|
};
|
package/lib/util/fs.js
CHANGED
@@ -93,6 +93,7 @@ const path = require("path");
|
|
93
93
|
* @property {function(string, Callback): void=} rmdir
|
94
94
|
* @property {function(string, Callback): void=} unlink
|
95
95
|
* @property {function(string, StatsCallback): void} stat
|
96
|
+
* @property {function(string, StatsCallback): void=} lstat
|
96
97
|
* @property {function(string, BufferOrStringCallback): void} readFile
|
97
98
|
* @property {(function(string, string): string)=} join
|
98
99
|
* @property {(function(string, string): string)=} relative
|
package/lib/util/hash/md4.js
CHANGED
@@ -10,8 +10,8 @@ const create = require("./wasm-hash");
|
|
10
10
|
//#region wasm code: md4 (../../../assembly/hash/md4.asm.ts) --initialMemory 1
|
11
11
|
const md4 = new WebAssembly.Module(
|
12
12
|
Buffer.from(
|
13
|
-
//
|
14
|
-
"AGFzbQEAAAABCAJgAX8AYAAAAwUEAQAAAAUDAQABBhoFfwFBAAt/AUEAC38BQQALfwFBAAt/
|
13
|
+
// 2156 bytes
|
14
|
+
"AGFzbQEAAAABCAJgAX8AYAAAAwUEAQAAAAUDAQABBhoFfwFBAAt/AUEAC38BQQALfwFBAAt/AUEACwciBARpbml0AAAGdXBkYXRlAAIFZmluYWwAAwZtZW1vcnkCAAqLEAQmAEGBxpS6BiQBQY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w4MCBg4aMmDCEfDcDAEEIIwKtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEQIwOtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEYIwStIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAAs=",
|
15
15
|
"base64"
|
16
16
|
)
|
17
17
|
);
|
@@ -11,7 +11,7 @@ const create = require("./wasm-hash");
|
|
11
11
|
const xxhash64 = new WebAssembly.Module(
|
12
12
|
Buffer.from(
|
13
13
|
// 1173 bytes
|
14
|
-
"AGFzbQEAAAABCAJgAX8AYAAAAwQDAQAABQMBAAEGGgV+AUIAC34BQgALfgFCAAt+AUIAC34BQgALByIEBGluaXQAAAZ1cGRhdGUAAQVmaW5hbAACBm1lbW9yeQIACrUIAzAAQtbrgu7q/Yn14AAkAELP1tO+0ser2UIkAUIAJAJC+erQ0OfJoeThACQDQgAkBAvUAQIBfwR+IABFBEAPCyMEIACtfCQEIwAhAiMBIQMjAiEEIwMhBQNAIAIgASkDAELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiECIAMgASkDCELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEDIAQgASkDEELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/f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+AvIDwgcAHg0IIhiACQvCBwIeAnoD4AINCBIiEIgJChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IAJCsODAgYOGjJgwhHw3AwAL",
|
15
15
|
"base64"
|
16
16
|
)
|
17
17
|
);
|
package/lib/webpack.js
CHANGED
@@ -96,6 +96,9 @@ const createCompiler = rawOptions => {
|
|
96
96
|
* @returns {MultiCompiler} the multi compiler object
|
97
97
|
*/
|
98
98
|
|
99
|
+
const asArray = options =>
|
100
|
+
Array.isArray(options) ? Array.from(options) : [options];
|
101
|
+
|
99
102
|
const webpack = /** @type {WebpackFunctionSingle & WebpackFunctionMulti} */ (
|
100
103
|
/**
|
101
104
|
* @param {WebpackOptions | (ReadonlyArray<WebpackOptions> & MultiCompilerOptions)} options options
|
@@ -104,8 +107,13 @@ const webpack = /** @type {WebpackFunctionSingle & WebpackFunctionMulti} */ (
|
|
104
107
|
*/
|
105
108
|
(options, callback) => {
|
106
109
|
const create = () => {
|
107
|
-
if (!
|
110
|
+
if (!asArray(options).every(webpackOptionsSchemaCheck)) {
|
108
111
|
getValidateSchema()(webpackOptionsSchema, options);
|
112
|
+
util.deprecate(
|
113
|
+
() => {},
|
114
|
+
"webpack bug: Pre-compiled schema reports error while real schema is happy. This has performance drawbacks.",
|
115
|
+
"DEP_WEBPACK_PRE_COMPILED_SCHEMA_INVALID"
|
116
|
+
)();
|
109
117
|
}
|
110
118
|
/** @type {MultiCompiler|Compiler} */
|
111
119
|
let compiler;
|
package/module.d.ts
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "webpack",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.64.3",
|
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",
|
@@ -28,7 +28,7 @@
|
|
28
28
|
"tapable": "^2.1.1",
|
29
29
|
"terser-webpack-plugin": "^5.1.3",
|
30
30
|
"watchpack": "^2.2.0",
|
31
|
-
"webpack-sources": "^3.2.
|
31
|
+
"webpack-sources": "^3.2.2"
|
32
32
|
},
|
33
33
|
"peerDependenciesMeta": {
|
34
34
|
"webpack-cli": {
|
@@ -98,7 +98,7 @@
|
|
98
98
|
"style-loader": "^2.0.0",
|
99
99
|
"terser": "^5.7.0",
|
100
100
|
"toml": "^3.0.0",
|
101
|
-
"tooling": "webpack/tooling#v1.20.
|
101
|
+
"tooling": "webpack/tooling#v1.20.1",
|
102
102
|
"ts-loader": "^8.0.2",
|
103
103
|
"typescript": "^4.2.0-beta",
|
104
104
|
"url-loader": "^4.1.0",
|