webpack 5.99.5 → 5.99.7
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 +1 -1
- package/lib/APIPlugin.js +2 -2
- package/lib/AutomaticPrefetchPlugin.js +21 -22
- package/lib/BannerPlugin.js +31 -35
- package/lib/Cache.js +1 -1
- package/lib/Chunk.js +12 -9
- package/lib/CleanPlugin.js +5 -3
- package/lib/Compilation.js +45 -35
- package/lib/Compiler.js +6 -4
- package/lib/ContextExclusionPlugin.js +4 -2
- package/lib/ContextModule.js +2 -1
- package/lib/ContextReplacementPlugin.js +5 -3
- package/lib/DelegatedPlugin.js +4 -2
- package/lib/DllEntryPlugin.js +4 -2
- package/lib/DllPlugin.js +5 -3
- package/lib/DllReferencePlugin.js +56 -60
- package/lib/DynamicEntryPlugin.js +4 -2
- package/lib/EntryOptionPlugin.js +3 -1
- package/lib/EntryPlugin.js +4 -2
- package/lib/EnvironmentPlugin.js +4 -2
- package/lib/EvalDevToolModulePlugin.js +9 -7
- package/lib/EvalSourceMapDevToolPlugin.js +137 -138
- package/lib/ExternalsPlugin.js +3 -1
- package/lib/FlagDependencyExportsPlugin.js +2 -1
- package/lib/HotModuleReplacementPlugin.js +3 -3
- package/lib/IgnorePlugin.js +6 -4
- package/lib/IgnoreWarningsPlugin.js +4 -2
- package/lib/LibManifestPlugin.js +3 -4
- package/lib/LoaderOptionsPlugin.js +4 -2
- package/lib/LoaderTargetPlugin.js +4 -2
- package/lib/Module.js +29 -14
- package/lib/ModuleFilenameHelpers.js +1 -1
- package/lib/ModuleGraph.js +15 -10
- package/lib/ModuleInfoHeaderPlugin.js +11 -12
- package/lib/MultiCompiler.js +5 -3
- package/lib/NoEmitOnErrorsPlugin.js +5 -3
- package/lib/NormalModule.js +6 -2
- package/lib/NormalModuleReplacementPlugin.js +33 -36
- package/lib/PlatformPlugin.js +3 -1
- package/lib/PrefetchPlugin.js +5 -3
- package/lib/ProgressPlugin.js +23 -26
- package/lib/RecordIdsPlugin.js +73 -103
- package/lib/RuntimePlugin.js +34 -32
- package/lib/SourceMapDevToolPlugin.js +8 -6
- package/lib/Template.js +1 -1
- package/lib/WarnCaseSensitiveModulesPlugin.js +36 -37
- package/lib/WarnNoModeSetPlugin.js +3 -1
- package/lib/WatchIgnorePlugin.js +3 -1
- package/lib/WebpackError.js +11 -3
- package/lib/WebpackOptionsApply.js +22 -5
- package/lib/async-modules/InferAsyncModulesPlugin.js +25 -26
- package/lib/buildChunkGraph.js +7 -2
- package/lib/cache/IdleFileCachePlugin.js +12 -13
- package/lib/cache/MemoryCachePlugin.js +2 -1
- package/lib/cache/MemoryWithGcCachePlugin.js +10 -7
- package/lib/cache/PackFileCacheStrategy.js +13 -21
- package/lib/cache/ResolverCachePlugin.js +22 -22
- package/lib/cli.js +8 -4
- package/lib/config/defaults.js +2 -2
- package/lib/config/normalization.js +9 -3
- package/lib/config/target.js +6 -6
- package/lib/container/ContainerReferencePlugin.js +24 -26
- package/lib/container/ModuleFederationPlugin.js +2 -1
- package/lib/css/CssGenerator.js +1 -1
- package/lib/css/CssModulesPlugin.js +6 -4
- package/lib/css/CssParser.js +1 -1
- package/lib/debug/ProfilingPlugin.js +1 -1
- package/lib/dependencies/ContextDependencyHelpers.js +1 -1
- package/lib/dependencies/CssIcssImportDependency.js +3 -2
- package/lib/dependencies/HarmonyDetectionParserPlugin.js +9 -15
- package/lib/dependencies/HarmonyExportExpressionDependency.js +1 -1
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +2 -1
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +1 -1
- package/lib/dependencies/HarmonyTopLevelThisParserPlugin.js +15 -15
- package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +4 -2
- package/lib/dependencies/JsonExportsDependency.js +1 -1
- package/lib/dependencies/LoaderPlugin.js +5 -3
- package/lib/dependencies/LocalModulesHelpers.js +1 -1
- package/lib/dependencies/RequireContextDependencyParserPlugin.js +46 -46
- package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +94 -100
- package/lib/dependencies/RequireResolveDependency.js +1 -1
- package/lib/dependencies/WorkerPlugin.js +2 -2
- package/lib/esm/ModuleChunkLoadingPlugin.js +76 -57
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +11 -9
- package/lib/hmr/HotModuleReplacement.runtime.js +0 -1
- package/lib/hmr/JavascriptHotModuleReplacement.runtime.js +0 -1
- package/lib/hmr/LazyCompilationPlugin.js +17 -18
- package/lib/ids/ChunkModuleIdRangePlugin.js +6 -6
- package/lib/ids/DeterministicChunkIdsPlugin.js +1 -1
- package/lib/ids/DeterministicModuleIdsPlugin.js +48 -49
- package/lib/ids/HashedModuleIdsPlugin.js +4 -2
- package/lib/ids/NamedChunkIdsPlugin.js +6 -4
- package/lib/ids/NamedModuleIdsPlugin.js +6 -4
- package/lib/ids/NaturalChunkIdsPlugin.js +4 -2
- package/lib/ids/NaturalModuleIdsPlugin.js +4 -2
- package/lib/ids/OccurrenceChunkIdsPlugin.js +4 -2
- package/lib/ids/OccurrenceModuleIdsPlugin.js +4 -2
- package/lib/index.js +1 -1
- package/lib/javascript/BasicEvaluatedExpression.js +2 -2
- package/lib/javascript/JavascriptParser.js +670 -688
- package/lib/library/EnableLibraryPlugin.js +15 -2
- package/lib/library/ModuleLibraryPlugin.js +66 -43
- package/lib/logging/createConsoleLogger.js +0 -1
- package/lib/node/CommonJsChunkLoadingPlugin.js +71 -75
- package/lib/node/NodeEnvironmentPlugin.js +3 -1
- package/lib/node/NodeTemplatePlugin.js +2 -2
- package/lib/node/ReadFileCompileAsyncWasmPlugin.js +2 -2
- package/lib/node/ReadFileCompileWasmPlugin.js +3 -3
- package/lib/optimize/AggressiveMergingPlugin.js +1 -1
- package/lib/optimize/AggressiveSplittingPlugin.js +224 -232
- package/lib/optimize/ConcatenatedModule.js +12 -15
- package/lib/optimize/FlagIncludedChunksPlugin.js +92 -97
- package/lib/optimize/LimitChunkCountPlugin.js +4 -2
- package/lib/optimize/MangleExportsPlugin.js +15 -16
- package/lib/optimize/MinChunkSizePlugin.js +4 -2
- package/lib/optimize/ModuleConcatenationPlugin.js +4 -2
- package/lib/optimize/RealContentHashPlugin.js +4 -2
- package/lib/optimize/RemoveEmptyChunksPlugin.js +5 -3
- package/lib/optimize/RemoveParentModulesPlugin.js +4 -2
- package/lib/optimize/RuntimeChunkPlugin.js +17 -18
- package/lib/optimize/SplitChunksPlugin.js +9 -6
- package/lib/performance/SizeLimitsPlugin.js +3 -1
- package/lib/prefetch/ChunkPrefetchPreloadPlugin.js +61 -62
- package/lib/runtime/GetChunkFilenameRuntimeModule.js +3 -4
- package/lib/runtime/StartupChunkDependenciesPlugin.js +39 -42
- package/lib/schemes/DataUriPlugin.js +5 -3
- package/lib/schemes/FileUriPlugin.js +5 -3
- package/lib/schemes/HttpUriPlugin.js +32 -39
- package/lib/serialization/AggregateErrorSerializer.js +42 -0
- package/lib/serialization/BinaryMiddleware.js +22 -38
- package/lib/serialization/ErrorObjectSerializer.js +7 -2
- package/lib/serialization/FileMiddleware.js +29 -33
- package/lib/serialization/ObjectMiddleware.js +42 -30
- package/lib/serialization/Serializer.js +29 -18
- package/lib/serialization/SerializerMiddleware.js +105 -72
- package/lib/serialization/SingleItemMiddleware.js +4 -5
- package/lib/sharing/ProvideSharedPlugin.js +6 -4
- package/lib/stats/DefaultStatsFactoryPlugin.js +128 -57
- package/lib/stats/DefaultStatsPresetPlugin.js +25 -20
- package/lib/stats/DefaultStatsPrinterPlugin.js +486 -334
- package/lib/stats/StatsFactory.js +47 -10
- package/lib/stats/StatsPrinter.js +52 -31
- package/lib/util/ArrayQueue.js +1 -1
- package/lib/util/AsyncQueue.js +1 -1
- package/lib/util/TupleQueue.js +9 -7
- package/lib/util/TupleSet.js +37 -18
- package/lib/util/WeakTupleMap.js +50 -37
- package/lib/util/cleverMerge.js +2 -2
- package/lib/util/comparators.js +1 -1
- package/lib/util/concatenate.js +4 -2
- package/lib/util/createHash.js +1 -1
- package/lib/util/fs.js +1 -1
- package/lib/util/makeSerializable.js +1 -1
- package/lib/util/runtime.js +1 -0
- package/lib/util/serialization.js +50 -42
- package/lib/wasm-async/AsyncWebAssemblyGenerator.js +1 -1
- package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +1 -1
- package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +2 -2
- package/lib/wasm-sync/WasmFinalizeExportsPlugin.js +55 -57
- package/lib/wasm-sync/WebAssemblyGenerator.js +1 -1
- package/lib/wasm-sync/WebAssemblyModulesPlugin.js +1 -1
- package/lib/web/FetchCompileWasmPlugin.js +2 -2
- package/lib/web/JsonpChunkLoadingPlugin.js +73 -74
- package/lib/webpack.js +1 -1
- package/lib/webworker/ImportScriptsChunkLoadingPlugin.js +77 -78
- package/package.json +4 -3
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +24 -2
- package/types.d.ts +273 -128
package/types.d.ts
CHANGED
@@ -92,10 +92,7 @@ import { JSONSchema4, JSONSchema6, JSONSchema7 } from "json-schema";
|
|
92
92
|
import { ListenOptions, Server } from "net";
|
93
93
|
import { validate as validateFunction } from "schema-utils";
|
94
94
|
import { default as ValidationError } from "schema-utils/declarations/ValidationError";
|
95
|
-
import {
|
96
|
-
Extend,
|
97
|
-
ValidationErrorConfiguration
|
98
|
-
} from "schema-utils/declarations/validate";
|
95
|
+
import { ValidationErrorConfiguration } from "schema-utils/declarations/validate";
|
99
96
|
import {
|
100
97
|
AsArray,
|
101
98
|
AsyncParallelHook,
|
@@ -669,7 +666,15 @@ declare abstract class BasicEvaluatedExpression {
|
|
669
666
|
/**
|
670
667
|
* Gets the compile-time value of the expression
|
671
668
|
*/
|
672
|
-
asCompileTimeValue():
|
669
|
+
asCompileTimeValue():
|
670
|
+
| undefined
|
671
|
+
| null
|
672
|
+
| string
|
673
|
+
| number
|
674
|
+
| bigint
|
675
|
+
| boolean
|
676
|
+
| RegExp
|
677
|
+
| any[];
|
673
678
|
isTruthy(): boolean;
|
674
679
|
isFalsy(): boolean;
|
675
680
|
isNullish(): undefined | boolean;
|
@@ -1116,7 +1121,7 @@ declare class Chunk {
|
|
1116
1121
|
getChildIdsByOrders(
|
1117
1122
|
chunkGraph: ChunkGraph,
|
1118
1123
|
filterFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean
|
1119
|
-
): Record<string,
|
1124
|
+
): Record<string, ChunkId[]>;
|
1120
1125
|
getChildrenOfTypeInOrder(
|
1121
1126
|
chunkGraph: ChunkGraph,
|
1122
1127
|
type: string
|
@@ -1476,6 +1481,7 @@ declare interface ChunkModuleMaps {
|
|
1476
1481
|
id: Record<string | number, (string | number)[]>;
|
1477
1482
|
hash: Record<string | number, string>;
|
1478
1483
|
}
|
1484
|
+
type ChunkName = null | string;
|
1479
1485
|
declare interface ChunkPathData {
|
1480
1486
|
id: string | number;
|
1481
1487
|
name?: string;
|
@@ -1953,8 +1959,8 @@ declare class Compilation {
|
|
1953
1959
|
needAdditionalPass: SyncBailHook<[], boolean | void>;
|
1954
1960
|
childCompiler: SyncHook<[Compiler, string, number]>;
|
1955
1961
|
log: SyncBailHook<[string, LogEntry], boolean | void>;
|
1956
|
-
processWarnings: SyncWaterfallHook<[
|
1957
|
-
processErrors: SyncWaterfallHook<[
|
1962
|
+
processWarnings: SyncWaterfallHook<[Error[]]>;
|
1963
|
+
processErrors: SyncWaterfallHook<[Error[]]>;
|
1958
1964
|
statsPreset: HookMap<
|
1959
1965
|
SyncHook<[Partial<NormalizedStatsOptions>, CreateStatsOptionsContext]>
|
1960
1966
|
>;
|
@@ -1987,8 +1993,8 @@ declare class Compilation {
|
|
1987
1993
|
chunkTemplate: ChunkTemplate;
|
1988
1994
|
runtimeTemplate: RuntimeTemplate;
|
1989
1995
|
moduleTemplates: ModuleTemplates;
|
1990
|
-
moduleMemCaches?: Map<Module, WeakTupleMap<any, any>>;
|
1991
|
-
moduleMemCaches2?: Map<Module, WeakTupleMap<any, any>>;
|
1996
|
+
moduleMemCaches?: Map<Module, WeakTupleMap<any[], any>>;
|
1997
|
+
moduleMemCaches2?: Map<Module, WeakTupleMap<any[], any>>;
|
1992
1998
|
moduleGraph: ModuleGraph;
|
1993
1999
|
chunkGraph: ChunkGraph;
|
1994
2000
|
codeGenerationResults: CodeGenerationResults;
|
@@ -2021,8 +2027,8 @@ declare class Compilation {
|
|
2021
2027
|
additionalChunkAssets: string[];
|
2022
2028
|
assets: CompilationAssets;
|
2023
2029
|
assetsInfo: Map<string, AssetInfo>;
|
2024
|
-
errors:
|
2025
|
-
warnings:
|
2030
|
+
errors: Error[];
|
2031
|
+
warnings: Error[];
|
2026
2032
|
children: Compilation[];
|
2027
2033
|
logging: Map<string, LogEntry[]>;
|
2028
2034
|
dependencyFactories: Map<DepConstructor, ModuleFactory>;
|
@@ -2221,8 +2227,8 @@ declare class Compilation {
|
|
2221
2227
|
filename: TemplatePath,
|
2222
2228
|
data: PathData
|
2223
2229
|
): InterpolatedPathAndAssetInfo;
|
2224
|
-
getWarnings():
|
2225
|
-
getErrors():
|
2230
|
+
getWarnings(): Error[];
|
2231
|
+
getErrors(): Error[];
|
2226
2232
|
|
2227
2233
|
/**
|
2228
2234
|
* This function allows you to run another instance of webpack inside of webpack however as
|
@@ -2696,7 +2702,7 @@ declare interface Configuration {
|
|
2696
2702
|
*/
|
2697
2703
|
module?: RegExp;
|
2698
2704
|
}
|
2699
|
-
| ((warning:
|
2705
|
+
| ((warning: Error, compilation: Compilation) => boolean)
|
2700
2706
|
)[];
|
2701
2707
|
|
2702
2708
|
/**
|
@@ -3073,7 +3079,7 @@ declare interface ContextModuleOptions {
|
|
3073
3079
|
resource: string | false | string[];
|
3074
3080
|
resourceQuery?: string;
|
3075
3081
|
resourceFragment?: string;
|
3076
|
-
resolveOptions
|
3082
|
+
resolveOptions?: ResolveOptions;
|
3077
3083
|
}
|
3078
3084
|
declare class ContextReplacementPlugin {
|
3079
3085
|
constructor(
|
@@ -3114,6 +3120,7 @@ type CreateWriteStreamFSImplementation = FSImplementation & {
|
|
3114
3120
|
write: (...args: any[]) => any;
|
3115
3121
|
close?: (...args: any[]) => any;
|
3116
3122
|
};
|
3123
|
+
declare interface CreatedObject<T, F> {}
|
3117
3124
|
|
3118
3125
|
/**
|
3119
3126
|
* Generator options for css/auto modules.
|
@@ -3165,6 +3172,17 @@ declare interface CssAutoParserOptions {
|
|
3165
3172
|
*/
|
3166
3173
|
url?: boolean;
|
3167
3174
|
}
|
3175
|
+
declare interface CssData {
|
3176
|
+
/**
|
3177
|
+
* whether export __esModule
|
3178
|
+
*/
|
3179
|
+
esModule: boolean;
|
3180
|
+
|
3181
|
+
/**
|
3182
|
+
* the css exports
|
3183
|
+
*/
|
3184
|
+
exports: Map<string, string>;
|
3185
|
+
}
|
3168
3186
|
|
3169
3187
|
/**
|
3170
3188
|
* Generator options for css modules.
|
@@ -3936,8 +3954,9 @@ declare class EnableChunkLoadingPlugin {
|
|
3936
3954
|
static checkEnabled(compiler: Compiler, type: string): void;
|
3937
3955
|
}
|
3938
3956
|
declare class EnableLibraryPlugin {
|
3939
|
-
constructor(type: string);
|
3957
|
+
constructor(type: string, options?: EnableLibraryPluginOptions);
|
3940
3958
|
type: string;
|
3959
|
+
options: EnableLibraryPluginOptions;
|
3941
3960
|
|
3942
3961
|
/**
|
3943
3962
|
* Apply the plugin
|
@@ -3946,6 +3965,12 @@ declare class EnableLibraryPlugin {
|
|
3946
3965
|
static setEnabled(compiler: Compiler, type: string): void;
|
3947
3966
|
static checkEnabled(compiler: Compiler, type: string): void;
|
3948
3967
|
}
|
3968
|
+
declare interface EnableLibraryPluginOptions {
|
3969
|
+
/**
|
3970
|
+
* function that runs when applying the current plugin.
|
3971
|
+
*/
|
3972
|
+
additionalApply?: () => void;
|
3973
|
+
}
|
3949
3974
|
declare class EnableWasmLoadingPlugin {
|
3950
3975
|
constructor(type: string);
|
3951
3976
|
type: string;
|
@@ -4330,6 +4355,7 @@ declare class EvalSourceMapDevToolPlugin {
|
|
4330
4355
|
*/
|
4331
4356
|
apply(compiler: Compiler): void;
|
4332
4357
|
}
|
4358
|
+
type ExcludeModulesType = "module" | "chunk" | "root-of-chunk" | "nested";
|
4333
4359
|
declare interface ExecuteModuleArgument {
|
4334
4360
|
module: Module;
|
4335
4361
|
moduleObject?: ExecuteModuleObject;
|
@@ -7696,19 +7722,97 @@ declare interface KnownAssetInfo {
|
|
7696
7722
|
declare interface KnownBuildInfo {
|
7697
7723
|
cacheable?: boolean;
|
7698
7724
|
parsed?: boolean;
|
7725
|
+
strict?: boolean;
|
7726
|
+
|
7727
|
+
/**
|
7728
|
+
* using in AMD
|
7729
|
+
*/
|
7699
7730
|
moduleArgument?: string;
|
7731
|
+
|
7732
|
+
/**
|
7733
|
+
* using in AMD
|
7734
|
+
*/
|
7700
7735
|
exportsArgument?: string;
|
7701
|
-
|
7736
|
+
|
7737
|
+
/**
|
7738
|
+
* using in CommonJs
|
7739
|
+
*/
|
7702
7740
|
moduleConcatenationBailout?: string;
|
7741
|
+
|
7742
|
+
/**
|
7743
|
+
* using in APIPlugin
|
7744
|
+
*/
|
7745
|
+
needCreateRequire?: boolean;
|
7746
|
+
|
7747
|
+
/**
|
7748
|
+
* using in HttpUriPlugin
|
7749
|
+
*/
|
7750
|
+
resourceIntegrity?: string;
|
7751
|
+
|
7752
|
+
/**
|
7753
|
+
* using in NormalModule
|
7754
|
+
*/
|
7703
7755
|
fileDependencies?: LazySet<string>;
|
7756
|
+
|
7757
|
+
/**
|
7758
|
+
* using in NormalModule
|
7759
|
+
*/
|
7704
7760
|
contextDependencies?: LazySet<string>;
|
7761
|
+
|
7762
|
+
/**
|
7763
|
+
* using in NormalModule
|
7764
|
+
*/
|
7705
7765
|
missingDependencies?: LazySet<string>;
|
7766
|
+
|
7767
|
+
/**
|
7768
|
+
* using in NormalModule
|
7769
|
+
*/
|
7706
7770
|
buildDependencies?: LazySet<string>;
|
7771
|
+
|
7772
|
+
/**
|
7773
|
+
* using in NormalModule
|
7774
|
+
*/
|
7707
7775
|
valueDependencies?: Map<string, string | Set<string>>;
|
7708
|
-
|
7776
|
+
|
7777
|
+
/**
|
7778
|
+
* using in NormalModule
|
7779
|
+
*/
|
7709
7780
|
assets?: Record<string, Source>;
|
7710
|
-
|
7781
|
+
|
7782
|
+
/**
|
7783
|
+
* using in NormalModule
|
7784
|
+
*/
|
7785
|
+
hash?: string;
|
7786
|
+
|
7787
|
+
/**
|
7788
|
+
* using in ContextModule
|
7789
|
+
*/
|
7711
7790
|
snapshot?: null | Snapshot;
|
7791
|
+
|
7792
|
+
/**
|
7793
|
+
* for assets modules
|
7794
|
+
*/
|
7795
|
+
fullContentHash?: string;
|
7796
|
+
|
7797
|
+
/**
|
7798
|
+
* for assets modules
|
7799
|
+
*/
|
7800
|
+
filename?: string;
|
7801
|
+
|
7802
|
+
/**
|
7803
|
+
* for assets modules
|
7804
|
+
*/
|
7805
|
+
assetsInfo?: Map<string, undefined | AssetInfo>;
|
7806
|
+
|
7807
|
+
/**
|
7808
|
+
* for assets modules
|
7809
|
+
*/
|
7810
|
+
dataUrl?: boolean;
|
7811
|
+
|
7812
|
+
/**
|
7813
|
+
* for css modules
|
7814
|
+
*/
|
7815
|
+
cssData?: CssData;
|
7712
7816
|
}
|
7713
7817
|
declare interface KnownBuildMeta {
|
7714
7818
|
exportsType?: "namespace" | "dynamic" | "default" | "flagged";
|
@@ -7757,7 +7861,7 @@ declare interface KnownNormalizedStatsOptions {
|
|
7757
7861
|
excludeModules: ((
|
7758
7862
|
name: string,
|
7759
7863
|
module: StatsModule,
|
7760
|
-
type:
|
7864
|
+
type: ExcludeModulesType
|
7761
7865
|
) => boolean)[];
|
7762
7866
|
warningsFilter: ((warning: StatsError, textValue: string) => boolean)[];
|
7763
7867
|
cachedModules: boolean;
|
@@ -7791,12 +7895,12 @@ declare interface KnownStatsAsset {
|
|
7791
7895
|
comparedForEmit: boolean;
|
7792
7896
|
cached: boolean;
|
7793
7897
|
related?: StatsAsset[];
|
7794
|
-
|
7795
|
-
|
7796
|
-
|
7797
|
-
|
7798
|
-
|
7799
|
-
auxiliaryChunkIdHints?:
|
7898
|
+
chunks?: ChunkId[];
|
7899
|
+
chunkNames?: ChunkName[];
|
7900
|
+
chunkIdHints?: string[];
|
7901
|
+
auxiliaryChunks?: ChunkId[];
|
7902
|
+
auxiliaryChunkNames?: ChunkName[];
|
7903
|
+
auxiliaryChunkIdHints?: string[];
|
7800
7904
|
filteredRelated?: number;
|
7801
7905
|
isOverSizeLimit?: boolean;
|
7802
7906
|
}
|
@@ -7814,7 +7918,7 @@ declare interface KnownStatsChunk {
|
|
7814
7918
|
files: string[];
|
7815
7919
|
auxiliaryFiles: string[];
|
7816
7920
|
hash: string;
|
7817
|
-
childrenByOrder: Record<string,
|
7921
|
+
childrenByOrder: Record<string, ChunkId[]>;
|
7818
7922
|
id?: string | number;
|
7819
7923
|
siblings?: (string | number)[];
|
7820
7924
|
parents?: (string | number)[];
|
@@ -7845,7 +7949,7 @@ declare interface KnownStatsChunkOrigin {
|
|
7845
7949
|
moduleId?: string | number;
|
7846
7950
|
}
|
7847
7951
|
declare interface KnownStatsCompilation {
|
7848
|
-
env?: any
|
7952
|
+
env?: Record<string, any>;
|
7849
7953
|
name?: string;
|
7850
7954
|
hash?: string;
|
7851
7955
|
version?: string;
|
@@ -7868,6 +7972,8 @@ declare interface KnownStatsCompilation {
|
|
7868
7972
|
warningsCount?: number;
|
7869
7973
|
children?: StatsCompilation[];
|
7870
7974
|
logging?: Record<string, StatsLogging>;
|
7975
|
+
filteredWarningDetailsCount?: number;
|
7976
|
+
filteredErrorDetailsCount?: number;
|
7871
7977
|
}
|
7872
7978
|
declare interface KnownStatsError {
|
7873
7979
|
message: string;
|
@@ -7883,6 +7989,8 @@ declare interface KnownStatsError {
|
|
7883
7989
|
moduleTrace?: StatsModuleTraceItem[];
|
7884
7990
|
details?: string;
|
7885
7991
|
stack?: string;
|
7992
|
+
cause?: KnownStatsError;
|
7993
|
+
errors?: KnownStatsError[];
|
7886
7994
|
compilerPath?: string;
|
7887
7995
|
}
|
7888
7996
|
declare interface KnownStatsFactoryContext {
|
@@ -7936,7 +8044,7 @@ declare interface KnownStatsModule {
|
|
7936
8044
|
dependent?: boolean;
|
7937
8045
|
issuer?: null | string;
|
7938
8046
|
issuerName?: null | string;
|
7939
|
-
issuerPath?: StatsModuleIssuer[];
|
8047
|
+
issuerPath?: null | StatsModuleIssuer[];
|
7940
8048
|
failed?: boolean;
|
7941
8049
|
errors?: number;
|
7942
8050
|
warnings?: number;
|
@@ -7982,13 +8090,13 @@ declare interface KnownStatsModuleTraceItem {
|
|
7982
8090
|
originId?: string | number;
|
7983
8091
|
moduleId?: string | number;
|
7984
8092
|
}
|
7985
|
-
declare interface
|
7986
|
-
bold?: (
|
7987
|
-
yellow?: (
|
7988
|
-
red?: (
|
7989
|
-
green?: (
|
7990
|
-
magenta?: (
|
7991
|
-
cyan?: (
|
8093
|
+
declare interface KnownStatsPrinterColorFunctions {
|
8094
|
+
bold?: (value: string | number) => string;
|
8095
|
+
yellow?: (value: string | number) => string;
|
8096
|
+
red?: (value: string | number) => string;
|
8097
|
+
green?: (value: string | number) => string;
|
8098
|
+
magenta?: (value: string | number) => string;
|
8099
|
+
cyan?: (value: string | number) => string;
|
7992
8100
|
}
|
7993
8101
|
declare interface KnownStatsPrinterContext {
|
7994
8102
|
type?: string;
|
@@ -8173,6 +8281,20 @@ declare interface LazyCompilationOptions {
|
|
8173
8281
|
*/
|
8174
8282
|
test?: string | RegExp | ((module: Module) => boolean);
|
8175
8283
|
}
|
8284
|
+
type LazyFunction<
|
8285
|
+
InputValue,
|
8286
|
+
OutputValue,
|
8287
|
+
InternalLazyTarget extends SerializerMiddleware<
|
8288
|
+
any,
|
8289
|
+
any,
|
8290
|
+
Record<string, any>
|
8291
|
+
>,
|
8292
|
+
InternalLazyOptions extends undefined | LazyOptions
|
8293
|
+
> = (() => InputValue | Promise<InputValue>) &
|
8294
|
+
Partial<{ options: InternalLazyOptions }>;
|
8295
|
+
declare interface LazyOptions {
|
8296
|
+
[index: string]: any;
|
8297
|
+
}
|
8176
8298
|
declare class LazySet<T> {
|
8177
8299
|
constructor(iterable?: Iterable<T>);
|
8178
8300
|
get size(): number;
|
@@ -9340,14 +9462,20 @@ declare class ModuleGraph {
|
|
9340
9462
|
getMetaIfExisting(thing: object): any;
|
9341
9463
|
freeze(cacheStage?: string): void;
|
9342
9464
|
unfreeze(): void;
|
9343
|
-
cached<T,
|
9344
|
-
fn: (moduleGraph: ModuleGraph, ...args: T[]) =>
|
9465
|
+
cached<T, R>(
|
9466
|
+
fn: (moduleGraph: ModuleGraph, ...args: T[]) => R,
|
9345
9467
|
...args: T[]
|
9346
|
-
):
|
9468
|
+
): R;
|
9347
9469
|
setModuleMemCaches(
|
9348
|
-
moduleMemCaches: Map<Module, WeakTupleMap<any, any>>
|
9470
|
+
moduleMemCaches: Map<Module, WeakTupleMap<any[], any>>
|
9349
9471
|
): void;
|
9350
|
-
dependencyCacheProvide
|
9472
|
+
dependencyCacheProvide<D extends Dependency, ARGS extends any[], R>(
|
9473
|
+
dependency: D,
|
9474
|
+
...args: [
|
9475
|
+
ARGS,
|
9476
|
+
...((moduleGraph: ModuleGraph, dependency: D, ...args: ARGS) => R)[]
|
9477
|
+
]
|
9478
|
+
): R;
|
9351
9479
|
static getModuleGraphForModule(
|
9352
9480
|
module: Module,
|
9353
9481
|
deprecateMessage: string,
|
@@ -9413,7 +9541,7 @@ type ModuleInfo = ConcatenatedModuleInfo | ExternalModuleInfo;
|
|
9413
9541
|
declare interface ModuleMemCachesItem {
|
9414
9542
|
buildInfo: BuildInfo;
|
9415
9543
|
references?: WeakMap<Dependency, Module>;
|
9416
|
-
memCache: WeakTupleMap<
|
9544
|
+
memCache: WeakTupleMap<any[], any>;
|
9417
9545
|
}
|
9418
9546
|
|
9419
9547
|
/**
|
@@ -10253,7 +10381,7 @@ declare class NullDependencyTemplate extends DependencyTemplate {
|
|
10253
10381
|
}
|
10254
10382
|
declare interface ObjectDeserializerContext {
|
10255
10383
|
read: () => any;
|
10256
|
-
setCircularReference: (value
|
10384
|
+
setCircularReference: (value: ReferenceableItem) => void;
|
10257
10385
|
}
|
10258
10386
|
declare interface ObjectEncodingOptions {
|
10259
10387
|
encoding?:
|
@@ -10280,11 +10408,14 @@ declare interface ObjectSerializer {
|
|
10280
10408
|
}
|
10281
10409
|
declare interface ObjectSerializerContext {
|
10282
10410
|
write: (value?: any) => void;
|
10283
|
-
setCircularReference: (value
|
10411
|
+
setCircularReference: (value: ReferenceableItem) => void;
|
10284
10412
|
snapshot: () => ObjectSerializerSnapshot;
|
10285
10413
|
rollback: (snapshot: ObjectSerializerSnapshot) => void;
|
10286
10414
|
writeLazy?: (item?: any) => void;
|
10287
|
-
writeSeparate?: (
|
10415
|
+
writeSeparate?: (
|
10416
|
+
item: any,
|
10417
|
+
obj?: LazyOptions
|
10418
|
+
) => LazyFunction<any, any, any, LazyOptions>;
|
10288
10419
|
}
|
10289
10420
|
declare interface ObjectSerializerSnapshot {
|
10290
10421
|
length: number;
|
@@ -11614,7 +11745,7 @@ declare interface PreparsedAst {
|
|
11614
11745
|
}
|
11615
11746
|
declare interface PrintedElement {
|
11616
11747
|
element: string;
|
11617
|
-
content
|
11748
|
+
content?: string;
|
11618
11749
|
}
|
11619
11750
|
declare interface Problem {
|
11620
11751
|
type: ProblemType;
|
@@ -11639,7 +11770,7 @@ declare class Profiler {
|
|
11639
11770
|
inspector: any;
|
11640
11771
|
hasSession(): boolean;
|
11641
11772
|
startProfiling(): Promise<void> | Promise<[any, any, any]>;
|
11642
|
-
sendCommand(method: string, params
|
11773
|
+
sendCommand(method: string, params?: Record<string, any>): Promise<any>;
|
11643
11774
|
destroy(): Promise<void>;
|
11644
11775
|
stopProfiling(): Promise<{ profile: any }>;
|
11645
11776
|
}
|
@@ -12445,6 +12576,7 @@ type RecursiveArrayOrRecord<T> =
|
|
12445
12576
|
| { [index: string]: RecursiveArrayOrRecord<T> }
|
12446
12577
|
| RecursiveArrayOrRecord<T>[]
|
12447
12578
|
| T;
|
12579
|
+
type ReferenceableItem = string | object;
|
12448
12580
|
declare interface ReferencedExport {
|
12449
12581
|
/**
|
12450
12582
|
* name of the referenced export
|
@@ -14188,31 +14320,36 @@ declare interface ScopeInfo {
|
|
14188
14320
|
inTry: boolean;
|
14189
14321
|
isStrict: boolean;
|
14190
14322
|
isAsmJs: boolean;
|
14191
|
-
|
14192
|
-
/**
|
14193
|
-
* false for unknown state
|
14194
|
-
*/
|
14195
|
-
inExecutedPath: boolean;
|
14196
|
-
terminated?: "return" | "throw";
|
14323
|
+
terminated?: 1 | 2;
|
14197
14324
|
}
|
14198
14325
|
declare interface Selector<A, B> {
|
14199
14326
|
(input: A): undefined | null | B;
|
14200
14327
|
}
|
14201
|
-
declare abstract class Serializer {
|
14202
|
-
serializeMiddlewares: SerializerMiddleware<any, any>[];
|
14203
|
-
deserializeMiddlewares: SerializerMiddleware<any, any>[];
|
14204
|
-
context
|
14205
|
-
serialize(
|
14206
|
-
|
14207
|
-
|
14208
|
-
|
14328
|
+
declare abstract class Serializer<DeserializedValue, SerializedValue, Context> {
|
14329
|
+
serializeMiddlewares: SerializerMiddleware<any, any, any>[];
|
14330
|
+
deserializeMiddlewares: SerializerMiddleware<any, any, any>[];
|
14331
|
+
context?: Context;
|
14332
|
+
serialize<ExtendedContext>(
|
14333
|
+
obj: DeserializedValue | Promise<DeserializedValue>,
|
14334
|
+
context: Context & ExtendedContext
|
14335
|
+
): Promise<SerializedValue>;
|
14336
|
+
deserialize<ExtendedContext>(
|
14337
|
+
value: SerializedValue | Promise<SerializedValue>,
|
14338
|
+
context: Context & ExtendedContext
|
14339
|
+
): Promise<DeserializedValue>;
|
14340
|
+
}
|
14341
|
+
declare abstract class SerializerMiddleware<
|
14342
|
+
DeserializedType,
|
14343
|
+
SerializedType,
|
14344
|
+
Context
|
14345
|
+
> {
|
14209
14346
|
serialize(
|
14210
14347
|
data: DeserializedType,
|
14211
|
-
context
|
14348
|
+
context: Context
|
14212
14349
|
): null | SerializedType | Promise<SerializedType>;
|
14213
14350
|
deserialize(
|
14214
14351
|
data: SerializedType,
|
14215
|
-
context
|
14352
|
+
context: Context
|
14216
14353
|
): DeserializedType | Promise<DeserializedType>;
|
14217
14354
|
}
|
14218
14355
|
declare class SharePlugin {
|
@@ -14840,11 +14977,11 @@ type StatsCompilation = KnownStatsCompilation & Record<string, any>;
|
|
14840
14977
|
type StatsError = KnownStatsError & Record<string, any>;
|
14841
14978
|
declare abstract class StatsFactory {
|
14842
14979
|
hooks: StatsFactoryHooks;
|
14843
|
-
create(
|
14980
|
+
create<FactoryData, FallbackCreatedObject>(
|
14844
14981
|
type: string,
|
14845
|
-
data:
|
14982
|
+
data: FactoryData,
|
14846
14983
|
baseContext: Omit<StatsFactoryContext, "type">
|
14847
|
-
):
|
14984
|
+
): CreatedObject<FactoryData, FallbackCreatedObject>;
|
14848
14985
|
}
|
14849
14986
|
type StatsFactoryContext = KnownStatsFactoryContext & Record<string, any>;
|
14850
14987
|
declare interface StatsFactoryHooks {
|
@@ -15047,11 +15184,21 @@ declare interface StatsOptions {
|
|
15047
15184
|
*/
|
15048
15185
|
env?: boolean;
|
15049
15186
|
|
15187
|
+
/**
|
15188
|
+
* Add cause to errors.
|
15189
|
+
*/
|
15190
|
+
errorCause?: boolean | "auto";
|
15191
|
+
|
15050
15192
|
/**
|
15051
15193
|
* Add details to errors (like resolving log).
|
15052
15194
|
*/
|
15053
15195
|
errorDetails?: boolean | "auto";
|
15054
15196
|
|
15197
|
+
/**
|
15198
|
+
* Add nested errors to errors (like in AggregateError).
|
15199
|
+
*/
|
15200
|
+
errorErrors?: boolean | "auto";
|
15201
|
+
|
15055
15202
|
/**
|
15056
15203
|
* Add internal stack trace to errors.
|
15057
15204
|
*/
|
@@ -15341,23 +15488,32 @@ declare interface StatsOptions {
|
|
15341
15488
|
declare interface StatsPrintHooks {
|
15342
15489
|
sortElements: HookMap<SyncBailHook<[string[], StatsPrinterContext], void>>;
|
15343
15490
|
printElements: HookMap<
|
15344
|
-
SyncBailHook<
|
15491
|
+
SyncBailHook<
|
15492
|
+
[PrintedElement[], StatsPrinterContext],
|
15493
|
+
undefined | string | void
|
15494
|
+
>
|
15345
15495
|
>;
|
15346
15496
|
sortItems: HookMap<
|
15347
15497
|
SyncBailHook<[any[], StatsPrinterContext], boolean | void>
|
15348
15498
|
>;
|
15349
15499
|
getItemName: HookMap<SyncBailHook<[any, StatsPrinterContext], string | void>>;
|
15350
15500
|
printItems: HookMap<
|
15351
|
-
SyncBailHook<[string[], StatsPrinterContext],
|
15501
|
+
SyncBailHook<[string[], StatsPrinterContext], undefined | string>
|
15502
|
+
>;
|
15503
|
+
print: HookMap<
|
15504
|
+
SyncBailHook<[any, StatsPrinterContext], undefined | string | void>
|
15352
15505
|
>;
|
15353
|
-
print: HookMap<SyncBailHook<[any, StatsPrinterContext], string | void>>;
|
15354
15506
|
result: HookMap<SyncWaterfallHook<[string, StatsPrinterContext]>>;
|
15355
15507
|
}
|
15356
15508
|
declare abstract class StatsPrinter {
|
15357
15509
|
hooks: StatsPrintHooks;
|
15358
|
-
print(
|
15510
|
+
print(
|
15511
|
+
type: string,
|
15512
|
+
object?: any,
|
15513
|
+
baseContext?: StatsPrinterContext
|
15514
|
+
): undefined | string;
|
15359
15515
|
}
|
15360
|
-
type StatsPrinterContext =
|
15516
|
+
type StatsPrinterContext = KnownStatsPrinterColorFunctions &
|
15361
15517
|
KnownStatsPrinterFormatters &
|
15362
15518
|
KnownStatsPrinterContext &
|
15363
15519
|
Record<string, any>;
|
@@ -15413,12 +15569,6 @@ declare const TRANSITIVE_ONLY: unique symbol;
|
|
15413
15569
|
declare interface TagData {
|
15414
15570
|
[index: string]: any;
|
15415
15571
|
}
|
15416
|
-
|
15417
|
-
/**
|
15418
|
-
* Helper function for joining two ranges into a single range. This is useful
|
15419
|
-
* when working with AST nodes, as it allows you to combine the ranges of child nodes
|
15420
|
-
* to create the range of the _parent node_.
|
15421
|
-
*/
|
15422
15572
|
declare interface TagInfo {
|
15423
15573
|
tag: symbol;
|
15424
15574
|
data?: TagData;
|
@@ -15675,12 +15825,12 @@ declare abstract class Watching {
|
|
15675
15825
|
resume(): void;
|
15676
15826
|
close(callback: CallbackFunction_1<void>): void;
|
15677
15827
|
}
|
15678
|
-
declare abstract class WeakTupleMap<
|
15679
|
-
set(...args: [
|
15680
|
-
has(...args:
|
15681
|
-
get(...args:
|
15682
|
-
provide(...args: [
|
15683
|
-
delete(...args:
|
15828
|
+
declare abstract class WeakTupleMap<K extends any[], V> {
|
15829
|
+
set(...args: [K, ...V[]]): void;
|
15830
|
+
has(...args: K): boolean;
|
15831
|
+
get(...args: K): undefined | V;
|
15832
|
+
provide(...args: [K, ...((...args: K) => V)[]]): V;
|
15833
|
+
delete(...args: K): void;
|
15684
15834
|
clear(): void;
|
15685
15835
|
}
|
15686
15836
|
declare interface WebAssemblyRenderContext {
|
@@ -15726,7 +15876,7 @@ declare class WebpackError extends Error {
|
|
15726
15876
|
/**
|
15727
15877
|
* Creates an instance of WebpackError.
|
15728
15878
|
*/
|
15729
|
-
constructor(message?: string);
|
15879
|
+
constructor(message?: string, options?: { cause?: unknown });
|
15730
15880
|
[index: number]: () => string;
|
15731
15881
|
details?: string;
|
15732
15882
|
module?: null | Module;
|
@@ -15736,6 +15886,7 @@ declare class WebpackError extends Error {
|
|
15736
15886
|
file?: string;
|
15737
15887
|
serialize(__0: ObjectSerializerContext): void;
|
15738
15888
|
deserialize(__0: ObjectDeserializerContext): void;
|
15889
|
+
cause: any;
|
15739
15890
|
|
15740
15891
|
/**
|
15741
15892
|
* Create .stack property on a target object
|
@@ -15873,10 +16024,7 @@ declare interface WebpackOptionsNormalized {
|
|
15873
16024
|
/**
|
15874
16025
|
* Ignore specific warnings.
|
15875
16026
|
*/
|
15876
|
-
ignoreWarnings?: ((
|
15877
|
-
warning: WebpackError,
|
15878
|
-
compilation: Compilation
|
15879
|
-
) => boolean)[];
|
16027
|
+
ignoreWarnings?: ((warning: Error, compilation: Compilation) => boolean)[];
|
15880
16028
|
|
15881
16029
|
/**
|
15882
16030
|
* Options for infrastructure level logging.
|
@@ -16186,42 +16334,39 @@ declare namespace exports {
|
|
16186
16334
|
export namespace cli {
|
16187
16335
|
export let getArguments: (
|
16188
16336
|
schema?:
|
16189
|
-
| (JSONSchema4 &
|
16190
|
-
|
16191
|
-
|
16192
|
-
|
16193
|
-
|
16194
|
-
|
16195
|
-
|
16196
|
-
|
16197
|
-
|
16198
|
-
|
16199
|
-
|
16200
|
-
|
16201
|
-
|
16202
|
-
|
16203
|
-
|
16204
|
-
|
16205
|
-
|
16206
|
-
|
16207
|
-
|
16208
|
-
|
16209
|
-
|
16210
|
-
|
16211
|
-
|
16212
|
-
|
16213
|
-
|
16214
|
-
|
16215
|
-
|
16216
|
-
|
16217
|
-
|
16218
|
-
|
16219
|
-
|
16220
|
-
|
16221
|
-
|
16222
|
-
resetDescription?: string;
|
16223
|
-
};
|
16224
|
-
})
|
16337
|
+
| (JSONSchema4 & {
|
16338
|
+
absolutePath: boolean;
|
16339
|
+
instanceof: string;
|
16340
|
+
cli: {
|
16341
|
+
helper?: boolean;
|
16342
|
+
exclude?: boolean;
|
16343
|
+
description?: string;
|
16344
|
+
negatedDescription?: string;
|
16345
|
+
resetDescription?: string;
|
16346
|
+
};
|
16347
|
+
})
|
16348
|
+
| (JSONSchema6 & {
|
16349
|
+
absolutePath: boolean;
|
16350
|
+
instanceof: string;
|
16351
|
+
cli: {
|
16352
|
+
helper?: boolean;
|
16353
|
+
exclude?: boolean;
|
16354
|
+
description?: string;
|
16355
|
+
negatedDescription?: string;
|
16356
|
+
resetDescription?: string;
|
16357
|
+
};
|
16358
|
+
})
|
16359
|
+
| (JSONSchema7 & {
|
16360
|
+
absolutePath: boolean;
|
16361
|
+
instanceof: string;
|
16362
|
+
cli: {
|
16363
|
+
helper?: boolean;
|
16364
|
+
exclude?: boolean;
|
16365
|
+
description?: string;
|
16366
|
+
negatedDescription?: string;
|
16367
|
+
resetDescription?: string;
|
16368
|
+
};
|
16369
|
+
})
|
16225
16370
|
) => Flags;
|
16226
16371
|
export let processArguments: (
|
16227
16372
|
args: Flags,
|
@@ -16647,11 +16792,11 @@ declare namespace exports {
|
|
16647
16792
|
) => void;
|
16648
16793
|
export const registerNotSerializable: (Constructor: Constructor) => void;
|
16649
16794
|
export const NOT_SERIALIZABLE: object;
|
16650
|
-
export const buffersSerializer: Serializer
|
16651
|
-
export let createFileSerializer: (
|
16795
|
+
export const buffersSerializer: Serializer<any, any, any>;
|
16796
|
+
export let createFileSerializer: <D, S, C>(
|
16652
16797
|
fs: IntermediateFileSystem,
|
16653
16798
|
hashFunction: string | typeof Hash
|
16654
|
-
) => Serializer
|
16799
|
+
) => Serializer<D, S, C>;
|
16655
16800
|
export { MEASURE_START_OPERATION, MEASURE_END_OPERATION };
|
16656
16801
|
}
|
16657
16802
|
export const cleverMerge: <T, O>(
|