webpack 5.86.0 → 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/CaseSensitiveModulesWarning.js +3 -1
- package/lib/ChunkGroup.js +1 -0
- package/lib/Compiler.js +3 -1
- package/lib/ConcatenationScope.js +2 -2
- package/lib/ConditionalInitFragment.js +11 -1
- package/lib/ConstPlugin.js +57 -29
- package/lib/FlagEntryExportAsUsedPlugin.js +4 -0
- 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/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 +1 -1
- package/lib/WebpackOptionsDefaulter.js +10 -3
- package/lib/config/defaults.js +31 -2
- package/lib/css/CssModulesPlugin.js +5 -2
- 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/ids/SyncModuleIdsPlugin.js +1 -0
- package/lib/javascript/BasicEvaluatedExpression.js +23 -15
- package/lib/javascript/CommonJsChunkFormatPlugin.js +6 -2
- package/lib/javascript/JavascriptParser.js +118 -58
- package/lib/javascript/JavascriptParserHelpers.js +37 -15
- 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/ObjectMiddleware.js +6 -3
- 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 +39 -5
- package/schemas/plugins/css/CssGeneratorOptions.json +1 -1
- package/schemas/plugins/css/CssParserOptions.json +1 -1
- package/types.d.ts +433 -184
@@ -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
|
},
|
@@ -3573,6 +3589,9 @@
|
|
3573
3589
|
"items": {
|
3574
3590
|
"description": "Plugin of type object or instanceof Function.",
|
3575
3591
|
"anyOf": [
|
3592
|
+
{
|
3593
|
+
"$ref": "#/definitions/Falsy"
|
3594
|
+
},
|
3576
3595
|
{
|
3577
3596
|
"$ref": "#/definitions/WebpackPluginInstance"
|
3578
3597
|
},
|
@@ -3923,6 +3942,9 @@
|
|
3923
3942
|
{
|
3924
3943
|
"enum": ["..."]
|
3925
3944
|
},
|
3945
|
+
{
|
3946
|
+
"$ref": "#/definitions/Falsy"
|
3947
|
+
},
|
3926
3948
|
{
|
3927
3949
|
"$ref": "#/definitions/ResolvePluginInstance"
|
3928
3950
|
}
|
@@ -4283,7 +4305,10 @@
|
|
4283
4305
|
"type": "array",
|
4284
4306
|
"items": {
|
4285
4307
|
"description": "A rule.",
|
4286
|
-
"
|
4308
|
+
"anyOf": [
|
4309
|
+
{
|
4310
|
+
"$ref": "#/definitions/Falsy"
|
4311
|
+
},
|
4287
4312
|
{
|
4288
4313
|
"$ref": "#/definitions/RuleSetRule"
|
4289
4314
|
}
|
@@ -4352,7 +4377,10 @@
|
|
4352
4377
|
"type": "array",
|
4353
4378
|
"items": {
|
4354
4379
|
"description": "A rule.",
|
4355
|
-
"
|
4380
|
+
"anyOf": [
|
4381
|
+
{
|
4382
|
+
"$ref": "#/definitions/Falsy"
|
4383
|
+
},
|
4356
4384
|
{
|
4357
4385
|
"$ref": "#/definitions/RuleSetRule"
|
4358
4386
|
}
|
@@ -4405,6 +4433,9 @@
|
|
4405
4433
|
},
|
4406
4434
|
"enum": ["..."]
|
4407
4435
|
},
|
4436
|
+
{
|
4437
|
+
"$ref": "#/definitions/Falsy"
|
4438
|
+
},
|
4408
4439
|
{
|
4409
4440
|
"$ref": "#/definitions/RuleSetRule"
|
4410
4441
|
}
|
@@ -4418,7 +4449,10 @@
|
|
4418
4449
|
"type": "array",
|
4419
4450
|
"items": {
|
4420
4451
|
"description": "An use item.",
|
4421
|
-
"
|
4452
|
+
"anyOf": [
|
4453
|
+
{
|
4454
|
+
"$ref": "#/definitions/Falsy"
|
4455
|
+
},
|
4422
4456
|
{
|
4423
4457
|
"$ref": "#/definitions/RuleSetUseItem"
|
4424
4458
|
}
|
@@ -4427,7 +4461,7 @@
|
|
4427
4461
|
},
|
4428
4462
|
{
|
4429
4463
|
"instanceof": "Function",
|
4430
|
-
"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)[])"
|
4431
4465
|
},
|
4432
4466
|
{
|
4433
4467
|
"$ref": "#/definitions/RuleSetUseItem"
|
@@ -4465,7 +4499,7 @@
|
|
4465
4499
|
},
|
4466
4500
|
{
|
4467
4501
|
"instanceof": "Function",
|
4468
|
-
"tsType": "((data: object) => RuleSetUseItem|RuleSetUseItem[])"
|
4502
|
+
"tsType": "((data: object) => RuleSetUseItem | (Falsy | RuleSetUseItem)[])"
|
4469
4503
|
},
|
4470
4504
|
{
|
4471
4505
|
"$ref": "#/definitions/RuleSetLoader"
|