webpack 5.107.0 → 5.107.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.
- package/lib/BannerPlugin.js +3 -4
- package/lib/Chunk.js +21 -25
- package/lib/ChunkGroup.js +57 -15
- package/lib/Compilation.js +33 -11
- package/lib/EvalSourceMapDevToolPlugin.js +0 -1
- package/lib/ExportsInfo.js +30 -34
- package/lib/ExternalModule.js +15 -11
- package/lib/ExternalModuleFactoryPlugin.js +2 -1
- package/lib/Module.js +1 -1
- package/lib/ModuleNotFoundError.js +10 -0
- package/lib/ModuleSourceTypeConstants.js +24 -22
- package/lib/NormalModule.js +106 -46
- package/lib/NormalModuleFactory.js +38 -26
- package/lib/RuntimePlugin.js +1 -1
- package/lib/SourceMapDevToolPlugin.js +250 -49
- package/lib/Template.js +1 -1
- package/lib/TemplatedPathPlugin.js +22 -4
- package/lib/asset/AssetBytesGenerator.js +6 -6
- package/lib/asset/AssetGenerator.js +14 -14
- package/lib/asset/AssetModulesPlugin.js +3 -7
- package/lib/asset/AssetSourceGenerator.js +6 -6
- package/lib/css/CssModulesPlugin.js +2 -2
- package/lib/dependencies/CommonJsImportsParserPlugin.js +108 -1
- package/lib/dependencies/CssUrlDependency.js +3 -2
- package/lib/dependencies/HarmonyDetectionParserPlugin.js +21 -1
- package/lib/dependencies/HtmlScriptSrcDependency.js +264 -25
- package/lib/dependencies/HtmlSourceDependency.js +3 -2
- package/lib/html/HtmlModulesPlugin.js +1 -5
- package/lib/html/walkHtmlTokens.js +641 -125
- package/lib/index.js +2 -0
- package/lib/javascript/JavascriptModulesPlugin.js +2 -2
- package/lib/optimize/SideEffectsFlagPlugin.js +1 -2
- package/lib/optimize/SplitChunksPlugin.js +4 -4
- package/lib/runtime/AutoPublicPathRuntimeModule.js +3 -3
- package/lib/runtime/GetChunkFilenameRuntimeModule.js +5 -5
- package/lib/sharing/ConsumeSharedPlugin.js +2 -8
- package/lib/sharing/ProvideSharedPlugin.js +4 -4
- package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +1 -2
- package/package.json +3 -3
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +11 -9
- package/schemas/plugins/container/ContainerReferencePlugin.check.js +1 -1
- package/schemas/plugins/container/ContainerReferencePlugin.json +1 -0
- package/schemas/plugins/container/ExternalsType.check.js +1 -1
- package/schemas/plugins/container/ModuleFederationPlugin.check.js +1 -1
- package/schemas/plugins/container/ModuleFederationPlugin.json +1 -0
- package/types.d.ts +355 -144
package/types.d.ts
CHANGED
|
@@ -327,9 +327,9 @@ declare interface AllCodeGenerationSchemas {
|
|
|
327
327
|
chunkInitFragments: InitFragment<any>[];
|
|
328
328
|
|
|
329
329
|
/**
|
|
330
|
-
* url for
|
|
330
|
+
* url for asset modules
|
|
331
331
|
*/
|
|
332
|
-
url: { javascript?: string; "
|
|
332
|
+
url: { javascript?: string; "asset-url"?: string };
|
|
333
333
|
|
|
334
334
|
/**
|
|
335
335
|
* a filename for asset modules
|
|
@@ -435,7 +435,7 @@ declare abstract class AssetBytesGenerator extends Generator {
|
|
|
435
435
|
}
|
|
436
436
|
declare abstract class AssetBytesParser extends ParserClass {}
|
|
437
437
|
declare interface AssetDependencyMeta {
|
|
438
|
-
sourceType: "css-url";
|
|
438
|
+
sourceType: "asset-url" | "css-url";
|
|
439
439
|
}
|
|
440
440
|
|
|
441
441
|
/**
|
|
@@ -459,9 +459,9 @@ declare abstract class AssetGenerator extends Generator {
|
|
|
459
459
|
source: string | Buffer,
|
|
460
460
|
context: { filename: string; module: Module }
|
|
461
461
|
) => string);
|
|
462
|
-
filename?: string |
|
|
463
|
-
publicPath?: string |
|
|
464
|
-
outputPath?: string |
|
|
462
|
+
filename?: string | TemplatePathFn<PathDataModule>;
|
|
463
|
+
publicPath?: string | TemplatePathFn<PathData>;
|
|
464
|
+
outputPath?: string | TemplatePathFn<PathDataModule>;
|
|
465
465
|
emit?: boolean;
|
|
466
466
|
|
|
467
467
|
/**
|
|
@@ -571,19 +571,19 @@ declare interface AssetResourceGeneratorOptions {
|
|
|
571
571
|
emit?: boolean;
|
|
572
572
|
|
|
573
573
|
/**
|
|
574
|
-
*
|
|
574
|
+
* The filename of asset modules as relative path inside the 'output.path' directory.
|
|
575
575
|
*/
|
|
576
|
-
filename?: string |
|
|
576
|
+
filename?: string | TemplatePathFn<PathDataModule>;
|
|
577
577
|
|
|
578
578
|
/**
|
|
579
579
|
* Emit the asset in the specified folder relative to 'output.path'. This should only be needed when custom 'publicPath' is specified to match the folder structure there.
|
|
580
580
|
*/
|
|
581
|
-
outputPath?: string |
|
|
581
|
+
outputPath?: string | TemplatePathFn<PathDataModule>;
|
|
582
582
|
|
|
583
583
|
/**
|
|
584
584
|
* The 'publicPath' specifies the public URL address of the output files when referenced in a browser.
|
|
585
585
|
*/
|
|
586
|
-
publicPath?: string |
|
|
586
|
+
publicPath?: string | TemplatePathFn<PathData>;
|
|
587
587
|
}
|
|
588
588
|
declare abstract class AssetSourceGenerator extends Generator {
|
|
589
589
|
/**
|
|
@@ -1426,7 +1426,9 @@ declare interface CacheGroupSource {
|
|
|
1426
1426
|
minChunks?: number;
|
|
1427
1427
|
maxAsyncRequests?: number;
|
|
1428
1428
|
maxInitialRequests?: number;
|
|
1429
|
-
filename?:
|
|
1429
|
+
filename?:
|
|
1430
|
+
| string
|
|
1431
|
+
| ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
1430
1432
|
idHint?: string;
|
|
1431
1433
|
automaticNameDelimiter?: string;
|
|
1432
1434
|
reuseExistingChunk?: boolean;
|
|
@@ -1563,10 +1565,10 @@ declare class Chunk {
|
|
|
1563
1565
|
preventIntegration: boolean;
|
|
1564
1566
|
filenameTemplate?:
|
|
1565
1567
|
| string
|
|
1566
|
-
| ((pathData:
|
|
1568
|
+
| ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
1567
1569
|
cssFilenameTemplate?:
|
|
1568
1570
|
| string
|
|
1569
|
-
| ((pathData:
|
|
1571
|
+
| ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
1570
1572
|
runtime: RuntimeSpec;
|
|
1571
1573
|
files: Set<string>;
|
|
1572
1574
|
auxiliaryFiles: Set<string>;
|
|
@@ -1833,6 +1835,9 @@ declare interface ChunkConditionMap {
|
|
|
1833
1835
|
[index: number]: boolean;
|
|
1834
1836
|
[index: string]: boolean;
|
|
1835
1837
|
}
|
|
1838
|
+
type ChunkFilenameTemplate =
|
|
1839
|
+
| string
|
|
1840
|
+
| ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
1836
1841
|
declare class ChunkGraph {
|
|
1837
1842
|
/**
|
|
1838
1843
|
* Creates an instance of ChunkGraph.
|
|
@@ -2525,6 +2530,18 @@ declare abstract class ChunkGroup {
|
|
|
2525
2530
|
*/
|
|
2526
2531
|
compareTo(chunkGraph: ChunkGraph, otherGroup: ChunkGroup): 0 | 1 | -1;
|
|
2527
2532
|
|
|
2533
|
+
/**
|
|
2534
|
+
* Aggregates per-block `*Order` options for the blocks that bridge this
|
|
2535
|
+
* chunk group to the given child chunk group. `*Order` options are tied to
|
|
2536
|
+
* the originating `import()` call and must not be sourced from the child's
|
|
2537
|
+
* shared options, otherwise a webpackPrefetch/Preload directive from one
|
|
2538
|
+
* parent would leak into other parents that share the child by name.
|
|
2539
|
+
*/
|
|
2540
|
+
getChildOrderOptions(
|
|
2541
|
+
childGroup: ChunkGroup,
|
|
2542
|
+
chunkGraph: ChunkGraph
|
|
2543
|
+
): Record<string, number>;
|
|
2544
|
+
|
|
2528
2545
|
/**
|
|
2529
2546
|
* Groups child chunk groups by their `*Order` options and sorts each group
|
|
2530
2547
|
* by descending order and deterministic chunk-group comparison.
|
|
@@ -3740,27 +3757,33 @@ declare class Compilation {
|
|
|
3740
3757
|
/**
|
|
3741
3758
|
* Returns interpolated path.
|
|
3742
3759
|
*/
|
|
3743
|
-
getPath
|
|
3760
|
+
getPath<T extends PathData = PathData>(
|
|
3761
|
+
filename: string | TemplatePathFn<T>,
|
|
3762
|
+
data?: T
|
|
3763
|
+
): string;
|
|
3744
3764
|
|
|
3745
3765
|
/**
|
|
3746
3766
|
* Gets path with info.
|
|
3747
3767
|
*/
|
|
3748
|
-
getPathWithInfo(
|
|
3749
|
-
filename:
|
|
3750
|
-
data?:
|
|
3768
|
+
getPathWithInfo<T extends PathData = PathData>(
|
|
3769
|
+
filename: string | TemplatePathFn<T>,
|
|
3770
|
+
data?: T
|
|
3751
3771
|
): InterpolatedPathAndAssetInfo;
|
|
3752
3772
|
|
|
3753
3773
|
/**
|
|
3754
3774
|
* Returns interpolated path.
|
|
3755
3775
|
*/
|
|
3756
|
-
getAssetPath
|
|
3776
|
+
getAssetPath<T extends PathData = PathData>(
|
|
3777
|
+
filename: string | TemplatePathFn<T>,
|
|
3778
|
+
data: T
|
|
3779
|
+
): string;
|
|
3757
3780
|
|
|
3758
3781
|
/**
|
|
3759
3782
|
* Gets asset path with info.
|
|
3760
3783
|
*/
|
|
3761
|
-
getAssetPathWithInfo(
|
|
3762
|
-
filename:
|
|
3763
|
-
data:
|
|
3784
|
+
getAssetPathWithInfo<T extends PathData = PathData>(
|
|
3785
|
+
filename: string | TemplatePathFn<T>,
|
|
3786
|
+
data: T
|
|
3764
3787
|
): InterpolatedPathAndAssetInfo;
|
|
3765
3788
|
getWarnings(): Error[];
|
|
3766
3789
|
getErrors(): Error[];
|
|
@@ -4417,7 +4440,7 @@ declare interface Configuration {
|
|
|
4417
4440
|
/**
|
|
4418
4441
|
* Which asset type should receive this devtool value.
|
|
4419
4442
|
*/
|
|
4420
|
-
type: "
|
|
4443
|
+
type: "css" | "all" | "javascript";
|
|
4421
4444
|
/**
|
|
4422
4445
|
* A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
|
|
4423
4446
|
*/
|
|
@@ -4497,6 +4520,7 @@ declare interface Configuration {
|
|
|
4497
4520
|
| "script"
|
|
4498
4521
|
| "node-commonjs"
|
|
4499
4522
|
| "asset"
|
|
4523
|
+
| "asset-url"
|
|
4500
4524
|
| "css-import"
|
|
4501
4525
|
| "css-url";
|
|
4502
4526
|
|
|
@@ -5021,6 +5045,89 @@ declare interface ContextTimestampAndHash {
|
|
|
5021
5045
|
symlinks?: Set<string>;
|
|
5022
5046
|
}
|
|
5023
5047
|
type ContextTypes = KnownContext & Record<any, any>;
|
|
5048
|
+
|
|
5049
|
+
declare interface CreateData {
|
|
5050
|
+
/**
|
|
5051
|
+
* an optional layer in which the module is
|
|
5052
|
+
*/
|
|
5053
|
+
layer?: string;
|
|
5054
|
+
|
|
5055
|
+
/**
|
|
5056
|
+
* module type. When deserializing, this is set to an empty string "".
|
|
5057
|
+
*/
|
|
5058
|
+
type: string;
|
|
5059
|
+
|
|
5060
|
+
/**
|
|
5061
|
+
* request string
|
|
5062
|
+
*/
|
|
5063
|
+
request: string;
|
|
5064
|
+
|
|
5065
|
+
/**
|
|
5066
|
+
* request intended by user (without loaders from config)
|
|
5067
|
+
*/
|
|
5068
|
+
userRequest: string;
|
|
5069
|
+
|
|
5070
|
+
/**
|
|
5071
|
+
* request without resolving
|
|
5072
|
+
*/
|
|
5073
|
+
rawRequest: string;
|
|
5074
|
+
|
|
5075
|
+
/**
|
|
5076
|
+
* list of loaders
|
|
5077
|
+
*/
|
|
5078
|
+
loaders: LoaderItem[];
|
|
5079
|
+
|
|
5080
|
+
/**
|
|
5081
|
+
* path + query of the real resource
|
|
5082
|
+
*/
|
|
5083
|
+
resource: string;
|
|
5084
|
+
|
|
5085
|
+
/**
|
|
5086
|
+
* resource resolve data
|
|
5087
|
+
*/
|
|
5088
|
+
resourceResolveData?: ResourceSchemeData & Partial<ResolveRequest>;
|
|
5089
|
+
|
|
5090
|
+
/**
|
|
5091
|
+
* context directory for resolving
|
|
5092
|
+
*/
|
|
5093
|
+
context: string;
|
|
5094
|
+
|
|
5095
|
+
/**
|
|
5096
|
+
* path + query of the matched resource (virtual)
|
|
5097
|
+
*/
|
|
5098
|
+
matchResource?: string;
|
|
5099
|
+
|
|
5100
|
+
/**
|
|
5101
|
+
* the parser used
|
|
5102
|
+
*/
|
|
5103
|
+
parser: ParserClass;
|
|
5104
|
+
|
|
5105
|
+
/**
|
|
5106
|
+
* the options of the parser used
|
|
5107
|
+
*/
|
|
5108
|
+
parserOptions?: ParserOptions;
|
|
5109
|
+
|
|
5110
|
+
/**
|
|
5111
|
+
* the generator used
|
|
5112
|
+
*/
|
|
5113
|
+
generator: Generator;
|
|
5114
|
+
|
|
5115
|
+
/**
|
|
5116
|
+
* the options of the generator used
|
|
5117
|
+
*/
|
|
5118
|
+
generatorOptions?: GeneratorOptions;
|
|
5119
|
+
|
|
5120
|
+
/**
|
|
5121
|
+
* options used for resolving requests from this module
|
|
5122
|
+
*/
|
|
5123
|
+
resolveOptions?: ResolveOptions;
|
|
5124
|
+
|
|
5125
|
+
/**
|
|
5126
|
+
* enable/disable extracting source map
|
|
5127
|
+
*/
|
|
5128
|
+
extractSourceMap: boolean;
|
|
5129
|
+
settings: ModuleSettings;
|
|
5130
|
+
}
|
|
5024
5131
|
type CreateReadStreamFSImplementation = FSImplementation & {
|
|
5025
5132
|
read: (...args: any[]) => any;
|
|
5026
5133
|
};
|
|
@@ -5264,9 +5371,7 @@ declare interface CssModuleGeneratorOptions {
|
|
|
5264
5371
|
/**
|
|
5265
5372
|
* Configure the generated local ident name.
|
|
5266
5373
|
*/
|
|
5267
|
-
localIdentName?:
|
|
5268
|
-
| string
|
|
5269
|
-
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
|
5374
|
+
localIdentName?: string | TemplatePathFn<PathDataModule>;
|
|
5270
5375
|
}
|
|
5271
5376
|
|
|
5272
5377
|
/**
|
|
@@ -5379,7 +5484,7 @@ declare class CssModulesPlugin {
|
|
|
5379
5484
|
static getChunkFilenameTemplate(
|
|
5380
5485
|
chunk: Chunk,
|
|
5381
5486
|
outputOptions: OutputNormalizedWithDefaults
|
|
5382
|
-
):
|
|
5487
|
+
): ChunkFilenameTemplate;
|
|
5383
5488
|
|
|
5384
5489
|
/**
|
|
5385
5490
|
* Returns true, when the chunk has css.
|
|
@@ -6480,7 +6585,7 @@ declare interface EntryDescription {
|
|
|
6480
6585
|
/**
|
|
6481
6586
|
* Specifies the filename of the output file on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
|
|
6482
6587
|
*/
|
|
6483
|
-
filename?: string |
|
|
6588
|
+
filename?: string | TemplatePathFn<PathDataChunk>;
|
|
6484
6589
|
|
|
6485
6590
|
/**
|
|
6486
6591
|
* Module(s) that are loaded upon startup.
|
|
@@ -6500,7 +6605,7 @@ declare interface EntryDescription {
|
|
|
6500
6605
|
/**
|
|
6501
6606
|
* The 'publicPath' specifies the public URL address of the output files when referenced in a browser.
|
|
6502
6607
|
*/
|
|
6503
|
-
publicPath?: string |
|
|
6608
|
+
publicPath?: string | TemplatePathFn<PathData>;
|
|
6504
6609
|
|
|
6505
6610
|
/**
|
|
6506
6611
|
* The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.
|
|
@@ -6540,7 +6645,7 @@ declare interface EntryDescriptionNormalized {
|
|
|
6540
6645
|
/**
|
|
6541
6646
|
* Specifies the filename of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
|
|
6542
6647
|
*/
|
|
6543
|
-
filename?: string |
|
|
6648
|
+
filename?: string | TemplatePathFn<PathDataChunk>;
|
|
6544
6649
|
|
|
6545
6650
|
/**
|
|
6546
6651
|
* Module(s) that are loaded upon startup. The last one is exported.
|
|
@@ -6560,7 +6665,7 @@ declare interface EntryDescriptionNormalized {
|
|
|
6560
6665
|
/**
|
|
6561
6666
|
* The 'publicPath' specifies the public URL address of the output files when referenced in a browser.
|
|
6562
6667
|
*/
|
|
6563
|
-
publicPath?: string |
|
|
6668
|
+
publicPath?: string | TemplatePathFn<PathData>;
|
|
6564
6669
|
|
|
6565
6670
|
/**
|
|
6566
6671
|
* The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.
|
|
@@ -7114,6 +7219,7 @@ declare abstract class ExportInfo {
|
|
|
7114
7219
|
* Sets used without info.
|
|
7115
7220
|
*/
|
|
7116
7221
|
setUsedWithoutInfo(runtime: RuntimeSpec): boolean;
|
|
7222
|
+
setHasProvideInfo(): void;
|
|
7117
7223
|
setHasUseInfo(): void;
|
|
7118
7224
|
|
|
7119
7225
|
/**
|
|
@@ -7788,6 +7894,7 @@ declare class ExternalsPlugin {
|
|
|
7788
7894
|
| "script"
|
|
7789
7895
|
| "node-commonjs"
|
|
7790
7896
|
| "asset"
|
|
7897
|
+
| "asset-url"
|
|
7791
7898
|
| "css-import"
|
|
7792
7899
|
| "css-url"
|
|
7793
7900
|
| ((dependency: Dependency) => ExternalsType),
|
|
@@ -7817,6 +7924,7 @@ declare class ExternalsPlugin {
|
|
|
7817
7924
|
| "script"
|
|
7818
7925
|
| "node-commonjs"
|
|
7819
7926
|
| "asset"
|
|
7927
|
+
| "asset-url"
|
|
7820
7928
|
| "css-import"
|
|
7821
7929
|
| "css-url"
|
|
7822
7930
|
| ((dependency: Dependency) => ExternalsType);
|
|
@@ -7905,6 +8013,7 @@ type ExternalsType =
|
|
|
7905
8013
|
| "script"
|
|
7906
8014
|
| "node-commonjs"
|
|
7907
8015
|
| "asset"
|
|
8016
|
+
| "asset-url"
|
|
7908
8017
|
| "css-import"
|
|
7909
8018
|
| "css-url";
|
|
7910
8019
|
|
|
@@ -8482,14 +8591,17 @@ declare class GetChunkFilenameRuntimeModule extends RuntimeModule {
|
|
|
8482
8591
|
) =>
|
|
8483
8592
|
| string
|
|
8484
8593
|
| false
|
|
8485
|
-
| ((pathData:
|
|
8594
|
+
| ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string),
|
|
8486
8595
|
allChunks: boolean
|
|
8487
8596
|
);
|
|
8488
8597
|
contentType: string;
|
|
8489
8598
|
global: string;
|
|
8490
8599
|
getFilenameForChunk: (
|
|
8491
8600
|
chunk: Chunk
|
|
8492
|
-
) =>
|
|
8601
|
+
) =>
|
|
8602
|
+
| string
|
|
8603
|
+
| false
|
|
8604
|
+
| ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
8493
8605
|
allChunks: boolean;
|
|
8494
8606
|
|
|
8495
8607
|
/**
|
|
@@ -9756,7 +9868,7 @@ declare class JavascriptModulesPlugin {
|
|
|
9756
9868
|
static getChunkFilenameTemplate(
|
|
9757
9869
|
chunk: Chunk,
|
|
9758
9870
|
outputOptions: OutputNormalizedWithDefaults
|
|
9759
|
-
):
|
|
9871
|
+
): ChunkFilenameTemplate;
|
|
9760
9872
|
static chunkHasJs: (chunk: Chunk, chunkGraph: ChunkGraph) => boolean;
|
|
9761
9873
|
}
|
|
9762
9874
|
declare class JavascriptParser extends ParserClass {
|
|
@@ -14595,6 +14707,7 @@ declare interface ModuleFederationPluginOptions {
|
|
|
14595
14707
|
| "script"
|
|
14596
14708
|
| "node-commonjs"
|
|
14597
14709
|
| "asset"
|
|
14710
|
+
| "asset-url"
|
|
14598
14711
|
| "css-import"
|
|
14599
14712
|
| "css-url";
|
|
14600
14713
|
|
|
@@ -15910,7 +16023,7 @@ declare interface NodeTemplatePluginOptions {
|
|
|
15910
16023
|
type NodeWebpackOptions = false | NodeOptions;
|
|
15911
16024
|
type NonNullable<T> = T & {};
|
|
15912
16025
|
declare class NormalModule extends Module {
|
|
15913
|
-
constructor(__0:
|
|
16026
|
+
constructor(__0: NormalModuleCreateDataNormalModuleObject_1<string>);
|
|
15914
16027
|
request: string;
|
|
15915
16028
|
userRequest: string;
|
|
15916
16029
|
rawRequest: string;
|
|
@@ -16006,7 +16119,9 @@ declare interface NormalModuleCompilationHooks {
|
|
|
16006
16119
|
>;
|
|
16007
16120
|
needBuild: AsyncSeriesBailHook<[NormalModule, NeedBuildContext], boolean>;
|
|
16008
16121
|
}
|
|
16009
|
-
declare interface
|
|
16122
|
+
declare interface NormalModuleCreateDataNormalModuleObject_1<
|
|
16123
|
+
T extends string = string
|
|
16124
|
+
> {
|
|
16010
16125
|
/**
|
|
16011
16126
|
* an optional layer in which the module is
|
|
16012
16127
|
*/
|
|
@@ -16015,7 +16130,7 @@ declare interface NormalModuleCreateData {
|
|
|
16015
16130
|
/**
|
|
16016
16131
|
* module type. When deserializing, this is set to an empty string "".
|
|
16017
16132
|
*/
|
|
16018
|
-
type:
|
|
16133
|
+
type: T;
|
|
16019
16134
|
|
|
16020
16135
|
/**
|
|
16021
16136
|
* request string
|
|
@@ -16060,22 +16175,86 @@ declare interface NormalModuleCreateData {
|
|
|
16060
16175
|
/**
|
|
16061
16176
|
* the parser used
|
|
16062
16177
|
*/
|
|
16063
|
-
parser:
|
|
16178
|
+
parser: (Record<"javascript/auto", JavascriptParser> &
|
|
16179
|
+
Record<"javascript/dynamic", JavascriptParser> &
|
|
16180
|
+
Record<"javascript/esm", JavascriptParser> &
|
|
16181
|
+
Record<"json", JsonParser> &
|
|
16182
|
+
Record<"asset", AssetParser> &
|
|
16183
|
+
Record<"asset/inline", AssetParser> &
|
|
16184
|
+
Record<"asset/resource", AssetParser> &
|
|
16185
|
+
Record<"asset/source", AssetSourceParser> &
|
|
16186
|
+
Record<"asset/bytes", AssetBytesParser> &
|
|
16187
|
+
Record<"webassembly/async", AsyncWebAssemblyParser> &
|
|
16188
|
+
Record<"webassembly/sync", WebAssemblyParser> &
|
|
16189
|
+
Record<"css", CssParser> &
|
|
16190
|
+
Record<"css/auto", CssParser> &
|
|
16191
|
+
Record<"css/module", CssParser> &
|
|
16192
|
+
Record<"css/global", CssParser> &
|
|
16193
|
+
Record<"html", HtmlParser> &
|
|
16194
|
+
Record<string, ParserClass>)[T];
|
|
16064
16195
|
|
|
16065
16196
|
/**
|
|
16066
16197
|
* the options of the parser used
|
|
16067
16198
|
*/
|
|
16068
|
-
parserOptions?:
|
|
16199
|
+
parserOptions?: (Record<"javascript/auto", JavascriptParserOptions> &
|
|
16200
|
+
Record<"javascript/dynamic", JavascriptParserOptions> &
|
|
16201
|
+
Record<"javascript/esm", JavascriptParserOptions> &
|
|
16202
|
+
Record<"json", JsonParserOptions> &
|
|
16203
|
+
Record<"asset", AssetParserOptions> &
|
|
16204
|
+
Record<"asset/inline", EmptyParserOptions> &
|
|
16205
|
+
Record<"asset/resource", EmptyParserOptions> &
|
|
16206
|
+
Record<"asset/source", EmptyParserOptions> &
|
|
16207
|
+
Record<"asset/bytes", EmptyParserOptions> &
|
|
16208
|
+
Record<"webassembly/async", EmptyParserOptions> &
|
|
16209
|
+
Record<"webassembly/sync", EmptyParserOptions> &
|
|
16210
|
+
Record<"css", CssParserOptions> &
|
|
16211
|
+
Record<"css/auto", CssModuleParserOptions> &
|
|
16212
|
+
Record<"css/module", CssModuleParserOptions> &
|
|
16213
|
+
Record<"css/global", CssModuleParserOptions> &
|
|
16214
|
+
Record<"html", EmptyParserOptions> &
|
|
16215
|
+
Record<string, ParserOptions>)[T];
|
|
16069
16216
|
|
|
16070
16217
|
/**
|
|
16071
16218
|
* the generator used
|
|
16072
16219
|
*/
|
|
16073
|
-
generator:
|
|
16220
|
+
generator: (Record<"javascript/auto", JavascriptGenerator> &
|
|
16221
|
+
Record<"javascript/dynamic", JavascriptGenerator> &
|
|
16222
|
+
Record<"javascript/esm", JavascriptGenerator> &
|
|
16223
|
+
Record<"json", JsonGenerator> &
|
|
16224
|
+
Record<"asset", AssetGenerator> &
|
|
16225
|
+
Record<"asset/inline", AssetGenerator> &
|
|
16226
|
+
Record<"asset/resource", AssetGenerator> &
|
|
16227
|
+
Record<"asset/source", AssetSourceGenerator> &
|
|
16228
|
+
Record<"asset/bytes", AssetBytesGenerator> &
|
|
16229
|
+
Record<"webassembly/async", Generator> &
|
|
16230
|
+
Record<"webassembly/sync", Generator> &
|
|
16231
|
+
Record<"css", CssGenerator> &
|
|
16232
|
+
Record<"css/auto", CssGenerator> &
|
|
16233
|
+
Record<"css/module", CssGenerator> &
|
|
16234
|
+
Record<"css/global", CssGenerator> &
|
|
16235
|
+
Record<"html", HtmlGenerator> &
|
|
16236
|
+
Record<string, Generator>)[T];
|
|
16074
16237
|
|
|
16075
16238
|
/**
|
|
16076
16239
|
* the options of the generator used
|
|
16077
16240
|
*/
|
|
16078
|
-
generatorOptions?:
|
|
16241
|
+
generatorOptions?: (Record<"javascript/auto", EmptyGeneratorOptions> &
|
|
16242
|
+
Record<"javascript/dynamic", EmptyGeneratorOptions> &
|
|
16243
|
+
Record<"javascript/esm", EmptyGeneratorOptions> &
|
|
16244
|
+
Record<"json", JsonGeneratorOptions> &
|
|
16245
|
+
Record<"asset", AssetGeneratorOptions> &
|
|
16246
|
+
Record<"asset/inline", AssetGeneratorOptions> &
|
|
16247
|
+
Record<"asset/resource", AssetGeneratorOptions> &
|
|
16248
|
+
Record<"asset/source", EmptyGeneratorOptions> &
|
|
16249
|
+
Record<"asset/bytes", EmptyGeneratorOptions> &
|
|
16250
|
+
Record<"webassembly/async", EmptyGeneratorOptions> &
|
|
16251
|
+
Record<"webassembly/sync", EmptyGeneratorOptions> &
|
|
16252
|
+
Record<"css", CssGeneratorOptions> &
|
|
16253
|
+
Record<"css/auto", CssModuleGeneratorOptions> &
|
|
16254
|
+
Record<"css/module", CssModuleGeneratorOptions> &
|
|
16255
|
+
Record<"css/global", CssModuleGeneratorOptions> &
|
|
16256
|
+
Record<"html", HtmlGeneratorOptions> &
|
|
16257
|
+
Record<string, GeneratorOptions>)[T];
|
|
16079
16258
|
|
|
16080
16259
|
/**
|
|
16081
16260
|
* options used for resolving requests from this module
|
|
@@ -16099,21 +16278,8 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
|
16099
16278
|
factorize: AsyncSeriesBailHook<[ResolveData], undefined | Module>;
|
|
16100
16279
|
beforeResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
|
|
16101
16280
|
afterResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
|
|
16102
|
-
createModule: AsyncSeriesBailHook<
|
|
16103
|
-
|
|
16104
|
-
Partial<NormalModuleCreateData & { settings: ModuleSettings }>,
|
|
16105
|
-
ResolveData
|
|
16106
|
-
],
|
|
16107
|
-
void | Module
|
|
16108
|
-
>;
|
|
16109
|
-
module: SyncWaterfallHook<
|
|
16110
|
-
[
|
|
16111
|
-
Module,
|
|
16112
|
-
Partial<NormalModuleCreateData & { settings: ModuleSettings }>,
|
|
16113
|
-
ResolveData
|
|
16114
|
-
],
|
|
16115
|
-
Module
|
|
16116
|
-
>;
|
|
16281
|
+
createModule: AsyncSeriesBailHook<[CreateData, ResolveData], void | Module>;
|
|
16282
|
+
module: SyncWaterfallHook<[Module, CreateData, ResolveData], Module>;
|
|
16117
16283
|
createParser: TypedHookMap<
|
|
16118
16284
|
Record<
|
|
16119
16285
|
"javascript/auto",
|
|
@@ -16254,11 +16420,11 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
|
16254
16420
|
> &
|
|
16255
16421
|
Record<
|
|
16256
16422
|
"webassembly/async",
|
|
16257
|
-
SyncBailHook<[
|
|
16423
|
+
SyncBailHook<[EmptyGeneratorOptions], Generator>
|
|
16258
16424
|
> &
|
|
16259
16425
|
Record<
|
|
16260
16426
|
"webassembly/sync",
|
|
16261
|
-
SyncBailHook<[
|
|
16427
|
+
SyncBailHook<[EmptyGeneratorOptions], Generator>
|
|
16262
16428
|
> &
|
|
16263
16429
|
Record<"css", SyncBailHook<[CssGeneratorOptions], CssGenerator>> &
|
|
16264
16430
|
Record<
|
|
@@ -16273,7 +16439,7 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
|
16273
16439
|
"css/global",
|
|
16274
16440
|
SyncBailHook<[CssModuleGeneratorOptions], CssGenerator>
|
|
16275
16441
|
> &
|
|
16276
|
-
Record<"html", SyncBailHook<[
|
|
16442
|
+
Record<"html", SyncBailHook<[HtmlGeneratorOptions], HtmlGenerator>> &
|
|
16277
16443
|
Record<string, SyncBailHook<[GeneratorOptions], Generator>>
|
|
16278
16444
|
>;
|
|
16279
16445
|
generator: TypedHookMap<
|
|
@@ -16315,11 +16481,11 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
|
16315
16481
|
> &
|
|
16316
16482
|
Record<
|
|
16317
16483
|
"webassembly/async",
|
|
16318
|
-
SyncBailHook<[Generator,
|
|
16484
|
+
SyncBailHook<[Generator, EmptyGeneratorOptions], void>
|
|
16319
16485
|
> &
|
|
16320
16486
|
Record<
|
|
16321
16487
|
"webassembly/sync",
|
|
16322
|
-
SyncBailHook<[Generator,
|
|
16488
|
+
SyncBailHook<[Generator, EmptyGeneratorOptions], void>
|
|
16323
16489
|
> &
|
|
16324
16490
|
Record<"css", SyncBailHook<[CssGenerator, CssGeneratorOptions], void>> &
|
|
16325
16491
|
Record<
|
|
@@ -16336,18 +16502,12 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
|
16336
16502
|
> &
|
|
16337
16503
|
Record<
|
|
16338
16504
|
"html",
|
|
16339
|
-
SyncBailHook<[HtmlGenerator,
|
|
16505
|
+
SyncBailHook<[HtmlGenerator, HtmlGeneratorOptions], void>
|
|
16340
16506
|
> &
|
|
16341
16507
|
Record<string, SyncBailHook<[Generator, GeneratorOptions], void>>
|
|
16342
16508
|
>;
|
|
16343
16509
|
createModuleClass: HookMap<
|
|
16344
|
-
SyncBailHook<
|
|
16345
|
-
[
|
|
16346
|
-
Partial<NormalModuleCreateData & { settings: ModuleSettings }>,
|
|
16347
|
-
ResolveData
|
|
16348
|
-
],
|
|
16349
|
-
void | Module
|
|
16350
|
-
>
|
|
16510
|
+
SyncBailHook<[CreateData, ResolveData], void | Module>
|
|
16351
16511
|
>;
|
|
16352
16512
|
}>;
|
|
16353
16513
|
resolverFactory: ResolverFactory;
|
|
@@ -16389,22 +16549,98 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
|
16389
16549
|
/**
|
|
16390
16550
|
* Returns parser.
|
|
16391
16551
|
*/
|
|
16392
|
-
getParser
|
|
16552
|
+
getParser<T extends string>(
|
|
16553
|
+
type: T,
|
|
16554
|
+
parserOptions?: ParserOptions
|
|
16555
|
+
): (Record<"javascript/auto", JavascriptParser> &
|
|
16556
|
+
Record<"javascript/dynamic", JavascriptParser> &
|
|
16557
|
+
Record<"javascript/esm", JavascriptParser> &
|
|
16558
|
+
Record<"json", JsonParser> &
|
|
16559
|
+
Record<"asset", AssetParser> &
|
|
16560
|
+
Record<"asset/inline", AssetParser> &
|
|
16561
|
+
Record<"asset/resource", AssetParser> &
|
|
16562
|
+
Record<"asset/source", AssetSourceParser> &
|
|
16563
|
+
Record<"asset/bytes", AssetBytesParser> &
|
|
16564
|
+
Record<"webassembly/async", AsyncWebAssemblyParser> &
|
|
16565
|
+
Record<"webassembly/sync", WebAssemblyParser> &
|
|
16566
|
+
Record<"css", CssParser> &
|
|
16567
|
+
Record<"css/auto", CssParser> &
|
|
16568
|
+
Record<"css/module", CssParser> &
|
|
16569
|
+
Record<"css/global", CssParser> &
|
|
16570
|
+
Record<"html", HtmlParser> &
|
|
16571
|
+
Record<string, ParserClass>)[T];
|
|
16393
16572
|
|
|
16394
16573
|
/**
|
|
16395
16574
|
* Creates a parser from the provided type.
|
|
16396
16575
|
*/
|
|
16397
|
-
createParser
|
|
16576
|
+
createParser<T extends string>(
|
|
16577
|
+
type: T,
|
|
16578
|
+
parserOptions?: ParserOptions
|
|
16579
|
+
): (Record<"javascript/auto", JavascriptParser> &
|
|
16580
|
+
Record<"javascript/dynamic", JavascriptParser> &
|
|
16581
|
+
Record<"javascript/esm", JavascriptParser> &
|
|
16582
|
+
Record<"json", JsonParser> &
|
|
16583
|
+
Record<"asset", AssetParser> &
|
|
16584
|
+
Record<"asset/inline", AssetParser> &
|
|
16585
|
+
Record<"asset/resource", AssetParser> &
|
|
16586
|
+
Record<"asset/source", AssetSourceParser> &
|
|
16587
|
+
Record<"asset/bytes", AssetBytesParser> &
|
|
16588
|
+
Record<"webassembly/async", AsyncWebAssemblyParser> &
|
|
16589
|
+
Record<"webassembly/sync", WebAssemblyParser> &
|
|
16590
|
+
Record<"css", CssParser> &
|
|
16591
|
+
Record<"css/auto", CssParser> &
|
|
16592
|
+
Record<"css/module", CssParser> &
|
|
16593
|
+
Record<"css/global", CssParser> &
|
|
16594
|
+
Record<"html", HtmlParser> &
|
|
16595
|
+
Record<string, ParserClass>)[T];
|
|
16398
16596
|
|
|
16399
16597
|
/**
|
|
16400
16598
|
* Returns generator.
|
|
16401
16599
|
*/
|
|
16402
|
-
getGenerator
|
|
16600
|
+
getGenerator<T extends string>(
|
|
16601
|
+
type: T,
|
|
16602
|
+
generatorOptions?: GeneratorOptions
|
|
16603
|
+
): (Record<"javascript/auto", JavascriptGenerator> &
|
|
16604
|
+
Record<"javascript/dynamic", JavascriptGenerator> &
|
|
16605
|
+
Record<"javascript/esm", JavascriptGenerator> &
|
|
16606
|
+
Record<"json", JsonGenerator> &
|
|
16607
|
+
Record<"asset", AssetGenerator> &
|
|
16608
|
+
Record<"asset/inline", AssetGenerator> &
|
|
16609
|
+
Record<"asset/resource", AssetGenerator> &
|
|
16610
|
+
Record<"asset/source", AssetSourceGenerator> &
|
|
16611
|
+
Record<"asset/bytes", AssetBytesGenerator> &
|
|
16612
|
+
Record<"webassembly/async", Generator> &
|
|
16613
|
+
Record<"webassembly/sync", Generator> &
|
|
16614
|
+
Record<"css", CssGenerator> &
|
|
16615
|
+
Record<"css/auto", CssGenerator> &
|
|
16616
|
+
Record<"css/module", CssGenerator> &
|
|
16617
|
+
Record<"css/global", CssGenerator> &
|
|
16618
|
+
Record<"html", HtmlGenerator> &
|
|
16619
|
+
Record<string, Generator>)[T];
|
|
16403
16620
|
|
|
16404
16621
|
/**
|
|
16405
16622
|
* Creates a generator.
|
|
16406
16623
|
*/
|
|
16407
|
-
createGenerator
|
|
16624
|
+
createGenerator<T extends string>(
|
|
16625
|
+
type: T,
|
|
16626
|
+
generatorOptions?: GeneratorOptions
|
|
16627
|
+
): (Record<"javascript/auto", JavascriptGenerator> &
|
|
16628
|
+
Record<"javascript/dynamic", JavascriptGenerator> &
|
|
16629
|
+
Record<"javascript/esm", JavascriptGenerator> &
|
|
16630
|
+
Record<"json", JsonGenerator> &
|
|
16631
|
+
Record<"asset", AssetGenerator> &
|
|
16632
|
+
Record<"asset/inline", AssetGenerator> &
|
|
16633
|
+
Record<"asset/resource", AssetGenerator> &
|
|
16634
|
+
Record<"asset/source", AssetSourceGenerator> &
|
|
16635
|
+
Record<"asset/bytes", AssetBytesGenerator> &
|
|
16636
|
+
Record<"webassembly/async", Generator> &
|
|
16637
|
+
Record<"webassembly/sync", Generator> &
|
|
16638
|
+
Record<"css", CssGenerator> &
|
|
16639
|
+
Record<"css/auto", CssGenerator> &
|
|
16640
|
+
Record<"css/module", CssGenerator> &
|
|
16641
|
+
Record<"css/global", CssGenerator> &
|
|
16642
|
+
Record<"html", HtmlGenerator> &
|
|
16643
|
+
Record<string, Generator>)[T];
|
|
16408
16644
|
|
|
16409
16645
|
/**
|
|
16410
16646
|
* Returns the resolver.
|
|
@@ -17081,7 +17317,7 @@ declare interface OptimizationSplitChunksCacheGroup {
|
|
|
17081
17317
|
/**
|
|
17082
17318
|
* Sets the template for the filename for created chunks.
|
|
17083
17319
|
*/
|
|
17084
|
-
filename?: string |
|
|
17320
|
+
filename?: string | TemplatePathFn<PathDataChunk>;
|
|
17085
17321
|
|
|
17086
17322
|
/**
|
|
17087
17323
|
* Sets the hint for chunk id.
|
|
@@ -17263,7 +17499,7 @@ declare interface OptimizationSplitChunksOptions {
|
|
|
17263
17499
|
/**
|
|
17264
17500
|
* Sets the template for the filename for created chunks.
|
|
17265
17501
|
*/
|
|
17266
|
-
filename?: string |
|
|
17502
|
+
filename?: string | TemplatePathFn<PathDataChunk>;
|
|
17267
17503
|
|
|
17268
17504
|
/**
|
|
17269
17505
|
* Prevents exposing path info when creating names for parts splitted by maxSize.
|
|
@@ -17414,9 +17650,7 @@ declare interface Output {
|
|
|
17414
17650
|
/**
|
|
17415
17651
|
* The filename of asset modules as relative path inside the 'output.path' directory.
|
|
17416
17652
|
*/
|
|
17417
|
-
assetModuleFilename?:
|
|
17418
|
-
| string
|
|
17419
|
-
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
|
17653
|
+
assetModuleFilename?: string | TemplatePathFn<PathDataModule>;
|
|
17420
17654
|
|
|
17421
17655
|
/**
|
|
17422
17656
|
* Enable/disable creating async chunks that are loaded on demand.
|
|
@@ -17436,9 +17670,7 @@ declare interface Output {
|
|
|
17436
17670
|
/**
|
|
17437
17671
|
* Specifies the filename template of output files of non-initial chunks on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
|
|
17438
17672
|
*/
|
|
17439
|
-
chunkFilename?:
|
|
17440
|
-
| string
|
|
17441
|
-
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
|
17673
|
+
chunkFilename?: string | TemplatePathFn<PathDataChunk>;
|
|
17442
17674
|
|
|
17443
17675
|
/**
|
|
17444
17676
|
* The format of chunks (formats included by default are 'array-push' (web/WebWorker), 'commonjs' (node.js), 'module' (ESM), but others might be added by plugins).
|
|
@@ -17478,16 +17710,12 @@ declare interface Output {
|
|
|
17478
17710
|
/**
|
|
17479
17711
|
* Specifies the filename template of non-initial output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
|
|
17480
17712
|
*/
|
|
17481
|
-
cssChunkFilename?:
|
|
17482
|
-
| string
|
|
17483
|
-
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
|
17713
|
+
cssChunkFilename?: string | TemplatePathFn<PathDataChunk>;
|
|
17484
17714
|
|
|
17485
17715
|
/**
|
|
17486
17716
|
* Specifies the filename template of output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
|
|
17487
17717
|
*/
|
|
17488
|
-
cssFilename?:
|
|
17489
|
-
| string
|
|
17490
|
-
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
|
17718
|
+
cssFilename?: string | TemplatePathFn<PathDataChunk>;
|
|
17491
17719
|
|
|
17492
17720
|
/**
|
|
17493
17721
|
* Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
|
|
@@ -17531,7 +17759,7 @@ declare interface Output {
|
|
|
17531
17759
|
/**
|
|
17532
17760
|
* Specifies the filename of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
|
|
17533
17761
|
*/
|
|
17534
|
-
filename?: string |
|
|
17762
|
+
filename?: string | TemplatePathFn<PathDataChunk>;
|
|
17535
17763
|
|
|
17536
17764
|
/**
|
|
17537
17765
|
* An expression which is used to address the global object/scope in runtime code.
|
|
@@ -17576,16 +17804,12 @@ declare interface Output {
|
|
|
17576
17804
|
/**
|
|
17577
17805
|
* Specifies the filename template of non-initial output html files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
|
|
17578
17806
|
*/
|
|
17579
|
-
htmlChunkFilename?:
|
|
17580
|
-
| string
|
|
17581
|
-
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
|
17807
|
+
htmlChunkFilename?: string | TemplatePathFn<PathDataChunk>;
|
|
17582
17808
|
|
|
17583
17809
|
/**
|
|
17584
17810
|
* Specifies the filename template of output html files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
|
|
17585
17811
|
*/
|
|
17586
|
-
htmlFilename?:
|
|
17587
|
-
| string
|
|
17588
|
-
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
|
17812
|
+
htmlFilename?: string | TemplatePathFn<PathDataChunk>;
|
|
17589
17813
|
|
|
17590
17814
|
/**
|
|
17591
17815
|
* Ignore warnings in the browser.
|
|
@@ -17640,7 +17864,7 @@ declare interface Output {
|
|
|
17640
17864
|
/**
|
|
17641
17865
|
* The 'publicPath' specifies the public URL address of the output files when referenced in a browser.
|
|
17642
17866
|
*/
|
|
17643
|
-
publicPath?: string |
|
|
17867
|
+
publicPath?: string | TemplatePathFn<PathData>;
|
|
17644
17868
|
|
|
17645
17869
|
/**
|
|
17646
17870
|
* This option enables loading async chunks via a custom script type, such as script type="module".
|
|
@@ -17756,9 +17980,7 @@ declare interface OutputNormalized {
|
|
|
17756
17980
|
/**
|
|
17757
17981
|
* The filename of asset modules as relative path inside the 'output.path' directory.
|
|
17758
17982
|
*/
|
|
17759
|
-
assetModuleFilename?:
|
|
17760
|
-
| string
|
|
17761
|
-
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
|
17983
|
+
assetModuleFilename?: string | TemplatePathFn<PathDataModule>;
|
|
17762
17984
|
|
|
17763
17985
|
/**
|
|
17764
17986
|
* Enable/disable creating async chunks that are loaded on demand.
|
|
@@ -17773,9 +17995,7 @@ declare interface OutputNormalized {
|
|
|
17773
17995
|
/**
|
|
17774
17996
|
* Specifies the filename template of output files of non-initial chunks on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
|
|
17775
17997
|
*/
|
|
17776
|
-
chunkFilename?:
|
|
17777
|
-
| string
|
|
17778
|
-
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
|
17998
|
+
chunkFilename?: string | TemplatePathFn<PathDataChunk>;
|
|
17779
17999
|
|
|
17780
18000
|
/**
|
|
17781
18001
|
* The format of chunks (formats included by default are 'array-push' (web/WebWorker), 'commonjs' (node.js), 'module' (ESM), but others might be added by plugins).
|
|
@@ -17815,16 +18035,12 @@ declare interface OutputNormalized {
|
|
|
17815
18035
|
/**
|
|
17816
18036
|
* Specifies the filename template of non-initial output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
|
|
17817
18037
|
*/
|
|
17818
|
-
cssChunkFilename?:
|
|
17819
|
-
| string
|
|
17820
|
-
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
|
18038
|
+
cssChunkFilename?: string | TemplatePathFn<PathDataChunk>;
|
|
17821
18039
|
|
|
17822
18040
|
/**
|
|
17823
18041
|
* Specifies the filename template of output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
|
|
17824
18042
|
*/
|
|
17825
|
-
cssFilename?:
|
|
17826
|
-
| string
|
|
17827
|
-
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
|
18043
|
+
cssFilename?: string | TemplatePathFn<PathDataChunk>;
|
|
17828
18044
|
|
|
17829
18045
|
/**
|
|
17830
18046
|
* Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
|
|
@@ -17868,7 +18084,7 @@ declare interface OutputNormalized {
|
|
|
17868
18084
|
/**
|
|
17869
18085
|
* Specifies the filename of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
|
|
17870
18086
|
*/
|
|
17871
|
-
filename?: string |
|
|
18087
|
+
filename?: string | TemplatePathFn<PathDataChunk>;
|
|
17872
18088
|
|
|
17873
18089
|
/**
|
|
17874
18090
|
* An expression which is used to address the global object/scope in runtime code.
|
|
@@ -17913,16 +18129,12 @@ declare interface OutputNormalized {
|
|
|
17913
18129
|
/**
|
|
17914
18130
|
* Specifies the filename template of non-initial output html files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
|
|
17915
18131
|
*/
|
|
17916
|
-
htmlChunkFilename?:
|
|
17917
|
-
| string
|
|
17918
|
-
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
|
18132
|
+
htmlChunkFilename?: string | TemplatePathFn<PathDataChunk>;
|
|
17919
18133
|
|
|
17920
18134
|
/**
|
|
17921
18135
|
* Specifies the filename template of output html files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
|
|
17922
18136
|
*/
|
|
17923
|
-
htmlFilename?:
|
|
17924
|
-
| string
|
|
17925
|
-
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
|
18137
|
+
htmlFilename?: string | TemplatePathFn<PathDataChunk>;
|
|
17926
18138
|
|
|
17927
18139
|
/**
|
|
17928
18140
|
* Ignore warnings in the browser.
|
|
@@ -17967,7 +18179,7 @@ declare interface OutputNormalized {
|
|
|
17967
18179
|
/**
|
|
17968
18180
|
* The 'publicPath' specifies the public URL address of the output files when referenced in a browser.
|
|
17969
18181
|
*/
|
|
17970
|
-
publicPath?: string |
|
|
18182
|
+
publicPath?: string | TemplatePathFn<PathData>;
|
|
17971
18183
|
|
|
17972
18184
|
/**
|
|
17973
18185
|
* This option enables loading async chunks via a custom script type, such as script type="module".
|
|
@@ -18032,30 +18244,24 @@ declare interface OutputNormalized {
|
|
|
18032
18244
|
}
|
|
18033
18245
|
type OutputNormalizedWithDefaults = OutputNormalized & {
|
|
18034
18246
|
uniqueName: string;
|
|
18035
|
-
filename: NonNullable<
|
|
18036
|
-
|
|
18037
|
-
>;
|
|
18038
|
-
cssFilename: NonNullable<
|
|
18039
|
-
undefined | string | ((pathData: PathData, assetInfo?: AssetInfo) => string)
|
|
18040
|
-
>;
|
|
18247
|
+
filename: NonNullable<undefined | string | TemplatePathFn<PathDataChunk>>;
|
|
18248
|
+
cssFilename: NonNullable<undefined | string | TemplatePathFn<PathDataChunk>>;
|
|
18041
18249
|
chunkFilename: NonNullable<
|
|
18042
|
-
undefined | string |
|
|
18250
|
+
undefined | string | TemplatePathFn<PathDataChunk>
|
|
18043
18251
|
>;
|
|
18044
18252
|
cssChunkFilename: NonNullable<
|
|
18045
|
-
undefined | string |
|
|
18253
|
+
undefined | string | TemplatePathFn<PathDataChunk>
|
|
18046
18254
|
>;
|
|
18047
18255
|
hotUpdateChunkFilename: string;
|
|
18048
18256
|
hotUpdateGlobal: string;
|
|
18049
18257
|
assetModuleFilename: NonNullable<
|
|
18050
|
-
undefined | string |
|
|
18258
|
+
undefined | string | TemplatePathFn<PathDataModule>
|
|
18051
18259
|
>;
|
|
18052
18260
|
webassemblyModuleFilename: string;
|
|
18053
18261
|
sourceMapFilename: string;
|
|
18054
18262
|
hotUpdateMainFilename: string;
|
|
18055
18263
|
devtoolNamespace: string;
|
|
18056
|
-
publicPath: NonNullable<
|
|
18057
|
-
undefined | string | ((pathData: PathData, assetInfo?: AssetInfo) => string)
|
|
18058
|
-
>;
|
|
18264
|
+
publicPath: NonNullable<undefined | string | TemplatePathFn<PathData>>;
|
|
18059
18265
|
workerPublicPath: string;
|
|
18060
18266
|
workerWasmLoading: NonNullable<undefined | string | false>;
|
|
18061
18267
|
workerChunkLoading: NonNullable<undefined | string | false>;
|
|
@@ -18279,6 +18485,11 @@ declare interface PathData {
|
|
|
18279
18485
|
local?: string;
|
|
18280
18486
|
prepareId?: (id: string | number) => string | number;
|
|
18281
18487
|
}
|
|
18488
|
+
type PathDataChunk = PathData & { chunk: Chunk | ChunkPathData };
|
|
18489
|
+
type PathDataModule = PathData & {
|
|
18490
|
+
module: Module | ModulePathData;
|
|
18491
|
+
chunkGraph: ChunkGraph;
|
|
18492
|
+
};
|
|
18282
18493
|
type PathLikeFs = string | Buffer | URL;
|
|
18283
18494
|
type PathLikeTypes = string | URL_url | Buffer;
|
|
18284
18495
|
type PathOrFileDescriptorFs = string | number | Buffer | URL;
|
|
@@ -19696,7 +19907,7 @@ declare interface RenderManifestEntryStatic {
|
|
|
19696
19907
|
}
|
|
19697
19908
|
declare interface RenderManifestEntryTemplated {
|
|
19698
19909
|
render: () => Source;
|
|
19699
|
-
filenameTemplate:
|
|
19910
|
+
filenameTemplate: string | TemplatePathFn<any>;
|
|
19700
19911
|
pathOptions?: PathData;
|
|
19701
19912
|
info?: AssetInfo;
|
|
19702
19913
|
identifier: string;
|
|
@@ -19831,7 +20042,7 @@ declare interface ResolveData {
|
|
|
19831
20042
|
attributes?: ImportAttributes;
|
|
19832
20043
|
dependencies: ModuleDependency[];
|
|
19833
20044
|
dependencyType: string;
|
|
19834
|
-
createData: Partial<
|
|
20045
|
+
createData: Partial<CreateData>;
|
|
19835
20046
|
fileDependencies: LazySet<string>;
|
|
19836
20047
|
missingDependencies: LazySet<string>;
|
|
19837
20048
|
contextDependencies: LazySet<string>;
|
|
@@ -22313,10 +22524,7 @@ declare class SourceMapDevToolPlugin {
|
|
|
22313
22524
|
*/
|
|
22314
22525
|
constructor(options?: SourceMapDevToolPluginOptions);
|
|
22315
22526
|
sourceMapFilename?: null | string | false;
|
|
22316
|
-
sourceMappingURLComment:
|
|
22317
|
-
| string
|
|
22318
|
-
| false
|
|
22319
|
-
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
|
22527
|
+
sourceMappingURLComment: string | false | TemplatePathFn<PathData>;
|
|
22320
22528
|
moduleFilenameTemplate: DevtoolModuleFilenameTemplate;
|
|
22321
22529
|
fallbackModuleFilenameTemplate: DevtoolFallbackModuleFilenameTemplate;
|
|
22322
22530
|
namespace: string;
|
|
@@ -22331,11 +22539,7 @@ declare interface SourceMapDevToolPluginOptions {
|
|
|
22331
22539
|
/**
|
|
22332
22540
|
* Appends the given value to the original asset. Usually the #sourceMappingURL comment. [url] is replaced with a URL to the source map file. false disables the appending.
|
|
22333
22541
|
*/
|
|
22334
|
-
append?:
|
|
22335
|
-
| null
|
|
22336
|
-
| string
|
|
22337
|
-
| false
|
|
22338
|
-
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
|
22542
|
+
append?: null | string | false | TemplatePathFn<PathData>;
|
|
22339
22543
|
|
|
22340
22544
|
/**
|
|
22341
22545
|
* Indicates whether column mappings should be used (defaults to true).
|
|
@@ -22470,7 +22674,9 @@ declare interface SplitChunksOptions {
|
|
|
22470
22674
|
maxAsyncRequests: number;
|
|
22471
22675
|
maxInitialRequests: number;
|
|
22472
22676
|
hidePathInfo: boolean;
|
|
22473
|
-
filename?:
|
|
22677
|
+
filename?:
|
|
22678
|
+
| string
|
|
22679
|
+
| ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
22474
22680
|
automaticNameDelimiter: string;
|
|
22475
22681
|
getCacheGroups: (
|
|
22476
22682
|
module: Module,
|
|
@@ -23678,9 +23884,10 @@ declare class Template {
|
|
|
23678
23884
|
static NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS: number;
|
|
23679
23885
|
static NUMBER_OF_IDENTIFIER_START_CHARS: number;
|
|
23680
23886
|
}
|
|
23681
|
-
type TemplatePath =
|
|
23682
|
-
|
|
23683
|
-
|
|
23887
|
+
type TemplatePath = string | TemplatePathFn<PathData>;
|
|
23888
|
+
declare interface TemplatePathFn<T extends PathData = PathData> {
|
|
23889
|
+
(pathData: T, assetInfo?: AssetInfo): string;
|
|
23890
|
+
}
|
|
23684
23891
|
declare interface TimestampAndHash {
|
|
23685
23892
|
safeTime: number;
|
|
23686
23893
|
timestamp?: number;
|
|
@@ -24378,7 +24585,7 @@ declare interface WebpackOptionsInterception {
|
|
|
24378
24585
|
/**
|
|
24379
24586
|
* Which asset type should receive this devtool value.
|
|
24380
24587
|
*/
|
|
24381
|
-
type: "
|
|
24588
|
+
type: "css" | "all" | "javascript";
|
|
24382
24589
|
/**
|
|
24383
24590
|
* A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
|
|
24384
24591
|
*/
|
|
@@ -24430,7 +24637,7 @@ declare interface WebpackOptionsNormalized {
|
|
|
24430
24637
|
/**
|
|
24431
24638
|
* Which asset type should receive this devtool value.
|
|
24432
24639
|
*/
|
|
24433
|
-
type: "
|
|
24640
|
+
type: "css" | "all" | "javascript";
|
|
24434
24641
|
/**
|
|
24435
24642
|
* A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
|
|
24436
24643
|
*/
|
|
@@ -24489,6 +24696,7 @@ declare interface WebpackOptionsNormalized {
|
|
|
24489
24696
|
| "script"
|
|
24490
24697
|
| "node-commonjs"
|
|
24491
24698
|
| "asset"
|
|
24699
|
+
| "asset-url"
|
|
24492
24700
|
| "css-import"
|
|
24493
24701
|
| "css-url";
|
|
24494
24702
|
|
|
@@ -24625,7 +24833,7 @@ type WebpackOptionsNormalizedWithDefaults = WebpackOptionsNormalized & {
|
|
|
24625
24833
|
/**
|
|
24626
24834
|
* Which asset type should receive this devtool value.
|
|
24627
24835
|
*/
|
|
24628
|
-
type: "
|
|
24836
|
+
type: "css" | "all" | "javascript";
|
|
24629
24837
|
/**
|
|
24630
24838
|
* A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
|
|
24631
24839
|
*/
|
|
@@ -24662,6 +24870,7 @@ type WebpackOptionsNormalizedWithDefaults = WebpackOptionsNormalized & {
|
|
|
24662
24870
|
| "script"
|
|
24663
24871
|
| "node-commonjs"
|
|
24664
24872
|
| "asset"
|
|
24873
|
+
| "asset-url"
|
|
24665
24874
|
| "css-import"
|
|
24666
24875
|
| "css-url"
|
|
24667
24876
|
>;
|
|
@@ -25535,6 +25744,8 @@ declare namespace exports {
|
|
|
25535
25744
|
AssetInfo,
|
|
25536
25745
|
EntryOptions,
|
|
25537
25746
|
PathData,
|
|
25747
|
+
PathDataChunk,
|
|
25748
|
+
PathDataModule,
|
|
25538
25749
|
CodeGenerationResults,
|
|
25539
25750
|
Entrypoint,
|
|
25540
25751
|
ExternalItemFunctionData,
|