webpack 5.85.1 → 5.87.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 +5 -2
- package/lib/APIPlugin.js +150 -99
- package/lib/CaseSensitiveModulesWarning.js +3 -1
- package/lib/Chunk.js +35 -17
- package/lib/ChunkGroup.js +11 -6
- package/lib/Compiler.js +4 -3
- package/lib/ConcatenationScope.js +2 -2
- package/lib/ConditionalInitFragment.js +11 -1
- package/lib/ConstPlugin.js +57 -29
- package/lib/ContextModule.js +4 -2
- package/lib/ContextModuleFactory.js +1 -0
- package/lib/DependenciesBlock.js +1 -1
- package/lib/DllModule.js +6 -0
- package/lib/EvalSourceMapDevToolPlugin.js +2 -1
- package/lib/ExternalModule.js +15 -8
- package/lib/FlagEntryExportAsUsedPlugin.js +4 -0
- package/lib/Module.js +7 -1
- package/lib/ModuleDependencyError.js +4 -2
- package/lib/ModuleDependencyWarning.js +4 -2
- package/lib/ModuleGraph.js +31 -24
- package/lib/ModuleGraphConnection.js +19 -6
- package/lib/ModuleInfoHeaderPlugin.js +9 -2
- package/lib/ModuleNotFoundError.js +5 -2
- package/lib/ModuleStoreError.js +2 -1
- package/lib/ModuleTypeConstants.js +7 -0
- package/lib/MultiWatching.js +4 -0
- package/lib/ProgressPlugin.js +71 -15
- package/lib/RuntimeGlobals.js +5 -0
- package/lib/RuntimePlugin.js +2 -1
- package/lib/RuntimeTemplate.js +20 -2
- package/lib/WebpackError.js +6 -5
- package/lib/WebpackOptionsApply.js +4 -2
- package/lib/WebpackOptionsDefaulter.js +10 -3
- package/lib/config/defaults.js +31 -2
- package/lib/css/CssExportsGenerator.js +9 -0
- package/lib/css/CssGenerator.js +1 -1
- package/lib/css/CssLoadingRuntimeModule.js +13 -6
- package/lib/css/CssModulesPlugin.js +42 -14
- package/lib/css/CssParser.js +12 -0
- package/lib/dependencies/ConstDependency.js +2 -2
- package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +19 -0
- package/lib/dependencies/ImportParserPlugin.js +25 -1
- package/lib/dependencies/JsonExportsDependency.js +1 -1
- package/lib/ids/SyncModuleIdsPlugin.js +1 -0
- package/lib/javascript/BasicEvaluatedExpression.js +23 -15
- package/lib/javascript/CommonJsChunkFormatPlugin.js +6 -2
- package/lib/javascript/JavascriptModulesPlugin.js +1 -0
- package/lib/javascript/JavascriptParser.js +118 -58
- package/lib/javascript/JavascriptParserHelpers.js +37 -15
- package/lib/json/JsonData.js +2 -2
- package/lib/json/JsonParser.js +25 -12
- package/lib/node/ReadFileCompileAsyncWasmPlugin.js +2 -1
- package/lib/optimize/AggressiveMergingPlugin.js +8 -0
- package/lib/optimize/AggressiveSplittingPlugin.js +9 -2
- package/lib/optimize/EnsureChunkConditionsPlugin.js +3 -0
- package/lib/optimize/FlagIncludedChunksPlugin.js +11 -5
- package/lib/optimize/InnerGraph.js +4 -4
- package/lib/optimize/LimitChunkCountPlugin.js +29 -4
- package/lib/optimize/MangleExportsPlugin.js +1 -1
- package/lib/optimize/MinMaxSizeWarning.js +5 -0
- package/lib/optimize/ModuleConcatenationPlugin.js +59 -2
- package/lib/optimize/RealContentHashPlugin.js +80 -30
- package/lib/optimize/RemoveParentModulesPlugin.js +6 -0
- package/lib/optimize/RuntimeChunkPlugin.js +9 -1
- package/lib/optimize/SideEffectsFlagPlugin.js +10 -1
- package/lib/optimize/SplitChunksPlugin.js +71 -31
- package/lib/performance/SizeLimitsPlugin.js +7 -4
- package/lib/prefetch/ChunkPrefetchFunctionRuntimeModule.js +3 -1
- package/lib/prefetch/ChunkPrefetchPreloadPlugin.js +3 -1
- package/lib/prefetch/ChunkPrefetchStartupRuntimeModule.js +5 -2
- package/lib/prefetch/ChunkPrefetchTriggerRuntimeModule.js +3 -1
- package/lib/prefetch/ChunkPreloadTriggerRuntimeModule.js +3 -1
- package/lib/rules/BasicEffectRulePlugin.js +4 -0
- package/lib/rules/BasicMatcherRulePlugin.js +5 -0
- package/lib/rules/RuleSetCompiler.js +3 -3
- package/lib/rules/UseEffectRulePlugin.js +6 -4
- package/lib/runtime/AsyncModuleRuntimeModule.js +4 -1
- package/lib/runtime/AutoPublicPathRuntimeModule.js +3 -1
- package/lib/runtime/BaseUriRuntimeModule.js +2 -2
- package/lib/runtime/CompatGetDefaultExportRuntimeModule.js +4 -1
- package/lib/runtime/CompatRuntimeModule.js +6 -1
- package/lib/runtime/CreateFakeNamespaceObjectRuntimeModule.js +4 -1
- package/lib/runtime/CreateScriptRuntimeModule.js +3 -1
- package/lib/runtime/CreateScriptUrlRuntimeModule.js +3 -1
- package/lib/runtime/DefinePropertyGettersRuntimeModule.js +4 -1
- package/lib/runtime/EnsureChunkRuntimeModule.js +14 -3
- package/lib/runtime/GetChunkFilenameRuntimeModule.js +5 -9
- package/lib/runtime/GetFullHashRuntimeModule.js +3 -2
- package/lib/runtime/GetMainFilenameRuntimeModule.js +4 -1
- package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +3 -1
- package/lib/runtime/HasOwnPropertyRuntimeModule.js +4 -1
- package/lib/runtime/LoadScriptRuntimeModule.js +63 -47
- package/lib/runtime/MakeNamespaceObjectRuntimeModule.js +4 -1
- package/lib/runtime/OnChunksLoadedRuntimeModule.js +3 -1
- package/lib/runtime/PublicPathRuntimeModule.js +3 -1
- package/lib/runtime/RelativeUrlRuntimeModule.js +4 -1
- package/lib/runtime/RuntimeIdRuntimeModule.js +5 -1
- package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +8 -2
- package/lib/runtime/StartupEntrypointRuntimeModule.js +2 -1
- package/lib/serialization/BinaryMiddleware.js +143 -1
- package/lib/serialization/ErrorObjectSerializer.js +3 -0
- package/lib/serialization/ObjectMiddleware.js +9 -3
- package/lib/serialization/types.js +1 -1
- package/lib/sharing/ConsumeSharedFallbackDependency.js +3 -0
- package/lib/sharing/ConsumeSharedRuntimeModule.js +13 -4
- package/lib/sharing/ProvideSharedDependency.js +11 -0
- package/lib/sharing/ProvideSharedModule.js +4 -0
- package/lib/sharing/ProvideSharedPlugin.js +22 -21
- package/lib/sharing/ShareRuntimeModule.js +11 -4
- package/lib/sharing/resolveMatchedConfigs.js +1 -1
- package/lib/sharing/utils.js +32 -5
- package/lib/util/AsyncQueue.js +4 -2
- package/lib/util/ParallelismFactorCalculator.js +10 -0
- package/lib/util/Semaphore.js +1 -1
- package/lib/util/createHash.js +30 -9
- package/lib/util/deprecation.js +10 -3
- package/lib/util/deterministicGrouping.js +50 -11
- package/lib/util/findGraphRoots.js +4 -2
- package/lib/util/memoize.js +3 -3
- package/lib/util/processAsyncTree.js +7 -1
- package/lib/util/registerExternalSerializer.js +1 -1
- package/lib/util/runtime.js +14 -1
- package/lib/util/smartGrouping.js +1 -1
- package/lib/validateSchema.js +6 -2
- package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +5 -1
- package/lib/wasm-async/AsyncWebAssemblyParser.js +7 -3
- package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +13 -6
- package/lib/wasm-sync/WasmFinalizeExportsPlugin.js +3 -1
- package/lib/wasm-sync/WebAssemblyGenerator.js +1 -0
- package/lib/wasm-sync/WebAssemblyParser.js +6 -2
- package/lib/web/JsonpChunkLoadingRuntimeModule.js +13 -3
- package/lib/webpack.js +11 -2
- package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +14 -15
- package/module.d.ts +1 -0
- package/package.json +4 -4
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +51 -5
- package/schemas/plugins/css/CssGeneratorOptions.json +1 -1
- package/schemas/plugins/css/CssParserOptions.json +1 -1
- package/types.d.ts +476 -218
@@ -1145,6 +1145,15 @@
|
|
1145
1145
|
"node-commonjs"
|
1146
1146
|
]
|
1147
1147
|
},
|
1148
|
+
"Falsy": {
|
1149
|
+
"description": "These values will be ignored by webpack and created to be used with '&&' or '||' to improve readability of configurations.",
|
1150
|
+
"cli": {
|
1151
|
+
"exclude": true
|
1152
|
+
},
|
1153
|
+
"enum": [false, 0, "", null],
|
1154
|
+
"undefinedAsNull": true,
|
1155
|
+
"tsType": "false | 0 | '' | null | undefined"
|
1156
|
+
},
|
1148
1157
|
"FileCacheOptions": {
|
1149
1158
|
"description": "Options object for persistent file-based caching.",
|
1150
1159
|
"type": "object",
|
@@ -1632,6 +1641,10 @@
|
|
1632
1641
|
}
|
1633
1642
|
]
|
1634
1643
|
},
|
1644
|
+
"dynamicImportFetchPriority": {
|
1645
|
+
"description": "Specifies global fetchPriority for dynamic import.",
|
1646
|
+
"enum": ["low", "high", "auto", false]
|
1647
|
+
},
|
1635
1648
|
"dynamicImportMode": {
|
1636
1649
|
"description": "Specifies global mode for dynamic import.",
|
1637
1650
|
"enum": ["eager", "weak", "lazy", "lazy-once"]
|
@@ -2472,6 +2485,9 @@
|
|
2472
2485
|
{
|
2473
2486
|
"enum": ["..."]
|
2474
2487
|
},
|
2488
|
+
{
|
2489
|
+
"$ref": "#/definitions/Falsy"
|
2490
|
+
},
|
2475
2491
|
{
|
2476
2492
|
"$ref": "#/definitions/WebpackPluginInstance"
|
2477
2493
|
},
|
@@ -2625,6 +2641,10 @@
|
|
2625
2641
|
{
|
2626
2642
|
"enum": ["initial", "async", "all"]
|
2627
2643
|
},
|
2644
|
+
{
|
2645
|
+
"instanceof": "RegExp",
|
2646
|
+
"tsType": "RegExp"
|
2647
|
+
},
|
2628
2648
|
{
|
2629
2649
|
"instanceof": "Function",
|
2630
2650
|
"tsType": "((chunk: import('../lib/Chunk')) => boolean)"
|
@@ -2872,6 +2892,10 @@
|
|
2872
2892
|
{
|
2873
2893
|
"enum": ["initial", "async", "all"]
|
2874
2894
|
},
|
2895
|
+
{
|
2896
|
+
"instanceof": "RegExp",
|
2897
|
+
"tsType": "RegExp"
|
2898
|
+
},
|
2875
2899
|
{
|
2876
2900
|
"instanceof": "Function",
|
2877
2901
|
"tsType": "((chunk: import('../lib/Chunk')) => boolean)"
|
@@ -2911,6 +2935,10 @@
|
|
2911
2935
|
{
|
2912
2936
|
"enum": ["initial", "async", "all"]
|
2913
2937
|
},
|
2938
|
+
{
|
2939
|
+
"instanceof": "RegExp",
|
2940
|
+
"tsType": "RegExp"
|
2941
|
+
},
|
2914
2942
|
{
|
2915
2943
|
"instanceof": "Function",
|
2916
2944
|
"tsType": "((chunk: import('../lib/Chunk')) => boolean)"
|
@@ -3561,6 +3589,9 @@
|
|
3561
3589
|
"items": {
|
3562
3590
|
"description": "Plugin of type object or instanceof Function.",
|
3563
3591
|
"anyOf": [
|
3592
|
+
{
|
3593
|
+
"$ref": "#/definitions/Falsy"
|
3594
|
+
},
|
3564
3595
|
{
|
3565
3596
|
"$ref": "#/definitions/WebpackPluginInstance"
|
3566
3597
|
},
|
@@ -3911,6 +3942,9 @@
|
|
3911
3942
|
{
|
3912
3943
|
"enum": ["..."]
|
3913
3944
|
},
|
3945
|
+
{
|
3946
|
+
"$ref": "#/definitions/Falsy"
|
3947
|
+
},
|
3914
3948
|
{
|
3915
3949
|
"$ref": "#/definitions/ResolvePluginInstance"
|
3916
3950
|
}
|
@@ -4271,7 +4305,10 @@
|
|
4271
4305
|
"type": "array",
|
4272
4306
|
"items": {
|
4273
4307
|
"description": "A rule.",
|
4274
|
-
"
|
4308
|
+
"anyOf": [
|
4309
|
+
{
|
4310
|
+
"$ref": "#/definitions/Falsy"
|
4311
|
+
},
|
4275
4312
|
{
|
4276
4313
|
"$ref": "#/definitions/RuleSetRule"
|
4277
4314
|
}
|
@@ -4340,7 +4377,10 @@
|
|
4340
4377
|
"type": "array",
|
4341
4378
|
"items": {
|
4342
4379
|
"description": "A rule.",
|
4343
|
-
"
|
4380
|
+
"anyOf": [
|
4381
|
+
{
|
4382
|
+
"$ref": "#/definitions/Falsy"
|
4383
|
+
},
|
4344
4384
|
{
|
4345
4385
|
"$ref": "#/definitions/RuleSetRule"
|
4346
4386
|
}
|
@@ -4393,6 +4433,9 @@
|
|
4393
4433
|
},
|
4394
4434
|
"enum": ["..."]
|
4395
4435
|
},
|
4436
|
+
{
|
4437
|
+
"$ref": "#/definitions/Falsy"
|
4438
|
+
},
|
4396
4439
|
{
|
4397
4440
|
"$ref": "#/definitions/RuleSetRule"
|
4398
4441
|
}
|
@@ -4406,7 +4449,10 @@
|
|
4406
4449
|
"type": "array",
|
4407
4450
|
"items": {
|
4408
4451
|
"description": "An use item.",
|
4409
|
-
"
|
4452
|
+
"anyOf": [
|
4453
|
+
{
|
4454
|
+
"$ref": "#/definitions/Falsy"
|
4455
|
+
},
|
4410
4456
|
{
|
4411
4457
|
"$ref": "#/definitions/RuleSetUseItem"
|
4412
4458
|
}
|
@@ -4415,7 +4461,7 @@
|
|
4415
4461
|
},
|
4416
4462
|
{
|
4417
4463
|
"instanceof": "Function",
|
4418
|
-
"tsType": "((data: { resource: string, realResource: string, resourceQuery: string, issuer: string, compiler: string }) => RuleSetUseItem[])"
|
4464
|
+
"tsType": "((data: { resource: string, realResource: string, resourceQuery: string, issuer: string, compiler: string }) => (Falsy | RuleSetUseItem)[])"
|
4419
4465
|
},
|
4420
4466
|
{
|
4421
4467
|
"$ref": "#/definitions/RuleSetUseItem"
|
@@ -4453,7 +4499,7 @@
|
|
4453
4499
|
},
|
4454
4500
|
{
|
4455
4501
|
"instanceof": "Function",
|
4456
|
-
"tsType": "((data: object) => RuleSetUseItem|RuleSetUseItem[])"
|
4502
|
+
"tsType": "((data: object) => RuleSetUseItem | (Falsy | RuleSetUseItem)[])"
|
4457
4503
|
},
|
4458
4504
|
{
|
4459
4505
|
"$ref": "#/definitions/RuleSetLoader"
|