webpack 5.108.2 → 5.108.4
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/lib/Compilation.js +1 -4
- package/lib/FlagDependencyExportsPlugin.js +55 -8
- package/lib/LazyBarrel.js +30 -3
- package/lib/NormalModule.js +8 -12
- package/lib/config/defaults.js +3 -3
- package/lib/css/CssGenerator.js +33 -42
- package/lib/css/CssModulesPlugin.js +79 -53
- package/lib/css/CssParser.js +699 -449
- package/lib/css/syntax.js +1146 -360
- package/lib/dependencies/CssIcssExportDependency.js +28 -16
- package/lib/dependencies/HarmonyAcceptDependency.js +8 -16
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +23 -96
- package/lib/dependencies/HarmonyImportGuard.js +192 -20
- package/lib/dependencies/ImportParserPlugin.js +7 -9
- package/lib/html/HtmlGenerator.js +53 -76
- package/lib/html/HtmlModule.js +1 -0
- package/lib/html/HtmlModulesPlugin.js +24 -13
- package/lib/html/HtmlParser.js +240 -124
- package/lib/html/syntax.js +1362 -683
- package/lib/javascript/JavascriptParser.js +10 -0
- package/lib/url/URLParserPlugin.js +33 -7
- package/lib/util/LocConverter.js +9 -8
- package/lib/util/SourceProcessor.js +41 -28
- package/package.json +3 -3
- package/types.d.ts +79 -221
package/types.d.ts
CHANGED
|
@@ -424,9 +424,7 @@ declare interface AssetEmittedInfo {
|
|
|
424
424
|
targetPath: string;
|
|
425
425
|
}
|
|
426
426
|
type AssetFilterItemTypes =
|
|
427
|
-
| string
|
|
428
|
-
| RegExp
|
|
429
|
-
| ((name: string, asset: StatsAsset) => boolean);
|
|
427
|
+
string | RegExp | ((name: string, asset: StatsAsset) => boolean);
|
|
430
428
|
declare abstract class AssetGenerator extends Generator {
|
|
431
429
|
dataUrlOptions?:
|
|
432
430
|
| AssetGeneratorDataUrlOptions
|
|
@@ -982,14 +980,7 @@ declare abstract class BasicEvaluatedExpression {
|
|
|
982
980
|
* As compile time value.
|
|
983
981
|
*/
|
|
984
982
|
asCompileTimeValue():
|
|
985
|
-
|
|
|
986
|
-
| null
|
|
987
|
-
| string
|
|
988
|
-
| number
|
|
989
|
-
| bigint
|
|
990
|
-
| boolean
|
|
991
|
-
| RegExp
|
|
992
|
-
| any[];
|
|
983
|
+
undefined | null | string | number | bigint | boolean | RegExp | any[];
|
|
993
984
|
isTruthy(): boolean;
|
|
994
985
|
isFalsy(): boolean;
|
|
995
986
|
isNullish(): undefined | boolean;
|
|
@@ -1426,8 +1417,7 @@ declare interface CacheGroupSource {
|
|
|
1426
1417
|
maxAsyncRequests?: number;
|
|
1427
1418
|
maxInitialRequests?: number;
|
|
1428
1419
|
filename?:
|
|
1429
|
-
| string
|
|
1430
|
-
| ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
1420
|
+
string | ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
1431
1421
|
idHint?: string;
|
|
1432
1422
|
automaticNameDelimiter?: string;
|
|
1433
1423
|
reuseExistingChunk?: boolean;
|
|
@@ -1568,11 +1558,9 @@ declare class Chunk {
|
|
|
1568
1558
|
idNameHints: SortableSet<string>;
|
|
1569
1559
|
preventIntegration: boolean;
|
|
1570
1560
|
filenameTemplate?:
|
|
1571
|
-
| string
|
|
1572
|
-
| ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
1561
|
+
string | ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
1573
1562
|
cssFilenameTemplate?:
|
|
1574
|
-
| string
|
|
1575
|
-
| ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
1563
|
+
string | ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
1576
1564
|
runtime: RuntimeSpec;
|
|
1577
1565
|
files: Set<string>;
|
|
1578
1566
|
auxiliaryFiles: Set<string>;
|
|
@@ -1841,8 +1829,7 @@ declare interface ChunkConditionMap {
|
|
|
1841
1829
|
[index: string]: boolean;
|
|
1842
1830
|
}
|
|
1843
1831
|
type ChunkFilenameTemplate =
|
|
1844
|
-
| string
|
|
1845
|
-
| ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
1832
|
+
string | ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
1846
1833
|
declare class ChunkGraph {
|
|
1847
1834
|
/**
|
|
1848
1835
|
* Creates an instance of ChunkGraph.
|
|
@@ -2821,8 +2808,7 @@ declare abstract class ChunkTemplate {
|
|
|
2821
2808
|
renderManifest: {
|
|
2822
2809
|
tap: <AdditionalOptions>(
|
|
2823
2810
|
options:
|
|
2824
|
-
| string
|
|
2825
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
2811
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
2826
2812
|
fn: (
|
|
2827
2813
|
renderManifestEntries: RenderManifestEntry[],
|
|
2828
2814
|
renderManifestOptions: RenderManifestOptions
|
|
@@ -2832,8 +2818,7 @@ declare abstract class ChunkTemplate {
|
|
|
2832
2818
|
modules: {
|
|
2833
2819
|
tap: <AdditionalOptions>(
|
|
2834
2820
|
options:
|
|
2835
|
-
| string
|
|
2836
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
2821
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
2837
2822
|
fn: (
|
|
2838
2823
|
source: Source,
|
|
2839
2824
|
moduleTemplate: ModuleTemplate,
|
|
@@ -2844,8 +2829,7 @@ declare abstract class ChunkTemplate {
|
|
|
2844
2829
|
render: {
|
|
2845
2830
|
tap: <AdditionalOptions>(
|
|
2846
2831
|
options:
|
|
2847
|
-
| string
|
|
2848
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
2832
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
2849
2833
|
fn: (
|
|
2850
2834
|
source: Source,
|
|
2851
2835
|
moduleTemplate: ModuleTemplate,
|
|
@@ -2856,24 +2840,21 @@ declare abstract class ChunkTemplate {
|
|
|
2856
2840
|
renderWithEntry: {
|
|
2857
2841
|
tap: <AdditionalOptions>(
|
|
2858
2842
|
options:
|
|
2859
|
-
| string
|
|
2860
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
2843
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
2861
2844
|
fn: (source: Source, chunk: Chunk) => Source
|
|
2862
2845
|
) => void;
|
|
2863
2846
|
};
|
|
2864
2847
|
hash: {
|
|
2865
2848
|
tap: <AdditionalOptions>(
|
|
2866
2849
|
options:
|
|
2867
|
-
| string
|
|
2868
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
2850
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
2869
2851
|
fn: (hash: Hash) => void
|
|
2870
2852
|
) => void;
|
|
2871
2853
|
};
|
|
2872
2854
|
hashForChunk: {
|
|
2873
2855
|
tap: <AdditionalOptions>(
|
|
2874
2856
|
options:
|
|
2875
|
-
| string
|
|
2876
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
2857
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
2877
2858
|
fn: (
|
|
2878
2859
|
hash: Hash,
|
|
2879
2860
|
chunk: Chunk,
|
|
@@ -3123,14 +3104,7 @@ type CodeValue =
|
|
|
3123
3104
|
| RuntimeValue
|
|
3124
3105
|
>[];
|
|
3125
3106
|
type CodeValuePrimitive =
|
|
3126
|
-
|
|
|
3127
|
-
| null
|
|
3128
|
-
| string
|
|
3129
|
-
| number
|
|
3130
|
-
| bigint
|
|
3131
|
-
| boolean
|
|
3132
|
-
| Function
|
|
3133
|
-
| RegExp;
|
|
3107
|
+
undefined | null | string | number | bigint | boolean | Function | RegExp;
|
|
3134
3108
|
declare interface Colors {
|
|
3135
3109
|
reset: (value?: any) => string;
|
|
3136
3110
|
bold: (value?: any) => string;
|
|
@@ -3770,8 +3744,7 @@ declare class Compilation {
|
|
|
3770
3744
|
file: string,
|
|
3771
3745
|
newSourceOrFunction: Source | ((source: Source) => Source),
|
|
3772
3746
|
assetInfoUpdateOrFunction?:
|
|
3773
|
-
| AssetInfo
|
|
3774
|
-
| ((assetInfo?: AssetInfo) => undefined | AssetInfo)
|
|
3747
|
+
AssetInfo | ((assetInfo?: AssetInfo) => undefined | AssetInfo)
|
|
3775
3748
|
): void;
|
|
3776
3749
|
|
|
3777
3750
|
/**
|
|
@@ -4407,19 +4380,13 @@ declare interface ConcatenatedModuleInfo {
|
|
|
4407
4380
|
* memoized getExportsType(strict=true)
|
|
4408
4381
|
*/
|
|
4409
4382
|
exportsTypeStrict?:
|
|
4410
|
-
| "
|
|
4411
|
-
| "dynamic"
|
|
4412
|
-
| "default-only"
|
|
4413
|
-
| "default-with-named";
|
|
4383
|
+
"namespace" | "dynamic" | "default-only" | "default-with-named";
|
|
4414
4384
|
|
|
4415
4385
|
/**
|
|
4416
4386
|
* memoized getExportsType(strict=false)
|
|
4417
4387
|
*/
|
|
4418
4388
|
exportsTypeNonStrict?:
|
|
4419
|
-
| "
|
|
4420
|
-
| "dynamic"
|
|
4421
|
-
| "default-only"
|
|
4422
|
-
| "default-with-named";
|
|
4389
|
+
"namespace" | "dynamic" | "default-only" | "default-with-named";
|
|
4423
4390
|
}
|
|
4424
4391
|
declare interface ConcatenationBailoutReasonContext {
|
|
4425
4392
|
/**
|
|
@@ -4787,9 +4754,7 @@ declare interface Configuration {
|
|
|
4787
4754
|
watchOptions?: WatchOptions;
|
|
4788
4755
|
}
|
|
4789
4756
|
type ConnectionState =
|
|
4790
|
-
|
|
|
4791
|
-
| typeof CIRCULAR_CONNECTION
|
|
4792
|
-
| typeof TRANSITIVE_ONLY;
|
|
4757
|
+
boolean | typeof CIRCULAR_CONNECTION | typeof TRANSITIVE_ONLY;
|
|
4793
4758
|
declare class ConstDependency extends NullDependency {
|
|
4794
4759
|
/**
|
|
4795
4760
|
* Creates an instance of ConstDependency.
|
|
@@ -5035,12 +5000,7 @@ declare interface ContextHash {
|
|
|
5035
5000
|
symlinks?: Set<string>;
|
|
5036
5001
|
}
|
|
5037
5002
|
type ContextMode =
|
|
5038
|
-
| "
|
|
5039
|
-
| "weak"
|
|
5040
|
-
| "lazy"
|
|
5041
|
-
| "lazy-once"
|
|
5042
|
-
| "sync"
|
|
5043
|
-
| "async-weak";
|
|
5003
|
+
"eager" | "weak" | "lazy" | "lazy-once" | "sync" | "async-weak";
|
|
5044
5004
|
type ContextModuleBuildInfo = KnownBuildInfo &
|
|
5045
5005
|
Record<string, any> &
|
|
5046
5006
|
KnownContextModuleBuildInfo;
|
|
@@ -5356,11 +5316,12 @@ declare abstract class CssGenerator extends Generator {
|
|
|
5356
5316
|
* Processes the provided module.
|
|
5357
5317
|
*/
|
|
5358
5318
|
sourceDependency(
|
|
5359
|
-
module: NormalModule,
|
|
5360
5319
|
dependency: Dependency,
|
|
5361
|
-
initFragments: InitFragment<GenerateContext>[],
|
|
5362
5320
|
source: ReplaceSource,
|
|
5363
|
-
|
|
5321
|
+
templateContext: DependencyTemplateContext & {
|
|
5322
|
+
cssData: CssData;
|
|
5323
|
+
type: string;
|
|
5324
|
+
}
|
|
5364
5325
|
): void;
|
|
5365
5326
|
|
|
5366
5327
|
/**
|
|
@@ -6218,11 +6179,9 @@ declare interface DeterministicModuleIdsPluginOptions {
|
|
|
6218
6179
|
failOnConflict?: boolean;
|
|
6219
6180
|
}
|
|
6220
6181
|
type DevtoolFallbackModuleFilenameTemplate =
|
|
6221
|
-
| string
|
|
6222
|
-
| ((context: ModuleFilenameTemplateContext) => string);
|
|
6182
|
+
string | ((context: ModuleFilenameTemplateContext) => string);
|
|
6223
6183
|
type DevtoolModuleFilenameTemplate =
|
|
6224
|
-
| string
|
|
6225
|
-
| ((context: ModuleFilenameTemplateContext) => string);
|
|
6184
|
+
string | ((context: ModuleFilenameTemplateContext) => string);
|
|
6226
6185
|
|
|
6227
6186
|
/**
|
|
6228
6187
|
* Returns location of targetPath relative to rootPath.
|
|
@@ -6949,8 +6908,7 @@ type EntryLibIndex =
|
|
|
6949
6908
|
| EntryObject
|
|
6950
6909
|
| string[];
|
|
6951
6910
|
type EntryNormalized =
|
|
6952
|
-
|
|
6953
|
-
| EntryStaticNormalized;
|
|
6911
|
+
(() => Promise<EntryStaticNormalized>) | EntryStaticNormalized;
|
|
6954
6912
|
|
|
6955
6913
|
/**
|
|
6956
6914
|
* Multiple entry bundles are created. The key is the entry name. The value can be a string, an array or an entry description object.
|
|
@@ -7070,12 +7028,7 @@ declare abstract class Entrypoint extends ChunkGroup {
|
|
|
7070
7028
|
dependOn(entrypoint: Entrypoint): boolean;
|
|
7071
7029
|
}
|
|
7072
7030
|
type EnumValue =
|
|
7073
|
-
|
|
|
7074
|
-
| string
|
|
7075
|
-
| number
|
|
7076
|
-
| boolean
|
|
7077
|
-
| EnumValueObject
|
|
7078
|
-
| EnumValue[];
|
|
7031
|
+
null | string | number | boolean | EnumValueObject | EnumValue[];
|
|
7079
7032
|
declare interface EnumValueObject {
|
|
7080
7033
|
[index: string]: EnumValue;
|
|
7081
7034
|
}
|
|
@@ -7245,8 +7198,7 @@ declare interface EvalDevToolModulePluginOptions {
|
|
|
7245
7198
|
* module filename template
|
|
7246
7199
|
*/
|
|
7247
7200
|
moduleFilenameTemplate?:
|
|
7248
|
-
| string
|
|
7249
|
-
| ((context: ModuleFilenameTemplateContext) => string);
|
|
7201
|
+
string | ((context: ModuleFilenameTemplateContext) => string);
|
|
7250
7202
|
}
|
|
7251
7203
|
declare class EvalSourceMapDevToolPlugin {
|
|
7252
7204
|
/**
|
|
@@ -7957,10 +7909,7 @@ declare interface ExportsSpec {
|
|
|
7957
7909
|
dependencies?: Module[];
|
|
7958
7910
|
}
|
|
7959
7911
|
type ExportsType =
|
|
7960
|
-
| "
|
|
7961
|
-
| "dynamic"
|
|
7962
|
-
| "default-only"
|
|
7963
|
-
| "default-with-named";
|
|
7912
|
+
"namespace" | "dynamic" | "default-only" | "default-with-named";
|
|
7964
7913
|
type Exposes = (string | ExposesObject)[] | ExposesObject;
|
|
7965
7914
|
|
|
7966
7915
|
/**
|
|
@@ -8115,17 +8064,13 @@ declare class ExternalModule extends Module {
|
|
|
8115
8064
|
type: ExternalsType,
|
|
8116
8065
|
userRequest: string,
|
|
8117
8066
|
dependencyMeta?:
|
|
8118
|
-
|
|
|
8119
|
-
| CssImportDependencyMeta
|
|
8120
|
-
| AssetDependencyMeta
|
|
8067
|
+
ImportDependencyMeta | CssImportDependencyMeta | AssetDependencyMeta
|
|
8121
8068
|
);
|
|
8122
8069
|
request: ExternalModuleRequest;
|
|
8123
8070
|
externalType: ExternalsType;
|
|
8124
8071
|
userRequest: string;
|
|
8125
8072
|
dependencyMeta?:
|
|
8126
|
-
|
|
|
8127
|
-
| CssImportDependencyMeta
|
|
8128
|
-
| AssetDependencyMeta;
|
|
8073
|
+
ImportDependencyMeta | CssImportDependencyMeta | AssetDependencyMeta;
|
|
8129
8074
|
|
|
8130
8075
|
/**
|
|
8131
8076
|
* restore unsafe cache data
|
|
@@ -8224,19 +8169,13 @@ declare interface ExternalModuleInfo {
|
|
|
8224
8169
|
* memoized getExportsType(strict=true)
|
|
8225
8170
|
*/
|
|
8226
8171
|
exportsTypeStrict?:
|
|
8227
|
-
| "
|
|
8228
|
-
| "dynamic"
|
|
8229
|
-
| "default-only"
|
|
8230
|
-
| "default-with-named";
|
|
8172
|
+
"namespace" | "dynamic" | "default-only" | "default-with-named";
|
|
8231
8173
|
|
|
8232
8174
|
/**
|
|
8233
8175
|
* memoized getExportsType(strict=false)
|
|
8234
8176
|
*/
|
|
8235
8177
|
exportsTypeNonStrict?:
|
|
8236
|
-
| "
|
|
8237
|
-
| "dynamic"
|
|
8238
|
-
| "default-only"
|
|
8239
|
-
| "default-with-named";
|
|
8178
|
+
"namespace" | "dynamic" | "default-only" | "default-with-named";
|
|
8240
8179
|
}
|
|
8241
8180
|
type ExternalModuleRequest = string | string[] | RequestRecord;
|
|
8242
8181
|
type Externals =
|
|
@@ -8699,9 +8638,7 @@ declare abstract class FileSystemInfo {
|
|
|
8699
8638
|
callback: (
|
|
8700
8639
|
err?: null | WebpackError,
|
|
8701
8640
|
resolvedContextTimestamp?:
|
|
8702
|
-
|
|
|
8703
|
-
| "ignore"
|
|
8704
|
-
| ResolvedContextFileSystemInfoEntry
|
|
8641
|
+
null | "ignore" | ResolvedContextFileSystemInfoEntry
|
|
8705
8642
|
) => void
|
|
8706
8643
|
): void;
|
|
8707
8644
|
|
|
@@ -8784,10 +8721,7 @@ declare interface FileSystemInfoEntry {
|
|
|
8784
8721
|
timestamp?: number;
|
|
8785
8722
|
}
|
|
8786
8723
|
type FileTimestamp =
|
|
8787
|
-
|
|
|
8788
|
-
| "ignore"
|
|
8789
|
-
| FileSystemInfoEntry
|
|
8790
|
-
| ExistenceOnlyTimeEntryFileSystemInfo;
|
|
8724
|
+
null | "ignore" | FileSystemInfoEntry | ExistenceOnlyTimeEntryFileSystemInfo;
|
|
8791
8725
|
type FilterItemTypes = string | RegExp | ((value: string) => boolean);
|
|
8792
8726
|
declare interface Flags {
|
|
8793
8727
|
[index: string]: Argument;
|
|
@@ -9453,22 +9387,18 @@ declare abstract class HtmlGenerator extends Generator {
|
|
|
9453
9387
|
* Processes the provided module.
|
|
9454
9388
|
*/
|
|
9455
9389
|
sourceDependency(
|
|
9456
|
-
module: NormalModule,
|
|
9457
9390
|
dependency: Dependency,
|
|
9458
|
-
initFragments: InitFragment<GenerateContext>[],
|
|
9459
9391
|
source: ReplaceSource,
|
|
9460
|
-
|
|
9392
|
+
templateContext: DependencyTemplateContext
|
|
9461
9393
|
): void;
|
|
9462
9394
|
|
|
9463
9395
|
/**
|
|
9464
9396
|
* Processes the provided dependencies block.
|
|
9465
9397
|
*/
|
|
9466
9398
|
sourceBlock(
|
|
9467
|
-
module: NormalModule,
|
|
9468
9399
|
block: DependenciesBlock,
|
|
9469
|
-
initFragments: InitFragment<GenerateContext>[],
|
|
9470
9400
|
source: ReplaceSource,
|
|
9471
|
-
|
|
9401
|
+
templateContext: DependencyTemplateContext
|
|
9472
9402
|
): void;
|
|
9473
9403
|
|
|
9474
9404
|
/**
|
|
@@ -10052,12 +9982,7 @@ declare interface ImportSettings {
|
|
|
10052
9982
|
expression: ImportExpressionJavascriptParser;
|
|
10053
9983
|
}
|
|
10054
9984
|
type ImportSource =
|
|
10055
|
-
|
|
|
10056
|
-
| null
|
|
10057
|
-
| string
|
|
10058
|
-
| SimpleLiteral
|
|
10059
|
-
| RegExpLiteral
|
|
10060
|
-
| BigIntLiteral;
|
|
9985
|
+
undefined | null | string | SimpleLiteral | RegExpLiteral | BigIntLiteral;
|
|
10061
9986
|
type Imported = true | [string, string][];
|
|
10062
9987
|
|
|
10063
9988
|
/**
|
|
@@ -12771,13 +12696,7 @@ declare abstract class JsonData {
|
|
|
12771
12696
|
* Returns raw JSON data.
|
|
12772
12697
|
*/
|
|
12773
12698
|
get():
|
|
12774
|
-
|
|
|
12775
|
-
| null
|
|
12776
|
-
| string
|
|
12777
|
-
| number
|
|
12778
|
-
| boolean
|
|
12779
|
-
| JsonObjectFs
|
|
12780
|
-
| JsonValueFs[];
|
|
12699
|
+
undefined | null | string | number | boolean | JsonObjectFs | JsonValueFs[];
|
|
12781
12700
|
|
|
12782
12701
|
/**
|
|
12783
12702
|
* Updates the hash with the data contributed by this instance.
|
|
@@ -12812,13 +12731,7 @@ type JsonModuleBuildInfo = KnownBuildInfo &
|
|
|
12812
12731
|
KnownJsonModuleBuildInfo;
|
|
12813
12732
|
declare interface JsonObjectFs {
|
|
12814
12733
|
[index: string]:
|
|
12815
|
-
|
|
|
12816
|
-
| null
|
|
12817
|
-
| string
|
|
12818
|
-
| number
|
|
12819
|
-
| boolean
|
|
12820
|
-
| JsonObjectFs
|
|
12821
|
-
| JsonValueFs[];
|
|
12734
|
+
undefined | null | string | number | boolean | JsonObjectFs | JsonValueFs[];
|
|
12822
12735
|
}
|
|
12823
12736
|
declare interface JsonObjectTypes {
|
|
12824
12737
|
[index: string]:
|
|
@@ -12856,19 +12769,9 @@ declare interface JsonParserOptions {
|
|
|
12856
12769
|
) => null | string | number | boolean | Buffer | JsonObjectFs | JsonValueFs[];
|
|
12857
12770
|
}
|
|
12858
12771
|
type JsonValueFs =
|
|
12859
|
-
|
|
|
12860
|
-
| string
|
|
12861
|
-
| number
|
|
12862
|
-
| boolean
|
|
12863
|
-
| JsonObjectFs
|
|
12864
|
-
| JsonValueFs[];
|
|
12772
|
+
null | string | number | boolean | JsonObjectFs | JsonValueFs[];
|
|
12865
12773
|
type JsonValueTypes =
|
|
12866
|
-
|
|
|
12867
|
-
| string
|
|
12868
|
-
| number
|
|
12869
|
-
| boolean
|
|
12870
|
-
| JsonObjectTypes
|
|
12871
|
-
| JsonValueTypes[];
|
|
12774
|
+
null | string | number | boolean | JsonObjectTypes | JsonValueTypes[];
|
|
12872
12775
|
declare class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
|
|
12873
12776
|
constructor(runtimeRequirements: ReadonlySet<string>);
|
|
12874
12777
|
static getCompilationHooks: (
|
|
@@ -13121,6 +13024,11 @@ declare interface KnownHtmlModuleBuildInfo {
|
|
|
13121
13024
|
* entries collected from the document, grouped by kind
|
|
13122
13025
|
*/
|
|
13123
13026
|
htmlEntryScripts?: Record<string, EntryScriptInfo[]>;
|
|
13027
|
+
|
|
13028
|
+
/**
|
|
13029
|
+
* `../` per `<base href>` path segment, prepended to the auto-public-path undo path so a relative base doesn't misdirect bundled URLs
|
|
13030
|
+
*/
|
|
13031
|
+
baseUrlPrefix?: string;
|
|
13124
13032
|
}
|
|
13125
13033
|
declare interface KnownJavascriptModuleBuildInfo {
|
|
13126
13034
|
/**
|
|
@@ -13655,9 +13563,7 @@ declare interface LazyCompilationDefaultBackendOptions {
|
|
|
13655
13563
|
* Specifies where to listen to from the server.
|
|
13656
13564
|
*/
|
|
13657
13565
|
listen?:
|
|
13658
|
-
|
|
|
13659
|
-
| ListenOptions
|
|
13660
|
-
| ((server: ServerLazyCompilationBackend) => void);
|
|
13566
|
+
number | ListenOptions | ((server: ServerLazyCompilationBackend) => void);
|
|
13661
13567
|
|
|
13662
13568
|
/**
|
|
13663
13569
|
* Specifies the protocol the client should use to connect to the server.
|
|
@@ -14412,8 +14318,7 @@ declare abstract class MainTemplate {
|
|
|
14412
14318
|
renderManifest: {
|
|
14413
14319
|
tap: <AdditionalOptions>(
|
|
14414
14320
|
options:
|
|
14415
|
-
| string
|
|
14416
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
14321
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
14417
14322
|
fn: (
|
|
14418
14323
|
renderManifestEntries: RenderManifestEntry[],
|
|
14419
14324
|
renderManifestOptions: RenderManifestOptions
|
|
@@ -14425,8 +14330,7 @@ declare abstract class MainTemplate {
|
|
|
14425
14330
|
require: {
|
|
14426
14331
|
tap: <AdditionalOptions>(
|
|
14427
14332
|
options:
|
|
14428
|
-
| string
|
|
14429
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
14333
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
14430
14334
|
fn: (
|
|
14431
14335
|
value: string,
|
|
14432
14336
|
renderBootstrapContext: RenderBootstrapContext
|
|
@@ -14439,8 +14343,7 @@ declare abstract class MainTemplate {
|
|
|
14439
14343
|
render: {
|
|
14440
14344
|
tap: <AdditionalOptions>(
|
|
14441
14345
|
options:
|
|
14442
|
-
| string
|
|
14443
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
14346
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
14444
14347
|
fn: (
|
|
14445
14348
|
source: Source,
|
|
14446
14349
|
chunk: Chunk,
|
|
@@ -14453,16 +14356,14 @@ declare abstract class MainTemplate {
|
|
|
14453
14356
|
renderWithEntry: {
|
|
14454
14357
|
tap: <AdditionalOptions>(
|
|
14455
14358
|
options:
|
|
14456
|
-
| string
|
|
14457
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
14359
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
14458
14360
|
fn: (source: Source, chunk: Chunk, hash?: string) => Source
|
|
14459
14361
|
) => void;
|
|
14460
14362
|
};
|
|
14461
14363
|
assetPath: {
|
|
14462
14364
|
tap: <AdditionalOptions>(
|
|
14463
14365
|
options:
|
|
14464
|
-
| string
|
|
14465
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
14366
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
14466
14367
|
fn: (value: string, path: PathData, assetInfo?: AssetInfo) => string
|
|
14467
14368
|
) => void;
|
|
14468
14369
|
call: (filename: TemplatePath, options: PathData) => string;
|
|
@@ -14470,16 +14371,14 @@ declare abstract class MainTemplate {
|
|
|
14470
14371
|
hash: {
|
|
14471
14372
|
tap: <AdditionalOptions>(
|
|
14472
14373
|
options:
|
|
14473
|
-
| string
|
|
14474
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
14374
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
14475
14375
|
fn: (hash: Hash) => void
|
|
14476
14376
|
) => void;
|
|
14477
14377
|
};
|
|
14478
14378
|
hashForChunk: {
|
|
14479
14379
|
tap: <AdditionalOptions>(
|
|
14480
14380
|
options:
|
|
14481
|
-
| string
|
|
14482
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
14381
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
14483
14382
|
fn: (hash: Hash, chunk: Chunk) => void
|
|
14484
14383
|
) => void;
|
|
14485
14384
|
};
|
|
@@ -14762,10 +14661,7 @@ declare interface MkdirSync {
|
|
|
14762
14661
|
(
|
|
14763
14662
|
path: PathLikeFs,
|
|
14764
14663
|
options?:
|
|
14765
|
-
|
|
|
14766
|
-
| string
|
|
14767
|
-
| number
|
|
14768
|
-
| (MakeDirectoryOptions & { recursive?: false })
|
|
14664
|
+
null | string | number | (MakeDirectoryOptions & { recursive?: false })
|
|
14769
14665
|
): void;
|
|
14770
14666
|
(
|
|
14771
14667
|
path: PathLikeFs,
|
|
@@ -14859,8 +14755,7 @@ declare class Module extends DependenciesBlock {
|
|
|
14859
14755
|
* @deprecated
|
|
14860
14756
|
*/
|
|
14861
14757
|
get optimizationBailout(): (
|
|
14862
|
-
| string
|
|
14863
|
-
| ((requestShortener: RequestShortener) => string)
|
|
14758
|
+
string | ((requestShortener: RequestShortener) => string)
|
|
14864
14759
|
)[];
|
|
14865
14760
|
|
|
14866
14761
|
/**
|
|
@@ -16299,8 +16194,7 @@ declare abstract class ModuleTemplate {
|
|
|
16299
16194
|
content: {
|
|
16300
16195
|
tap: <AdditionalOptions>(
|
|
16301
16196
|
options:
|
|
16302
|
-
| string
|
|
16303
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
16197
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
16304
16198
|
fn: (
|
|
16305
16199
|
source: Source,
|
|
16306
16200
|
module: Module,
|
|
@@ -16312,8 +16206,7 @@ declare abstract class ModuleTemplate {
|
|
|
16312
16206
|
module: {
|
|
16313
16207
|
tap: <AdditionalOptions>(
|
|
16314
16208
|
options:
|
|
16315
|
-
| string
|
|
16316
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
16209
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
16317
16210
|
fn: (
|
|
16318
16211
|
source: Source,
|
|
16319
16212
|
module: Module,
|
|
@@ -16325,8 +16218,7 @@ declare abstract class ModuleTemplate {
|
|
|
16325
16218
|
render: {
|
|
16326
16219
|
tap: <AdditionalOptions>(
|
|
16327
16220
|
options:
|
|
16328
|
-
| string
|
|
16329
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
16221
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
16330
16222
|
fn: (
|
|
16331
16223
|
source: Source,
|
|
16332
16224
|
module: Module,
|
|
@@ -16338,8 +16230,7 @@ declare abstract class ModuleTemplate {
|
|
|
16338
16230
|
package: {
|
|
16339
16231
|
tap: <AdditionalOptions>(
|
|
16340
16232
|
options:
|
|
16341
|
-
| string
|
|
16342
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
16233
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
16343
16234
|
fn: (
|
|
16344
16235
|
source: Source,
|
|
16345
16236
|
module: Module,
|
|
@@ -16351,8 +16242,7 @@ declare abstract class ModuleTemplate {
|
|
|
16351
16242
|
hash: {
|
|
16352
16243
|
tap: <AdditionalOptions>(
|
|
16353
16244
|
options:
|
|
16354
|
-
| string
|
|
16355
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
16245
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
16356
16246
|
fn: (hash: Hash) => void
|
|
16357
16247
|
) => void;
|
|
16358
16248
|
};
|
|
@@ -17863,12 +17753,7 @@ declare interface Optimization {
|
|
|
17863
17753
|
* 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).
|
|
17864
17754
|
*/
|
|
17865
17755
|
chunkIds?:
|
|
17866
|
-
|
|
|
17867
|
-
| "natural"
|
|
17868
|
-
| "named"
|
|
17869
|
-
| "deterministic"
|
|
17870
|
-
| "size"
|
|
17871
|
-
| "total-size";
|
|
17756
|
+
false | "natural" | "named" | "deterministic" | "size" | "total-size";
|
|
17872
17757
|
|
|
17873
17758
|
/**
|
|
17874
17759
|
* Concatenate modules when possible to generate less modules, more efficient code and enable more optimizations by the minimizer.
|
|
@@ -18018,12 +17903,7 @@ declare interface OptimizationNormalized {
|
|
|
18018
17903
|
* 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).
|
|
18019
17904
|
*/
|
|
18020
17905
|
chunkIds?:
|
|
18021
|
-
|
|
|
18022
|
-
| "natural"
|
|
18023
|
-
| "named"
|
|
18024
|
-
| "deterministic"
|
|
18025
|
-
| "size"
|
|
18026
|
-
| "total-size";
|
|
17906
|
+
false | "natural" | "named" | "deterministic" | "size" | "total-size";
|
|
18027
17907
|
|
|
18028
17908
|
/**
|
|
18029
17909
|
* Concatenate modules when possible to generate less modules, more efficient code and enable more optimizations by the minimizer.
|
|
@@ -18639,15 +18519,13 @@ declare interface Output {
|
|
|
18639
18519
|
* Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
|
|
18640
18520
|
*/
|
|
18641
18521
|
devtoolFallbackModuleFilenameTemplate?:
|
|
18642
|
-
| string
|
|
18643
|
-
| ((context: ModuleFilenameTemplateContext) => string);
|
|
18522
|
+
string | ((context: ModuleFilenameTemplateContext) => string);
|
|
18644
18523
|
|
|
18645
18524
|
/**
|
|
18646
18525
|
* Filename template string of function for the sources array in a generated SourceMap.
|
|
18647
18526
|
*/
|
|
18648
18527
|
devtoolModuleFilenameTemplate?:
|
|
18649
|
-
| string
|
|
18650
|
-
| ((context: ModuleFilenameTemplateContext) => string);
|
|
18528
|
+
string | ((context: ModuleFilenameTemplateContext) => string);
|
|
18651
18529
|
|
|
18652
18530
|
/**
|
|
18653
18531
|
* Module namespace to use when interpolating filename template string for the sources array in a generated SourceMap. Defaults to `output.library` if not set. It's useful for avoiding runtime collisions in sourcemaps from multiple webpack projects built as libraries.
|
|
@@ -18989,15 +18867,13 @@ declare interface OutputNormalized {
|
|
|
18989
18867
|
* Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
|
|
18990
18868
|
*/
|
|
18991
18869
|
devtoolFallbackModuleFilenameTemplate?:
|
|
18992
|
-
| string
|
|
18993
|
-
| ((context: ModuleFilenameTemplateContext) => string);
|
|
18870
|
+
string | ((context: ModuleFilenameTemplateContext) => string);
|
|
18994
18871
|
|
|
18995
18872
|
/**
|
|
18996
18873
|
* Filename template string of function for the sources array in a generated SourceMap.
|
|
18997
18874
|
*/
|
|
18998
18875
|
devtoolModuleFilenameTemplate?:
|
|
18999
|
-
| string
|
|
19000
|
-
| ((context: ModuleFilenameTemplateContext) => string);
|
|
18876
|
+
string | ((context: ModuleFilenameTemplateContext) => string);
|
|
19001
18877
|
|
|
19002
18878
|
/**
|
|
19003
18879
|
* Module namespace to use when interpolating filename template string for the sources array in a generated SourceMap. Defaults to `output.library` if not set. It's useful for avoiding runtime collisions in sourcemaps from multiple webpack projects built as libraries.
|
|
@@ -19929,8 +19805,7 @@ declare interface ProvidesObject {
|
|
|
19929
19805
|
[index: string]: string | ProvidesConfig;
|
|
19930
19806
|
}
|
|
19931
19807
|
type PureCondition =
|
|
19932
|
-
| boolean
|
|
19933
|
-
| ((compilation: Compilation, module: Module) => boolean);
|
|
19808
|
+
boolean | ((compilation: Compilation, module: Module) => boolean);
|
|
19934
19809
|
declare interface RawChunkGroupOptions {
|
|
19935
19810
|
preloadOrder?: number;
|
|
19936
19811
|
prefetchOrder?: number;
|
|
@@ -20114,9 +19989,7 @@ declare interface ReadFileFs {
|
|
|
20114
19989
|
(
|
|
20115
19990
|
path: PathOrFileDescriptorFs,
|
|
20116
19991
|
options:
|
|
20117
|
-
|
|
|
20118
|
-
| null
|
|
20119
|
-
| ({ encoding?: null; flag?: string } & Abortable),
|
|
19992
|
+
undefined | null | ({ encoding?: null; flag?: string } & Abortable),
|
|
20120
19993
|
callback: (err: null | NodeJS.ErrnoException, result?: Buffer) => void
|
|
20121
19994
|
): void;
|
|
20122
19995
|
(
|
|
@@ -20210,9 +20083,7 @@ declare interface ReadFileTypes {
|
|
|
20210
20083
|
(
|
|
20211
20084
|
path: PathOrFileDescriptorTypes,
|
|
20212
20085
|
options:
|
|
20213
|
-
|
|
|
20214
|
-
| null
|
|
20215
|
-
| ({ encoding?: null; flag?: string } & Abortable),
|
|
20086
|
+
undefined | null | ({ encoding?: null; flag?: string } & Abortable),
|
|
20216
20087
|
callback: (err: null | NodeJS.ErrnoException, result?: Buffer) => void
|
|
20217
20088
|
): void;
|
|
20218
20089
|
(
|
|
@@ -20933,8 +20804,7 @@ declare interface RenderContextJavascriptModulesPlugin {
|
|
|
20933
20804
|
strictMode?: boolean;
|
|
20934
20805
|
}
|
|
20935
20806
|
type RenderManifestEntry =
|
|
20936
|
-
|
|
|
20937
|
-
| RenderManifestEntryStatic;
|
|
20807
|
+
RenderManifestEntryTemplated | RenderManifestEntryStatic;
|
|
20938
20808
|
declare interface RenderManifestEntryStatic {
|
|
20939
20809
|
render: () => Source;
|
|
20940
20810
|
filename: string;
|
|
@@ -21560,9 +21430,7 @@ declare interface ResolveOptionsResolverFactoryObject2 {
|
|
|
21560
21430
|
* A list of main fields in description files
|
|
21561
21431
|
*/
|
|
21562
21432
|
mainFields?: (
|
|
21563
|
-
| string
|
|
21564
|
-
| string[]
|
|
21565
|
-
| { name: string | string[]; forceRelative: boolean }
|
|
21433
|
+
string | string[] | { name: string | string[]; forceRelative: boolean }
|
|
21566
21434
|
)[];
|
|
21567
21435
|
|
|
21568
21436
|
/**
|
|
@@ -23711,8 +23579,7 @@ declare interface SourceMapDevToolPluginOptions {
|
|
|
23711
23579
|
* Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap used only if 'moduleFilenameTemplate' would result in a conflict.
|
|
23712
23580
|
*/
|
|
23713
23581
|
fallbackModuleFilenameTemplate?:
|
|
23714
|
-
| string
|
|
23715
|
-
| ((context: ModuleFilenameTemplateContext) => string);
|
|
23582
|
+
string | ((context: ModuleFilenameTemplateContext) => string);
|
|
23716
23583
|
|
|
23717
23584
|
/**
|
|
23718
23585
|
* Path prefix to which the [file] placeholder is relative to.
|
|
@@ -23743,8 +23610,7 @@ declare interface SourceMapDevToolPluginOptions {
|
|
|
23743
23610
|
* Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap.
|
|
23744
23611
|
*/
|
|
23745
23612
|
moduleFilenameTemplate?:
|
|
23746
|
-
| string
|
|
23747
|
-
| ((context: ModuleFilenameTemplateContext) => string);
|
|
23613
|
+
string | ((context: ModuleFilenameTemplateContext) => string);
|
|
23748
23614
|
|
|
23749
23615
|
/**
|
|
23750
23616
|
* Namespace prefix to allow multiple webpack roots in the devtools.
|
|
@@ -23851,8 +23717,7 @@ declare interface SplitChunksOptions {
|
|
|
23851
23717
|
maxInitialRequests: number;
|
|
23852
23718
|
hidePathInfo: boolean;
|
|
23853
23719
|
filename?:
|
|
23854
|
-
| string
|
|
23855
|
-
| ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
23720
|
+
string | ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
23856
23721
|
automaticNameDelimiter: string;
|
|
23857
23722
|
getCacheGroups: (
|
|
23858
23723
|
module: Module,
|
|
@@ -25253,10 +25118,7 @@ declare interface UserAliasOptionEntry {
|
|
|
25253
25118
|
onlyModule?: boolean;
|
|
25254
25119
|
}
|
|
25255
25120
|
type UserAliasOptionNewRequest =
|
|
25256
|
-
| string
|
|
25257
|
-
| false
|
|
25258
|
-
| URL_url
|
|
25259
|
-
| (string | URL_url)[];
|
|
25121
|
+
string | false | URL_url | (string | URL_url)[];
|
|
25260
25122
|
declare interface UserAliasOptions {
|
|
25261
25123
|
[index: string]: UserAliasOptionNewRequest;
|
|
25262
25124
|
}
|
|
@@ -25400,9 +25262,7 @@ declare class VirtualUrlPlugin {
|
|
|
25400
25262
|
static DEFAULT_SCHEME: string;
|
|
25401
25263
|
}
|
|
25402
25264
|
type WarningFilterItemTypes =
|
|
25403
|
-
| string
|
|
25404
|
-
| RegExp
|
|
25405
|
-
| ((warning: StatsError, warningString: string) => boolean);
|
|
25265
|
+
string | RegExp | ((warning: StatsError, warningString: string) => boolean);
|
|
25406
25266
|
|
|
25407
25267
|
/**
|
|
25408
25268
|
* Returns location of targetPath relative to rootPath.
|
|
@@ -26060,8 +25920,7 @@ declare interface WebpackOptionsNormalized {
|
|
|
26060
25920
|
* Add additional plugins to the compiler.
|
|
26061
25921
|
*/
|
|
26062
25922
|
plugins: (
|
|
26063
|
-
|
|
26064
|
-
| WebpackPluginInstance
|
|
25923
|
+
((this: Compiler, compiler: Compiler) => void) | WebpackPluginInstance
|
|
26065
25924
|
)[];
|
|
26066
25925
|
|
|
26067
25926
|
/**
|
|
@@ -26403,8 +26262,7 @@ declare namespace exports {
|
|
|
26403
26262
|
options: {
|
|
26404
26263
|
namespace?: string;
|
|
26405
26264
|
moduleFilenameTemplate?:
|
|
26406
|
-
| string
|
|
26407
|
-
| ((context: ModuleFilenameTemplateContext) => string);
|
|
26265
|
+
string | ((context: ModuleFilenameTemplateContext) => string);
|
|
26408
26266
|
},
|
|
26409
26267
|
__2: {
|
|
26410
26268
|
requestShortener: RequestShortener;
|