webpack 5.89.0 → 5.90.1
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 +3 -0
- package/bin/webpack.js +1 -3
- package/hot/log.js +0 -2
- package/lib/APIPlugin.js +17 -13
- package/lib/ChunkGraph.js +1 -1
- package/lib/CleanPlugin.js +12 -12
- package/lib/Compilation.js +26 -17
- package/lib/Compiler.js +13 -0
- package/lib/ConcatenationScope.js +2 -2
- package/lib/ConditionalInitFragment.js +3 -3
- package/lib/ContextModule.js +4 -4
- package/lib/ContextModuleFactory.js +1 -1
- package/lib/DefinePlugin.js +47 -26
- package/lib/DependencyTemplate.js +3 -1
- package/lib/EnvironmentNotSupportAsyncWarning.js +52 -0
- package/lib/EvalDevToolModulePlugin.js +1 -1
- package/lib/EvalSourceMapDevToolPlugin.js +2 -2
- package/lib/ExportsInfoApiPlugin.js +2 -2
- package/lib/ExternalModule.js +47 -12
- package/lib/ExternalModuleFactoryPlugin.js +1 -1
- package/lib/FileSystemInfo.js +20 -3
- package/lib/FlagDependencyExportsPlugin.js +1 -1
- package/lib/Generator.js +1 -0
- package/lib/HotModuleReplacementPlugin.js +3 -3
- package/lib/InitFragment.js +7 -7
- package/lib/LibManifestPlugin.js +4 -1
- package/lib/Module.js +2 -1
- package/lib/ModuleFilenameHelpers.js +1 -1
- package/lib/ModuleInfoHeaderPlugin.js +1 -1
- package/lib/MultiStats.js +2 -2
- package/lib/NodeStuffPlugin.js +48 -0
- package/lib/NormalModule.js +13 -11
- package/lib/NormalModuleFactory.js +7 -7
- package/lib/RuntimeTemplate.js +15 -11
- package/lib/SourceMapDevToolPlugin.js +2 -2
- package/lib/Stats.js +4 -0
- package/lib/WebpackOptionsApply.js +4 -3
- package/lib/asset/AssetModulesPlugin.js +2 -3
- package/lib/async-modules/AwaitDependenciesInitFragment.js +2 -2
- package/lib/buildChunkGraph.js +53 -0
- package/lib/cache/AddManagedPathsPlugin.js +6 -1
- package/lib/cache/IdleFileCachePlugin.js +12 -5
- package/lib/cache/PackFileCacheStrategy.js +3 -3
- package/lib/cache/ResolverCachePlugin.js +2 -2
- package/lib/config/browserslistTargetHandler.js +35 -14
- package/lib/config/defaults.js +88 -52
- package/lib/config/normalization.js +17 -18
- package/lib/config/target.js +5 -0
- package/lib/container/ContainerReferencePlugin.js +1 -1
- package/lib/css/CssExportsGenerator.js +14 -1
- package/lib/css/CssGenerator.js +14 -1
- package/lib/css/CssLoadingRuntimeModule.js +23 -23
- package/lib/css/CssModulesPlugin.js +68 -32
- package/lib/css/CssParser.js +8 -3
- package/lib/debug/ProfilingPlugin.js +2 -2
- package/lib/dependencies/AMDDefineDependency.js +4 -4
- package/lib/dependencies/AMDDefineDependencyParserPlugin.js +126 -34
- package/lib/dependencies/AMDPlugin.js +11 -4
- package/lib/dependencies/AMDRequireArrayDependency.js +13 -1
- package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +159 -43
- package/lib/dependencies/AMDRequireDependency.js +2 -2
- package/lib/dependencies/AMDRequireItemDependency.js +1 -1
- package/lib/dependencies/CachedConstDependency.js +8 -1
- package/lib/dependencies/CommonJsImportsParserPlugin.js +1 -1
- package/lib/dependencies/ContextElementDependency.js +1 -1
- package/lib/dependencies/ExternalModuleDependency.js +107 -0
- package/lib/dependencies/ExternalModuleInitFragment.js +131 -0
- package/lib/dependencies/HarmonyAcceptDependency.js +1 -1
- package/lib/dependencies/HarmonyDetectionParserPlugin.js +7 -1
- package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +18 -18
- package/lib/dependencies/HarmonyExportInitFragment.js +6 -6
- package/lib/dependencies/HarmonyImportDependency.js +4 -4
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +6 -6
- package/lib/dependencies/ImportDependency.js +26 -6
- package/lib/dependencies/JsonExportsDependency.js +1 -1
- package/lib/dependencies/LoaderPlugin.js +2 -1
- package/lib/dependencies/LocalModuleDependency.js +1 -1
- package/lib/dependencies/PureExpressionDependency.js +12 -4
- package/lib/dependencies/RequireIncludeDependency.js +1 -1
- package/lib/dependencies/WebpackIsIncludedDependency.js +1 -1
- package/lib/dependencies/WorkerPlugin.js +10 -3
- package/lib/dependencies/getFunctionExpression.js +2 -2
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +6 -6
- package/lib/hmr/HotModuleReplacement.runtime.js +3 -5
- package/lib/hmr/lazyCompilationBackend.js +4 -4
- package/lib/ids/DeterministicModuleIdsPlugin.js +1 -1
- package/lib/index.js +4 -0
- package/lib/javascript/JavascriptGenerator.js +16 -1
- package/lib/javascript/JavascriptModulesPlugin.js +33 -33
- package/lib/javascript/JavascriptParser.js +220 -74
- package/lib/json/JsonGenerator.js +1 -1
- package/lib/library/AmdLibraryPlugin.js +5 -1
- package/lib/library/AssignLibraryPlugin.js +1 -1
- package/lib/library/SystemLibraryPlugin.js +1 -1
- package/lib/library/UmdLibraryPlugin.js +39 -39
- package/lib/logging/createConsoleLogger.js +1 -19
- package/lib/node/ReadFileChunkLoadingRuntimeModule.js +8 -8
- package/lib/node/RequireChunkLoadingRuntimeModule.js +8 -8
- package/lib/node/nodeConsole.js +1 -5
- package/lib/optimize/ConcatenatedModule.js +7 -7
- package/lib/optimize/InnerGraphPlugin.js +9 -1
- package/lib/optimize/MangleExportsPlugin.js +5 -1
- package/lib/optimize/ModuleConcatenationPlugin.js +2 -2
- package/lib/optimize/RemoveParentModulesPlugin.js +123 -47
- package/lib/optimize/SideEffectsFlagPlugin.js +15 -3
- package/lib/optimize/SplitChunksPlugin.js +16 -16
- package/lib/prefetch/ChunkPrefetchStartupRuntimeModule.js +2 -2
- package/lib/rules/RuleSetCompiler.js +1 -1
- package/lib/runtime/AutoPublicPathRuntimeModule.js +2 -2
- package/lib/runtime/GetChunkFilenameRuntimeModule.js +4 -4
- package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +4 -4
- package/lib/runtime/LoadScriptRuntimeModule.js +2 -2
- package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +23 -22
- package/lib/runtime/StartupEntrypointRuntimeModule.js +2 -2
- package/lib/schemes/HttpUriPlugin.js +1 -1
- package/lib/serialization/FileMiddleware.js +4 -4
- package/lib/serialization/ObjectMiddleware.js +4 -4
- package/lib/sharing/ConsumeSharedPlugin.js +5 -5
- package/lib/sharing/ConsumeSharedRuntimeModule.js +8 -4
- package/lib/sharing/ProvideSharedModule.js +2 -2
- package/lib/sharing/SharePlugin.js +2 -2
- package/lib/sharing/ShareRuntimeModule.js +1 -1
- package/lib/sharing/utils.js +24 -28
- package/lib/stats/DefaultStatsFactoryPlugin.js +10 -10
- package/lib/stats/DefaultStatsPresetPlugin.js +3 -7
- package/lib/stats/DefaultStatsPrinterPlugin.js +34 -31
- package/lib/util/chainedImports.js +7 -6
- package/lib/util/cleverMerge.js +4 -4
- package/lib/util/comparators.js +59 -23
- package/lib/util/hash/xxhash64.js +2 -2
- package/lib/util/identifier.js +2 -2
- package/lib/util/internalSerializables.js +6 -0
- package/lib/util/numberHash.js +64 -52
- package/lib/util/runtime.js +18 -1
- package/lib/util/semver.js +19 -24
- package/lib/util/smartGrouping.js +1 -1
- package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +53 -28
- package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +2 -2
- package/lib/wasm-async/AsyncWebAssemblyParser.js +6 -0
- package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +2 -2
- package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +2 -2
- package/lib/web/JsonpChunkLoadingRuntimeModule.js +13 -13
- package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +6 -6
- package/package.json +25 -80
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +140 -32
- package/schemas/plugins/css/CssAutoGeneratorOptions.check.d.ts +7 -0
- package/schemas/plugins/css/CssAutoGeneratorOptions.check.js +6 -0
- package/schemas/plugins/css/CssAutoGeneratorOptions.json +3 -0
- package/schemas/plugins/css/CssAutoParserOptions.check.d.ts +7 -0
- package/schemas/plugins/css/CssAutoParserOptions.check.js +6 -0
- package/schemas/plugins/css/CssAutoParserOptions.json +3 -0
- package/schemas/plugins/css/CssGeneratorOptions.check.js +1 -1
- package/schemas/plugins/css/CssGlobalGeneratorOptions.check.d.ts +7 -0
- package/schemas/plugins/css/CssGlobalGeneratorOptions.check.js +6 -0
- package/schemas/plugins/css/CssGlobalGeneratorOptions.json +3 -0
- package/schemas/plugins/css/CssGlobalParserOptions.check.d.ts +7 -0
- package/schemas/plugins/css/CssGlobalParserOptions.check.js +6 -0
- package/schemas/plugins/css/CssGlobalParserOptions.json +3 -0
- package/schemas/plugins/css/CssModuleGeneratorOptions.check.d.ts +7 -0
- package/schemas/plugins/css/CssModuleGeneratorOptions.check.js +6 -0
- package/schemas/plugins/css/CssModuleGeneratorOptions.json +3 -0
- package/schemas/plugins/css/CssModuleParserOptions.check.d.ts +7 -0
- package/schemas/plugins/css/CssModuleParserOptions.check.js +6 -0
- package/schemas/plugins/css/CssModuleParserOptions.json +3 -0
- package/schemas/plugins/css/CssParserOptions.check.js +1 -1
- package/types.d.ts +273 -94
package/types.d.ts
CHANGED
@@ -106,6 +106,7 @@ import {
|
|
106
106
|
SyncWaterfallHook
|
107
107
|
} from "tapable";
|
108
108
|
import { SecureContextOptions, TlsOptions } from "tls";
|
109
|
+
import { Context } from "vm";
|
109
110
|
|
110
111
|
declare class AbstractLibraryPlugin<T> {
|
111
112
|
constructor(__0: {
|
@@ -1518,10 +1519,15 @@ declare interface CodeGenerationContext {
|
|
1518
1519
|
chunkGraph: ChunkGraph;
|
1519
1520
|
|
1520
1521
|
/**
|
1521
|
-
* the
|
1522
|
+
* the runtime code should be generated for
|
1522
1523
|
*/
|
1523
1524
|
runtime: RuntimeSpec;
|
1524
1525
|
|
1526
|
+
/**
|
1527
|
+
* the runtimes code should be generated for
|
1528
|
+
*/
|
1529
|
+
runtimes?: RuntimeSpec[];
|
1530
|
+
|
1525
1531
|
/**
|
1526
1532
|
* when in concatenated module, information about other concatenated modules
|
1527
1533
|
*/
|
@@ -1852,7 +1858,7 @@ declare class Compilation {
|
|
1852
1858
|
compilationDependencies: { add: (item?: any) => LazySet<string> };
|
1853
1859
|
getStats(): Stats;
|
1854
1860
|
createStatsOptions(
|
1855
|
-
optionsOrPreset
|
1861
|
+
optionsOrPreset?: string | StatsOptions,
|
1856
1862
|
context?: CreateStatsOptionsContext
|
1857
1863
|
): NormalizedStatsOptions;
|
1858
1864
|
createStatsFactory(options?: any): StatsFactory;
|
@@ -2242,6 +2248,7 @@ declare class Compiler {
|
|
2242
2248
|
recordsOutputPath: null | string;
|
2243
2249
|
records: object;
|
2244
2250
|
managedPaths: Set<string | RegExp>;
|
2251
|
+
unmanagedPaths: Set<string | RegExp>;
|
2245
2252
|
immutablePaths: Set<string | RegExp>;
|
2246
2253
|
modifiedFiles?: ReadonlySet<string>;
|
2247
2254
|
removedFiles?: ReadonlySet<string>;
|
@@ -2882,14 +2889,84 @@ type CreateStatsOptionsContext = KnownCreateStatsOptionsContext &
|
|
2882
2889
|
Record<string, any>;
|
2883
2890
|
|
2884
2891
|
/**
|
2885
|
-
*
|
2892
|
+
* Generator options for css/auto modules.
|
2886
2893
|
*/
|
2887
|
-
declare interface
|
2894
|
+
declare interface CssAutoGeneratorOptions {
|
2888
2895
|
/**
|
2889
2896
|
* Avoid generating and loading a stylesheet and only embed exports from css into output javascript files.
|
2890
2897
|
*/
|
2891
2898
|
exportsOnly?: boolean;
|
2892
2899
|
}
|
2900
|
+
|
2901
|
+
/**
|
2902
|
+
* Parser options for css/auto modules.
|
2903
|
+
*/
|
2904
|
+
declare interface CssAutoParserOptions {
|
2905
|
+
/**
|
2906
|
+
* Use ES modules named export for css exports.
|
2907
|
+
*/
|
2908
|
+
namedExports?: boolean;
|
2909
|
+
}
|
2910
|
+
|
2911
|
+
/**
|
2912
|
+
* Generator options for css modules.
|
2913
|
+
*/
|
2914
|
+
declare interface CssGeneratorOptions {
|
2915
|
+
/**
|
2916
|
+
* Avoid generating and loading a stylesheet and only embed exports from css into output javascript files.
|
2917
|
+
*/
|
2918
|
+
exportsOnly?: boolean;
|
2919
|
+
}
|
2920
|
+
|
2921
|
+
/**
|
2922
|
+
* Generator options for css/global modules.
|
2923
|
+
*/
|
2924
|
+
declare interface CssGlobalGeneratorOptions {
|
2925
|
+
/**
|
2926
|
+
* Avoid generating and loading a stylesheet and only embed exports from css into output javascript files.
|
2927
|
+
*/
|
2928
|
+
exportsOnly?: boolean;
|
2929
|
+
}
|
2930
|
+
|
2931
|
+
/**
|
2932
|
+
* Parser options for css/global modules.
|
2933
|
+
*/
|
2934
|
+
declare interface CssGlobalParserOptions {
|
2935
|
+
/**
|
2936
|
+
* Use ES modules named export for css exports.
|
2937
|
+
*/
|
2938
|
+
namedExports?: boolean;
|
2939
|
+
}
|
2940
|
+
|
2941
|
+
/**
|
2942
|
+
* Generator options for css/module modules.
|
2943
|
+
*/
|
2944
|
+
declare interface CssModuleGeneratorOptions {
|
2945
|
+
/**
|
2946
|
+
* Avoid generating and loading a stylesheet and only embed exports from css into output javascript files.
|
2947
|
+
*/
|
2948
|
+
exportsOnly?: boolean;
|
2949
|
+
}
|
2950
|
+
|
2951
|
+
/**
|
2952
|
+
* Parser options for css/module modules.
|
2953
|
+
*/
|
2954
|
+
declare interface CssModuleParserOptions {
|
2955
|
+
/**
|
2956
|
+
* Use ES modules named export for css exports.
|
2957
|
+
*/
|
2958
|
+
namedExports?: boolean;
|
2959
|
+
}
|
2960
|
+
|
2961
|
+
/**
|
2962
|
+
* Parser options for css modules.
|
2963
|
+
*/
|
2964
|
+
declare interface CssParserOptions {
|
2965
|
+
/**
|
2966
|
+
* Use ES modules named export for css exports.
|
2967
|
+
*/
|
2968
|
+
namedExports?: boolean;
|
2969
|
+
}
|
2893
2970
|
type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration;
|
2894
2971
|
declare class DefinePlugin {
|
2895
2972
|
/**
|
@@ -3065,10 +3142,15 @@ declare interface DependencyTemplateContext {
|
|
3065
3142
|
module: Module;
|
3066
3143
|
|
3067
3144
|
/**
|
3068
|
-
* current
|
3145
|
+
* current runtime, for which code is generated
|
3069
3146
|
*/
|
3070
3147
|
runtime: RuntimeSpec;
|
3071
3148
|
|
3149
|
+
/**
|
3150
|
+
* current runtimes, for which code is generated
|
3151
|
+
*/
|
3152
|
+
runtimes?: RuntimeSpec[];
|
3153
|
+
|
3072
3154
|
/**
|
3073
3155
|
* mutable array of init fragments for the current module
|
3074
3156
|
*/
|
@@ -3083,6 +3165,11 @@ declare interface DependencyTemplateContext {
|
|
3083
3165
|
* the code generation results
|
3084
3166
|
*/
|
3085
3167
|
codeGenerationResults: CodeGenerationResults;
|
3168
|
+
|
3169
|
+
/**
|
3170
|
+
* chunkInitFragments
|
3171
|
+
*/
|
3172
|
+
chunkInitFragments: InitFragment<GenerateContext>[];
|
3086
3173
|
}
|
3087
3174
|
declare abstract class DependencyTemplates {
|
3088
3175
|
get(dependency: DependencyConstructor): undefined | DependencyTemplate;
|
@@ -3154,13 +3241,6 @@ declare interface DeterministicModuleIdsPluginOptions {
|
|
3154
3241
|
*/
|
3155
3242
|
failOnConflict?: boolean;
|
3156
3243
|
}
|
3157
|
-
|
3158
|
-
/**
|
3159
|
-
* Options for the webpack-dev-server.
|
3160
|
-
*/
|
3161
|
-
declare interface DevServer {
|
3162
|
-
[index: string]: any;
|
3163
|
-
}
|
3164
3244
|
declare class DllPlugin {
|
3165
3245
|
constructor(options: DllPluginOptions);
|
3166
3246
|
options: {
|
@@ -3670,6 +3750,11 @@ declare interface Environment {
|
|
3670
3750
|
*/
|
3671
3751
|
arrowFunction?: boolean;
|
3672
3752
|
|
3753
|
+
/**
|
3754
|
+
* The environment supports async function and await ('async function () { await ... }').
|
3755
|
+
*/
|
3756
|
+
asyncFunction?: boolean;
|
3757
|
+
|
3673
3758
|
/**
|
3674
3759
|
* The environment supports BigInt as literal (123n).
|
3675
3760
|
*/
|
@@ -3840,7 +3925,7 @@ declare interface ExperimentsExtra {
|
|
3840
3925
|
/**
|
3841
3926
|
* Enable css support.
|
3842
3927
|
*/
|
3843
|
-
css?: boolean
|
3928
|
+
css?: boolean;
|
3844
3929
|
|
3845
3930
|
/**
|
3846
3931
|
* Compile entrypoints and import()s only when they are accessed.
|
@@ -3861,7 +3946,7 @@ declare interface ExperimentsNormalizedExtra {
|
|
3861
3946
|
/**
|
3862
3947
|
* Enable css support.
|
3863
3948
|
*/
|
3864
|
-
css?:
|
3949
|
+
css?: boolean;
|
3865
3950
|
|
3866
3951
|
/**
|
3867
3952
|
* Compile entrypoints and import()s only when they are accessed.
|
@@ -4525,7 +4610,7 @@ declare interface FileSystem {
|
|
4525
4610
|
| "binary"
|
4526
4611
|
| ((
|
4527
4612
|
arg0?: null | NodeJS.ErrnoException,
|
4528
|
-
arg1?: (string | Buffer)[] |
|
4613
|
+
arg1?: (string | Buffer)[] | Dirent[]
|
4529
4614
|
) => void)
|
4530
4615
|
| ReaddirOptions
|
4531
4616
|
| "utf-8"
|
@@ -4536,7 +4621,7 @@ declare interface FileSystem {
|
|
4536
4621
|
| "buffer",
|
4537
4622
|
arg2?: (
|
4538
4623
|
arg0?: null | NodeJS.ErrnoException,
|
4539
|
-
arg1?: (string | Buffer)[] |
|
4624
|
+
arg1?: (string | Buffer)[] | Dirent[]
|
4540
4625
|
) => void
|
4541
4626
|
) => void;
|
4542
4627
|
readJson?: {
|
@@ -4585,6 +4670,8 @@ declare abstract class FileSystemInfo {
|
|
4585
4670
|
contextTshQueue: AsyncQueue<string, string, null | ContextTimestampAndHash>;
|
4586
4671
|
managedItemQueue: AsyncQueue<string, string, null | string>;
|
4587
4672
|
managedItemDirectoryQueue: AsyncQueue<string, string, Set<string>>;
|
4673
|
+
unmanagedPathsWithSlash: string[];
|
4674
|
+
unmanagedPathsRegExps: RegExp[];
|
4588
4675
|
managedPaths: (string | RegExp)[];
|
4589
4676
|
managedPathsWithSlash: string[];
|
4590
4677
|
managedPathsRegExps: RegExp[];
|
@@ -4698,6 +4785,11 @@ declare interface GenerateContext {
|
|
4698
4785
|
*/
|
4699
4786
|
runtime: RuntimeSpec;
|
4700
4787
|
|
4788
|
+
/**
|
4789
|
+
* the runtimes
|
4790
|
+
*/
|
4791
|
+
runtimes?: RuntimeSpec[];
|
4792
|
+
|
4701
4793
|
/**
|
4702
4794
|
* when in concatenated module, information about other concatenated modules
|
4703
4795
|
*/
|
@@ -4752,6 +4844,26 @@ declare interface GeneratorOptionsByModuleTypeKnown {
|
|
4752
4844
|
*/
|
4753
4845
|
"asset/resource"?: AssetResourceGeneratorOptions;
|
4754
4846
|
|
4847
|
+
/**
|
4848
|
+
* Generator options for css modules.
|
4849
|
+
*/
|
4850
|
+
css?: CssGeneratorOptions;
|
4851
|
+
|
4852
|
+
/**
|
4853
|
+
* Generator options for css/auto modules.
|
4854
|
+
*/
|
4855
|
+
"css/auto"?: CssAutoGeneratorOptions;
|
4856
|
+
|
4857
|
+
/**
|
4858
|
+
* Generator options for css/global modules.
|
4859
|
+
*/
|
4860
|
+
"css/global"?: CssGlobalGeneratorOptions;
|
4861
|
+
|
4862
|
+
/**
|
4863
|
+
* Generator options for css/module modules.
|
4864
|
+
*/
|
4865
|
+
"css/module"?: CssModuleGeneratorOptions;
|
4866
|
+
|
4755
4867
|
/**
|
4756
4868
|
* No generator options are supported for this module type.
|
4757
4869
|
*/
|
@@ -4846,6 +4958,11 @@ declare interface HandleModuleCreationOptions {
|
|
4846
4958
|
* connect the resolved module with the origin module
|
4847
4959
|
*/
|
4848
4960
|
connectOrigin?: boolean;
|
4961
|
+
|
4962
|
+
/**
|
4963
|
+
* check the cycle dependencies of the created module
|
4964
|
+
*/
|
4965
|
+
checkCycle?: boolean;
|
4849
4966
|
}
|
4850
4967
|
declare class HarmonyImportDependency extends ModuleDependency {
|
4851
4968
|
constructor(request: string, sourceOrder: number, assertions?: Assertions);
|
@@ -5121,14 +5238,14 @@ declare interface InfrastructureLogging {
|
|
5121
5238
|
*/
|
5122
5239
|
stream?: NodeJS.WritableStream;
|
5123
5240
|
}
|
5124
|
-
declare abstract class InitFragment<
|
5241
|
+
declare abstract class InitFragment<GenerateContext> {
|
5125
5242
|
content: string | Source;
|
5126
5243
|
stage: number;
|
5127
5244
|
position: number;
|
5128
5245
|
key?: string;
|
5129
5246
|
endContent?: string | Source;
|
5130
|
-
getContent(context:
|
5131
|
-
getEndContent(context:
|
5247
|
+
getContent(context: GenerateContext): string | Source;
|
5248
|
+
getEndContent(context: GenerateContext): undefined | string | Source;
|
5132
5249
|
serialize(context: ObjectSerializerContext): void;
|
5133
5250
|
deserialize(context: ObjectDeserializerContext): void;
|
5134
5251
|
merge: any;
|
@@ -5564,63 +5681,9 @@ declare class JavascriptParser extends Parser {
|
|
5564
5681
|
sourceType: "module" | "auto" | "script";
|
5565
5682
|
scope: ScopeInfo;
|
5566
5683
|
state: ParserState;
|
5567
|
-
comments
|
5568
|
-
semicolons
|
5569
|
-
statementPath:
|
5570
|
-
| UnaryExpression
|
5571
|
-
| ArrayExpression
|
5572
|
-
| ArrowFunctionExpression
|
5573
|
-
| AssignmentExpression
|
5574
|
-
| AwaitExpression
|
5575
|
-
| BinaryExpression
|
5576
|
-
| SimpleCallExpression
|
5577
|
-
| NewExpression
|
5578
|
-
| ChainExpression
|
5579
|
-
| ClassExpression
|
5580
|
-
| ConditionalExpression
|
5581
|
-
| FunctionExpression
|
5582
|
-
| Identifier
|
5583
|
-
| ImportExpression
|
5584
|
-
| SimpleLiteral
|
5585
|
-
| RegExpLiteral
|
5586
|
-
| BigIntLiteral
|
5587
|
-
| LogicalExpression
|
5588
|
-
| MemberExpression
|
5589
|
-
| MetaProperty
|
5590
|
-
| ObjectExpression
|
5591
|
-
| SequenceExpression
|
5592
|
-
| TaggedTemplateExpression
|
5593
|
-
| TemplateLiteral
|
5594
|
-
| ThisExpression
|
5595
|
-
| UpdateExpression
|
5596
|
-
| YieldExpression
|
5597
|
-
| FunctionDeclaration
|
5598
|
-
| VariableDeclaration
|
5599
|
-
| ClassDeclaration
|
5600
|
-
| ExpressionStatement
|
5601
|
-
| BlockStatement
|
5602
|
-
| StaticBlock
|
5603
|
-
| EmptyStatement
|
5604
|
-
| DebuggerStatement
|
5605
|
-
| WithStatement
|
5606
|
-
| ReturnStatement
|
5607
|
-
| LabeledStatement
|
5608
|
-
| BreakStatement
|
5609
|
-
| ContinueStatement
|
5610
|
-
| IfStatement
|
5611
|
-
| SwitchStatement
|
5612
|
-
| ThrowStatement
|
5613
|
-
| TryStatement
|
5614
|
-
| WhileStatement
|
5615
|
-
| DoWhileStatement
|
5616
|
-
| ForStatement
|
5617
|
-
| ForInStatement
|
5618
|
-
| ForOfStatement
|
5619
|
-
| ImportDeclaration
|
5620
|
-
| ExportNamedDeclaration
|
5621
|
-
| ExportDefaultDeclaration
|
5622
|
-
| ExportAllDeclaration
|
5623
|
-
)[];
|
5684
|
+
comments?: Comment[];
|
5685
|
+
semicolons?: Set<number>;
|
5686
|
+
statementPath: StatementPathItem[];
|
5624
5687
|
prevStatement?:
|
5625
5688
|
| UnaryExpression
|
5626
5689
|
| ArrayExpression
|
@@ -5675,8 +5738,9 @@ declare class JavascriptParser extends Parser {
|
|
5675
5738
|
| ExportNamedDeclaration
|
5676
5739
|
| ExportDefaultDeclaration
|
5677
5740
|
| ExportAllDeclaration;
|
5678
|
-
destructuringAssignmentProperties
|
5741
|
+
destructuringAssignmentProperties?: WeakMap<Expression, Set<string>>;
|
5679
5742
|
currentTagData: any;
|
5743
|
+
magicCommentContext: Context;
|
5680
5744
|
destructuringAssignmentPropertiesFor(
|
5681
5745
|
node: Expression
|
5682
5746
|
): undefined | Set<string>;
|
@@ -5915,7 +5979,7 @@ declare class JavascriptParser extends Parser {
|
|
5915
5979
|
blockPreWalkExpressionStatement(statement: ExpressionStatement): void;
|
5916
5980
|
preWalkAssignmentExpression(expression: AssignmentExpression): void;
|
5917
5981
|
blockPreWalkImportDeclaration(statement?: any): void;
|
5918
|
-
enterDeclaration(declaration
|
5982
|
+
enterDeclaration(declaration: Declaration, onIdent?: any): void;
|
5919
5983
|
blockPreWalkExportNamedDeclaration(statement?: any): void;
|
5920
5984
|
walkExportNamedDeclaration(statement: ExportNamedDeclaration): void;
|
5921
5985
|
blockPreWalkExportDefaultDeclaration(statement?: any): void;
|
@@ -5997,16 +6061,20 @@ declare class JavascriptParser extends Parser {
|
|
5997
6061
|
walkCallExpression(expression?: any): void;
|
5998
6062
|
walkMemberExpression(expression: MemberExpression): void;
|
5999
6063
|
walkMemberExpressionWithExpressionName(
|
6000
|
-
expression
|
6001
|
-
name
|
6002
|
-
rootInfo
|
6003
|
-
members
|
6064
|
+
expression: any,
|
6065
|
+
name: string,
|
6066
|
+
rootInfo: string | VariableInfo,
|
6067
|
+
members: string[],
|
6004
6068
|
onUnhandled?: any
|
6005
6069
|
): void;
|
6006
6070
|
walkThisExpression(expression: ThisExpression): void;
|
6007
6071
|
walkIdentifier(expression: Identifier): void;
|
6008
6072
|
walkMetaProperty(metaProperty: MetaProperty): void;
|
6009
|
-
callHooksForExpression
|
6073
|
+
callHooksForExpression<T, R>(
|
6074
|
+
hookMap: HookMap<SyncBailHook<T, R>>,
|
6075
|
+
expr: any,
|
6076
|
+
...args: AsArray<T>
|
6077
|
+
): undefined | R;
|
6010
6078
|
callHooksForExpressionWithFallback<T, R>(
|
6011
6079
|
hookMap: HookMap<SyncBailHook<T, R>>,
|
6012
6080
|
expr: MemberExpression,
|
@@ -6079,8 +6147,29 @@ declare class JavascriptParser extends Parser {
|
|
6079
6147
|
| Directive
|
6080
6148
|
)[]
|
6081
6149
|
): void;
|
6082
|
-
enterPatterns(
|
6083
|
-
|
6150
|
+
enterPatterns(
|
6151
|
+
patterns: (
|
6152
|
+
| Identifier
|
6153
|
+
| MemberExpression
|
6154
|
+
| ObjectPattern
|
6155
|
+
| ArrayPattern
|
6156
|
+
| RestElement
|
6157
|
+
| AssignmentPattern
|
6158
|
+
| Property
|
6159
|
+
)[],
|
6160
|
+
onIdent?: any
|
6161
|
+
): void;
|
6162
|
+
enterPattern(
|
6163
|
+
pattern:
|
6164
|
+
| Identifier
|
6165
|
+
| MemberExpression
|
6166
|
+
| ObjectPattern
|
6167
|
+
| ArrayPattern
|
6168
|
+
| RestElement
|
6169
|
+
| AssignmentPattern
|
6170
|
+
| Property,
|
6171
|
+
onIdent?: any
|
6172
|
+
): void;
|
6084
6173
|
enterIdentifier(pattern: Identifier, onIdent?: any): void;
|
6085
6174
|
enterObjectPattern(pattern: ObjectPattern, onIdent?: any): void;
|
6086
6175
|
enterArrayPattern(pattern: ArrayPattern, onIdent?: any): void;
|
@@ -6127,12 +6216,12 @@ declare class JavascriptParser extends Parser {
|
|
6127
6216
|
| PrivateIdentifier,
|
6128
6217
|
commentsStartPos: number
|
6129
6218
|
): boolean;
|
6130
|
-
getComments(range: [number, number]):
|
6219
|
+
getComments(range: [number, number]): Comment[];
|
6131
6220
|
isAsiPosition(pos: number): boolean;
|
6132
6221
|
unsetAsiPosition(pos: number): void;
|
6133
6222
|
isStatementLevelExpression(expr: Expression): boolean;
|
6134
|
-
getTagData(name
|
6135
|
-
tagVariable(name
|
6223
|
+
getTagData(name: string, tag?: any): any;
|
6224
|
+
tagVariable(name: string, tag?: any, data?: any): void;
|
6136
6225
|
defineVariable(name: string): void;
|
6137
6226
|
undefineVariable(name: string): void;
|
6138
6227
|
isVariableDefined(name: string): boolean;
|
@@ -6823,7 +6912,7 @@ declare interface LazyCompilationDefaultBackendOptions {
|
|
6823
6912
|
/**
|
6824
6913
|
* Specifies where to listen to from the server.
|
6825
6914
|
*/
|
6826
|
-
listen?: number | ListenOptions | ((server:
|
6915
|
+
listen?: number | ListenOptions | ((server: Server) => void);
|
6827
6916
|
|
6828
6917
|
/**
|
6829
6918
|
* Specifies the protocol the client should use to connect to the server.
|
@@ -6836,7 +6925,7 @@ declare interface LazyCompilationDefaultBackendOptions {
|
|
6836
6925
|
server?:
|
6837
6926
|
| ServerOptionsImport<typeof IncomingMessage>
|
6838
6927
|
| ServerOptionsHttps<typeof IncomingMessage, typeof ServerResponse>
|
6839
|
-
| (() =>
|
6928
|
+
| (() => Server);
|
6840
6929
|
}
|
6841
6930
|
|
6842
6931
|
/**
|
@@ -8317,12 +8406,12 @@ declare interface NodeOptions {
|
|
8317
8406
|
/**
|
8318
8407
|
* Include a polyfill for the '__dirname' variable.
|
8319
8408
|
*/
|
8320
|
-
__dirname?: boolean | "warn-mock" | "mock" | "eval-only";
|
8409
|
+
__dirname?: boolean | "warn-mock" | "mock" | "node-module" | "eval-only";
|
8321
8410
|
|
8322
8411
|
/**
|
8323
8412
|
* Include a polyfill for the '__filename' variable.
|
8324
8413
|
*/
|
8325
|
-
__filename?: boolean | "warn-mock" | "mock" | "eval-only";
|
8414
|
+
__filename?: boolean | "warn-mock" | "mock" | "node-module" | "eval-only";
|
8326
8415
|
|
8327
8416
|
/**
|
8328
8417
|
* Include a polyfill for the 'global' variable.
|
@@ -9758,6 +9847,26 @@ declare interface ParserOptionsByModuleTypeKnown {
|
|
9758
9847
|
*/
|
9759
9848
|
"asset/source"?: EmptyParserOptions;
|
9760
9849
|
|
9850
|
+
/**
|
9851
|
+
* Parser options for css modules.
|
9852
|
+
*/
|
9853
|
+
css?: CssParserOptions;
|
9854
|
+
|
9855
|
+
/**
|
9856
|
+
* Parser options for css/auto modules.
|
9857
|
+
*/
|
9858
|
+
"css/auto"?: CssAutoParserOptions;
|
9859
|
+
|
9860
|
+
/**
|
9861
|
+
* Parser options for css/global modules.
|
9862
|
+
*/
|
9863
|
+
"css/global"?: CssGlobalParserOptions;
|
9864
|
+
|
9865
|
+
/**
|
9866
|
+
* Parser options for css/module modules.
|
9867
|
+
*/
|
9868
|
+
"css/module"?: CssModuleParserOptions;
|
9869
|
+
|
9761
9870
|
/**
|
9762
9871
|
* Parser options for javascript modules.
|
9763
9872
|
*/
|
@@ -11263,6 +11372,7 @@ declare abstract class RuntimeTemplate {
|
|
11263
11372
|
isModule(): undefined | boolean;
|
11264
11373
|
supportsConst(): undefined | boolean;
|
11265
11374
|
supportsArrowFunction(): undefined | boolean;
|
11375
|
+
supportsAsyncFunction(): undefined | boolean;
|
11266
11376
|
supportsOptionalChaining(): undefined | boolean;
|
11267
11377
|
supportsForOf(): undefined | boolean;
|
11268
11378
|
supportsDestructuring(): undefined | boolean;
|
@@ -11945,6 +12055,11 @@ declare interface SnapshotOptionsWebpackOptions {
|
|
11945
12055
|
*/
|
11946
12056
|
timestamp?: boolean;
|
11947
12057
|
};
|
12058
|
+
|
12059
|
+
/**
|
12060
|
+
* List of paths that are not managed by a package manager and the contents are subject to change.
|
12061
|
+
*/
|
12062
|
+
unmanagedPaths?: (string | RegExp)[];
|
11948
12063
|
}
|
11949
12064
|
declare abstract class SortableSet<T> extends Set<T> {
|
11950
12065
|
/**
|
@@ -12181,6 +12296,60 @@ type Statement =
|
|
12181
12296
|
| ForStatement
|
12182
12297
|
| ForInStatement
|
12183
12298
|
| ForOfStatement;
|
12299
|
+
type StatementPathItem =
|
12300
|
+
| UnaryExpression
|
12301
|
+
| ArrayExpression
|
12302
|
+
| ArrowFunctionExpression
|
12303
|
+
| AssignmentExpression
|
12304
|
+
| AwaitExpression
|
12305
|
+
| BinaryExpression
|
12306
|
+
| SimpleCallExpression
|
12307
|
+
| NewExpression
|
12308
|
+
| ChainExpression
|
12309
|
+
| ClassExpression
|
12310
|
+
| ConditionalExpression
|
12311
|
+
| FunctionExpression
|
12312
|
+
| Identifier
|
12313
|
+
| ImportExpression
|
12314
|
+
| SimpleLiteral
|
12315
|
+
| RegExpLiteral
|
12316
|
+
| BigIntLiteral
|
12317
|
+
| LogicalExpression
|
12318
|
+
| MemberExpression
|
12319
|
+
| MetaProperty
|
12320
|
+
| ObjectExpression
|
12321
|
+
| SequenceExpression
|
12322
|
+
| TaggedTemplateExpression
|
12323
|
+
| TemplateLiteral
|
12324
|
+
| ThisExpression
|
12325
|
+
| UpdateExpression
|
12326
|
+
| YieldExpression
|
12327
|
+
| FunctionDeclaration
|
12328
|
+
| VariableDeclaration
|
12329
|
+
| ClassDeclaration
|
12330
|
+
| ExpressionStatement
|
12331
|
+
| BlockStatement
|
12332
|
+
| StaticBlock
|
12333
|
+
| EmptyStatement
|
12334
|
+
| DebuggerStatement
|
12335
|
+
| WithStatement
|
12336
|
+
| ReturnStatement
|
12337
|
+
| LabeledStatement
|
12338
|
+
| BreakStatement
|
12339
|
+
| ContinueStatement
|
12340
|
+
| IfStatement
|
12341
|
+
| SwitchStatement
|
12342
|
+
| ThrowStatement
|
12343
|
+
| TryStatement
|
12344
|
+
| WhileStatement
|
12345
|
+
| DoWhileStatement
|
12346
|
+
| ForStatement
|
12347
|
+
| ForInStatement
|
12348
|
+
| ForOfStatement
|
12349
|
+
| ImportDeclaration
|
12350
|
+
| ExportNamedDeclaration
|
12351
|
+
| ExportDefaultDeclaration
|
12352
|
+
| ExportAllDeclaration;
|
12184
12353
|
declare class Stats {
|
12185
12354
|
constructor(compilation: Compilation);
|
12186
12355
|
compilation: Compilation;
|
@@ -12190,7 +12359,7 @@ declare class Stats {
|
|
12190
12359
|
hasWarnings(): boolean;
|
12191
12360
|
hasErrors(): boolean;
|
12192
12361
|
toJson(options?: string | StatsOptions): StatsCompilation;
|
12193
|
-
toString(options?:
|
12362
|
+
toString(options?: string | StatsOptions): string;
|
12194
12363
|
}
|
12195
12364
|
type StatsAsset = KnownStatsAsset & Record<string, any>;
|
12196
12365
|
type StatsChunk = KnownStatsChunk & Record<string, any>;
|
@@ -13298,7 +13467,7 @@ declare interface WebpackOptionsNormalized {
|
|
13298
13467
|
/**
|
13299
13468
|
* Options for the webpack-dev-server.
|
13300
13469
|
*/
|
13301
|
-
devServer?:
|
13470
|
+
devServer?: false | { [index: string]: any };
|
13302
13471
|
|
13303
13472
|
/**
|
13304
13473
|
* A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
|
@@ -13645,6 +13814,11 @@ declare namespace exports {
|
|
13645
13814
|
export let matchPart: (str: string, test: Matcher) => boolean;
|
13646
13815
|
export let matchObject: (obj: MatchObject, str: string) => boolean;
|
13647
13816
|
}
|
13817
|
+
export namespace OptimizationStages {
|
13818
|
+
export let STAGE_BASIC: -10;
|
13819
|
+
export let STAGE_DEFAULT: 0;
|
13820
|
+
export let STAGE_ADVANCED: 10;
|
13821
|
+
}
|
13648
13822
|
export namespace RuntimeGlobals {
|
13649
13823
|
export let require: "__webpack_require__";
|
13650
13824
|
export let requireScope: "__webpack_require__.*";
|
@@ -13955,6 +14129,10 @@ declare namespace exports {
|
|
13955
14129
|
export let runtimeEqual: (a: RuntimeSpec, b: RuntimeSpec) => boolean;
|
13956
14130
|
export let compareRuntime: (a: RuntimeSpec, b: RuntimeSpec) => 0 | 1 | -1;
|
13957
14131
|
export let mergeRuntime: (a: RuntimeSpec, b: RuntimeSpec) => RuntimeSpec;
|
14132
|
+
export let deepMergeRuntime: (
|
14133
|
+
runtimes: RuntimeSpec[],
|
14134
|
+
runtime: RuntimeSpec
|
14135
|
+
) => RuntimeSpec;
|
13958
14136
|
export let mergeRuntimeCondition: (
|
13959
14137
|
a: RuntimeCondition,
|
13960
14138
|
b: RuntimeCondition,
|
@@ -14122,6 +14300,7 @@ declare namespace exports {
|
|
14122
14300
|
EntryOptions,
|
14123
14301
|
PathData,
|
14124
14302
|
AssetEmittedInfo,
|
14303
|
+
MultiCompilerOptions,
|
14125
14304
|
MultiStats,
|
14126
14305
|
ResolveData,
|
14127
14306
|
ParserState,
|