webpack 5.37.0 → 5.39.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 -8
- package/bin/webpack.js +20 -5
- package/lib/AsyncDependencyToInitialChunkError.js +0 -2
- package/lib/CacheFacade.js +3 -3
- package/lib/CaseSensitiveModulesWarning.js +0 -2
- package/lib/Chunk.js +8 -5
- package/lib/ChunkRenderError.js +0 -2
- package/lib/CodeGenerationError.js +0 -2
- package/lib/CommentCompilationWarning.js +0 -2
- package/lib/Compilation.js +43 -55
- package/lib/Compiler.js +7 -4
- package/lib/ConcatenationScope.js +2 -1
- package/lib/ConcurrentCompilationError.js +0 -2
- package/lib/ContextModule.js +5 -4
- package/lib/ContextModuleFactory.js +3 -1
- package/lib/ContextReplacementPlugin.js +4 -3
- package/lib/DefinePlugin.js +16 -12
- package/lib/DllReferencePlugin.js +0 -2
- package/lib/EntryPlugin.js +3 -3
- package/lib/EvalSourceMapDevToolPlugin.js +3 -1
- package/lib/ExportsInfo.js +20 -13
- package/lib/FileSystemInfo.js +24 -30
- package/lib/FlagDependencyExportsPlugin.js +8 -7
- package/lib/FlagDependencyUsagePlugin.js +2 -4
- package/lib/HarmonyLinkingError.js +0 -2
- package/lib/HookWebpackError.js +0 -1
- package/lib/HotModuleReplacementPlugin.js +27 -32
- package/lib/InvalidDependenciesModuleWarning.js +0 -2
- package/lib/JavascriptMetaInfoPlugin.js +2 -1
- package/lib/MainTemplate.js +2 -3
- package/lib/ModuleBuildError.js +0 -2
- package/lib/ModuleDependencyError.js +0 -2
- package/lib/ModuleDependencyWarning.js +0 -2
- package/lib/ModuleError.js +0 -2
- package/lib/ModuleFilenameHelpers.js +4 -2
- package/lib/ModuleGraphConnection.js +6 -2
- package/lib/ModuleInfoHeaderPlugin.js +2 -3
- package/lib/ModuleNotFoundError.js +0 -2
- package/lib/ModuleParseError.js +0 -2
- package/lib/ModuleRestoreError.js +0 -2
- package/lib/ModuleStoreError.js +0 -2
- package/lib/ModuleWarning.js +0 -2
- package/lib/MultiCompiler.js +31 -27
- package/lib/NoModeWarning.js +0 -2
- package/lib/NormalModule.js +26 -8
- package/lib/NormalModuleFactory.js +2 -0
- package/lib/RecordIdsPlugin.js +5 -4
- package/lib/ResolverFactory.js +10 -7
- package/lib/SourceMapDevToolPlugin.js +13 -14
- package/lib/Template.js +4 -2
- package/lib/UnsupportedFeatureWarning.js +0 -2
- package/lib/WarnDeprecatedOptionPlugin.js +0 -2
- package/lib/Watching.js +91 -47
- package/lib/WebpackError.js +0 -2
- package/lib/asset/AssetGenerator.js +46 -29
- package/lib/asset/AssetModulesPlugin.js +1 -1
- package/lib/buildChunkGraph.js +21 -21
- package/lib/cache/PackFileCacheStrategy.js +12 -9
- package/lib/config/defaults.js +21 -10
- package/lib/config/normalization.js +8 -7
- package/lib/config/target.js +7 -2
- package/lib/debug/ProfilingPlugin.js +4 -3
- package/lib/dependencies/AMDRequireDependency.js +3 -3
- package/lib/dependencies/CommonJsExportRequireDependency.js +2 -3
- package/lib/dependencies/CommonJsExportsParserPlugin.js +3 -1
- package/lib/dependencies/CommonJsImportsParserPlugin.js +2 -4
- package/lib/dependencies/CommonJsPlugin.js +8 -7
- package/lib/dependencies/CommonJsRequireContextDependency.js +2 -1
- package/lib/dependencies/ContextDependencyHelpers.js +10 -8
- package/lib/dependencies/ContextElementDependency.js +6 -1
- package/lib/dependencies/CriticalDependencyWarning.js +0 -2
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +11 -13
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +2 -4
- package/lib/dependencies/HarmonyImportSpecifierDependency.js +4 -11
- package/lib/dependencies/ImportDependency.js +3 -3
- package/lib/dependencies/ImportParserPlugin.js +3 -4
- package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +2 -3
- package/lib/dependencies/RequireEnsureDependency.js +3 -3
- package/lib/dependencies/RequireIncludeDependencyParserPlugin.js +0 -2
- package/lib/dependencies/SystemPlugin.js +0 -2
- package/lib/dependencies/WorkerDependency.js +6 -6
- package/lib/dependencies/WorkerPlugin.js +18 -19
- package/lib/errors/BuildCycleError.js +0 -1
- package/lib/hmr/LazyCompilationPlugin.js +9 -5
- package/lib/ids/HashedModuleIdsPlugin.js +3 -3
- package/lib/ids/OccurrenceModuleIdsPlugin.js +2 -3
- package/lib/index.js +5 -3
- package/lib/javascript/ArrayPushCallbackChunkFormatPlugin.js +4 -6
- package/lib/javascript/CommonJsChunkFormatPlugin.js +2 -3
- package/lib/javascript/JavascriptGenerator.js +3 -1
- package/lib/javascript/JavascriptModulesPlugin.js +15 -23
- package/lib/javascript/JavascriptParser.js +10 -8
- package/lib/library/AssignLibraryPlugin.js +4 -2
- package/lib/node/NodeEnvironmentPlugin.js +1 -0
- package/lib/node/NodeWatchFileSystem.js +19 -4
- package/lib/optimize/AggressiveSplittingPlugin.js +5 -4
- package/lib/optimize/ConcatenatedModule.js +31 -27
- package/lib/optimize/FlagIncludedChunksPlugin.js +4 -6
- package/lib/optimize/InnerGraph.js +9 -11
- package/lib/optimize/InnerGraphPlugin.js +3 -1
- package/lib/optimize/ModuleConcatenationPlugin.js +7 -10
- package/lib/optimize/RealContentHashPlugin.js +14 -16
- package/lib/optimize/SideEffectsFlagPlugin.js +6 -5
- package/lib/optimize/SplitChunksPlugin.js +13 -15
- package/lib/performance/AssetsOverSizeLimitWarning.js +0 -2
- package/lib/performance/EntrypointsOverSizeLimitWarning.js +0 -2
- package/lib/performance/NoAsyncChunksWarning.js +0 -2
- package/lib/runtime/EnsureChunkRuntimeModule.js +9 -8
- package/lib/runtime/LoadScriptRuntimeModule.js +2 -3
- package/lib/runtime/OnChunksLoadedRuntimeModule.js +38 -37
- package/lib/schemes/DataUriPlugin.js +21 -2
- package/lib/serialization/BinaryMiddleware.js +5 -3
- package/lib/serialization/FileMiddleware.js +3 -1
- package/lib/serialization/ObjectMiddleware.js +11 -7
- package/lib/stats/DefaultStatsFactoryPlugin.js +7 -7
- package/lib/stats/DefaultStatsPrinterPlugin.js +11 -9
- package/lib/stats/StatsFactory.js +2 -1
- package/lib/stats/StatsPrinter.js +3 -3
- package/lib/util/LazyBucketSortedSet.js +3 -3
- package/lib/util/cleverMerge.js +3 -1
- package/lib/util/comparators.js +13 -13
- package/lib/util/createHash.js +5 -4
- package/lib/util/identifier.js +2 -1
- package/lib/util/serialization.js +108 -59
- package/lib/validateSchema.js +5 -3
- package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +4 -4
- package/lib/wasm-sync/UnsupportedWebAssemblyFeatureError.js +0 -2
- package/lib/wasm-sync/WasmFinalizeExportsPlugin.js +5 -4
- package/lib/wasm-sync/WebAssemblyGenerator.js +89 -83
- package/lib/wasm-sync/WebAssemblyInInitialChunkError.js +0 -2
- package/lib/wasm-sync/WebAssemblyModulesPlugin.js +2 -1
- package/lib/wasm-sync/WebAssemblyParser.js +6 -5
- package/lib/web/JsonpChunkLoadingRuntimeModule.js +2 -4
- package/lib/webpack.js +11 -7
- package/package.json +9 -6
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +76 -60
- package/types.d.ts +112 -262
- package/lib/util/DataURI.js +0 -32
@@ -3391,40 +3391,13 @@
|
|
3391
3391
|
{
|
3392
3392
|
"type": "string"
|
3393
3393
|
},
|
3394
|
-
{
|
3395
|
-
"type": "object",
|
3396
|
-
"additionalProperties": false,
|
3397
|
-
"properties": {
|
3398
|
-
"and": {
|
3399
|
-
"description": "Logical AND.",
|
3400
|
-
"oneOf": [
|
3401
|
-
{
|
3402
|
-
"$ref": "#/definitions/RuleSetConditions"
|
3403
|
-
}
|
3404
|
-
]
|
3405
|
-
},
|
3406
|
-
"not": {
|
3407
|
-
"description": "Logical NOT.",
|
3408
|
-
"oneOf": [
|
3409
|
-
{
|
3410
|
-
"$ref": "#/definitions/RuleSetConditions"
|
3411
|
-
}
|
3412
|
-
]
|
3413
|
-
},
|
3414
|
-
"or": {
|
3415
|
-
"description": "Logical OR.",
|
3416
|
-
"oneOf": [
|
3417
|
-
{
|
3418
|
-
"$ref": "#/definitions/RuleSetConditions"
|
3419
|
-
}
|
3420
|
-
]
|
3421
|
-
}
|
3422
|
-
}
|
3423
|
-
},
|
3424
3394
|
{
|
3425
3395
|
"instanceof": "Function",
|
3426
3396
|
"tsType": "((value: string) => boolean)"
|
3427
3397
|
},
|
3398
|
+
{
|
3399
|
+
"$ref": "#/definitions/RuleSetLogicalConditions"
|
3400
|
+
},
|
3428
3401
|
{
|
3429
3402
|
"$ref": "#/definitions/RuleSetConditions"
|
3430
3403
|
}
|
@@ -3444,40 +3417,13 @@
|
|
3444
3417
|
"type": "string",
|
3445
3418
|
"absolutePath": true
|
3446
3419
|
},
|
3447
|
-
{
|
3448
|
-
"type": "object",
|
3449
|
-
"additionalProperties": false,
|
3450
|
-
"properties": {
|
3451
|
-
"and": {
|
3452
|
-
"description": "Logical AND.",
|
3453
|
-
"oneOf": [
|
3454
|
-
{
|
3455
|
-
"$ref": "#/definitions/RuleSetConditionsAbsolute"
|
3456
|
-
}
|
3457
|
-
]
|
3458
|
-
},
|
3459
|
-
"not": {
|
3460
|
-
"description": "Logical NOT.",
|
3461
|
-
"oneOf": [
|
3462
|
-
{
|
3463
|
-
"$ref": "#/definitions/RuleSetConditionsAbsolute"
|
3464
|
-
}
|
3465
|
-
]
|
3466
|
-
},
|
3467
|
-
"or": {
|
3468
|
-
"description": "Logical OR.",
|
3469
|
-
"oneOf": [
|
3470
|
-
{
|
3471
|
-
"$ref": "#/definitions/RuleSetConditionsAbsolute"
|
3472
|
-
}
|
3473
|
-
]
|
3474
|
-
}
|
3475
|
-
}
|
3476
|
-
},
|
3477
3420
|
{
|
3478
3421
|
"instanceof": "Function",
|
3479
3422
|
"tsType": "((value: string) => boolean)"
|
3480
3423
|
},
|
3424
|
+
{
|
3425
|
+
"$ref": "#/definitions/RuleSetLogicalConditionsAbsolute"
|
3426
|
+
},
|
3481
3427
|
{
|
3482
3428
|
"$ref": "#/definitions/RuleSetConditionsAbsolute"
|
3483
3429
|
}
|
@@ -3551,6 +3497,68 @@
|
|
3551
3497
|
}
|
3552
3498
|
]
|
3553
3499
|
},
|
3500
|
+
"RuleSetLogicalConditions": {
|
3501
|
+
"description": "Logic operators used in a condition matcher.",
|
3502
|
+
"type": "object",
|
3503
|
+
"additionalProperties": false,
|
3504
|
+
"properties": {
|
3505
|
+
"and": {
|
3506
|
+
"description": "Logical AND.",
|
3507
|
+
"oneOf": [
|
3508
|
+
{
|
3509
|
+
"$ref": "#/definitions/RuleSetConditions"
|
3510
|
+
}
|
3511
|
+
]
|
3512
|
+
},
|
3513
|
+
"not": {
|
3514
|
+
"description": "Logical NOT.",
|
3515
|
+
"oneOf": [
|
3516
|
+
{
|
3517
|
+
"$ref": "#/definitions/RuleSetCondition"
|
3518
|
+
}
|
3519
|
+
]
|
3520
|
+
},
|
3521
|
+
"or": {
|
3522
|
+
"description": "Logical OR.",
|
3523
|
+
"oneOf": [
|
3524
|
+
{
|
3525
|
+
"$ref": "#/definitions/RuleSetConditions"
|
3526
|
+
}
|
3527
|
+
]
|
3528
|
+
}
|
3529
|
+
}
|
3530
|
+
},
|
3531
|
+
"RuleSetLogicalConditionsAbsolute": {
|
3532
|
+
"description": "Logic operators used in a condition matcher.",
|
3533
|
+
"type": "object",
|
3534
|
+
"additionalProperties": false,
|
3535
|
+
"properties": {
|
3536
|
+
"and": {
|
3537
|
+
"description": "Logical AND.",
|
3538
|
+
"oneOf": [
|
3539
|
+
{
|
3540
|
+
"$ref": "#/definitions/RuleSetConditionsAbsolute"
|
3541
|
+
}
|
3542
|
+
]
|
3543
|
+
},
|
3544
|
+
"not": {
|
3545
|
+
"description": "Logical NOT.",
|
3546
|
+
"oneOf": [
|
3547
|
+
{
|
3548
|
+
"$ref": "#/definitions/RuleSetConditionAbsolute"
|
3549
|
+
}
|
3550
|
+
]
|
3551
|
+
},
|
3552
|
+
"or": {
|
3553
|
+
"description": "Logical OR.",
|
3554
|
+
"oneOf": [
|
3555
|
+
{
|
3556
|
+
"$ref": "#/definitions/RuleSetConditionsAbsolute"
|
3557
|
+
}
|
3558
|
+
]
|
3559
|
+
}
|
3560
|
+
}
|
3561
|
+
},
|
3554
3562
|
"RuleSetRule": {
|
3555
3563
|
"description": "A rule description with conditions and effects for modules.",
|
3556
3564
|
"type": "object",
|
@@ -3720,6 +3728,14 @@
|
|
3720
3728
|
]
|
3721
3729
|
}
|
3722
3730
|
},
|
3731
|
+
"scheme": {
|
3732
|
+
"description": "Match module scheme.",
|
3733
|
+
"oneOf": [
|
3734
|
+
{
|
3735
|
+
"$ref": "#/definitions/RuleSetConditionOrConditions"
|
3736
|
+
}
|
3737
|
+
]
|
3738
|
+
},
|
3723
3739
|
"sideEffects": {
|
3724
3740
|
"description": "Flags a module as with or without side effects.",
|
3725
3741
|
"type": "boolean"
|