webpack 5.99.7 → 5.99.9
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 +0 -3
- package/lib/CacheFacade.js +2 -1
- package/lib/ChunkGraph.js +0 -1
- package/lib/ChunkGroup.js +13 -6
- package/lib/Compilation.js +22 -33
- package/lib/ConstPlugin.js +61 -43
- package/lib/ContextModule.js +1 -1
- package/lib/ContextModuleFactory.js +1 -2
- package/lib/ContextReplacementPlugin.js +2 -1
- package/lib/CssModule.js +0 -1
- package/lib/DefinePlugin.js +2 -2
- package/lib/DelegatedModule.js +18 -8
- package/lib/DelegatedModuleFactoryPlugin.js +9 -7
- package/lib/Dependency.js +10 -11
- package/lib/EvalSourceMapDevToolPlugin.js +1 -1
- package/lib/ExportsInfo.js +35 -16
- package/lib/ExternalModule.js +6 -5
- package/lib/FileSystemInfo.js +2 -4
- package/lib/LibManifestPlugin.js +2 -2
- package/lib/ModuleFilenameHelpers.js +8 -4
- package/lib/NormalModule.js +38 -19
- package/lib/NormalModuleFactory.js +23 -18
- package/lib/RuntimePlugin.js +1 -1
- package/lib/SourceMapDevToolPlugin.js +2 -3
- package/lib/WebpackOptionsApply.js +1 -4
- package/lib/asset/AssetGenerator.js +13 -12
- package/lib/asset/AssetSourceGenerator.js +7 -5
- package/lib/config/defaults.js +10 -6
- package/lib/config/normalization.js +5 -5
- package/lib/css/CssModulesPlugin.js +2 -2
- package/lib/debug/ProfilingPlugin.js +18 -21
- package/lib/dependencies/CommonJsImportsParserPlugin.js +1 -1
- package/lib/dependencies/ContextElementDependency.js +1 -1
- package/lib/dependencies/CssLocalIdentifierDependency.js +2 -2
- package/lib/dependencies/CssUrlDependency.js +1 -1
- package/lib/dependencies/ModuleDependency.js +1 -1
- package/lib/dependencies/RequireContextPlugin.js +2 -1
- package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +3 -0
- package/lib/dependencies/URLDependency.js +1 -1
- package/lib/dependencies/WorkerPlugin.js +2 -2
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +3 -3
- package/lib/hmr/JavascriptHotModuleReplacement.runtime.js +0 -1
- package/lib/index.js +11 -0
- package/lib/javascript/JavascriptModulesPlugin.js +2 -2
- package/lib/javascript/JavascriptParser.js +19 -5
- package/lib/json/JsonModulesPlugin.js +4 -4
- package/lib/library/AbstractLibraryPlugin.js +1 -1
- package/lib/library/ModuleLibraryPlugin.js +4 -1
- package/lib/node/nodeConsole.js +3 -2
- package/lib/optimize/AggressiveSplittingPlugin.js +1 -1
- package/lib/optimize/ConcatenatedModule.js +3 -1
- package/lib/optimize/ModuleConcatenationPlugin.js +2 -2
- package/lib/optimize/RuntimeChunkPlugin.js +5 -6
- package/lib/optimize/SideEffectsFlagPlugin.js +12 -7
- package/lib/optimize/SplitChunksPlugin.js +2 -2
- package/lib/rules/BasicEffectRulePlugin.js +1 -2
- package/lib/rules/ObjectMatcherRulePlugin.js +2 -1
- package/lib/rules/RuleSetCompiler.js +19 -5
- package/lib/rules/UseEffectRulePlugin.js +4 -6
- package/lib/schemes/DataUriPlugin.js +3 -1
- package/lib/schemes/HttpUriPlugin.js +154 -149
- package/lib/sharing/ProvideSharedPlugin.js +3 -1
- package/lib/stats/DefaultStatsPrinterPlugin.js +13 -13
- package/lib/util/createHash.js +3 -3
- package/package.json +45 -40
- package/schemas/WebpackOptions.check.d.ts +1 -1
- package/schemas/WebpackOptions.check.js +2 -2
- package/schemas/WebpackOptions.json +243 -24
- package/schemas/plugins/BannerPlugin.check.d.ts +1 -1
- package/schemas/plugins/BannerPlugin.check.js +1 -1
- package/schemas/plugins/DllPlugin.check.d.ts +1 -1
- package/schemas/plugins/DllPlugin.check.js +1 -1
- package/schemas/plugins/DllReferencePlugin.check.d.ts +1 -1
- package/schemas/plugins/DllReferencePlugin.check.js +1 -1
- package/schemas/plugins/HashedModuleIdsPlugin.check.d.ts +1 -1
- package/schemas/plugins/HashedModuleIdsPlugin.check.js +1 -1
- package/schemas/plugins/IgnorePlugin.check.d.ts +1 -1
- package/schemas/plugins/IgnorePlugin.check.js +1 -1
- package/schemas/plugins/LoaderOptionsPlugin.check.d.ts +1 -1
- package/schemas/plugins/LoaderOptionsPlugin.check.js +1 -1
- package/schemas/plugins/ProgressPlugin.check.d.ts +1 -1
- package/schemas/plugins/ProgressPlugin.check.js +1 -1
- package/schemas/plugins/SourceMapDevToolPlugin.check.d.ts +1 -1
- package/schemas/plugins/SourceMapDevToolPlugin.check.js +1 -1
- package/schemas/plugins/SourceMapDevToolPlugin.json +2 -2
- package/schemas/plugins/WatchIgnorePlugin.check.d.ts +1 -1
- package/schemas/plugins/WatchIgnorePlugin.check.js +1 -1
- package/schemas/plugins/asset/AssetGeneratorOptions.check.d.ts +1 -1
- package/schemas/plugins/asset/AssetGeneratorOptions.check.js +1 -1
- package/schemas/plugins/asset/AssetInlineGeneratorOptions.check.d.ts +1 -1
- package/schemas/plugins/asset/AssetInlineGeneratorOptions.check.js +1 -1
- package/schemas/plugins/asset/AssetParserOptions.check.d.ts +1 -1
- package/schemas/plugins/asset/AssetParserOptions.check.js +1 -1
- package/schemas/plugins/asset/AssetResourceGeneratorOptions.check.d.ts +1 -1
- package/schemas/plugins/asset/AssetResourceGeneratorOptions.check.js +1 -1
- package/schemas/plugins/container/ContainerPlugin.check.d.ts +1 -1
- package/schemas/plugins/container/ContainerPlugin.check.js +1 -1
- package/schemas/plugins/container/ContainerReferencePlugin.check.d.ts +1 -1
- package/schemas/plugins/container/ContainerReferencePlugin.check.js +1 -1
- package/schemas/plugins/container/ExternalsType.check.d.ts +1 -1
- package/schemas/plugins/container/ExternalsType.check.js +1 -1
- package/schemas/plugins/container/ModuleFederationPlugin.check.d.ts +1 -1
- package/schemas/plugins/container/ModuleFederationPlugin.check.js +1 -1
- package/schemas/plugins/css/CssAutoGeneratorOptions.check.d.ts +1 -1
- package/schemas/plugins/css/CssAutoGeneratorOptions.check.js +1 -1
- package/schemas/plugins/css/CssAutoParserOptions.check.d.ts +1 -1
- package/schemas/plugins/css/CssAutoParserOptions.check.js +1 -1
- package/schemas/plugins/css/CssGeneratorOptions.check.d.ts +1 -1
- package/schemas/plugins/css/CssGeneratorOptions.check.js +1 -1
- package/schemas/plugins/css/CssGlobalGeneratorOptions.check.d.ts +1 -1
- package/schemas/plugins/css/CssGlobalGeneratorOptions.check.js +1 -1
- package/schemas/plugins/css/CssGlobalParserOptions.check.d.ts +1 -1
- package/schemas/plugins/css/CssGlobalParserOptions.check.js +1 -1
- package/schemas/plugins/css/CssModuleGeneratorOptions.check.d.ts +1 -1
- package/schemas/plugins/css/CssModuleGeneratorOptions.check.js +1 -1
- package/schemas/plugins/css/CssModuleParserOptions.check.d.ts +1 -1
- package/schemas/plugins/css/CssModuleParserOptions.check.js +1 -1
- package/schemas/plugins/css/CssParserOptions.check.d.ts +1 -1
- package/schemas/plugins/css/CssParserOptions.check.js +1 -1
- package/schemas/plugins/debug/ProfilingPlugin.check.d.ts +1 -1
- package/schemas/plugins/debug/ProfilingPlugin.check.js +1 -1
- package/schemas/plugins/ids/OccurrenceChunkIdsPlugin.check.d.ts +1 -1
- package/schemas/plugins/ids/OccurrenceChunkIdsPlugin.check.js +1 -1
- package/schemas/plugins/ids/OccurrenceModuleIdsPlugin.check.d.ts +1 -1
- package/schemas/plugins/ids/OccurrenceModuleIdsPlugin.check.js +1 -1
- package/schemas/plugins/json/JsonModulesPluginGenerator.check.d.ts +7 -0
- package/schemas/plugins/{JsonModulesPluginGenerator.check.js → json/JsonModulesPluginGenerator.check.js} +1 -1
- package/schemas/plugins/json/JsonModulesPluginGenerator.json +3 -0
- package/schemas/plugins/json/JsonModulesPluginParser.check.d.ts +7 -0
- package/schemas/plugins/{JsonModulesPluginParser.check.js → json/JsonModulesPluginParser.check.js} +1 -1
- package/schemas/plugins/json/JsonModulesPluginParser.json +3 -0
- package/schemas/plugins/optimize/AggressiveSplittingPlugin.check.d.ts +1 -1
- package/schemas/plugins/optimize/AggressiveSplittingPlugin.check.js +1 -1
- package/schemas/plugins/optimize/LimitChunkCountPlugin.check.d.ts +1 -1
- package/schemas/plugins/optimize/LimitChunkCountPlugin.check.js +1 -1
- package/schemas/plugins/optimize/MergeDuplicateChunksPlugin.check.d.ts +1 -1
- package/schemas/plugins/optimize/MergeDuplicateChunksPlugin.check.js +1 -1
- package/schemas/plugins/optimize/MinChunkSizePlugin.check.d.ts +1 -1
- package/schemas/plugins/optimize/MinChunkSizePlugin.check.js +1 -1
- package/schemas/plugins/schemes/HttpUriPlugin.check.d.ts +1 -1
- package/schemas/plugins/schemes/HttpUriPlugin.check.js +1 -1
- package/schemas/plugins/sharing/ConsumeSharedPlugin.check.d.ts +1 -1
- package/schemas/plugins/sharing/ConsumeSharedPlugin.check.js +1 -1
- package/schemas/plugins/sharing/ProvideSharedPlugin.check.d.ts +1 -1
- package/schemas/plugins/sharing/ProvideSharedPlugin.check.js +1 -1
- package/schemas/plugins/sharing/SharePlugin.check.d.ts +1 -1
- package/schemas/plugins/sharing/SharePlugin.check.js +1 -1
- package/types.d.ts +468 -156
- package/schemas/plugins/JsonModulesPluginGenerator.check.d.ts +0 -7
- package/schemas/plugins/JsonModulesPluginGenerator.json +0 -11
- package/schemas/plugins/JsonModulesPluginParser.check.d.ts +0 -7
- package/schemas/plugins/JsonModulesPluginParser.json +0 -16
package/types.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/*
|
2
2
|
* This file was automatically generated.
|
3
3
|
* DO NOT MODIFY BY HAND.
|
4
|
-
* Run `yarn special
|
4
|
+
* Run `yarn fix:special` to update
|
5
5
|
*/
|
6
6
|
|
7
7
|
import { Buffer } from "buffer";
|
@@ -88,6 +88,10 @@ import {
|
|
88
88
|
YieldExpression
|
89
89
|
} from "estree";
|
90
90
|
import { IncomingMessage, ServerOptions } from "http";
|
91
|
+
import {
|
92
|
+
Session as SessionImportInspectorClass_1,
|
93
|
+
Session as SessionImportInspectorClass_2
|
94
|
+
} from "inspector";
|
91
95
|
import { JSONSchema4, JSONSchema6, JSONSchema7 } from "json-schema";
|
92
96
|
import { ListenOptions, Server } from "net";
|
93
97
|
import { validate as validateFunction } from "schema-utils";
|
@@ -224,7 +228,6 @@ declare interface AggressiveSplittingPluginOptions {
|
|
224
228
|
*/
|
225
229
|
minSize?: number;
|
226
230
|
}
|
227
|
-
type Algorithm = string | typeof Hash;
|
228
231
|
type Alias = string | false | string[];
|
229
232
|
declare interface AliasOption {
|
230
233
|
alias: Alias;
|
@@ -2640,7 +2643,6 @@ declare interface Configuration {
|
|
2640
2643
|
externals?:
|
2641
2644
|
| string
|
2642
2645
|
| RegExp
|
2643
|
-
| ExternalItem[]
|
2644
2646
|
| (ExternalItemObjectKnown & ExternalItemObjectUnknown)
|
2645
2647
|
| ((
|
2646
2648
|
data: ExternalItemFunctionData,
|
@@ -2649,7 +2651,8 @@ declare interface Configuration {
|
|
2649
2651
|
result?: string | boolean | string[] | { [index: string]: any }
|
2650
2652
|
) => void
|
2651
2653
|
) => void)
|
2652
|
-
| ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>)
|
2654
|
+
| ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>)
|
2655
|
+
| ExternalItem[];
|
2653
2656
|
|
2654
2657
|
/**
|
2655
2658
|
* Enable presets of externals for specific targets.
|
@@ -3523,7 +3526,7 @@ declare class Dependency {
|
|
3523
3526
|
getModuleEvaluationSideEffectsState(
|
3524
3527
|
moduleGraph: ModuleGraph
|
3525
3528
|
): ConnectionState;
|
3526
|
-
createIgnoredModule(context: string):
|
3529
|
+
createIgnoredModule(context: string): Module;
|
3527
3530
|
serialize(__0: ObjectSerializerContext): void;
|
3528
3531
|
deserialize(__0: ObjectDeserializerContext): void;
|
3529
3532
|
module: any;
|
@@ -3922,7 +3925,18 @@ declare interface Effect {
|
|
3922
3925
|
value: any;
|
3923
3926
|
}
|
3924
3927
|
declare interface EffectData {
|
3925
|
-
|
3928
|
+
resource?: string;
|
3929
|
+
realResource?: string;
|
3930
|
+
resourceQuery?: string;
|
3931
|
+
resourceFragment?: string;
|
3932
|
+
scheme?: string;
|
3933
|
+
assertions?: ImportAttributes;
|
3934
|
+
mimetype?: string;
|
3935
|
+
dependency: string;
|
3936
|
+
descriptionData?: Record<string, any>;
|
3937
|
+
compiler?: string;
|
3938
|
+
issuer: string;
|
3939
|
+
issuerLayer: string;
|
3926
3940
|
}
|
3927
3941
|
declare class ElectronTargetPlugin {
|
3928
3942
|
constructor(context?: "main" | "preload" | "renderer");
|
@@ -4810,6 +4824,15 @@ type ExternalItem =
|
|
4810
4824
|
) => void
|
4811
4825
|
) => void)
|
4812
4826
|
| ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>);
|
4827
|
+
type ExternalItemFunction =
|
4828
|
+
| ((
|
4829
|
+
data: ExternalItemFunctionData,
|
4830
|
+
callback: (
|
4831
|
+
err?: null | Error,
|
4832
|
+
result?: string | boolean | string[] | { [index: string]: any }
|
4833
|
+
) => void
|
4834
|
+
) => void)
|
4835
|
+
| ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>);
|
4813
4836
|
|
4814
4837
|
/**
|
4815
4838
|
* Data object passed as argument when a function is set for 'externals'.
|
@@ -4914,7 +4937,6 @@ declare interface ExternalModuleInfo {
|
|
4914
4937
|
type Externals =
|
4915
4938
|
| string
|
4916
4939
|
| RegExp
|
4917
|
-
| ExternalItem[]
|
4918
4940
|
| (ExternalItemObjectKnown & ExternalItemObjectUnknown)
|
4919
4941
|
| ((
|
4920
4942
|
data: ExternalItemFunctionData,
|
@@ -4923,7 +4945,8 @@ type Externals =
|
|
4923
4945
|
result?: string | boolean | string[] | { [index: string]: any }
|
4924
4946
|
) => void
|
4925
4947
|
) => void)
|
4926
|
-
| ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>)
|
4948
|
+
| ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>)
|
4949
|
+
| ExternalItem[];
|
4927
4950
|
declare class ExternalsPlugin {
|
4928
4951
|
constructor(type: undefined | string, externals: Externals);
|
4929
4952
|
type?: string;
|
@@ -5867,7 +5890,11 @@ declare interface InfrastructureLogging {
|
|
5867
5890
|
/**
|
5868
5891
|
* Stream used for logging output. Defaults to process.stderr. This option is only used when no custom console is provided.
|
5869
5892
|
*/
|
5870
|
-
stream?: NodeJS.WritableStream
|
5893
|
+
stream?: NodeJS.WritableStream & {
|
5894
|
+
isTTY?: boolean;
|
5895
|
+
columns?: number;
|
5896
|
+
rows?: number;
|
5897
|
+
};
|
5871
5898
|
}
|
5872
5899
|
declare class InitFragment<GenerateContext> {
|
5873
5900
|
constructor(
|
@@ -5926,6 +5953,9 @@ declare interface InputFileSystem {
|
|
5926
5953
|
relative?: (from: string, to: string) => string;
|
5927
5954
|
dirname?: (dirname: string) => string;
|
5928
5955
|
}
|
5956
|
+
declare interface Inspector {
|
5957
|
+
Session: typeof SessionImportInspectorClass_1;
|
5958
|
+
}
|
5929
5959
|
type IntermediateFileSystem = InputFileSystem &
|
5930
5960
|
OutputFileSystem &
|
5931
5961
|
IntermediateFileSystemExtras;
|
@@ -6471,6 +6501,7 @@ declare class JavascriptParser extends Parser {
|
|
6471
6501
|
program: SyncBailHook<[Program, Comment[]], boolean | void>;
|
6472
6502
|
terminate: SyncBailHook<[ReturnStatement | ThrowStatement], boolean | void>;
|
6473
6503
|
finish: SyncBailHook<[Program, Comment[]], boolean | void>;
|
6504
|
+
unusedStatement: SyncBailHook<[Statement], boolean | void>;
|
6474
6505
|
}>;
|
6475
6506
|
sourceType: "module" | "auto" | "script";
|
6476
6507
|
scope: ScopeInfo;
|
@@ -7603,6 +7634,23 @@ type JsonObjectTypes = { [index: string]: JsonValueTypes } & {
|
|
7603
7634
|
| JsonObjectTypes
|
7604
7635
|
| JsonValueTypes[];
|
7605
7636
|
};
|
7637
|
+
|
7638
|
+
/**
|
7639
|
+
* Parser options for JSON modules.
|
7640
|
+
*/
|
7641
|
+
declare interface JsonParserOptions {
|
7642
|
+
/**
|
7643
|
+
* The depth of json dependency flagged as `exportInfo`.
|
7644
|
+
*/
|
7645
|
+
exportsDepth?: number;
|
7646
|
+
|
7647
|
+
/**
|
7648
|
+
* Function to parser content and return JSON.
|
7649
|
+
*/
|
7650
|
+
parse?: (
|
7651
|
+
input: string
|
7652
|
+
) => null | string | number | boolean | Buffer | JsonObjectFs | JsonValueFs[];
|
7653
|
+
}
|
7606
7654
|
type JsonValueFs =
|
7607
7655
|
| null
|
7608
7656
|
| string
|
@@ -8659,7 +8707,7 @@ declare interface LoaderRunnerLoaderContext<OptionsType> {
|
|
8659
8707
|
async(): (
|
8660
8708
|
err?: null | Error,
|
8661
8709
|
content?: string | Buffer,
|
8662
|
-
sourceMap?: string | SourceMap,
|
8710
|
+
sourceMap?: null | string | SourceMap,
|
8663
8711
|
additionalData?: AdditionalData
|
8664
8712
|
) => void;
|
8665
8713
|
|
@@ -8673,7 +8721,7 @@ declare interface LoaderRunnerLoaderContext<OptionsType> {
|
|
8673
8721
|
callback: (
|
8674
8722
|
err?: null | Error,
|
8675
8723
|
content?: string | Buffer,
|
8676
|
-
sourceMap?: string | SourceMap,
|
8724
|
+
sourceMap?: null | string | SourceMap,
|
8677
8725
|
additionalData?: AdditionalData
|
8678
8726
|
) => void;
|
8679
8727
|
|
@@ -9581,7 +9629,11 @@ declare interface ModuleOptions {
|
|
9581
9629
|
/**
|
9582
9630
|
* Don't parse files matching. It's matched against the full resolved request.
|
9583
9631
|
*/
|
9584
|
-
noParse?:
|
9632
|
+
noParse?:
|
9633
|
+
| string
|
9634
|
+
| RegExp
|
9635
|
+
| (string | RegExp | ((content: string) => boolean))[]
|
9636
|
+
| ((content: string) => boolean);
|
9585
9637
|
|
9586
9638
|
/**
|
9587
9639
|
* Specify options for each parser.
|
@@ -9626,7 +9678,7 @@ declare interface ModuleOptions {
|
|
9626
9678
|
/**
|
9627
9679
|
* Cache the resolving of module requests.
|
9628
9680
|
*/
|
9629
|
-
unsafeCache?: boolean |
|
9681
|
+
unsafeCache?: boolean | ((module: Module) => boolean);
|
9630
9682
|
|
9631
9683
|
/**
|
9632
9684
|
* Enable warnings for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextCritical'.
|
@@ -9661,7 +9713,11 @@ declare interface ModuleOptionsNormalized {
|
|
9661
9713
|
/**
|
9662
9714
|
* Don't parse files matching. It's matched against the full resolved request.
|
9663
9715
|
*/
|
9664
|
-
noParse?:
|
9716
|
+
noParse?:
|
9717
|
+
| string
|
9718
|
+
| RegExp
|
9719
|
+
| (string | RegExp | ((content: string) => boolean))[]
|
9720
|
+
| ((content: string) => boolean);
|
9665
9721
|
|
9666
9722
|
/**
|
9667
9723
|
* Specify options for each parser.
|
@@ -9676,7 +9732,7 @@ declare interface ModuleOptionsNormalized {
|
|
9676
9732
|
/**
|
9677
9733
|
* Cache the resolving of module requests.
|
9678
9734
|
*/
|
9679
|
-
unsafeCache?: boolean |
|
9735
|
+
unsafeCache?: boolean | ((module: Module) => boolean);
|
9680
9736
|
}
|
9681
9737
|
declare interface ModulePathData {
|
9682
9738
|
id: string | number;
|
@@ -9973,6 +10029,11 @@ declare class NoEmitOnErrorsPlugin {
|
|
9973
10029
|
*/
|
9974
10030
|
apply(compiler: Compiler): void;
|
9975
10031
|
}
|
10032
|
+
type NoParse =
|
10033
|
+
| string
|
10034
|
+
| RegExp
|
10035
|
+
| (string | RegExp | ((content: string) => boolean))[]
|
10036
|
+
| ((content: string) => boolean);
|
9976
10037
|
type Node = false | NodeOptions;
|
9977
10038
|
declare class NodeEnvironmentPlugin {
|
9978
10039
|
constructor(options: NodeEnvironmentPluginOptions);
|
@@ -10050,7 +10111,7 @@ declare class NormalModule extends Module {
|
|
10050
10111
|
generator?: Generator;
|
10051
10112
|
generatorOptions?: GeneratorOptions;
|
10052
10113
|
resource: string;
|
10053
|
-
resourceResolveData
|
10114
|
+
resourceResolveData?: ResourceSchemeData & Partial<ResolveRequest>;
|
10054
10115
|
matchResource?: string;
|
10055
10116
|
loaders: LoaderItem[];
|
10056
10117
|
error: null | WebpackError;
|
@@ -10069,7 +10130,10 @@ declare class NormalModule extends Module {
|
|
10069
10130
|
sourceMap?: string | SourceMap,
|
10070
10131
|
associatedObjectForCache?: object
|
10071
10132
|
): Source;
|
10072
|
-
getCurrentLoader(
|
10133
|
+
getCurrentLoader(
|
10134
|
+
loaderContext: LoaderContextNormalModule<any>,
|
10135
|
+
index?: number
|
10136
|
+
): null | LoaderItem;
|
10073
10137
|
createSource(
|
10074
10138
|
context: string,
|
10075
10139
|
content: string | Buffer,
|
@@ -10077,12 +10141,20 @@ declare class NormalModule extends Module {
|
|
10077
10141
|
associatedObjectForCache?: object
|
10078
10142
|
): Source;
|
10079
10143
|
markModuleAsErrored(error: WebpackError): void;
|
10080
|
-
applyNoParseRule(rule:
|
10081
|
-
shouldPreventParsing(
|
10144
|
+
applyNoParseRule(rule: Exclude<NoParse, any[]>, content: string): boolean;
|
10145
|
+
shouldPreventParsing(
|
10146
|
+
noParseRule:
|
10147
|
+
| undefined
|
10148
|
+
| string
|
10149
|
+
| RegExp
|
10150
|
+
| (string | RegExp | ((content: string) => boolean))[]
|
10151
|
+
| ((content: string) => boolean),
|
10152
|
+
request: string
|
10153
|
+
): boolean;
|
10082
10154
|
static getCompilationHooks(
|
10083
10155
|
compilation: Compilation
|
10084
10156
|
): NormalModuleCompilationHooks;
|
10085
|
-
static deserialize(context: ObjectDeserializerContext):
|
10157
|
+
static deserialize(context: ObjectDeserializerContext): NormalModule;
|
10086
10158
|
}
|
10087
10159
|
declare interface NormalModuleCompilationHooks {
|
10088
10160
|
loader: SyncHook<[LoaderContextNormalModule<any>, NormalModule]>;
|
@@ -10146,7 +10218,7 @@ declare interface NormalModuleCreateData {
|
|
10146
10218
|
/**
|
10147
10219
|
* resource resolve data
|
10148
10220
|
*/
|
10149
|
-
resourceResolveData?:
|
10221
|
+
resourceResolveData?: ResourceSchemeData & Partial<ResolveRequest>;
|
10150
10222
|
|
10151
10223
|
/**
|
10152
10224
|
* context directory for resolving
|
@@ -10603,7 +10675,154 @@ declare interface Optimization {
|
|
10603
10675
|
/**
|
10604
10676
|
* The name or name factory for the runtime chunks.
|
10605
10677
|
*/
|
10606
|
-
name?: string |
|
10678
|
+
name?: string | ((entrypoint: { name: string }) => string);
|
10679
|
+
};
|
10680
|
+
|
10681
|
+
/**
|
10682
|
+
* Skip over modules which contain no side effects when exports are not used (false: disabled, 'flag': only use manually placed side effects flag, true: also analyse source code for side effects).
|
10683
|
+
*/
|
10684
|
+
sideEffects?: boolean | "flag";
|
10685
|
+
|
10686
|
+
/**
|
10687
|
+
* Optimize duplication and caching by splitting chunks by shared modules and cache group.
|
10688
|
+
*/
|
10689
|
+
splitChunks?: false | OptimizationSplitChunksOptions;
|
10690
|
+
|
10691
|
+
/**
|
10692
|
+
* Figure out which exports are used by modules to mangle export names, omit unused exports and generate more efficient code (true: analyse used exports for each runtime, "global": analyse exports globally for all runtimes combined).
|
10693
|
+
*/
|
10694
|
+
usedExports?: boolean | "global";
|
10695
|
+
}
|
10696
|
+
|
10697
|
+
/**
|
10698
|
+
* Enables/Disables integrated optimizations.
|
10699
|
+
*/
|
10700
|
+
declare interface OptimizationNormalized {
|
10701
|
+
/**
|
10702
|
+
* Avoid wrapping the entry module in an IIFE.
|
10703
|
+
*/
|
10704
|
+
avoidEntryIife?: boolean;
|
10705
|
+
|
10706
|
+
/**
|
10707
|
+
* Check for incompatible wasm types when importing/exporting from/to ESM.
|
10708
|
+
*/
|
10709
|
+
checkWasmTypes?: boolean;
|
10710
|
+
|
10711
|
+
/**
|
10712
|
+
* Define the algorithm to choose chunk ids (named: readable ids for better debugging, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin).
|
10713
|
+
*/
|
10714
|
+
chunkIds?:
|
10715
|
+
| false
|
10716
|
+
| "natural"
|
10717
|
+
| "named"
|
10718
|
+
| "deterministic"
|
10719
|
+
| "size"
|
10720
|
+
| "total-size";
|
10721
|
+
|
10722
|
+
/**
|
10723
|
+
* Concatenate modules when possible to generate less modules, more efficient code and enable more optimizations by the minimizer.
|
10724
|
+
*/
|
10725
|
+
concatenateModules?: boolean;
|
10726
|
+
|
10727
|
+
/**
|
10728
|
+
* Emit assets even when errors occur. Critical errors are emitted into the generated code and will cause errors at runtime.
|
10729
|
+
*/
|
10730
|
+
emitOnErrors?: boolean;
|
10731
|
+
|
10732
|
+
/**
|
10733
|
+
* Also flag chunks as loaded which contain a subset of the modules.
|
10734
|
+
*/
|
10735
|
+
flagIncludedChunks?: boolean;
|
10736
|
+
|
10737
|
+
/**
|
10738
|
+
* Creates a module-internal dependency graph for top level symbols, exports and imports, to improve unused exports detection.
|
10739
|
+
*/
|
10740
|
+
innerGraph?: boolean;
|
10741
|
+
|
10742
|
+
/**
|
10743
|
+
* Rename exports when possible to generate shorter code (depends on optimization.usedExports and optimization.providedExports, true/"deterministic": generate short deterministic names optimized for caching, "size": generate the shortest possible names).
|
10744
|
+
*/
|
10745
|
+
mangleExports?: boolean | "deterministic" | "size";
|
10746
|
+
|
10747
|
+
/**
|
10748
|
+
* Reduce size of WASM by changing imports to shorter strings.
|
10749
|
+
*/
|
10750
|
+
mangleWasmImports?: boolean;
|
10751
|
+
|
10752
|
+
/**
|
10753
|
+
* Merge chunks which contain the same modules.
|
10754
|
+
*/
|
10755
|
+
mergeDuplicateChunks?: boolean;
|
10756
|
+
|
10757
|
+
/**
|
10758
|
+
* Enable minimizing the output. Uses optimization.minimizer.
|
10759
|
+
*/
|
10760
|
+
minimize?: boolean;
|
10761
|
+
|
10762
|
+
/**
|
10763
|
+
* Minimizer(s) to use for minimizing the output.
|
10764
|
+
*/
|
10765
|
+
minimizer?: (
|
10766
|
+
| undefined
|
10767
|
+
| null
|
10768
|
+
| false
|
10769
|
+
| ""
|
10770
|
+
| 0
|
10771
|
+
| ((this: Compiler, compiler: Compiler) => void)
|
10772
|
+
| WebpackPluginInstance
|
10773
|
+
| "..."
|
10774
|
+
)[];
|
10775
|
+
|
10776
|
+
/**
|
10777
|
+
* Define the algorithm to choose module ids (natural: numeric ids in order of usage, named: readable ids for better debugging, hashed: (deprecated) short hashes as ids for better long term caching, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, false: no algorithm used, as custom one can be provided via plugin).
|
10778
|
+
*/
|
10779
|
+
moduleIds?: false | "natural" | "named" | "deterministic" | "size" | "hashed";
|
10780
|
+
|
10781
|
+
/**
|
10782
|
+
* Avoid emitting assets when errors occur (deprecated: use 'emitOnErrors' instead).
|
10783
|
+
*/
|
10784
|
+
noEmitOnErrors?: boolean;
|
10785
|
+
|
10786
|
+
/**
|
10787
|
+
* Set process.env.NODE_ENV to a specific value.
|
10788
|
+
*/
|
10789
|
+
nodeEnv?: string | false;
|
10790
|
+
|
10791
|
+
/**
|
10792
|
+
* Generate records with relative paths to be able to move the context folder.
|
10793
|
+
*/
|
10794
|
+
portableRecords?: boolean;
|
10795
|
+
|
10796
|
+
/**
|
10797
|
+
* Figure out which exports are provided by modules to generate more efficient code.
|
10798
|
+
*/
|
10799
|
+
providedExports?: boolean;
|
10800
|
+
|
10801
|
+
/**
|
10802
|
+
* Use real [contenthash] based on final content of the assets.
|
10803
|
+
*/
|
10804
|
+
realContentHash?: boolean;
|
10805
|
+
|
10806
|
+
/**
|
10807
|
+
* Removes modules from chunks when these modules are already included in all parents.
|
10808
|
+
*/
|
10809
|
+
removeAvailableModules?: boolean;
|
10810
|
+
|
10811
|
+
/**
|
10812
|
+
* Remove chunks which are empty.
|
10813
|
+
*/
|
10814
|
+
removeEmptyChunks?: boolean;
|
10815
|
+
|
10816
|
+
/**
|
10817
|
+
* Create an additional chunk which contains only the webpack runtime and chunk hash maps.
|
10818
|
+
*/
|
10819
|
+
runtimeChunk?:
|
10820
|
+
| false
|
10821
|
+
| {
|
10822
|
+
/**
|
10823
|
+
* The name factory for the runtime chunks.
|
10824
|
+
*/
|
10825
|
+
name?: (entrypoint: { name: string }) => string;
|
10607
10826
|
};
|
10608
10827
|
|
10609
10828
|
/**
|
@@ -10759,8 +10978,13 @@ declare interface OptimizationSplitChunksOptions {
|
|
10759
10978
|
[index: string]:
|
10760
10979
|
| string
|
10761
10980
|
| false
|
10762
|
-
| Function
|
10763
10981
|
| RegExp
|
10982
|
+
| ((
|
10983
|
+
module: Module
|
10984
|
+
) =>
|
10985
|
+
| void
|
10986
|
+
| OptimizationSplitChunksCacheGroup
|
10987
|
+
| OptimizationSplitChunksCacheGroup[])
|
10764
10988
|
| OptimizationSplitChunksCacheGroup;
|
10765
10989
|
};
|
10766
10990
|
|
@@ -11587,6 +11811,11 @@ declare interface ParserOptionsByModuleTypeKnown {
|
|
11587
11811
|
* Parser options for javascript modules.
|
11588
11812
|
*/
|
11589
11813
|
"javascript/esm"?: JavascriptParserOptions;
|
11814
|
+
|
11815
|
+
/**
|
11816
|
+
* Parser options for JSON modules.
|
11817
|
+
*/
|
11818
|
+
json?: JsonParserOptions;
|
11590
11819
|
}
|
11591
11820
|
|
11592
11821
|
/**
|
@@ -11638,7 +11867,7 @@ declare interface PerformanceOptions {
|
|
11638
11867
|
/**
|
11639
11868
|
* Filter function to select assets that are checked.
|
11640
11869
|
*/
|
11641
|
-
assetFilter?:
|
11870
|
+
assetFilter?: (name: string, source: Source, assetInfo: AssetInfo) => boolean;
|
11642
11871
|
|
11643
11872
|
/**
|
11644
11873
|
* Sets the format of the hints: warnings, errors or nothing at all.
|
@@ -11765,12 +11994,12 @@ declare interface ProcessAssetsAdditionalOptions {
|
|
11765
11994
|
additionalAssets?: any;
|
11766
11995
|
}
|
11767
11996
|
declare class Profiler {
|
11768
|
-
constructor(inspector
|
11769
|
-
session
|
11770
|
-
inspector:
|
11997
|
+
constructor(inspector: Inspector);
|
11998
|
+
session?: SessionImportInspectorClass_2;
|
11999
|
+
inspector: Inspector;
|
11771
12000
|
hasSession(): boolean;
|
11772
12001
|
startProfiling(): Promise<void> | Promise<[any, any, any]>;
|
11773
|
-
sendCommand(method: string, params?:
|
12002
|
+
sendCommand(method: string, params?: object): Promise<any>;
|
11774
12003
|
destroy(): Promise<void>;
|
11775
12004
|
stopProfiling(): Promise<{ profile: any }>;
|
11776
12005
|
}
|
@@ -13344,15 +13573,43 @@ declare interface ResourceDataWithData {
|
|
13344
13573
|
query?: string;
|
13345
13574
|
fragment?: string;
|
13346
13575
|
context?: string;
|
13347
|
-
data:
|
13576
|
+
data: ResourceSchemeData & Partial<ResolveRequest>;
|
13577
|
+
}
|
13578
|
+
declare interface ResourceSchemeData {
|
13579
|
+
/**
|
13580
|
+
* mime type of the resource
|
13581
|
+
*/
|
13582
|
+
mimetype?: string;
|
13583
|
+
|
13584
|
+
/**
|
13585
|
+
* additional parameters for the resource
|
13586
|
+
*/
|
13587
|
+
parameters?: string;
|
13588
|
+
|
13589
|
+
/**
|
13590
|
+
* encoding of the resource
|
13591
|
+
*/
|
13592
|
+
encoding?: false | "base64";
|
13593
|
+
|
13594
|
+
/**
|
13595
|
+
* encoded content of the resource
|
13596
|
+
*/
|
13597
|
+
encodedContent?: string;
|
13348
13598
|
}
|
13349
13599
|
declare abstract class RestoreProvidedData {
|
13350
|
-
exports:
|
13600
|
+
exports: RestoreProvidedDataExports[];
|
13351
13601
|
otherProvided?: null | boolean;
|
13352
13602
|
otherCanMangleProvide?: boolean;
|
13353
13603
|
otherTerminalBinding: boolean;
|
13354
13604
|
serialize(__0: ObjectSerializerContext): void;
|
13355
13605
|
}
|
13606
|
+
declare interface RestoreProvidedDataExports {
|
13607
|
+
name: string;
|
13608
|
+
provided?: null | boolean;
|
13609
|
+
canMangleProvide?: boolean;
|
13610
|
+
terminalBinding: boolean;
|
13611
|
+
exportsInfo?: RestoreProvidedData;
|
13612
|
+
}
|
13356
13613
|
declare interface RmDirOptions {
|
13357
13614
|
maxRetries?: number;
|
13358
13615
|
recursive?: boolean;
|
@@ -13661,6 +13918,7 @@ declare interface RuleSetRule {
|
|
13661
13918
|
| string
|
13662
13919
|
| false
|
13663
13920
|
| 0
|
13921
|
+
| RuleSetUseFunction
|
13664
13922
|
| {
|
13665
13923
|
/**
|
13666
13924
|
* Unique loader options identifier.
|
@@ -13675,32 +13933,8 @@ declare interface RuleSetRule {
|
|
13675
13933
|
*/
|
13676
13934
|
options?: string | { [index: string]: any };
|
13677
13935
|
}
|
13678
|
-
| ((data: object) =>
|
13679
|
-
| string
|
13680
|
-
| {
|
13681
|
-
/**
|
13682
|
-
* Unique loader options identifier.
|
13683
|
-
*/
|
13684
|
-
ident?: string;
|
13685
|
-
/**
|
13686
|
-
* Loader name.
|
13687
|
-
*/
|
13688
|
-
loader?: string;
|
13689
|
-
/**
|
13690
|
-
* Loader options.
|
13691
|
-
*/
|
13692
|
-
options?: string | { [index: string]: any };
|
13693
|
-
}
|
13694
|
-
| __TypeWebpackOptions
|
13695
|
-
| __Type_2[])
|
13696
13936
|
)[]
|
13697
|
-
|
|
13698
|
-
resource: string;
|
13699
|
-
realResource: string;
|
13700
|
-
resourceQuery: string;
|
13701
|
-
issuer: string;
|
13702
|
-
compiler: string;
|
13703
|
-
}) => __Type_2[])
|
13937
|
+
| RuleSetUseFunction
|
13704
13938
|
| {
|
13705
13939
|
/**
|
13706
13940
|
* Unique loader options identifier.
|
@@ -13714,8 +13948,7 @@ declare interface RuleSetRule {
|
|
13714
13948
|
* Loader options.
|
13715
13949
|
*/
|
13716
13950
|
options?: string | { [index: string]: any };
|
13717
|
-
}
|
13718
|
-
| __TypeWebpackOptions;
|
13951
|
+
};
|
13719
13952
|
|
13720
13953
|
/**
|
13721
13954
|
* Match on import attributes of the dependency.
|
@@ -13730,6 +13963,7 @@ type RuleSetUse =
|
|
13730
13963
|
| string
|
13731
13964
|
| false
|
13732
13965
|
| 0
|
13966
|
+
| RuleSetUseFunction
|
13733
13967
|
| {
|
13734
13968
|
/**
|
13735
13969
|
* Unique loader options identifier.
|
@@ -13744,32 +13978,25 @@ type RuleSetUse =
|
|
13744
13978
|
*/
|
13745
13979
|
options?: string | { [index: string]: any };
|
13746
13980
|
}
|
13747
|
-
| ((data: object) =>
|
13748
|
-
| string
|
13749
|
-
| {
|
13750
|
-
/**
|
13751
|
-
* Unique loader options identifier.
|
13752
|
-
*/
|
13753
|
-
ident?: string;
|
13754
|
-
/**
|
13755
|
-
* Loader name.
|
13756
|
-
*/
|
13757
|
-
loader?: string;
|
13758
|
-
/**
|
13759
|
-
* Loader options.
|
13760
|
-
*/
|
13761
|
-
options?: string | { [index: string]: any };
|
13762
|
-
}
|
13763
|
-
| __TypeWebpackOptions
|
13764
|
-
| __Type_2[])
|
13765
13981
|
)[]
|
13766
|
-
|
|
13767
|
-
|
13768
|
-
|
13769
|
-
|
13770
|
-
|
13771
|
-
|
13772
|
-
|
13982
|
+
| RuleSetUseFunction
|
13983
|
+
| {
|
13984
|
+
/**
|
13985
|
+
* Unique loader options identifier.
|
13986
|
+
*/
|
13987
|
+
ident?: string;
|
13988
|
+
/**
|
13989
|
+
* Loader name.
|
13990
|
+
*/
|
13991
|
+
loader?: string;
|
13992
|
+
/**
|
13993
|
+
* Loader options.
|
13994
|
+
*/
|
13995
|
+
options?: string | { [index: string]: any };
|
13996
|
+
};
|
13997
|
+
type RuleSetUseFunction = (data: EffectData) =>
|
13998
|
+
| string
|
13999
|
+
| RuleSetUseFunction
|
13773
14000
|
| {
|
13774
14001
|
/**
|
13775
14002
|
* Unique loader options identifier.
|
@@ -13784,9 +14011,31 @@ type RuleSetUse =
|
|
13784
14011
|
*/
|
13785
14012
|
options?: string | { [index: string]: any };
|
13786
14013
|
}
|
13787
|
-
|
|
14014
|
+
| (
|
14015
|
+
| undefined
|
14016
|
+
| null
|
14017
|
+
| string
|
14018
|
+
| false
|
14019
|
+
| 0
|
14020
|
+
| RuleSetUseFunction
|
14021
|
+
| {
|
14022
|
+
/**
|
14023
|
+
* Unique loader options identifier.
|
14024
|
+
*/
|
14025
|
+
ident?: string;
|
14026
|
+
/**
|
14027
|
+
* Loader name.
|
14028
|
+
*/
|
14029
|
+
loader?: string;
|
14030
|
+
/**
|
14031
|
+
* Loader options.
|
14032
|
+
*/
|
14033
|
+
options?: string | { [index: string]: any };
|
14034
|
+
}
|
14035
|
+
)[];
|
13788
14036
|
type RuleSetUseItem =
|
13789
14037
|
| string
|
14038
|
+
| RuleSetUseFunction
|
13790
14039
|
| {
|
13791
14040
|
/**
|
13792
14041
|
* Unique loader options identifier.
|
@@ -13800,18 +14049,18 @@ type RuleSetUseItem =
|
|
13800
14049
|
* Loader options.
|
13801
14050
|
*/
|
13802
14051
|
options?: string | { [index: string]: any };
|
13803
|
-
}
|
13804
|
-
| __TypeWebpackOptions;
|
14052
|
+
};
|
13805
14053
|
declare interface RunCallback<T> {
|
13806
14054
|
(err: null | Error, result?: T): any;
|
13807
14055
|
}
|
13808
14056
|
declare class RuntimeChunkPlugin {
|
13809
|
-
constructor(options
|
13810
|
-
|
13811
|
-
|
13812
|
-
|
13813
|
-
|
13814
|
-
};
|
14057
|
+
constructor(options?: {
|
14058
|
+
/**
|
14059
|
+
* The name factory for the runtime chunks.
|
14060
|
+
*/
|
14061
|
+
name?: (entrypoint: { name: string }) => string;
|
14062
|
+
});
|
14063
|
+
options: { name: (entrypoint: { name: string }) => string };
|
13815
14064
|
|
13816
14065
|
/**
|
13817
14066
|
* Apply the plugin
|
@@ -15889,20 +16138,56 @@ declare class WebpackError extends Error {
|
|
15889
16138
|
cause: any;
|
15890
16139
|
|
15891
16140
|
/**
|
15892
|
-
*
|
16141
|
+
* Creates a `.stack` property on `targetObject`, which when accessed returns
|
16142
|
+
* a string representing the location in the code at which
|
16143
|
+
* `Error.captureStackTrace()` was called.
|
16144
|
+
* ```js
|
16145
|
+
* const myObject = {};
|
16146
|
+
* Error.captureStackTrace(myObject);
|
16147
|
+
* myObject.stack; // Similar to `new Error().stack`
|
16148
|
+
* ```
|
16149
|
+
* The first line of the trace will be prefixed with
|
16150
|
+
* `${myObject.name}: ${myObject.message}`.
|
16151
|
+
* The optional `constructorOpt` argument accepts a function. If given, all frames
|
16152
|
+
* above `constructorOpt`, including `constructorOpt`, will be omitted from the
|
16153
|
+
* generated stack trace.
|
16154
|
+
* The `constructorOpt` argument is useful for hiding implementation
|
16155
|
+
* details of error generation from the user. For instance:
|
16156
|
+
* ```js
|
16157
|
+
* function a() {
|
16158
|
+
* b();
|
16159
|
+
* }
|
16160
|
+
* function b() {
|
16161
|
+
* c();
|
16162
|
+
* }
|
16163
|
+
* function c() {
|
16164
|
+
* // Create an error without stack trace to avoid calculating the stack trace twice.
|
16165
|
+
* const { stackTraceLimit } = Error;
|
16166
|
+
* Error.stackTraceLimit = 0;
|
16167
|
+
* const error = new Error();
|
16168
|
+
* Error.stackTraceLimit = stackTraceLimit;
|
16169
|
+
* // Capture the stack trace above function b
|
16170
|
+
* Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
|
16171
|
+
* throw error;
|
16172
|
+
* }
|
16173
|
+
* a();
|
16174
|
+
* ```
|
15893
16175
|
*/
|
15894
16176
|
static captureStackTrace(
|
15895
16177
|
targetObject: object,
|
15896
16178
|
constructorOpt?: Function
|
15897
16179
|
): void;
|
16180
|
+
static prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
15898
16181
|
|
15899
16182
|
/**
|
15900
|
-
*
|
16183
|
+
* The `Error.stackTraceLimit` property specifies the number of stack frames
|
16184
|
+
* collected by a stack trace (whether generated by `new Error().stack` or
|
16185
|
+
* `Error.captureStackTrace(obj)`).
|
16186
|
+
* The default value is `10` but may be set to any valid JavaScript number. Changes
|
16187
|
+
* will affect any stack trace captured _after_ the value has been changed.
|
16188
|
+
* If set to a non-number value, or set to a negative number, stack traces will
|
16189
|
+
* not capture any frames.
|
15901
16190
|
*/
|
15902
|
-
static prepareStackTrace?: (
|
15903
|
-
err: Error,
|
15904
|
-
stackTraces: NodeJS.CallSite[]
|
15905
|
-
) => any;
|
15906
16191
|
static stackTraceLimit: number;
|
15907
16192
|
}
|
15908
16193
|
declare abstract class WebpackLogger {
|
@@ -16059,7 +16344,7 @@ declare interface WebpackOptionsNormalized {
|
|
16059
16344
|
/**
|
16060
16345
|
* Enables/Disables integrated optimizations.
|
16061
16346
|
*/
|
16062
|
-
optimization:
|
16347
|
+
optimization: OptimizationNormalized;
|
16063
16348
|
|
16064
16349
|
/**
|
16065
16350
|
* Normalized options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.
|
@@ -16250,62 +16535,6 @@ declare interface WriteStreamOptions {
|
|
16250
16535
|
signal?: null | AbortSignal;
|
16251
16536
|
fs?: null | CreateWriteStreamFSImplementation;
|
16252
16537
|
}
|
16253
|
-
type __TypeWebpackOptions = (data: object) =>
|
16254
|
-
| string
|
16255
|
-
| {
|
16256
|
-
/**
|
16257
|
-
* Unique loader options identifier.
|
16258
|
-
*/
|
16259
|
-
ident?: string;
|
16260
|
-
/**
|
16261
|
-
* Loader name.
|
16262
|
-
*/
|
16263
|
-
loader?: string;
|
16264
|
-
/**
|
16265
|
-
* Loader options.
|
16266
|
-
*/
|
16267
|
-
options?: string | { [index: string]: any };
|
16268
|
-
}
|
16269
|
-
| __TypeWebpackOptions
|
16270
|
-
| __Type_2[];
|
16271
|
-
type __Type_2 =
|
16272
|
-
| undefined
|
16273
|
-
| null
|
16274
|
-
| string
|
16275
|
-
| false
|
16276
|
-
| 0
|
16277
|
-
| {
|
16278
|
-
/**
|
16279
|
-
* Unique loader options identifier.
|
16280
|
-
*/
|
16281
|
-
ident?: string;
|
16282
|
-
/**
|
16283
|
-
* Loader name.
|
16284
|
-
*/
|
16285
|
-
loader?: string;
|
16286
|
-
/**
|
16287
|
-
* Loader options.
|
16288
|
-
*/
|
16289
|
-
options?: string | { [index: string]: any };
|
16290
|
-
}
|
16291
|
-
| ((data: object) =>
|
16292
|
-
| string
|
16293
|
-
| {
|
16294
|
-
/**
|
16295
|
-
* Unique loader options identifier.
|
16296
|
-
*/
|
16297
|
-
ident?: string;
|
16298
|
-
/**
|
16299
|
-
* Loader name.
|
16300
|
-
*/
|
16301
|
-
loader?: string;
|
16302
|
-
/**
|
16303
|
-
* Loader options.
|
16304
|
-
*/
|
16305
|
-
options?: string | { [index: string]: any };
|
16306
|
-
}
|
16307
|
-
| __TypeWebpackOptions
|
16308
|
-
| __Type_2[]);
|
16309
16538
|
declare function exports(
|
16310
16539
|
options: Configuration,
|
16311
16540
|
callback?: CallbackWebpack<Stats>
|
@@ -16399,7 +16628,10 @@ declare namespace exports {
|
|
16399
16628
|
export let REGEXP_NAMESPACE: RegExp;
|
16400
16629
|
export let createFilename: (
|
16401
16630
|
module: string | Module,
|
16402
|
-
options: {
|
16631
|
+
options: {
|
16632
|
+
namespace?: string;
|
16633
|
+
moduleFilenameTemplate?: string | ((context?: any) => string);
|
16634
|
+
},
|
16403
16635
|
__2: {
|
16404
16636
|
requestShortener: RequestShortener;
|
16405
16637
|
chunkGraph: ChunkGraph;
|
@@ -16670,7 +16902,7 @@ declare namespace exports {
|
|
16670
16902
|
export { ProfilingPlugin };
|
16671
16903
|
}
|
16672
16904
|
export namespace util {
|
16673
|
-
export const createHash: (algorithm:
|
16905
|
+
export const createHash: (algorithm: HashFunction) => Hash;
|
16674
16906
|
export namespace comparators {
|
16675
16907
|
export let compareChunksById: (a: Chunk, b: Chunk) => 0 | 1 | -1;
|
16676
16908
|
export let compareModulesByIdentifier: (
|
@@ -16837,6 +17069,81 @@ declare namespace exports {
|
|
16837
17069
|
export { SyncModuleIdsPlugin };
|
16838
17070
|
}
|
16839
17071
|
}
|
17072
|
+
export type ExternalItemFunctionCallback = (
|
17073
|
+
data: ExternalItemFunctionData,
|
17074
|
+
callback: (
|
17075
|
+
err?: null | Error,
|
17076
|
+
result?: string | boolean | string[] | { [index: string]: any }
|
17077
|
+
) => void
|
17078
|
+
) => void;
|
17079
|
+
export type ExternalItemFunctionDataGetResolve = (
|
17080
|
+
options?: ResolveOptions
|
17081
|
+
) =>
|
17082
|
+
| ((
|
17083
|
+
context: string,
|
17084
|
+
request: string,
|
17085
|
+
callback: (
|
17086
|
+
err?: null | Error,
|
17087
|
+
result?: string | false,
|
17088
|
+
resolveRequest?: ResolveRequest
|
17089
|
+
) => void
|
17090
|
+
) => void)
|
17091
|
+
| ((context: string, request: string) => Promise<string>);
|
17092
|
+
export type ExternalItemFunctionDataGetResolveCallbackResult = (
|
17093
|
+
context: string,
|
17094
|
+
request: string,
|
17095
|
+
callback: (
|
17096
|
+
err?: null | Error,
|
17097
|
+
result?: string | false,
|
17098
|
+
resolveRequest?: ResolveRequest
|
17099
|
+
) => void
|
17100
|
+
) => void;
|
17101
|
+
export type ExternalItemFunctionDataGetResolveResult = (
|
17102
|
+
context: string,
|
17103
|
+
request: string
|
17104
|
+
) => Promise<string>;
|
17105
|
+
export type ExternalItemFunctionPromise = (
|
17106
|
+
data: ExternalItemFunctionData
|
17107
|
+
) => Promise<ExternalItemValue>;
|
17108
|
+
export type RuleSetUseFunction = (data: EffectData) =>
|
17109
|
+
| string
|
17110
|
+
| RuleSetUseFunction
|
17111
|
+
| {
|
17112
|
+
/**
|
17113
|
+
* Unique loader options identifier.
|
17114
|
+
*/
|
17115
|
+
ident?: string;
|
17116
|
+
/**
|
17117
|
+
* Loader name.
|
17118
|
+
*/
|
17119
|
+
loader?: string;
|
17120
|
+
/**
|
17121
|
+
* Loader options.
|
17122
|
+
*/
|
17123
|
+
options?: string | { [index: string]: any };
|
17124
|
+
}
|
17125
|
+
| (
|
17126
|
+
| undefined
|
17127
|
+
| null
|
17128
|
+
| string
|
17129
|
+
| false
|
17130
|
+
| 0
|
17131
|
+
| RuleSetUseFunction
|
17132
|
+
| {
|
17133
|
+
/**
|
17134
|
+
* Unique loader options identifier.
|
17135
|
+
*/
|
17136
|
+
ident?: string;
|
17137
|
+
/**
|
17138
|
+
* Loader name.
|
17139
|
+
*/
|
17140
|
+
loader?: string;
|
17141
|
+
/**
|
17142
|
+
* Loader options.
|
17143
|
+
*/
|
17144
|
+
options?: string | { [index: string]: any };
|
17145
|
+
}
|
17146
|
+
)[];
|
16840
17147
|
export type WebpackPluginFunction = (
|
16841
17148
|
this: Compiler,
|
16842
17149
|
compiler: Compiler
|
@@ -16903,15 +17210,19 @@ declare namespace exports {
|
|
16903
17210
|
Entry,
|
16904
17211
|
EntryNormalized,
|
16905
17212
|
EntryObject,
|
17213
|
+
ExternalItem,
|
17214
|
+
ExternalItemFunction,
|
16906
17215
|
ExternalItemFunctionData,
|
16907
17216
|
ExternalItemObjectKnown,
|
16908
17217
|
ExternalItemObjectUnknown,
|
16909
17218
|
ExternalItemValue,
|
16910
17219
|
Externals,
|
16911
17220
|
FileCacheOptions,
|
17221
|
+
GeneratorOptionsByModuleTypeKnown,
|
16912
17222
|
LibraryOptions,
|
16913
17223
|
MemoryCacheOptions,
|
16914
17224
|
ModuleOptions,
|
17225
|
+
ParserOptionsByModuleTypeKnown,
|
16915
17226
|
ResolveOptions,
|
16916
17227
|
RuleSetCondition,
|
16917
17228
|
RuleSetConditionAbsolute,
|
@@ -16928,6 +17239,7 @@ declare namespace exports {
|
|
16928
17239
|
EntryOptions,
|
16929
17240
|
PathData,
|
16930
17241
|
AssetEmittedInfo,
|
17242
|
+
Entrypoint,
|
16931
17243
|
MultiCompilerOptions,
|
16932
17244
|
MultiStats,
|
16933
17245
|
ResolveData,
|