webpack 5.105.0 → 5.105.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/lib/AsyncDependenciesBlock.js +5 -2
- package/lib/AsyncDependencyToInitialChunkError.js +2 -0
- package/lib/BannerPlugin.js +3 -1
- package/lib/Chunk.js +4 -4
- package/lib/ChunkRenderError.js +7 -2
- package/lib/Compilation.js +4 -0
- package/lib/Compiler.js +1 -1
- package/lib/DefinePlugin.js +12 -7
- package/lib/DynamicEntryPlugin.js +7 -1
- package/lib/ExternalModuleFactoryPlugin.js +9 -2
- package/lib/ExternalsPlugin.js +2 -1
- package/lib/IgnoreWarningsPlugin.js +5 -2
- package/lib/ManifestPlugin.js +4 -0
- package/lib/ModuleError.js +2 -0
- package/lib/ModuleFilenameHelpers.js +2 -1
- package/lib/NormalModule.js +2 -0
- package/lib/UnsupportedFeatureWarning.js +2 -0
- package/lib/WebpackOptionsApply.js +1 -1
- package/lib/asset/AssetGenerator.js +9 -0
- package/lib/asset/AssetParser.js +4 -0
- package/lib/container/ContainerEntryDependency.js +3 -0
- package/lib/container/ContainerEntryModule.js +3 -0
- package/lib/container/ContainerExposedDependency.js +1 -0
- package/lib/container/FallbackDependency.js +1 -0
- package/lib/container/FallbackItemDependency.js +1 -0
- package/lib/container/FallbackModule.js +2 -0
- package/lib/container/ModuleFederationPlugin.js +1 -1
- package/lib/container/RemoteModule.js +5 -0
- package/lib/dependencies/CssIcssExportDependency.js +2 -0
- package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +2 -1
- package/lib/dependencies/HarmonyImportDependency.js +1 -1
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +14 -11
- package/lib/dependencies/RequireEnsureDependenciesBlock.js +1 -1
- package/lib/electron/ElectronTargetPlugin.js +3 -1
- package/lib/ids/ChunkModuleIdRangePlugin.js +7 -7
- package/lib/ids/DeterministicChunkIdsPlugin.js +1 -0
- package/lib/ids/DeterministicModuleIdsPlugin.js +1 -0
- package/lib/ids/HashedModuleIdsPlugin.js +3 -8
- package/lib/ids/NamedChunkIdsPlugin.js +7 -5
- package/lib/ids/NamedModuleIdsPlugin.js +1 -0
- package/lib/ids/OccurrenceChunkIdsPlugin.js +2 -2
- package/lib/ids/OccurrenceModuleIdsPlugin.js +3 -3
- package/lib/ids/SyncModuleIdsPlugin.js +25 -19
- package/lib/json/JsonGenerator.js +1 -0
- package/lib/json/JsonParser.js +3 -2
- package/lib/logging/Logger.js +9 -5
- package/lib/logging/createConsoleLogger.js +2 -1
- package/lib/node/CommonJsChunkLoadingPlugin.js +5 -4
- package/lib/node/NodeEnvironmentPlugin.js +1 -0
- package/lib/node/NodeTargetPlugin.js +9 -1
- package/lib/node/NodeTemplatePlugin.js +1 -0
- package/lib/node/NodeWatchFileSystem.js +3 -0
- package/lib/node/ReadFileChunkLoadingRuntimeModule.js +1 -0
- package/lib/node/ReadFileCompileAsyncWasmPlugin.js +1 -0
- package/lib/node/ReadFileCompileWasmPlugin.js +1 -0
- package/lib/node/RequireChunkLoadingRuntimeModule.js +1 -0
- package/lib/optimize/AggressiveSplittingPlugin.js +5 -0
- package/lib/optimize/LimitChunkCountPlugin.js +3 -2
- package/lib/optimize/MergeDuplicateChunksPlugin.js +2 -1
- package/lib/optimize/RealContentHashPlugin.js +2 -0
- package/lib/optimize/RuntimeChunkPlugin.js +3 -5
- package/lib/optimize/SplitChunksPlugin.js +9 -2
- package/lib/performance/SizeLimitsPlugin.js +6 -6
- package/lib/prefetch/ChunkPrefetchFunctionRuntimeModule.js +2 -0
- package/lib/prefetch/ChunkPrefetchStartupRuntimeModule.js +3 -1
- package/lib/prefetch/ChunkPrefetchTriggerRuntimeModule.js +1 -0
- package/lib/prefetch/ChunkPreloadTriggerRuntimeModule.js +1 -0
- package/lib/rules/RuleSetCompiler.js +4 -0
- package/lib/runtime/GetChunkFilenameRuntimeModule.js +1 -0
- package/lib/runtime/GetFullHashRuntimeModule.js +1 -0
- package/lib/runtime/MakeDeferredNamespaceObjectRuntime.js +1 -0
- package/lib/schemes/HttpUriPlugin.js +12 -13
- package/lib/schemes/VirtualUrlPlugin.js +21 -0
- package/lib/stats/DefaultStatsFactoryPlugin.js +6 -0
- package/lib/url/URLParserPlugin.js +1 -0
- package/lib/util/hash/BatchedHash.js +1 -0
- package/lib/util/hash/BulkUpdateHash.js +1 -0
- package/lib/util/hash/wasm-hash.js +2 -1
- package/lib/wasm/EnableWasmLoadingPlugin.js +1 -0
- package/lib/webpack.js +3 -1
- package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +2 -0
- package/package.json +15 -10
- package/schemas/WebpackOptions.json +50 -50
- package/schemas/plugins/BannerPlugin.json +2 -2
- package/schemas/plugins/IgnorePlugin.json +1 -1
- package/schemas/plugins/ManifestPlugin.json +3 -3
- package/schemas/plugins/ProgressPlugin.json +1 -1
- package/schemas/plugins/SourceMapDevToolPlugin.json +2 -2
- package/schemas/plugins/schemes/HttpUriPlugin.json +1 -1
- package/schemas/plugins/schemes/VirtualUrlPlugin.json +3 -3
- package/types.d.ts +100 -43
|
@@ -22,7 +22,6 @@ const memoize = require("../util/memoize");
|
|
|
22
22
|
const MinMaxSizeWarning = require("./MinMaxSizeWarning");
|
|
23
23
|
|
|
24
24
|
/** @typedef {import("../../declarations/WebpackOptions").OptimizationSplitChunksCacheGroup} OptimizationSplitChunksCacheGroup */
|
|
25
|
-
/** @typedef {import("../../declarations/WebpackOptions").OptimizationSplitChunksGetCacheGroups} OptimizationSplitChunksGetCacheGroups */
|
|
26
25
|
/** @typedef {import("../../declarations/WebpackOptions").OptimizationSplitChunksOptions} OptimizationSplitChunksOptions */
|
|
27
26
|
/** @typedef {import("../../declarations/WebpackOptions").OptimizationSplitChunksSizes} OptimizationSplitChunksSizes */
|
|
28
27
|
/** @typedef {import("../config/defaults").OutputNormalizedWithDefaults} OutputOptions */
|
|
@@ -124,6 +123,8 @@ const MinMaxSizeWarning = require("./MinMaxSizeWarning");
|
|
|
124
123
|
* @property {ChunkGraph} chunkGraph
|
|
125
124
|
*/
|
|
126
125
|
|
|
126
|
+
/** @typedef {(module: Module) => OptimizationSplitChunksCacheGroup | OptimizationSplitChunksCacheGroup[] | void} RawGetCacheGroups */
|
|
127
|
+
|
|
127
128
|
/**
|
|
128
129
|
* @callback GetCacheGroups
|
|
129
130
|
* @param {Module} module
|
|
@@ -456,7 +457,7 @@ const normalizeChunksFilter = (chunks) => {
|
|
|
456
457
|
};
|
|
457
458
|
|
|
458
459
|
/**
|
|
459
|
-
* @param {undefined | GetCacheGroups | Record<string, false | string | RegExp |
|
|
460
|
+
* @param {undefined | GetCacheGroups | Record<string, false | string | RegExp | RawGetCacheGroups | OptimizationSplitChunksCacheGroup>} cacheGroups the cache group options
|
|
460
461
|
* @param {DefaultSizeTypes} defaultSizeTypes the default size types
|
|
461
462
|
* @returns {GetCacheGroups} a function to get the cache groups
|
|
462
463
|
*/
|
|
@@ -533,6 +534,8 @@ const normalizeCacheGroups = (cacheGroups, defaultSizeTypes) => {
|
|
|
533
534
|
return () => null;
|
|
534
535
|
};
|
|
535
536
|
|
|
537
|
+
/** @typedef {(module: Module, context: CacheGroupsContext) => boolean} CheckTestFn */
|
|
538
|
+
|
|
536
539
|
/**
|
|
537
540
|
* @param {OptimizationSplitChunksCacheGroup["test"]} test test option
|
|
538
541
|
* @param {Module} module the module
|
|
@@ -556,6 +559,8 @@ const checkTest = (test, module, context) => {
|
|
|
556
559
|
return false;
|
|
557
560
|
};
|
|
558
561
|
|
|
562
|
+
/** @typedef {(type: string) => boolean} CheckModuleTypeFn */
|
|
563
|
+
|
|
559
564
|
/**
|
|
560
565
|
* @param {OptimizationSplitChunksCacheGroup["type"]} test type option
|
|
561
566
|
* @param {Module} module the module
|
|
@@ -577,6 +582,8 @@ const checkModuleType = (test, module) => {
|
|
|
577
582
|
return false;
|
|
578
583
|
};
|
|
579
584
|
|
|
585
|
+
/** @typedef {(layer: string | null) => boolean} CheckModuleLayerFn */
|
|
586
|
+
|
|
580
587
|
/**
|
|
581
588
|
* @param {OptimizationSplitChunksCacheGroup["layer"]} test type option
|
|
582
589
|
* @param {Module} module the module
|
|
@@ -34,12 +34,9 @@ const NoAsyncChunksWarning = require("./NoAsyncChunksWarning");
|
|
|
34
34
|
/** @type {WeakSet<Entrypoint | ChunkGroup | Source>} */
|
|
35
35
|
const isOverSizeLimitSet = new WeakSet();
|
|
36
36
|
|
|
37
|
-
/**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
* @param {Asset["info"]} info the info
|
|
41
|
-
* @returns {boolean} result
|
|
42
|
-
*/
|
|
37
|
+
/** @typedef {(name: Asset["name"], source: Asset["source"], assetInfo: Asset["info"]) => boolean} AssetFilter */
|
|
38
|
+
|
|
39
|
+
/** @type {AssetFilter} */
|
|
43
40
|
const excludeSourceMap = (name, source, info) => !info.development;
|
|
44
41
|
|
|
45
42
|
const PLUGIN_NAME = "SizeLimitsPlugin";
|
|
@@ -50,8 +47,11 @@ module.exports = class SizeLimitsPlugin {
|
|
|
50
47
|
*/
|
|
51
48
|
constructor(options) {
|
|
52
49
|
this.hints = options.hints;
|
|
50
|
+
/** @type {number | undefined} */
|
|
53
51
|
this.maxAssetSize = options.maxAssetSize;
|
|
52
|
+
/** @type {number | undefined} */
|
|
54
53
|
this.maxEntrypointSize = options.maxEntrypointSize;
|
|
54
|
+
/** @type {AssetFilter | undefined} */
|
|
55
55
|
this.assetFilter = options.assetFilter;
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -17,7 +17,9 @@ class ChunkPrefetchFunctionRuntimeModule extends RuntimeModule {
|
|
|
17
17
|
*/
|
|
18
18
|
constructor(type, runtimeFunction, runtimeHandlers) {
|
|
19
19
|
super(`chunk ${type} function`);
|
|
20
|
+
/** @type {string} */
|
|
20
21
|
this.runtimeFunction = runtimeFunction;
|
|
22
|
+
/** @type {string} */
|
|
21
23
|
this.runtimeHandlers = runtimeHandlers;
|
|
22
24
|
}
|
|
23
25
|
|
|
@@ -9,14 +9,16 @@ const RuntimeModule = require("../RuntimeModule");
|
|
|
9
9
|
const Template = require("../Template");
|
|
10
10
|
|
|
11
11
|
/** @typedef {import("../Chunk")} Chunk */
|
|
12
|
+
/** @typedef {import("../Chunk").ChunkChildOfTypeInOrder} ChunkChildOfTypeInOrder */
|
|
12
13
|
/** @typedef {import("../Compilation")} Compilation */
|
|
13
14
|
|
|
14
15
|
class ChunkPrefetchStartupRuntimeModule extends RuntimeModule {
|
|
15
16
|
/**
|
|
16
|
-
* @param {
|
|
17
|
+
* @param {ChunkChildOfTypeInOrder[]} startupChunks chunk ids to trigger when chunks are loaded
|
|
17
18
|
*/
|
|
18
19
|
constructor(startupChunks) {
|
|
19
20
|
super("startup prefetch", RuntimeModule.STAGE_TRIGGER);
|
|
21
|
+
/** @type {ChunkChildOfTypeInOrder[]} */
|
|
20
22
|
this.startupChunks = startupChunks;
|
|
21
23
|
}
|
|
22
24
|
|
|
@@ -9,6 +9,7 @@ const { SyncHook } = require("tapable");
|
|
|
9
9
|
|
|
10
10
|
/** @typedef {import("enhanced-resolve").ResolveRequest} ResolveRequest */
|
|
11
11
|
/** @typedef {import("../../declarations/WebpackOptions").Falsy} Falsy */
|
|
12
|
+
/** @typedef {import("../../declarations/WebpackOptions").RuleSetUseItem} RuleSetUseItem */
|
|
12
13
|
/** @typedef {import("../../declarations/WebpackOptions").RuleSetLoaderOptions} RuleSetLoaderOptions */
|
|
13
14
|
/** @typedef {import("../../declarations/WebpackOptions").RuleSetRule} RuleSetRule */
|
|
14
15
|
|
|
@@ -87,6 +88,9 @@ const { SyncHook } = require("tapable");
|
|
|
87
88
|
|
|
88
89
|
/** @typedef {Set<string>} UnhandledProperties */
|
|
89
90
|
|
|
91
|
+
/** @typedef {(data: EffectData) => (RuleSetUseItem | (Falsy | RuleSetUseItem)[])} RuleSetUseFn */
|
|
92
|
+
/** @typedef {(value: string) => boolean} RuleSetConditionFn */
|
|
93
|
+
|
|
90
94
|
/** @typedef {{ apply: (ruleSetCompiler: RuleSetCompiler) => void }} RuleSetPlugin */
|
|
91
95
|
|
|
92
96
|
class RuleSetCompiler {
|
|
@@ -30,6 +30,7 @@ class GetChunkFilenameRuntimeModule extends RuntimeModule {
|
|
|
30
30
|
this.contentType = contentType;
|
|
31
31
|
/** @type {string} */
|
|
32
32
|
this.global = global;
|
|
33
|
+
/** @type {(chunk: Chunk) => TemplatePath | false} */
|
|
33
34
|
this.getFilenameForChunk = getFilenameForChunk;
|
|
34
35
|
/** @type {boolean} */
|
|
35
36
|
this.allChunks = allChunks;
|
|
@@ -226,6 +226,7 @@ const sanitizeUrlForError = (href) => {
|
|
|
226
226
|
|
|
227
227
|
class Lockfile {
|
|
228
228
|
constructor() {
|
|
229
|
+
/** @type {number} */
|
|
229
230
|
this.version = 1;
|
|
230
231
|
/** @type {Map<string, LockfileEntry | "ignore" | "no-cache">} */
|
|
231
232
|
this.entries = new Map();
|
|
@@ -436,6 +437,8 @@ const cachedWithKey = (fn, forceFn = fn) => {
|
|
|
436
437
|
/** @typedef {FetchResultMeta & { entry: LockfileEntry, content: Buffer }} ContentFetchResult */
|
|
437
438
|
/** @typedef {RedirectFetchResult | ContentFetchResult} FetchResult */
|
|
438
439
|
|
|
440
|
+
/** @typedef {(uri: string) => boolean} AllowedUriFn */
|
|
441
|
+
|
|
439
442
|
const PLUGIN_NAME = "HttpUriPlugin";
|
|
440
443
|
|
|
441
444
|
class HttpUriPlugin {
|
|
@@ -444,12 +447,8 @@ class HttpUriPlugin {
|
|
|
444
447
|
*/
|
|
445
448
|
constructor(options) {
|
|
446
449
|
validate(options);
|
|
447
|
-
|
|
448
|
-
this.
|
|
449
|
-
this._upgrade = options.upgrade;
|
|
450
|
-
this._frozen = options.frozen;
|
|
451
|
-
this._allowedUris = options.allowedUris;
|
|
452
|
-
this._proxy = options.proxy;
|
|
450
|
+
/** @type {HttpUriPluginOptions} */
|
|
451
|
+
this.options = options;
|
|
453
452
|
}
|
|
454
453
|
|
|
455
454
|
/**
|
|
@@ -459,7 +458,7 @@ class HttpUriPlugin {
|
|
|
459
458
|
*/
|
|
460
459
|
apply(compiler) {
|
|
461
460
|
const proxy =
|
|
462
|
-
this.
|
|
461
|
+
this.options.proxy || process.env.http_proxy || process.env.HTTP_PROXY;
|
|
463
462
|
/**
|
|
464
463
|
* @type {{ scheme: "http" | "https", fetch: Fetch }[]}
|
|
465
464
|
*/
|
|
@@ -486,7 +485,7 @@ class HttpUriPlugin {
|
|
|
486
485
|
const logger = compilation.getLogger(`webpack.${PLUGIN_NAME}`);
|
|
487
486
|
/** @type {string} */
|
|
488
487
|
const lockfileLocation =
|
|
489
|
-
this.
|
|
488
|
+
this.options.lockfileLocation ||
|
|
490
489
|
join(
|
|
491
490
|
intermediateFs,
|
|
492
491
|
compiler.context,
|
|
@@ -496,15 +495,15 @@ class HttpUriPlugin {
|
|
|
496
495
|
);
|
|
497
496
|
/** @type {string | false} */
|
|
498
497
|
const cacheLocation =
|
|
499
|
-
this.
|
|
500
|
-
? this.
|
|
498
|
+
this.options.cacheLocation !== undefined
|
|
499
|
+
? this.options.cacheLocation
|
|
501
500
|
: `${lockfileLocation}.data`;
|
|
502
|
-
const upgrade = this.
|
|
503
|
-
const frozen = this.
|
|
501
|
+
const upgrade = this.options.upgrade || false;
|
|
502
|
+
const frozen = this.options.frozen || false;
|
|
504
503
|
const hashFunction = "sha512";
|
|
505
504
|
const hashDigest = "hex";
|
|
506
505
|
const hashDigestLength = 20;
|
|
507
|
-
const allowedUris = this.
|
|
506
|
+
const allowedUris = this.options.allowedUris;
|
|
508
507
|
|
|
509
508
|
let warnedAboutEol = false;
|
|
510
509
|
|
|
@@ -126,6 +126,27 @@ class VirtualUrlPlugin {
|
|
|
126
126
|
compiler.hooks.compilation.tap(
|
|
127
127
|
PLUGIN_NAME,
|
|
128
128
|
(compilation, { normalModuleFactory }) => {
|
|
129
|
+
compilation.hooks.assetPath.tap(
|
|
130
|
+
{ name: PLUGIN_NAME, before: "TemplatedPathPlugin" },
|
|
131
|
+
(path, data) => {
|
|
132
|
+
if (data.filename && this.modules[data.filename]) {
|
|
133
|
+
/**
|
|
134
|
+
* @param {string} str path
|
|
135
|
+
* @returns {string} safe path
|
|
136
|
+
*/
|
|
137
|
+
const toSafePath = (str) =>
|
|
138
|
+
`__${str
|
|
139
|
+
.replace(/:/g, "__")
|
|
140
|
+
.replace(/^[^a-z0-9]+|[^a-z0-9]+$/gi, "")
|
|
141
|
+
.replace(/[^a-z0-9._-]+/gi, "_")}`;
|
|
142
|
+
|
|
143
|
+
// filename: virtual:logo.svg -> __virtual__logo.svg
|
|
144
|
+
data.filename = toSafePath(data.filename);
|
|
145
|
+
}
|
|
146
|
+
return path;
|
|
147
|
+
}
|
|
148
|
+
);
|
|
149
|
+
|
|
129
150
|
normalModuleFactory.hooks.resolveForScheme
|
|
130
151
|
.for(scheme)
|
|
131
152
|
.tap(PLUGIN_NAME, (resourceData) => {
|
|
@@ -543,6 +543,8 @@ const EXTRACT_ERROR = {
|
|
|
543
543
|
}
|
|
544
544
|
};
|
|
545
545
|
|
|
546
|
+
/** @typedef {((value: string) => boolean)} FilterItemTypeFn */
|
|
547
|
+
|
|
546
548
|
/** @type {SimpleExtractors} */
|
|
547
549
|
const SIMPLE_EXTRACTORS = {
|
|
548
550
|
compilation: {
|
|
@@ -2100,6 +2102,8 @@ const GROUP_PATH_REGEXP = /(.+)[/\\][^/\\]+?(?:\?|(?: \+ \d+ modules?)?$)/;
|
|
|
2100
2102
|
* @typedef {BaseGroup & { children: T[], size: number }} BaseGroupWithChildren
|
|
2101
2103
|
*/
|
|
2102
2104
|
|
|
2105
|
+
/** @typedef {(name: string, asset: StatsAsset) => boolean} AssetFilterItemFn */
|
|
2106
|
+
|
|
2103
2107
|
/**
|
|
2104
2108
|
* @typedef {{
|
|
2105
2109
|
* _: (groupConfigs: GroupConfig<KnownStatsAsset, BaseGroup & { filteredChildren: number, size: number } | BaseGroupWithChildren<KnownStatsAsset>>[], context: StatsFactoryContext, options: NormalizedStatsOptions) => void,
|
|
@@ -2259,6 +2263,8 @@ const ASSETS_GROUPERS = {
|
|
|
2259
2263
|
* }} ModulesGroupers
|
|
2260
2264
|
*/
|
|
2261
2265
|
|
|
2266
|
+
/** @typedef {(name: string, module: StatsModule, type: "module" | "chunk" | "root-of-chunk" | "nested") => boolean} ModuleFilterItemTypeFn */
|
|
2267
|
+
|
|
2262
2268
|
/**
|
|
2263
2269
|
* @type {(type: ExcludeModulesType) => ModulesGroupers}
|
|
2264
2270
|
*/
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
const Hash = require("../Hash");
|
|
9
9
|
const { digest, update } = require("./hash-digest");
|
|
10
|
+
/** @type {number} */
|
|
10
11
|
const MAX_SHORT_STRING = require("./wasm-hash").MAX_SHORT_STRING;
|
|
11
12
|
|
|
12
13
|
/** @typedef {import("../../../declarations/WebpackOptions").HashDigest} Encoding */
|
package/lib/webpack.js
CHANGED
|
@@ -23,7 +23,6 @@ const NodeEnvironmentPlugin = require("./node/NodeEnvironmentPlugin");
|
|
|
23
23
|
const memoize = require("./util/memoize");
|
|
24
24
|
|
|
25
25
|
/** @typedef {import("../declarations/WebpackOptions").WebpackOptions} WebpackOptions */
|
|
26
|
-
/** @typedef {import("../declarations/WebpackOptions").WebpackPluginFunction} WebpackPluginFunction */
|
|
27
26
|
/** @typedef {import("./config/defaults").WebpackOptionsNormalizedWithDefaults} WebpackOptionsNormalizedWithDefaults */
|
|
28
27
|
/** @typedef {import("./config/normalization").WebpackOptionsInterception} WebpackOptionsInterception */
|
|
29
28
|
/** @typedef {import("./Compiler").WatchOptions} WatchOptions */
|
|
@@ -32,6 +31,9 @@ const memoize = require("./util/memoize");
|
|
|
32
31
|
/** @typedef {import("./MultiStats")} MultiStats */
|
|
33
32
|
/** @typedef {import("./Stats")} Stats */
|
|
34
33
|
|
|
34
|
+
/** @typedef {(this: Compiler, compiler: Compiler) => void} WebpackPluginFunction */
|
|
35
|
+
/** @typedef {(compiler: Compiler) => void} WebpackPluginInstanceApplyFunction */
|
|
36
|
+
|
|
35
37
|
const getValidateSchema = memoize(() => require("./validateSchema"));
|
|
36
38
|
|
|
37
39
|
/**
|
|
@@ -30,7 +30,9 @@ class ImportScriptsChunkLoadingRuntimeModule extends RuntimeModule {
|
|
|
30
30
|
*/
|
|
31
31
|
constructor(runtimeRequirements, withCreateScriptUrl) {
|
|
32
32
|
super("importScripts chunk loading", RuntimeModule.STAGE_ATTACH);
|
|
33
|
+
/** @type {ReadOnlyRuntimeRequirements} */
|
|
33
34
|
this.runtimeRequirements = runtimeRequirements;
|
|
35
|
+
/** @type {boolean} */
|
|
34
36
|
this._withCreateScriptUrl = withCreateScriptUrl;
|
|
35
37
|
}
|
|
36
38
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webpack",
|
|
3
|
-
"version": "5.105.
|
|
3
|
+
"version": "5.105.2",
|
|
4
4
|
"description": "Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.",
|
|
5
5
|
"homepage": "https://github.com/webpack/webpack",
|
|
6
6
|
"bugs": "https://github.com/webpack/webpack/issues",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"prepare": "husky",
|
|
33
33
|
"setup": "node ./setup/setup.js",
|
|
34
34
|
"prelint": "yarn setup",
|
|
35
|
-
"lint": "yarn lint:code && yarn lint:special && yarn lint:types && yarn lint:types-test && yarn lint:types-benchmark && yarn lint:types-module-test && yarn lint:types-hot && yarn
|
|
35
|
+
"lint": "yarn lint:code && yarn lint:special && yarn lint:types && yarn lint:types-test && yarn lint:types-benchmark && yarn lint:types-module-test && yarn lint:types-hot && yarn fmt:check && yarn lint:spellcheck",
|
|
36
36
|
"lint:code": "node node_modules/eslint/bin/eslint.js --cache .",
|
|
37
37
|
"lint:special": "node node_modules/tooling/lockfile-lint && node node_modules/tooling/schemas-lint && node node_modules/tooling/inherit-types && node node_modules/tooling/format-schemas && node tooling/generate-runtime-code.js && node tooling/generate-wasm-code.js && node node_modules/tooling/compile-to-definitions && node node_modules/tooling/precompile-schemas && node node_modules/tooling/generate-types --no-template-literals",
|
|
38
38
|
"lint:types": "tsc",
|
|
@@ -40,15 +40,13 @@
|
|
|
40
40
|
"lint:types-benchmark": "tsc -p tsconfig.types.benchmark.json",
|
|
41
41
|
"lint:types-hot": "tsc -p tsconfig.hot.json",
|
|
42
42
|
"lint:types-module-test": "tsc -p tsconfig.module.test.json",
|
|
43
|
-
"lint:yarn": "yarn-deduplicate --fail --list -s highest yarn.lock",
|
|
44
43
|
"lint:spellcheck": "cspell --cache --no-must-find-files --quiet \"**/*.*\"",
|
|
45
44
|
"validate:types": "tsc -p tsconfig.validation.json",
|
|
46
45
|
"fmt": "yarn fmt:base --log-level warn --write",
|
|
47
46
|
"fmt:check": "yarn fmt:base --check",
|
|
48
47
|
"fmt:base": "node node_modules/prettier/bin/prettier.cjs --cache --ignore-unknown .",
|
|
49
|
-
"fix": "yarn fix:code && yarn fix:
|
|
48
|
+
"fix": "yarn fix:code && yarn fix:special && yarn fmt",
|
|
50
49
|
"fix:code": "yarn lint:code --fix",
|
|
51
|
-
"fix:yarn": "yarn-deduplicate -s highest yarn.lock",
|
|
52
50
|
"fix:special": "node node_modules/tooling/inherit-types --write && node node_modules/tooling/format-schemas --write && node tooling/generate-runtime-code.js --write && node tooling/generate-wasm-code.js --write && node node_modules/tooling/compile-to-definitions --write && node node_modules/tooling/precompile-schemas --write && node node_modules/tooling/generate-types --no-template-literals --write",
|
|
53
51
|
"build:examples": "cd examples && node buildAll.js",
|
|
54
52
|
"benchmark": "node --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation --hash-seed=1 --random-seed=1 --no-opt --predictable --predictable-gc-schedule --interpreted-frames-native-stack --allow-natives-syntax --expose-gc --no-concurrent-sweeping ./test/BenchmarkTestCases.benchmark.mjs",
|
|
@@ -116,7 +114,7 @@
|
|
|
116
114
|
"@babel/preset-react": "^7.27.1",
|
|
117
115
|
"@changesets/cli": "^2.29.8",
|
|
118
116
|
"@changesets/get-github-info": "^0.7.0",
|
|
119
|
-
"@codspeed/core": "^5.0
|
|
117
|
+
"@codspeed/core": "^5.1.0",
|
|
120
118
|
"@types/glob-to-regexp": "^0.4.4",
|
|
121
119
|
"@types/graceful-fs": "^4.1.9",
|
|
122
120
|
"@types/jest": "^30.0.0",
|
|
@@ -141,6 +139,7 @@
|
|
|
141
139
|
"fork-ts-checker-webpack-plugin": "^9.0.2",
|
|
142
140
|
"globals": "^17.0.0",
|
|
143
141
|
"hash-wasm": "^4.9.0",
|
|
142
|
+
"html-loader": "^5.1.0",
|
|
144
143
|
"husky": "^9.0.11",
|
|
145
144
|
"istanbul": "^0.4.5",
|
|
146
145
|
"jest": "^30.2.0",
|
|
@@ -163,7 +162,7 @@
|
|
|
163
162
|
"node-gyp": "^12.1.0",
|
|
164
163
|
"nyc": "^17.1.0",
|
|
165
164
|
"open-cli": "^8.0.0",
|
|
166
|
-
"pkg-pr-new": "^0.0.
|
|
165
|
+
"pkg-pr-new": "^0.0.63",
|
|
167
166
|
"prettier": "^3.7.4",
|
|
168
167
|
"prettier-2": "npm:prettier@^2",
|
|
169
168
|
"pretty-format": "^30.0.5",
|
|
@@ -172,6 +171,12 @@
|
|
|
172
171
|
"raw-loader": "^4.0.1",
|
|
173
172
|
"react": "^19.2.3",
|
|
174
173
|
"react-dom": "^19.2.3",
|
|
174
|
+
"rehype-sanitize": "^6.0.0",
|
|
175
|
+
"rehype-stringify": "^10.0.1",
|
|
176
|
+
"remark-frontmatter": "^5.0.0",
|
|
177
|
+
"remark-gfm": "^4.0.1",
|
|
178
|
+
"remark-parse": "^11.0.0",
|
|
179
|
+
"remark-rehype": "^11.1.2",
|
|
175
180
|
"rimraf": "^3.0.2",
|
|
176
181
|
"script-loader": "^0.7.2",
|
|
177
182
|
"simple-git": "^3.28.0",
|
|
@@ -181,16 +186,16 @@
|
|
|
181
186
|
"three": "^0.182.0",
|
|
182
187
|
"tinybench": "^6.0.0",
|
|
183
188
|
"toml": "^3.0.0",
|
|
184
|
-
"tooling": "webpack/tooling#v1.24.
|
|
189
|
+
"tooling": "webpack/tooling#v1.24.5",
|
|
185
190
|
"ts-loader": "^9.5.4",
|
|
186
191
|
"typescript": "^5.9.3",
|
|
192
|
+
"unified": "^11.0.5",
|
|
187
193
|
"url-loader": "^4.1.0",
|
|
188
194
|
"wast-loader": "^1.12.1",
|
|
189
195
|
"webassembly-feature": "1.3.0",
|
|
190
196
|
"webpack-cli": "^6.0.1",
|
|
191
197
|
"xxhashjs": "^0.2.2",
|
|
192
|
-
"yamljs": "^0.3.0"
|
|
193
|
-
"yarn-deduplicate": "^6.0.1"
|
|
198
|
+
"yamljs": "^0.3.0"
|
|
194
199
|
},
|
|
195
200
|
"peerDependenciesMeta": {
|
|
196
201
|
"webpack-cli": {
|