webpack 5.86.0 → 5.88.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 +1 -1
- package/lib/AsyncDependenciesBlock.js +3 -3
- package/lib/CaseSensitiveModulesWarning.js +3 -1
- package/lib/ChunkGraph.js +4 -4
- package/lib/ChunkGroup.js +10 -3
- package/lib/CompatibilityPlugin.js +50 -30
- package/lib/Compilation.js +2 -1
- 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/ContextModule.js +4 -1
- package/lib/ContextReplacementPlugin.js +13 -0
- package/lib/DelegatedModule.js +15 -3
- package/lib/DelegatedModuleFactoryPlugin.js +6 -0
- package/lib/Dependency.js +11 -5
- package/lib/DllEntryPlugin.js +11 -1
- package/lib/DllReferencePlugin.js +13 -1
- package/lib/Entrypoint.js +1 -1
- package/lib/ErrorHelpers.js +1 -0
- package/lib/EvalSourceMapDevToolPlugin.js +4 -0
- package/lib/ExportsInfo.js +17 -3
- package/lib/ExportsInfoApiPlugin.js +14 -5
- package/lib/ExternalModule.js +5 -0
- package/lib/FlagAllModulesAsUsedPlugin.js +6 -1
- package/lib/FlagDependencyUsagePlugin.js +3 -1
- package/lib/FlagEntryExportAsUsedPlugin.js +4 -0
- package/lib/HotModuleReplacementPlugin.js +8 -0
- package/lib/InitFragment.js +28 -5
- package/lib/JavascriptMetaInfoPlugin.js +11 -6
- package/lib/LibManifestPlugin.js +20 -4
- package/lib/Module.js +7 -2
- 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/ModuleProfile.js +1 -0
- package/lib/ModuleRestoreError.js +2 -0
- package/lib/ModuleStoreError.js +2 -1
- package/lib/ModuleTypeConstants.js +7 -0
- package/lib/MultiWatching.js +4 -0
- package/lib/NodeStuffPlugin.js +32 -6
- package/lib/ProvidePlugin.js +13 -4
- package/lib/RawModule.js +3 -1
- package/lib/RequireJsStuffPlugin.js +7 -0
- package/lib/RuntimeGlobals.js +5 -0
- package/lib/RuntimeModule.js +3 -3
- package/lib/RuntimePlugin.js +6 -3
- package/lib/RuntimeTemplate.js +22 -4
- package/lib/SourceMapDevToolModuleOptionsPlugin.js +4 -0
- package/lib/SourceMapDevToolPlugin.js +7 -2
- package/lib/UseStrictPlugin.js +10 -3
- package/lib/WebpackError.js +6 -5
- package/lib/WebpackIsIncludedPlugin.js +6 -4
- package/lib/WebpackOptionsApply.js +1 -1
- package/lib/WebpackOptionsDefaulter.js +10 -3
- package/lib/asset/AssetGenerator.js +2 -1
- package/lib/asset/AssetParser.js +11 -6
- package/lib/asset/AssetSourceParser.js +8 -3
- package/lib/async-modules/AwaitDependenciesInitFragment.js +4 -0
- package/lib/cache/IdleFileCachePlugin.js +2 -1
- package/lib/cache/PackFileCacheStrategy.js +35 -14
- package/lib/config/browserslistTargetHandler.js +7 -7
- package/lib/config/defaults.js +43 -26
- package/lib/container/RemoteRuntimeModule.js +1 -1
- package/lib/css/CssLoadingRuntimeModule.js +30 -13
- package/lib/css/CssModulesPlugin.js +5 -2
- package/lib/css/CssParser.js +22 -0
- package/lib/dependencies/AMDDefineDependency.js +34 -4
- package/lib/dependencies/AMDDefineDependencyParserPlugin.js +5 -0
- package/lib/dependencies/AMDRuntimeModules.js +2 -2
- package/lib/dependencies/CommonJsExportsParserPlugin.js +14 -4
- package/lib/dependencies/CommonJsImportsParserPlugin.js +169 -59
- package/lib/dependencies/CommonJsPlugin.js +13 -8
- package/lib/dependencies/CommonJsRequireContextDependency.js +2 -2
- package/lib/dependencies/ConstDependency.js +2 -2
- package/lib/dependencies/ContextDependency.js +7 -2
- package/lib/dependencies/CssImportDependency.js +1 -1
- package/lib/dependencies/CssLocalIdentifierDependency.js +5 -0
- package/lib/dependencies/CssUrlDependency.js +3 -3
- package/lib/dependencies/DllEntryDependency.js +5 -0
- package/lib/dependencies/DynamicExports.js +10 -6
- package/lib/dependencies/ExportsInfoDependency.js +14 -4
- package/lib/dependencies/HarmonyCompatibilityDependency.js +2 -1
- package/lib/dependencies/HarmonyDetectionParserPlugin.js +3 -1
- package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +12 -5
- package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +2 -0
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +4 -4
- package/lib/dependencies/HarmonyExports.js +9 -5
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +32 -17
- package/lib/dependencies/HarmonyImportSideEffectDependency.js +1 -2
- package/lib/dependencies/HarmonyImportSpecifierDependency.js +19 -9
- package/lib/dependencies/HarmonyTopLevelThisParserPlugin.js +15 -3
- package/lib/dependencies/ImportDependency.js +5 -3
- package/lib/dependencies/ImportEagerDependency.js +5 -3
- package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +19 -0
- package/lib/dependencies/ImportMetaPlugin.js +31 -15
- package/lib/dependencies/ImportParserPlugin.js +62 -25
- package/lib/dependencies/ImportWeakDependency.js +5 -3
- package/lib/dependencies/ModuleDependency.js +1 -1
- package/lib/dependencies/ModuleDependencyTemplateAsId.js +2 -1
- package/lib/dependencies/ProvidedDependency.js +4 -1
- package/lib/dependencies/RequireContextDependencyParserPlugin.js +13 -5
- package/lib/dependencies/RequireEnsureDependenciesBlock.js +5 -2
- package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +6 -1
- package/lib/dependencies/RequireHeaderDependency.js +4 -0
- package/lib/dependencies/RequireIncludeDependencyParserPlugin.js +26 -5
- package/lib/dependencies/RequireResolveHeaderDependency.js +9 -0
- package/lib/dependencies/SystemPlugin.js +17 -5
- package/lib/dependencies/SystemRuntimeModule.js +1 -1
- package/lib/dependencies/URLDependency.js +2 -2
- package/lib/dependencies/URLPlugin.js +9 -4
- package/lib/dependencies/WebAssemblyImportDependency.js +1 -1
- package/lib/dependencies/WorkerPlugin.js +59 -22
- package/lib/esm/ExportWebpackRequireRuntimeModule.js +1 -1
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +1 -1
- package/lib/hmr/HotModuleReplacementRuntimeModule.js +1 -1
- package/lib/ids/HashedModuleIdsPlugin.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/JavascriptParser.js +135 -63
- package/lib/javascript/JavascriptParserHelpers.js +37 -15
- package/lib/logging/runtime.js +1 -1
- package/lib/logging/truncateArgs.js +4 -0
- package/lib/node/ReadFileChunkLoadingRuntimeModule.js +10 -6
- package/lib/node/RequireChunkLoadingRuntimeModule.js +10 -6
- package/lib/optimize/InnerGraph.js +1 -1
- package/lib/optimize/InnerGraphPlugin.js +2 -1
- package/lib/performance/SizeLimitsPlugin.js +7 -4
- package/lib/prefetch/ChunkPrefetchFunctionRuntimeModule.js +4 -2
- package/lib/prefetch/ChunkPrefetchPreloadPlugin.js +3 -1
- package/lib/prefetch/ChunkPrefetchStartupRuntimeModule.js +6 -3
- package/lib/prefetch/ChunkPrefetchTriggerRuntimeModule.js +4 -2
- package/lib/prefetch/ChunkPreloadTriggerRuntimeModule.js +4 -2
- 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 +8 -5
- package/lib/runtime/AutoPublicPathRuntimeModule.js +4 -2
- package/lib/runtime/BaseUriRuntimeModule.js +3 -3
- package/lib/runtime/ChunkNameRuntimeModule.js +1 -1
- package/lib/runtime/CompatGetDefaultExportRuntimeModule.js +5 -2
- package/lib/runtime/CompatRuntimeModule.js +7 -2
- package/lib/runtime/CreateFakeNamespaceObjectRuntimeModule.js +5 -2
- package/lib/runtime/CreateScriptRuntimeModule.js +4 -2
- package/lib/runtime/CreateScriptUrlRuntimeModule.js +4 -2
- package/lib/runtime/DefinePropertyGettersRuntimeModule.js +5 -2
- package/lib/runtime/EnsureChunkRuntimeModule.js +15 -4
- package/lib/runtime/GetChunkFilenameRuntimeModule.js +6 -10
- package/lib/runtime/GetFullHashRuntimeModule.js +4 -3
- package/lib/runtime/GetMainFilenameRuntimeModule.js +5 -2
- package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +4 -2
- package/lib/runtime/GlobalRuntimeModule.js +1 -1
- package/lib/runtime/HasOwnPropertyRuntimeModule.js +5 -2
- package/lib/runtime/LoadScriptRuntimeModule.js +64 -48
- package/lib/runtime/MakeNamespaceObjectRuntimeModule.js +5 -2
- package/lib/runtime/NonceRuntimeModule.js +1 -1
- package/lib/runtime/OnChunksLoadedRuntimeModule.js +4 -2
- package/lib/runtime/PublicPathRuntimeModule.js +4 -2
- package/lib/runtime/RelativeUrlRuntimeModule.js +5 -2
- package/lib/runtime/RuntimeIdRuntimeModule.js +6 -2
- package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +9 -3
- package/lib/runtime/StartupEntrypointRuntimeModule.js +3 -2
- package/lib/runtime/SystemContextRuntimeModule.js +1 -1
- package/lib/serialization/ObjectMiddleware.js +6 -3
- package/lib/sharing/ConsumeSharedFallbackDependency.js +3 -0
- package/lib/sharing/ConsumeSharedRuntimeModule.js +14 -5
- 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 +12 -5
- 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 +6 -2
- package/lib/wasm-async/AsyncWebAssemblyParser.js +7 -3
- package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +14 -7
- 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 +14 -4
- package/lib/webpack.js +11 -2
- package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +15 -16
- package/module.d.ts +1 -0
- package/package.json +5 -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 +519 -222
@@ -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"
|