webpack 5.94.0 → 5.96.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/AsyncDependenciesBlock.js +1 -1
- package/lib/BannerPlugin.js +2 -1
- package/lib/Chunk.js +30 -0
- package/lib/ChunkGraph.js +11 -6
- package/lib/ChunkGroup.js +2 -2
- package/lib/CleanPlugin.js +4 -5
- package/lib/CodeGenerationResults.js +6 -5
- package/lib/Compilation.js +71 -48
- package/lib/Compiler.js +7 -5
- package/lib/ConcatenationScope.js +7 -20
- package/lib/ContextModule.js +7 -8
- package/lib/CssModule.js +25 -21
- package/lib/DefinePlugin.js +14 -8
- package/lib/DelegatedModule.js +3 -3
- package/lib/DllModule.js +4 -4
- package/lib/DynamicEntryPlugin.js +29 -22
- package/lib/EnvironmentPlugin.js +3 -2
- package/lib/EvalDevToolModulePlugin.js +5 -2
- package/lib/EvalSourceMapDevToolPlugin.js +5 -2
- package/lib/ExternalModule.js +118 -99
- package/lib/ExternalModuleFactoryPlugin.js +33 -9
- package/lib/FileSystemInfo.js +12 -8
- package/lib/Generator.js +5 -4
- package/lib/HotModuleReplacementPlugin.js +8 -6
- package/lib/IgnorePlugin.js +19 -1
- package/lib/LoaderOptionsPlugin.js +3 -1
- package/lib/Module.js +9 -8
- package/lib/ModuleSourceTypesConstants.js +100 -0
- package/lib/NormalModule.js +27 -13
- package/lib/NormalModuleFactory.js +38 -22
- package/lib/OptionsApply.js +12 -1
- package/lib/ProgressPlugin.js +50 -10
- package/lib/RawModule.js +3 -4
- package/lib/RuntimeModule.js +3 -4
- package/lib/RuntimePlugin.js +11 -4
- package/lib/RuntimeTemplate.js +13 -42
- package/lib/SourceMapDevToolPlugin.js +10 -7
- package/lib/TemplatedPathPlugin.js +9 -3
- package/lib/Watching.js +2 -2
- package/lib/WebpackOptionsApply.js +42 -21
- package/lib/asset/AssetGenerator.js +347 -194
- package/lib/asset/AssetModulesPlugin.js +2 -1
- package/lib/asset/AssetSourceGenerator.js +82 -27
- package/lib/asset/RawDataUrlModule.js +5 -4
- package/lib/buildChunkGraph.js +79 -62
- package/lib/cache/PackFileCacheStrategy.js +69 -31
- package/lib/cache/ResolverCachePlugin.js +248 -173
- package/lib/config/defaults.js +135 -126
- package/lib/container/ContainerEntryModule.js +3 -4
- package/lib/container/ContainerPlugin.js +8 -0
- package/lib/container/FallbackModule.js +2 -2
- package/lib/container/HoistContainerReferencesPlugin.js +250 -0
- package/lib/container/ModuleFederationPlugin.js +38 -1
- package/lib/container/RemoteModule.js +4 -2
- package/lib/container/RemoteRuntimeModule.js +4 -2
- package/lib/css/CssExportsGenerator.js +16 -12
- package/lib/css/CssGenerator.js +22 -16
- package/lib/css/CssLoadingRuntimeModule.js +7 -6
- package/lib/css/CssModulesPlugin.js +122 -77
- package/lib/css/CssParser.js +655 -526
- package/lib/css/walkCssTokens.js +1168 -338
- package/lib/debug/ProfilingPlugin.js +5 -0
- package/lib/dependencies/CommonJsExportsParserPlugin.js +5 -2
- package/lib/dependencies/CommonJsImportsParserPlugin.js +3 -6
- package/lib/dependencies/ContextDependency.js +6 -1
- package/lib/dependencies/ContextElementDependency.js +33 -6
- package/lib/dependencies/CssExportDependency.js +3 -3
- package/lib/dependencies/CssLocalIdentifierDependency.js +26 -17
- package/lib/dependencies/CssUrlDependency.js +33 -3
- package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +3 -3
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +39 -14
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +15 -82
- package/lib/dependencies/HarmonyImportSpecifierDependency.js +5 -2
- package/lib/dependencies/ImportParserPlugin.js +9 -7
- package/lib/dependencies/LoaderPlugin.js +19 -0
- package/lib/dependencies/SystemPlugin.js +2 -1
- package/lib/dependencies/URLPlugin.js +7 -1
- package/lib/dependencies/WorkerPlugin.js +1 -1
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +4 -2
- package/lib/hmr/HotModuleReplacement.runtime.js +1 -0
- package/lib/hmr/JavascriptHotModuleReplacement.runtime.js +1 -0
- package/lib/hmr/LazyCompilationPlugin.js +16 -4
- package/lib/hmr/lazyCompilationBackend.js +1 -7
- package/lib/index.js +35 -6
- package/lib/javascript/EnableChunkLoadingPlugin.js +2 -2
- package/lib/javascript/JavascriptGenerator.js +8 -8
- package/lib/javascript/JavascriptModulesPlugin.js +166 -88
- package/lib/javascript/JavascriptParser.js +338 -117
- package/lib/json/JsonGenerator.js +5 -5
- package/lib/library/EnableLibraryPlugin.js +2 -2
- package/lib/library/ExportPropertyLibraryPlugin.js +1 -1
- package/lib/library/UmdLibraryPlugin.js +16 -8
- package/lib/logging/Logger.js +11 -11
- package/lib/logging/createConsoleLogger.js +14 -14
- package/lib/logging/truncateArgs.js +1 -1
- package/lib/node/NodeWatchFileSystem.js +3 -1
- package/lib/node/ReadFileCompileAsyncWasmPlugin.js +20 -18
- package/lib/node/ReadFileCompileWasmPlugin.js +1 -2
- package/lib/node/nodeConsole.js +11 -8
- package/lib/optimize/AggressiveSplittingPlugin.js +21 -7
- package/lib/optimize/ConcatenatedModule.js +44 -148
- package/lib/optimize/FlagIncludedChunksPlugin.js +6 -0
- package/lib/optimize/InnerGraphPlugin.js +57 -16
- package/lib/optimize/LimitChunkCountPlugin.js +2 -4
- package/lib/optimize/MergeDuplicateChunksPlugin.js +2 -2
- package/lib/optimize/ModuleConcatenationPlugin.js +4 -2
- package/lib/optimize/RealContentHashPlugin.js +1 -1
- package/lib/optimize/SideEffectsFlagPlugin.js +6 -3
- package/lib/rules/RuleSetCompiler.js +2 -2
- package/lib/runtime/GetChunkFilenameRuntimeModule.js +2 -2
- package/lib/schemes/DataUriPlugin.js +1 -1
- package/lib/serialization/BinaryMiddleware.js +32 -19
- package/lib/serialization/ObjectMiddleware.js +23 -9
- package/lib/serialization/SerializerMiddleware.js +3 -2
- package/lib/serialization/types.js +2 -2
- package/lib/sharing/ConsumeSharedModule.js +2 -3
- package/lib/sharing/ConsumeSharedRuntimeModule.js +3 -1
- package/lib/sharing/ProvideSharedModule.js +2 -3
- package/lib/stats/DefaultStatsFactoryPlugin.js +22 -20
- package/lib/stats/StatsFactory.js +12 -12
- package/lib/stats/StatsPrinter.js +7 -7
- package/lib/util/AsyncQueue.js +17 -1
- package/lib/util/IterableHelpers.js +1 -1
- package/lib/util/LazySet.js +12 -0
- package/lib/util/SetHelpers.js +1 -1
- package/lib/util/cleverMerge.js +48 -24
- package/lib/util/concatenate.js +227 -0
- package/lib/util/create-schema-validation.js +22 -9
- package/lib/util/deprecation.js +86 -28
- package/lib/util/fs.js +10 -10
- package/lib/util/hash/wasm-hash.js +12 -1
- package/lib/util/magicComment.js +21 -0
- package/lib/util/makeSerializable.js +24 -1
- package/lib/util/memoize.js +2 -1
- package/lib/util/runtime.js +10 -1
- package/lib/util/semver.js +130 -23
- package/lib/wasm/EnableWasmLoadingPlugin.js +2 -2
- package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +3 -3
- package/lib/wasm-async/AsyncWebAssemblyGenerator.js +5 -5
- package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +5 -5
- package/lib/wasm-sync/WebAssemblyGenerator.js +8 -9
- package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +5 -5
- package/lib/web/FetchCompileAsyncWasmPlugin.js +1 -2
- package/lib/web/FetchCompileWasmPlugin.js +1 -2
- package/lib/web/JsonpChunkLoadingRuntimeModule.js +6 -6
- package/package.json +19 -20
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +12 -2
- package/types.d.ts +817 -269
- package/lib/util/mergeScope.js +0 -76
package/types.d.ts
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
*/
|
6
6
|
|
7
7
|
import { Buffer } from "buffer";
|
8
|
+
import { Scope } from "eslint-scope";
|
8
9
|
import {
|
9
10
|
ArrayExpression,
|
10
11
|
ArrayPattern,
|
@@ -13,6 +14,7 @@ import {
|
|
13
14
|
AssignmentPattern,
|
14
15
|
AssignmentProperty,
|
15
16
|
AwaitExpression,
|
17
|
+
BaseNode,
|
16
18
|
BigIntLiteral,
|
17
19
|
BinaryExpression,
|
18
20
|
BlockStatement,
|
@@ -29,9 +31,9 @@ import {
|
|
29
31
|
Directive,
|
30
32
|
DoWhileStatement,
|
31
33
|
EmptyStatement,
|
32
|
-
ExportAllDeclaration,
|
34
|
+
ExportAllDeclaration as ExportAllDeclarationImport,
|
33
35
|
ExportDefaultDeclaration,
|
34
|
-
ExportNamedDeclaration,
|
36
|
+
ExportNamedDeclaration as ExportNamedDeclarationImport,
|
35
37
|
ExportSpecifier,
|
36
38
|
ExpressionStatement,
|
37
39
|
ForInStatement,
|
@@ -41,9 +43,9 @@ import {
|
|
41
43
|
FunctionExpression,
|
42
44
|
Identifier,
|
43
45
|
IfStatement,
|
44
|
-
ImportDeclaration,
|
46
|
+
ImportDeclaration as ImportDeclarationImport,
|
45
47
|
ImportDefaultSpecifier,
|
46
|
-
ImportExpression,
|
48
|
+
ImportExpression as ImportExpressionImport,
|
47
49
|
ImportNamespaceSpecifier,
|
48
50
|
ImportSpecifier,
|
49
51
|
LabeledStatement,
|
@@ -140,11 +142,11 @@ declare class AbstractLibraryPlugin<T> {
|
|
140
142
|
): void;
|
141
143
|
embedInRuntimeBailout(
|
142
144
|
module: Module,
|
143
|
-
renderContext:
|
145
|
+
renderContext: RenderContextJavascriptModulesPlugin,
|
144
146
|
libraryContext: LibraryContext<T>
|
145
147
|
): undefined | string;
|
146
148
|
strictRuntimeBailout(
|
147
|
-
renderContext:
|
149
|
+
renderContext: RenderContextJavascriptModulesPlugin,
|
148
150
|
libraryContext: LibraryContext<T>
|
149
151
|
): undefined | string;
|
150
152
|
runtimeRequirements(
|
@@ -154,7 +156,7 @@ declare class AbstractLibraryPlugin<T> {
|
|
154
156
|
): void;
|
155
157
|
render(
|
156
158
|
source: Source,
|
157
|
-
renderContext:
|
159
|
+
renderContext: RenderContextJavascriptModulesPlugin,
|
158
160
|
libraryContext: LibraryContext<T>
|
159
161
|
): Source;
|
160
162
|
renderStartup(
|
@@ -275,6 +277,9 @@ declare interface Asset {
|
|
275
277
|
*/
|
276
278
|
info: AssetInfo;
|
277
279
|
}
|
280
|
+
declare interface AssetDependencyMeta {
|
281
|
+
sourceType: "css-url";
|
282
|
+
}
|
278
283
|
declare interface AssetEmittedInfo {
|
279
284
|
content: Buffer;
|
280
285
|
source: Source;
|
@@ -383,18 +388,18 @@ declare class AsyncDependenciesBlock extends DependenciesBlock {
|
|
383
388
|
constructor(
|
384
389
|
groupOptions:
|
385
390
|
| null
|
386
|
-
| (RawChunkGroupOptions & { name?: string } & {
|
391
|
+
| (RawChunkGroupOptions & { name?: null | string } & {
|
387
392
|
entryOptions?: EntryOptions;
|
388
393
|
}),
|
389
394
|
loc?: null | SyntheticDependencyLocation | RealDependencyLocation,
|
390
395
|
request?: null | string
|
391
396
|
);
|
392
|
-
groupOptions: RawChunkGroupOptions & { name?: string } & {
|
397
|
+
groupOptions: RawChunkGroupOptions & { name?: null | string } & {
|
393
398
|
entryOptions?: EntryOptions;
|
394
399
|
};
|
395
400
|
loc?: null | SyntheticDependencyLocation | RealDependencyLocation;
|
396
401
|
request?: null | string;
|
397
|
-
chunkName?: string;
|
402
|
+
chunkName?: null | string;
|
398
403
|
module: any;
|
399
404
|
}
|
400
405
|
declare abstract class AsyncQueue<T, K, R> {
|
@@ -407,6 +412,8 @@ declare abstract class AsyncQueue<T, K, R> {
|
|
407
412
|
[T, undefined | null | WebpackError, undefined | null | R]
|
408
413
|
>;
|
409
414
|
};
|
415
|
+
getContext(): string;
|
416
|
+
setContext(value: string): void;
|
410
417
|
add(item: T, callback: CallbackAsyncQueue<R>): void;
|
411
418
|
invalidate(item: T): void;
|
412
419
|
|
@@ -554,6 +561,11 @@ declare abstract class BasicEvaluatedExpression {
|
|
554
561
|
getMembersOptionals?: () => boolean[];
|
555
562
|
getMemberRanges?: () => [number, number][];
|
556
563
|
expression?:
|
564
|
+
| Program
|
565
|
+
| ImportDeclarationImport
|
566
|
+
| ExportNamedDeclarationImport
|
567
|
+
| ExportAllDeclarationImport
|
568
|
+
| ImportExpressionImport
|
557
569
|
| UnaryExpression
|
558
570
|
| ArrayExpression
|
559
571
|
| ArrowFunctionExpression
|
@@ -567,7 +579,6 @@ declare abstract class BasicEvaluatedExpression {
|
|
567
579
|
| ConditionalExpression
|
568
580
|
| FunctionExpression
|
569
581
|
| Identifier
|
570
|
-
| ImportExpression
|
571
582
|
| SimpleLiteral
|
572
583
|
| RegExpLiteral
|
573
584
|
| BigIntLiteral
|
@@ -582,10 +593,10 @@ declare abstract class BasicEvaluatedExpression {
|
|
582
593
|
| UpdateExpression
|
583
594
|
| YieldExpression
|
584
595
|
| SpreadElement
|
596
|
+
| PrivateIdentifier
|
585
597
|
| FunctionDeclaration
|
586
598
|
| VariableDeclaration
|
587
599
|
| ClassDeclaration
|
588
|
-
| PrivateIdentifier
|
589
600
|
| ExpressionStatement
|
590
601
|
| BlockStatement
|
591
602
|
| StaticBlock
|
@@ -605,14 +616,10 @@ declare abstract class BasicEvaluatedExpression {
|
|
605
616
|
| ForStatement
|
606
617
|
| ForInStatement
|
607
618
|
| ForOfStatement
|
608
|
-
| ImportDeclaration
|
609
|
-
| ExportNamedDeclaration
|
610
619
|
| ExportDefaultDeclaration
|
611
|
-
| ExportAllDeclaration
|
612
620
|
| MethodDefinition
|
613
621
|
| PropertyDefinition
|
614
622
|
| VariableDeclarator
|
615
|
-
| Program
|
616
623
|
| SwitchCase
|
617
624
|
| CatchClause
|
618
625
|
| ObjectPattern
|
@@ -620,13 +627,13 @@ declare abstract class BasicEvaluatedExpression {
|
|
620
627
|
| RestElement
|
621
628
|
| AssignmentPattern
|
622
629
|
| Property
|
630
|
+
| Super
|
623
631
|
| AssignmentProperty
|
624
632
|
| ClassBody
|
625
633
|
| ImportSpecifier
|
626
634
|
| ImportDefaultSpecifier
|
627
635
|
| ImportNamespaceSpecifier
|
628
636
|
| ExportSpecifier
|
629
|
-
| Super
|
630
637
|
| TemplateElement;
|
631
638
|
isUnknown(): boolean;
|
632
639
|
isNull(): boolean;
|
@@ -777,6 +784,11 @@ declare abstract class BasicEvaluatedExpression {
|
|
777
784
|
*/
|
778
785
|
setExpression(
|
779
786
|
expression?:
|
787
|
+
| Program
|
788
|
+
| ImportDeclarationImport
|
789
|
+
| ExportNamedDeclarationImport
|
790
|
+
| ExportAllDeclarationImport
|
791
|
+
| ImportExpressionImport
|
780
792
|
| UnaryExpression
|
781
793
|
| ArrayExpression
|
782
794
|
| ArrowFunctionExpression
|
@@ -790,7 +802,6 @@ declare abstract class BasicEvaluatedExpression {
|
|
790
802
|
| ConditionalExpression
|
791
803
|
| FunctionExpression
|
792
804
|
| Identifier
|
793
|
-
| ImportExpression
|
794
805
|
| SimpleLiteral
|
795
806
|
| RegExpLiteral
|
796
807
|
| BigIntLiteral
|
@@ -805,10 +816,10 @@ declare abstract class BasicEvaluatedExpression {
|
|
805
816
|
| UpdateExpression
|
806
817
|
| YieldExpression
|
807
818
|
| SpreadElement
|
819
|
+
| PrivateIdentifier
|
808
820
|
| FunctionDeclaration
|
809
821
|
| VariableDeclaration
|
810
822
|
| ClassDeclaration
|
811
|
-
| PrivateIdentifier
|
812
823
|
| ExpressionStatement
|
813
824
|
| BlockStatement
|
814
825
|
| StaticBlock
|
@@ -828,14 +839,10 @@ declare abstract class BasicEvaluatedExpression {
|
|
828
839
|
| ForStatement
|
829
840
|
| ForInStatement
|
830
841
|
| ForOfStatement
|
831
|
-
| ImportDeclaration
|
832
|
-
| ExportNamedDeclaration
|
833
842
|
| ExportDefaultDeclaration
|
834
|
-
| ExportAllDeclaration
|
835
843
|
| MethodDefinition
|
836
844
|
| PropertyDefinition
|
837
845
|
| VariableDeclarator
|
838
|
-
| Program
|
839
846
|
| SwitchCase
|
840
847
|
| CatchClause
|
841
848
|
| ObjectPattern
|
@@ -843,13 +850,13 @@ declare abstract class BasicEvaluatedExpression {
|
|
843
850
|
| RestElement
|
844
851
|
| AssignmentPattern
|
845
852
|
| Property
|
853
|
+
| Super
|
846
854
|
| AssignmentProperty
|
847
855
|
| ClassBody
|
848
856
|
| ImportSpecifier
|
849
857
|
| ImportDefaultSpecifier
|
850
858
|
| ImportNamespaceSpecifier
|
851
859
|
| ExportSpecifier
|
852
|
-
| Super
|
853
860
|
| TemplateElement
|
854
861
|
): BasicEvaluatedExpression;
|
855
862
|
}
|
@@ -1104,6 +1111,12 @@ declare class Chunk {
|
|
1104
1111
|
includeDirectChildren?: boolean,
|
1105
1112
|
filterFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean
|
1106
1113
|
): Record<string | number, Record<string, (string | number)[]>>;
|
1114
|
+
hasChildByOrder(
|
1115
|
+
chunkGraph: ChunkGraph,
|
1116
|
+
type: string,
|
1117
|
+
includeDirectChildren?: boolean,
|
1118
|
+
filterFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean
|
1119
|
+
): boolean;
|
1107
1120
|
}
|
1108
1121
|
declare class ChunkGraph {
|
1109
1122
|
constructor(moduleGraph: ModuleGraph, hashFunction?: string | typeof Hash);
|
@@ -1142,8 +1155,8 @@ declare class ChunkGraph {
|
|
1142
1155
|
module: Module,
|
1143
1156
|
sourceTypes: Set<string>
|
1144
1157
|
): void;
|
1145
|
-
getChunkModuleSourceTypes(chunk: Chunk, module: Module):
|
1146
|
-
getModuleSourceTypes(module: Module):
|
1158
|
+
getChunkModuleSourceTypes(chunk: Chunk, module: Module): ReadonlySet<string>;
|
1159
|
+
getModuleSourceTypes(module: Module): ReadonlySet<string>;
|
1147
1160
|
getOrderedChunkModulesIterable(
|
1148
1161
|
chunk: Chunk,
|
1149
1162
|
comparator: (arg0: Module, arg1: Module) => 0 | 1 | -1
|
@@ -1297,7 +1310,7 @@ declare abstract class ChunkGroup {
|
|
1297
1310
|
* returns the name of current ChunkGroup
|
1298
1311
|
* sets a new name for current ChunkGroup
|
1299
1312
|
*/
|
1300
|
-
name?: string;
|
1313
|
+
name?: null | string;
|
1301
1314
|
|
1302
1315
|
/**
|
1303
1316
|
* get a uniqueId for ChunkGroup, made up of its member Chunk debugId's
|
@@ -1386,7 +1399,7 @@ declare abstract class ChunkGroup {
|
|
1386
1399
|
getModuleIndex: (module: Module) => undefined | number;
|
1387
1400
|
getModuleIndex2: (module: Module) => undefined | number;
|
1388
1401
|
}
|
1389
|
-
type ChunkGroupOptions = RawChunkGroupOptions & { name?: string };
|
1402
|
+
type ChunkGroupOptions = RawChunkGroupOptions & { name?: null | string };
|
1390
1403
|
declare interface ChunkHashContext {
|
1391
1404
|
/**
|
1392
1405
|
* results of code generation
|
@@ -1460,7 +1473,38 @@ declare class ChunkPrefetchPreloadPlugin {
|
|
1460
1473
|
constructor();
|
1461
1474
|
apply(compiler: Compiler): void;
|
1462
1475
|
}
|
1463
|
-
declare interface
|
1476
|
+
declare interface ChunkRenderContextCssModulesPlugin {
|
1477
|
+
/**
|
1478
|
+
* the chunk
|
1479
|
+
*/
|
1480
|
+
chunk: Chunk;
|
1481
|
+
|
1482
|
+
/**
|
1483
|
+
* the chunk graph
|
1484
|
+
*/
|
1485
|
+
chunkGraph: ChunkGraph;
|
1486
|
+
|
1487
|
+
/**
|
1488
|
+
* results of code generation
|
1489
|
+
*/
|
1490
|
+
codeGenerationResults: CodeGenerationResults;
|
1491
|
+
|
1492
|
+
/**
|
1493
|
+
* the runtime template
|
1494
|
+
*/
|
1495
|
+
runtimeTemplate: RuntimeTemplate;
|
1496
|
+
|
1497
|
+
/**
|
1498
|
+
* meta data for runtime
|
1499
|
+
*/
|
1500
|
+
metaData: string[];
|
1501
|
+
|
1502
|
+
/**
|
1503
|
+
* undo path to css file
|
1504
|
+
*/
|
1505
|
+
undoPath: string;
|
1506
|
+
}
|
1507
|
+
declare interface ChunkRenderContextJavascriptModulesPlugin {
|
1464
1508
|
/**
|
1465
1509
|
* the chunk
|
1466
1510
|
*/
|
@@ -1494,7 +1538,7 @@ declare interface ChunkRenderContext {
|
|
1494
1538
|
/**
|
1495
1539
|
* init fragments for the chunk
|
1496
1540
|
*/
|
1497
|
-
chunkInitFragments: InitFragment<
|
1541
|
+
chunkInitFragments: InitFragment<ChunkRenderContextJavascriptModulesPlugin>[];
|
1498
1542
|
|
1499
1543
|
/**
|
1500
1544
|
* rendering in strict context
|
@@ -1530,7 +1574,11 @@ declare abstract class ChunkTemplate {
|
|
1530
1574
|
options:
|
1531
1575
|
| string
|
1532
1576
|
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
1533
|
-
fn: (
|
1577
|
+
fn: (
|
1578
|
+
arg0: Source,
|
1579
|
+
arg1: ModuleTemplate,
|
1580
|
+
arg2: RenderContextJavascriptModulesPlugin
|
1581
|
+
) => Source
|
1534
1582
|
) => void;
|
1535
1583
|
};
|
1536
1584
|
render: {
|
@@ -1538,7 +1586,11 @@ declare abstract class ChunkTemplate {
|
|
1538
1586
|
options:
|
1539
1587
|
| string
|
1540
1588
|
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
1541
|
-
fn: (
|
1589
|
+
fn: (
|
1590
|
+
arg0: Source,
|
1591
|
+
arg1: ModuleTemplate,
|
1592
|
+
arg2: RenderContextJavascriptModulesPlugin
|
1593
|
+
) => Source
|
1542
1594
|
) => void;
|
1543
1595
|
};
|
1544
1596
|
renderWithEntry: {
|
@@ -1608,7 +1660,7 @@ declare interface CleanPluginCompilationHooks {
|
|
1608
1660
|
/**
|
1609
1661
|
* when returning true the file/directory will be kept during cleaning, returning false will clean it and ignore the following plugins and config
|
1610
1662
|
*/
|
1611
|
-
keep: SyncBailHook<[string], boolean>;
|
1663
|
+
keep: SyncBailHook<[string], boolean | void>;
|
1612
1664
|
}
|
1613
1665
|
declare interface CodeGenerationContext {
|
1614
1666
|
/**
|
@@ -1685,7 +1737,7 @@ declare abstract class CodeGenerationResults {
|
|
1685
1737
|
getRuntimeRequirements(
|
1686
1738
|
module: Module,
|
1687
1739
|
runtime: RuntimeSpec
|
1688
|
-
): ReadonlySet<string>;
|
1740
|
+
): null | ReadonlySet<string>;
|
1689
1741
|
getData(module: Module, runtime: RuntimeSpec, key: string): any;
|
1690
1742
|
getHash(module: Module, runtime: RuntimeSpec): any;
|
1691
1743
|
add(module: Module, runtime: RuntimeSpec, result: CodeGenerationResult): void;
|
@@ -1789,7 +1841,7 @@ declare class Compilation {
|
|
1789
1841
|
void
|
1790
1842
|
>;
|
1791
1843
|
afterOptimizeChunkModules: SyncHook<[Iterable<Chunk>, Iterable<Module>]>;
|
1792
|
-
shouldRecord: SyncBailHook<[],
|
1844
|
+
shouldRecord: SyncBailHook<[], boolean | void>;
|
1793
1845
|
additionalChunkRuntimeRequirements: SyncHook<
|
1794
1846
|
[Chunk, Set<string>, RuntimeRequirementsContext]
|
1795
1847
|
>;
|
@@ -1834,7 +1886,7 @@ declare class Compilation {
|
|
1834
1886
|
recordHash: SyncHook<[any]>;
|
1835
1887
|
record: SyncHook<[Compilation, any]>;
|
1836
1888
|
beforeModuleAssets: SyncHook<[]>;
|
1837
|
-
shouldGenerateChunkAssets: SyncBailHook<[], boolean>;
|
1889
|
+
shouldGenerateChunkAssets: SyncBailHook<[], boolean | void>;
|
1838
1890
|
beforeChunkAssets: SyncHook<[]>;
|
1839
1891
|
additionalChunkAssets: FakeHook<
|
1840
1892
|
Pick<
|
@@ -1868,7 +1920,7 @@ declare class Compilation {
|
|
1868
1920
|
>;
|
1869
1921
|
afterProcessAssets: SyncHook<[CompilationAssets]>;
|
1870
1922
|
processAdditionalAssets: AsyncSeriesHook<[CompilationAssets]>;
|
1871
|
-
needAdditionalSeal: SyncBailHook<[],
|
1923
|
+
needAdditionalSeal: SyncBailHook<[], boolean | void>;
|
1872
1924
|
afterSeal: AsyncSeriesHook<[]>;
|
1873
1925
|
renderManifest: SyncWaterfallHook<
|
1874
1926
|
[RenderManifestEntry[], RenderManifestOptions]
|
@@ -1878,9 +1930,9 @@ declare class Compilation {
|
|
1878
1930
|
moduleAsset: SyncHook<[Module, string]>;
|
1879
1931
|
chunkAsset: SyncHook<[Chunk, string]>;
|
1880
1932
|
assetPath: SyncWaterfallHook<[string, object, undefined | AssetInfo]>;
|
1881
|
-
needAdditionalPass: SyncBailHook<[], boolean>;
|
1933
|
+
needAdditionalPass: SyncBailHook<[], boolean | void>;
|
1882
1934
|
childCompiler: SyncHook<[Compiler, string, number]>;
|
1883
|
-
log: SyncBailHook<[string, LogEntry],
|
1935
|
+
log: SyncBailHook<[string, LogEntry], boolean | void>;
|
1884
1936
|
processWarnings: SyncWaterfallHook<[WebpackError[]]>;
|
1885
1937
|
processErrors: SyncWaterfallHook<[WebpackError[]]>;
|
1886
1938
|
statsPreset: HookMap<
|
@@ -1902,7 +1954,7 @@ declare class Compilation {
|
|
1902
1954
|
resolverFactory: ResolverFactory;
|
1903
1955
|
inputFileSystem: InputFileSystem;
|
1904
1956
|
fileSystemInfo: FileSystemInfo;
|
1905
|
-
valueCacheVersions: Map<string,
|
1957
|
+
valueCacheVersions: Map<string, string | Set<string>>;
|
1906
1958
|
requestShortener: RequestShortener;
|
1907
1959
|
compilerPath: string;
|
1908
1960
|
logger: WebpackLogger;
|
@@ -2162,7 +2214,7 @@ declare class Compilation {
|
|
2162
2214
|
*/
|
2163
2215
|
createChildCompiler(
|
2164
2216
|
name: string,
|
2165
|
-
outputOptions?: OutputNormalized
|
2217
|
+
outputOptions?: Partial<OutputNormalized>,
|
2166
2218
|
plugins?: (
|
2167
2219
|
| ((this: Compiler, compiler: Compiler) => void)
|
2168
2220
|
| WebpackPluginInstance
|
@@ -2277,29 +2329,56 @@ declare interface CompilationHooksAsyncWebAssemblyModulesPlugin {
|
|
2277
2329
|
[Source, Module, WebAssemblyRenderContext]
|
2278
2330
|
>;
|
2279
2331
|
}
|
2332
|
+
declare interface CompilationHooksCssModulesPlugin {
|
2333
|
+
renderModulePackage: SyncWaterfallHook<
|
2334
|
+
[Source, Module, ChunkRenderContextCssModulesPlugin]
|
2335
|
+
>;
|
2336
|
+
chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
|
2337
|
+
}
|
2280
2338
|
declare interface CompilationHooksJavascriptModulesPlugin {
|
2281
|
-
renderModuleContent: SyncWaterfallHook<
|
2339
|
+
renderModuleContent: SyncWaterfallHook<
|
2340
|
+
[Source, Module, ChunkRenderContextJavascriptModulesPlugin]
|
2341
|
+
>;
|
2282
2342
|
renderModuleContainer: SyncWaterfallHook<
|
2283
|
-
[Source, Module,
|
2343
|
+
[Source, Module, ChunkRenderContextJavascriptModulesPlugin]
|
2344
|
+
>;
|
2345
|
+
renderModulePackage: SyncWaterfallHook<
|
2346
|
+
[Source, Module, ChunkRenderContextJavascriptModulesPlugin]
|
2284
2347
|
>;
|
2285
|
-
|
2286
|
-
|
2287
|
-
|
2288
|
-
|
2289
|
-
|
2348
|
+
renderChunk: SyncWaterfallHook<
|
2349
|
+
[Source, RenderContextJavascriptModulesPlugin]
|
2350
|
+
>;
|
2351
|
+
renderMain: SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin]>;
|
2352
|
+
renderContent: SyncWaterfallHook<
|
2353
|
+
[Source, RenderContextJavascriptModulesPlugin]
|
2354
|
+
>;
|
2355
|
+
render: SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin]>;
|
2290
2356
|
renderStartup: SyncWaterfallHook<[Source, Module, StartupRenderContext]>;
|
2291
2357
|
renderRequire: SyncWaterfallHook<[string, RenderBootstrapContext]>;
|
2292
2358
|
inlineInRuntimeBailout: SyncBailHook<
|
2293
2359
|
[Module, RenderBootstrapContext],
|
2294
|
-
string
|
2360
|
+
string | void
|
2361
|
+
>;
|
2362
|
+
embedInRuntimeBailout: SyncBailHook<
|
2363
|
+
[Module, RenderContextJavascriptModulesPlugin],
|
2364
|
+
string | void
|
2365
|
+
>;
|
2366
|
+
strictRuntimeBailout: SyncBailHook<
|
2367
|
+
[RenderContextJavascriptModulesPlugin],
|
2368
|
+
string | void
|
2295
2369
|
>;
|
2296
|
-
embedInRuntimeBailout: SyncBailHook<[Module, RenderContext], string | void>;
|
2297
|
-
strictRuntimeBailout: SyncBailHook<[RenderContext], string | void>;
|
2298
2370
|
chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
|
2299
|
-
useSourceMap: SyncBailHook<
|
2371
|
+
useSourceMap: SyncBailHook<
|
2372
|
+
[Chunk, RenderContextJavascriptModulesPlugin],
|
2373
|
+
boolean | void
|
2374
|
+
>;
|
2375
|
+
}
|
2376
|
+
declare interface CompilationHooksModuleFederationPlugin {
|
2377
|
+
addContainerEntryDependency: SyncHook<Dependency>;
|
2378
|
+
addFederationRuntimeDependency: SyncHook<Dependency>;
|
2300
2379
|
}
|
2301
2380
|
declare interface CompilationHooksRealContentHashPlugin {
|
2302
|
-
updateHash: SyncBailHook<[Buffer[], string], string>;
|
2381
|
+
updateHash: SyncBailHook<[Buffer[], string], string | void>;
|
2303
2382
|
}
|
2304
2383
|
declare interface CompilationParams {
|
2305
2384
|
normalModuleFactory: NormalModuleFactory;
|
@@ -2309,7 +2388,7 @@ declare class Compiler {
|
|
2309
2388
|
constructor(context: string, options?: WebpackOptionsNormalized);
|
2310
2389
|
hooks: Readonly<{
|
2311
2390
|
initialize: SyncHook<[]>;
|
2312
|
-
shouldEmit: SyncBailHook<[Compilation],
|
2391
|
+
shouldEmit: SyncBailHook<[Compilation], boolean | void>;
|
2313
2392
|
done: AsyncSeriesHook<[Stats]>;
|
2314
2393
|
afterDone: SyncHook<[Stats]>;
|
2315
2394
|
additionalPass: AsyncSeriesHook<[]>;
|
@@ -2334,12 +2413,15 @@ declare class Compiler {
|
|
2334
2413
|
invalid: SyncHook<[null | string, number]>;
|
2335
2414
|
watchClose: SyncHook<[]>;
|
2336
2415
|
shutdown: AsyncSeriesHook<[]>;
|
2337
|
-
infrastructureLog: SyncBailHook<
|
2416
|
+
infrastructureLog: SyncBailHook<
|
2417
|
+
[string, string, undefined | any[]],
|
2418
|
+
true | void
|
2419
|
+
>;
|
2338
2420
|
environment: SyncHook<[]>;
|
2339
2421
|
afterEnvironment: SyncHook<[]>;
|
2340
2422
|
afterPlugins: SyncHook<[Compiler]>;
|
2341
2423
|
afterResolvers: SyncHook<[Compiler]>;
|
2342
|
-
entryOption: SyncBailHook<[string, EntryNormalized], boolean>;
|
2424
|
+
entryOption: SyncBailHook<[string, EntryNormalized], boolean | void>;
|
2343
2425
|
}>;
|
2344
2426
|
webpack: typeof exports;
|
2345
2427
|
name?: string;
|
@@ -2376,14 +2458,7 @@ declare class Compiler {
|
|
2376
2458
|
context: string;
|
2377
2459
|
requestShortener: RequestShortener;
|
2378
2460
|
cache: Cache;
|
2379
|
-
moduleMemCaches?: Map<
|
2380
|
-
Module,
|
2381
|
-
{
|
2382
|
-
buildInfo: BuildInfo;
|
2383
|
-
references?: WeakMap<Dependency, Module>;
|
2384
|
-
memCache: WeakTupleMap<any, any>;
|
2385
|
-
}
|
2386
|
-
>;
|
2461
|
+
moduleMemCaches?: Map<Module, ModuleMemCachesItem>;
|
2387
2462
|
compilerPath: string;
|
2388
2463
|
running: boolean;
|
2389
2464
|
idle: boolean;
|
@@ -2410,7 +2485,7 @@ declare class Compiler {
|
|
2410
2485
|
compilation: Compilation,
|
2411
2486
|
compilerName: string,
|
2412
2487
|
compilerIndex: number,
|
2413
|
-
outputOptions?: OutputNormalized
|
2488
|
+
outputOptions?: Partial<OutputNormalized>,
|
2414
2489
|
plugins?: WebpackPluginInstance[]
|
2415
2490
|
): Compiler;
|
2416
2491
|
isChild(): boolean;
|
@@ -2432,19 +2507,27 @@ declare class ConcatSource extends Source {
|
|
2432
2507
|
addAllSkipOptimizing(items: Source[]): void;
|
2433
2508
|
}
|
2434
2509
|
declare interface ConcatenatedModuleInfo {
|
2435
|
-
|
2510
|
+
type: "concatenated";
|
2436
2511
|
module: Module;
|
2437
|
-
|
2438
|
-
|
2439
|
-
|
2440
|
-
|
2441
|
-
|
2442
|
-
|
2443
|
-
|
2444
|
-
|
2445
|
-
|
2446
|
-
|
2512
|
+
index: number;
|
2513
|
+
ast?: Program;
|
2514
|
+
internalSource?: Source;
|
2515
|
+
source?: ReplaceSource;
|
2516
|
+
chunkInitFragments?: InitFragment<ChunkRenderContextJavascriptModulesPlugin>[];
|
2517
|
+
runtimeRequirements?: ReadonlySet<string>;
|
2518
|
+
globalScope?: Scope;
|
2519
|
+
moduleScope?: Scope;
|
2520
|
+
internalNames: Map<string, string>;
|
2521
|
+
exportMap?: Map<string, string>;
|
2522
|
+
rawExportMap?: Map<string, string>;
|
2447
2523
|
namespaceExportSymbol?: string;
|
2524
|
+
namespaceObjectName?: string;
|
2525
|
+
interopNamespaceObjectUsed: boolean;
|
2526
|
+
interopNamespaceObjectName?: string;
|
2527
|
+
interopNamespaceObject2Used: boolean;
|
2528
|
+
interopNamespaceObject2Name?: string;
|
2529
|
+
interopDefaultAccessUsed: boolean;
|
2530
|
+
interopDefaultAccessName?: string;
|
2448
2531
|
}
|
2449
2532
|
declare interface ConcatenationBailoutReasonContext {
|
2450
2533
|
/**
|
@@ -2960,9 +3043,9 @@ declare interface ContextModuleOptions {
|
|
2960
3043
|
regExp: RegExp;
|
2961
3044
|
namespaceObject?: boolean | "strict";
|
2962
3045
|
addon?: string;
|
2963
|
-
chunkName?: string;
|
2964
|
-
include?: RegExp;
|
2965
|
-
exclude?: RegExp;
|
3046
|
+
chunkName?: null | string;
|
3047
|
+
include?: null | RegExp;
|
3048
|
+
exclude?: null | RegExp;
|
2966
3049
|
groupOptions?: RawChunkGroupOptions;
|
2967
3050
|
typePrefix?: string;
|
2968
3051
|
category?: string;
|
@@ -3112,6 +3195,44 @@ declare interface CssImportDependencyMeta {
|
|
3112
3195
|
supports?: string;
|
3113
3196
|
media?: string;
|
3114
3197
|
}
|
3198
|
+
type CssLayer = undefined | string;
|
3199
|
+
declare class CssLoadingRuntimeModule extends RuntimeModule {
|
3200
|
+
constructor(runtimeRequirements: ReadonlySet<string>);
|
3201
|
+
static getCompilationHooks(
|
3202
|
+
compilation: Compilation
|
3203
|
+
): CssLoadingRuntimeModulePluginHooks;
|
3204
|
+
|
3205
|
+
/**
|
3206
|
+
* Runtime modules without any dependencies to other runtime modules
|
3207
|
+
*/
|
3208
|
+
static STAGE_NORMAL: number;
|
3209
|
+
|
3210
|
+
/**
|
3211
|
+
* Runtime modules with simple dependencies on other runtime modules
|
3212
|
+
*/
|
3213
|
+
static STAGE_BASIC: number;
|
3214
|
+
|
3215
|
+
/**
|
3216
|
+
* Runtime modules which attach to handlers of other runtime modules
|
3217
|
+
*/
|
3218
|
+
static STAGE_ATTACH: number;
|
3219
|
+
|
3220
|
+
/**
|
3221
|
+
* Runtime modules which trigger actions on bootstrap
|
3222
|
+
*/
|
3223
|
+
static STAGE_TRIGGER: number;
|
3224
|
+
}
|
3225
|
+
declare interface CssLoadingRuntimeModulePluginHooks {
|
3226
|
+
createStylesheet: SyncWaterfallHook<[string, Chunk]>;
|
3227
|
+
linkPreload: SyncWaterfallHook<[string, Chunk]>;
|
3228
|
+
linkPrefetch: SyncWaterfallHook<[string, Chunk]>;
|
3229
|
+
}
|
3230
|
+
declare abstract class CssModule extends NormalModule {
|
3231
|
+
cssLayer: CssLayer;
|
3232
|
+
supports: Supports;
|
3233
|
+
media: Media;
|
3234
|
+
inheritance: [CssLayer, Supports, Media][];
|
3235
|
+
}
|
3115
3236
|
|
3116
3237
|
/**
|
3117
3238
|
* Generator options for css/module modules.
|
@@ -3153,6 +3274,41 @@ declare interface CssModuleParserOptions {
|
|
3153
3274
|
*/
|
3154
3275
|
namedExports?: boolean;
|
3155
3276
|
}
|
3277
|
+
declare class CssModulesPlugin {
|
3278
|
+
constructor();
|
3279
|
+
|
3280
|
+
/**
|
3281
|
+
* Apply the plugin
|
3282
|
+
*/
|
3283
|
+
apply(compiler: Compiler): void;
|
3284
|
+
getModulesInOrder(
|
3285
|
+
chunk: Chunk,
|
3286
|
+
modules: Iterable<Module>,
|
3287
|
+
compilation: Compilation
|
3288
|
+
): Module[];
|
3289
|
+
getOrderedChunkCssModules(
|
3290
|
+
chunk: Chunk,
|
3291
|
+
chunkGraph: ChunkGraph,
|
3292
|
+
compilation: Compilation
|
3293
|
+
): Module[];
|
3294
|
+
renderModule(
|
3295
|
+
module: CssModule,
|
3296
|
+
renderContext: ChunkRenderContextCssModulesPlugin,
|
3297
|
+
hooks: CompilationHooksCssModulesPlugin
|
3298
|
+
): Source;
|
3299
|
+
renderChunk(
|
3300
|
+
__0: RenderContextCssModulesPlugin,
|
3301
|
+
hooks: CompilationHooksCssModulesPlugin
|
3302
|
+
): Source;
|
3303
|
+
static getCompilationHooks(
|
3304
|
+
compilation: Compilation
|
3305
|
+
): CompilationHooksCssModulesPlugin;
|
3306
|
+
static getChunkFilenameTemplate(
|
3307
|
+
chunk: Chunk,
|
3308
|
+
outputOptions: OutputNormalized
|
3309
|
+
): TemplatePath;
|
3310
|
+
static chunkHasCss(chunk: Chunk, chunkGraph: ChunkGraph): boolean;
|
3311
|
+
}
|
3156
3312
|
|
3157
3313
|
/**
|
3158
3314
|
* Parser options for css modules.
|
@@ -4048,9 +4204,9 @@ declare interface Environment {
|
|
4048
4204
|
templateLiteral?: boolean;
|
4049
4205
|
}
|
4050
4206
|
declare class EnvironmentPlugin {
|
4051
|
-
constructor(...keys: (string | string[] | Record<string,
|
4207
|
+
constructor(...keys: (string | string[] | Record<string, any>)[]);
|
4052
4208
|
keys: string[];
|
4053
|
-
defaultValues: Record<string,
|
4209
|
+
defaultValues: Record<string, any>;
|
4054
4210
|
|
4055
4211
|
/**
|
4056
4212
|
* Apply the plugin
|
@@ -4102,7 +4258,7 @@ declare class EvalSourceMapDevToolPlugin {
|
|
4102
4258
|
}
|
4103
4259
|
declare interface ExecuteModuleArgument {
|
4104
4260
|
module: Module;
|
4105
|
-
moduleObject?:
|
4261
|
+
moduleObject?: ModuleObject;
|
4106
4262
|
preparedInfo: any;
|
4107
4263
|
codeGenerationResult: CodeGenerationResult;
|
4108
4264
|
}
|
@@ -4211,6 +4367,9 @@ declare interface ExperimentsNormalizedExtra {
|
|
4211
4367
|
*/
|
4212
4368
|
lazyCompilation?: false | LazyCompilationOptions;
|
4213
4369
|
}
|
4370
|
+
type ExportAllDeclarationJavascriptParser = ExportAllDeclarationImport & {
|
4371
|
+
attributes?: ImportAttribute[];
|
4372
|
+
};
|
4214
4373
|
declare abstract class ExportInfo {
|
4215
4374
|
name: string;
|
4216
4375
|
|
@@ -4308,6 +4467,9 @@ declare abstract class ExportInfo {
|
|
4308
4467
|
| "not provided";
|
4309
4468
|
getRenameInfo(): string;
|
4310
4469
|
}
|
4470
|
+
type ExportNamedDeclarationJavascriptParser = ExportNamedDeclarationImport & {
|
4471
|
+
attributes?: ImportAttribute[];
|
4472
|
+
};
|
4311
4473
|
declare interface ExportSpec {
|
4312
4474
|
/**
|
4313
4475
|
* the name of the export
|
@@ -4459,6 +4621,7 @@ declare interface ExposesObject {
|
|
4459
4621
|
[index: string]: string | ExposesConfig | string[];
|
4460
4622
|
}
|
4461
4623
|
type Expression =
|
4624
|
+
| ImportExpressionImport
|
4462
4625
|
| UnaryExpression
|
4463
4626
|
| ArrayExpression
|
4464
4627
|
| ArrowFunctionExpression
|
@@ -4472,7 +4635,6 @@ type Expression =
|
|
4472
4635
|
| ConditionalExpression
|
4473
4636
|
| FunctionExpression
|
4474
4637
|
| Identifier
|
4475
|
-
| ImportExpression
|
4476
4638
|
| SimpleLiteral
|
4477
4639
|
| RegExpLiteral
|
4478
4640
|
| BigIntLiteral
|
@@ -4576,13 +4738,18 @@ declare class ExternalModule extends Module {
|
|
4576
4738
|
request: string | string[] | RequestRecord,
|
4577
4739
|
type: string,
|
4578
4740
|
userRequest: string,
|
4579
|
-
dependencyMeta?:
|
4741
|
+
dependencyMeta?:
|
4742
|
+
| ImportDependencyMeta
|
4743
|
+
| CssImportDependencyMeta
|
4744
|
+
| AssetDependencyMeta
|
4580
4745
|
);
|
4581
4746
|
request: string | string[] | Record<string, string | string[]>;
|
4582
4747
|
externalType: string;
|
4583
4748
|
userRequest: string;
|
4584
|
-
dependencyMeta?:
|
4585
|
-
|
4749
|
+
dependencyMeta?:
|
4750
|
+
| ImportDependencyMeta
|
4751
|
+
| CssImportDependencyMeta
|
4752
|
+
| AssetDependencyMeta;
|
4586
4753
|
|
4587
4754
|
/**
|
4588
4755
|
* restore unsafe cache data
|
@@ -4593,8 +4760,17 @@ declare class ExternalModule extends Module {
|
|
4593
4760
|
): void;
|
4594
4761
|
}
|
4595
4762
|
declare interface ExternalModuleInfo {
|
4596
|
-
|
4763
|
+
type: "external";
|
4597
4764
|
module: Module;
|
4765
|
+
runtimeCondition?: string | boolean | SortableSet<string>;
|
4766
|
+
index: number;
|
4767
|
+
name?: string;
|
4768
|
+
interopNamespaceObjectUsed: boolean;
|
4769
|
+
interopNamespaceObjectName?: string;
|
4770
|
+
interopNamespaceObject2Used: boolean;
|
4771
|
+
interopNamespaceObject2Name?: string;
|
4772
|
+
interopDefaultAccessUsed: boolean;
|
4773
|
+
interopDefaultAccessName?: string;
|
4598
4774
|
}
|
4599
4775
|
type Externals =
|
4600
4776
|
| string
|
@@ -4692,7 +4868,7 @@ declare interface FSImplementation {
|
|
4692
4868
|
close?: (...args: any[]) => any;
|
4693
4869
|
}
|
4694
4870
|
declare interface FactorizeModuleOptions {
|
4695
|
-
currentProfile
|
4871
|
+
currentProfile?: ModuleProfile;
|
4696
4872
|
factory: ModuleFactory;
|
4697
4873
|
dependencies: Dependency[];
|
4698
4874
|
|
@@ -5005,9 +5181,9 @@ declare interface GenerateContext {
|
|
5005
5181
|
}
|
5006
5182
|
declare class Generator {
|
5007
5183
|
constructor();
|
5008
|
-
getTypes(module: NormalModule):
|
5184
|
+
getTypes(module: NormalModule): ReadonlySet<string>;
|
5009
5185
|
getSize(module: NormalModule, type?: string): number;
|
5010
|
-
generate(module: NormalModule, __1: GenerateContext): Source;
|
5186
|
+
generate(module: NormalModule, __1: GenerateContext): null | Source;
|
5011
5187
|
getConcatenationBailoutReason(
|
5012
5188
|
module: NormalModule,
|
5013
5189
|
context: ConcatenationBailoutReasonContext
|
@@ -5092,12 +5268,16 @@ declare class GetChunkFilenameRuntimeModule extends RuntimeModule {
|
|
5092
5268
|
contentType: string,
|
5093
5269
|
name: string,
|
5094
5270
|
global: string,
|
5095
|
-
getFilenameForChunk: (
|
5271
|
+
getFilenameForChunk: (
|
5272
|
+
arg0: Chunk
|
5273
|
+
) => string | false | ((arg0: PathData, arg1?: AssetInfo) => string),
|
5096
5274
|
allChunks: boolean
|
5097
5275
|
);
|
5098
5276
|
contentType: string;
|
5099
5277
|
global: string;
|
5100
|
-
getFilenameForChunk: (
|
5278
|
+
getFilenameForChunk: (
|
5279
|
+
arg0: Chunk
|
5280
|
+
) => string | false | ((arg0: PathData, arg1?: AssetInfo) => string);
|
5101
5281
|
allChunks: boolean;
|
5102
5282
|
|
5103
5283
|
/**
|
@@ -5131,8 +5311,43 @@ declare interface GroupOptions {
|
|
5131
5311
|
targetGroupCount?: number;
|
5132
5312
|
}
|
5133
5313
|
declare interface HMRJavascriptParserHooks {
|
5134
|
-
hotAcceptCallback: SyncBailHook<
|
5135
|
-
|
5314
|
+
hotAcceptCallback: SyncBailHook<
|
5315
|
+
[
|
5316
|
+
(
|
5317
|
+
| ImportExpressionImport
|
5318
|
+
| UnaryExpression
|
5319
|
+
| ArrayExpression
|
5320
|
+
| ArrowFunctionExpression
|
5321
|
+
| AssignmentExpression
|
5322
|
+
| AwaitExpression
|
5323
|
+
| BinaryExpression
|
5324
|
+
| SimpleCallExpression
|
5325
|
+
| NewExpression
|
5326
|
+
| ChainExpression
|
5327
|
+
| ClassExpression
|
5328
|
+
| ConditionalExpression
|
5329
|
+
| FunctionExpression
|
5330
|
+
| Identifier
|
5331
|
+
| SimpleLiteral
|
5332
|
+
| RegExpLiteral
|
5333
|
+
| BigIntLiteral
|
5334
|
+
| LogicalExpression
|
5335
|
+
| MemberExpression
|
5336
|
+
| MetaProperty
|
5337
|
+
| ObjectExpression
|
5338
|
+
| SequenceExpression
|
5339
|
+
| TaggedTemplateExpression
|
5340
|
+
| TemplateLiteral
|
5341
|
+
| ThisExpression
|
5342
|
+
| UpdateExpression
|
5343
|
+
| YieldExpression
|
5344
|
+
| SpreadElement
|
5345
|
+
),
|
5346
|
+
string[]
|
5347
|
+
],
|
5348
|
+
void
|
5349
|
+
>;
|
5350
|
+
hotAcceptWithoutCallback: SyncBailHook<[CallExpression, string[]], void>;
|
5136
5351
|
}
|
5137
5352
|
declare interface HandleModuleCreationOptions {
|
5138
5353
|
factory: ModuleFactory;
|
@@ -5205,6 +5420,7 @@ declare class Hash {
|
|
5205
5420
|
*/
|
5206
5421
|
digest(encoding?: string): string | Buffer;
|
5207
5422
|
}
|
5423
|
+
type HashFunction = string | typeof Hash;
|
5208
5424
|
declare interface HashableObject {
|
5209
5425
|
updateHash: (arg0: Hash) => void;
|
5210
5426
|
}
|
@@ -5393,11 +5609,50 @@ type IgnorePluginOptions =
|
|
5393
5609
|
*/
|
5394
5610
|
checkResource: (resource: string, context: string) => boolean;
|
5395
5611
|
};
|
5612
|
+
type ImportAttribute = BaseNode & {
|
5613
|
+
type: "ImportAttribute";
|
5614
|
+
key: Identifier | SimpleLiteral | RegExpLiteral | BigIntLiteral;
|
5615
|
+
value: Literal;
|
5616
|
+
};
|
5396
5617
|
type ImportAttributes = Record<string, string> & {};
|
5618
|
+
type ImportDeclarationJavascriptParser = ImportDeclarationImport & {
|
5619
|
+
attributes?: ImportAttribute[];
|
5620
|
+
};
|
5397
5621
|
declare interface ImportDependencyMeta {
|
5398
5622
|
attributes?: ImportAttributes;
|
5399
5623
|
externalType?: "import" | "module";
|
5400
5624
|
}
|
5625
|
+
type ImportExpressionJavascriptParser = ImportExpressionImport & {
|
5626
|
+
options?:
|
5627
|
+
| null
|
5628
|
+
| ImportExpressionImport
|
5629
|
+
| UnaryExpression
|
5630
|
+
| ArrayExpression
|
5631
|
+
| ArrowFunctionExpression
|
5632
|
+
| AssignmentExpression
|
5633
|
+
| AwaitExpression
|
5634
|
+
| BinaryExpression
|
5635
|
+
| SimpleCallExpression
|
5636
|
+
| NewExpression
|
5637
|
+
| ChainExpression
|
5638
|
+
| ClassExpression
|
5639
|
+
| ConditionalExpression
|
5640
|
+
| FunctionExpression
|
5641
|
+
| Identifier
|
5642
|
+
| SimpleLiteral
|
5643
|
+
| RegExpLiteral
|
5644
|
+
| BigIntLiteral
|
5645
|
+
| LogicalExpression
|
5646
|
+
| MemberExpression
|
5647
|
+
| MetaProperty
|
5648
|
+
| ObjectExpression
|
5649
|
+
| SequenceExpression
|
5650
|
+
| TaggedTemplateExpression
|
5651
|
+
| TemplateLiteral
|
5652
|
+
| ThisExpression
|
5653
|
+
| UpdateExpression
|
5654
|
+
| YieldExpression;
|
5655
|
+
};
|
5401
5656
|
declare interface ImportModuleOptions {
|
5402
5657
|
/**
|
5403
5658
|
* the target layer
|
@@ -5581,12 +5836,12 @@ declare class JavascriptModulesPlugin {
|
|
5581
5836
|
apply(compiler: Compiler): void;
|
5582
5837
|
renderModule(
|
5583
5838
|
module: Module,
|
5584
|
-
renderContext:
|
5839
|
+
renderContext: ChunkRenderContextJavascriptModulesPlugin,
|
5585
5840
|
hooks: CompilationHooksJavascriptModulesPlugin,
|
5586
5841
|
factory: boolean
|
5587
5842
|
): null | Source;
|
5588
5843
|
renderChunk(
|
5589
|
-
renderContext:
|
5844
|
+
renderContext: RenderContextJavascriptModulesPlugin,
|
5590
5845
|
hooks: CompilationHooksJavascriptModulesPlugin
|
5591
5846
|
): Source;
|
5592
5847
|
renderMain(
|
@@ -5607,18 +5862,15 @@ declare class JavascriptModulesPlugin {
|
|
5607
5862
|
renderContext: RenderBootstrapContext,
|
5608
5863
|
hooks: CompilationHooksJavascriptModulesPlugin
|
5609
5864
|
): string;
|
5610
|
-
|
5865
|
+
getRenamedInlineModule(
|
5611
5866
|
allModules: Module[],
|
5612
5867
|
renderContext: MainRenderContext,
|
5613
5868
|
inlinedModules: Set<Module>,
|
5614
|
-
chunkRenderContext:
|
5615
|
-
hooks: CompilationHooksJavascriptModulesPlugin
|
5616
|
-
|
5617
|
-
|
5618
|
-
|
5619
|
-
usedName: Set<string>,
|
5620
|
-
extraInfo: string
|
5621
|
-
): string;
|
5869
|
+
chunkRenderContext: ChunkRenderContextJavascriptModulesPlugin,
|
5870
|
+
hooks: CompilationHooksJavascriptModulesPlugin,
|
5871
|
+
allStrict: undefined | boolean,
|
5872
|
+
hasChunkModules: boolean
|
5873
|
+
): false | Map<Module, Source>;
|
5622
5874
|
static getCompilationHooks(
|
5623
5875
|
compilation: Compilation
|
5624
5876
|
): CompilationHooksJavascriptModulesPlugin;
|
@@ -5640,6 +5892,7 @@ declare class JavascriptParser extends Parser {
|
|
5640
5892
|
evaluate: HookMap<
|
5641
5893
|
SyncBailHook<
|
5642
5894
|
[
|
5895
|
+
| ImportExpressionImport
|
5643
5896
|
| UnaryExpression
|
5644
5897
|
| ArrayExpression
|
5645
5898
|
| ArrowFunctionExpression
|
@@ -5653,7 +5906,6 @@ declare class JavascriptParser extends Parser {
|
|
5653
5906
|
| ConditionalExpression
|
5654
5907
|
| FunctionExpression
|
5655
5908
|
| Identifier
|
5656
|
-
| ImportExpression
|
5657
5909
|
| SimpleLiteral
|
5658
5910
|
| RegExpLiteral
|
5659
5911
|
| BigIntLiteral
|
@@ -5668,6 +5920,7 @@ declare class JavascriptParser extends Parser {
|
|
5668
5920
|
| UpdateExpression
|
5669
5921
|
| YieldExpression
|
5670
5922
|
| SpreadElement
|
5923
|
+
| PrivateIdentifier
|
5671
5924
|
],
|
5672
5925
|
undefined | null | BasicEvaluatedExpression
|
5673
5926
|
>
|
@@ -5703,6 +5956,7 @@ declare class JavascriptParser extends Parser {
|
|
5703
5956
|
SyncBailHook<
|
5704
5957
|
[
|
5705
5958
|
(
|
5959
|
+
| ImportExpressionImport
|
5706
5960
|
| UnaryExpression
|
5707
5961
|
| ArrayExpression
|
5708
5962
|
| ArrowFunctionExpression
|
@@ -5716,7 +5970,6 @@ declare class JavascriptParser extends Parser {
|
|
5716
5970
|
| ConditionalExpression
|
5717
5971
|
| FunctionExpression
|
5718
5972
|
| Identifier
|
5719
|
-
| ImportExpression
|
5720
5973
|
| SimpleLiteral
|
5721
5974
|
| RegExpLiteral
|
5722
5975
|
| BigIntLiteral
|
@@ -5730,10 +5983,10 @@ declare class JavascriptParser extends Parser {
|
|
5730
5983
|
| ThisExpression
|
5731
5984
|
| UpdateExpression
|
5732
5985
|
| YieldExpression
|
5986
|
+
| PrivateIdentifier
|
5733
5987
|
| FunctionDeclaration
|
5734
5988
|
| VariableDeclaration
|
5735
5989
|
| ClassDeclaration
|
5736
|
-
| PrivateIdentifier
|
5737
5990
|
),
|
5738
5991
|
number
|
5739
5992
|
],
|
@@ -5742,6 +5995,9 @@ declare class JavascriptParser extends Parser {
|
|
5742
5995
|
>;
|
5743
5996
|
preStatement: SyncBailHook<
|
5744
5997
|
[
|
5998
|
+
| ImportDeclarationJavascriptParser
|
5999
|
+
| ExportNamedDeclarationJavascriptParser
|
6000
|
+
| ExportAllDeclarationJavascriptParser
|
5745
6001
|
| FunctionDeclaration
|
5746
6002
|
| VariableDeclaration
|
5747
6003
|
| ClassDeclaration
|
@@ -5764,15 +6020,15 @@ declare class JavascriptParser extends Parser {
|
|
5764
6020
|
| ForStatement
|
5765
6021
|
| ForInStatement
|
5766
6022
|
| ForOfStatement
|
5767
|
-
| ImportDeclaration
|
5768
|
-
| ExportNamedDeclaration
|
5769
6023
|
| ExportDefaultDeclaration
|
5770
|
-
| ExportAllDeclaration
|
5771
6024
|
],
|
5772
6025
|
boolean | void
|
5773
6026
|
>;
|
5774
6027
|
blockPreStatement: SyncBailHook<
|
5775
6028
|
[
|
6029
|
+
| ImportDeclarationJavascriptParser
|
6030
|
+
| ExportNamedDeclarationJavascriptParser
|
6031
|
+
| ExportAllDeclarationJavascriptParser
|
5776
6032
|
| FunctionDeclaration
|
5777
6033
|
| VariableDeclaration
|
5778
6034
|
| ClassDeclaration
|
@@ -5795,15 +6051,15 @@ declare class JavascriptParser extends Parser {
|
|
5795
6051
|
| ForStatement
|
5796
6052
|
| ForInStatement
|
5797
6053
|
| ForOfStatement
|
5798
|
-
| ImportDeclaration
|
5799
|
-
| ExportNamedDeclaration
|
5800
6054
|
| ExportDefaultDeclaration
|
5801
|
-
| ExportAllDeclaration
|
5802
6055
|
],
|
5803
6056
|
boolean | void
|
5804
6057
|
>;
|
5805
6058
|
statement: SyncBailHook<
|
5806
6059
|
[
|
6060
|
+
| ImportDeclarationJavascriptParser
|
6061
|
+
| ExportNamedDeclarationJavascriptParser
|
6062
|
+
| ExportAllDeclarationJavascriptParser
|
5807
6063
|
| FunctionDeclaration
|
5808
6064
|
| VariableDeclaration
|
5809
6065
|
| ClassDeclaration
|
@@ -5826,10 +6082,7 @@ declare class JavascriptParser extends Parser {
|
|
5826
6082
|
| ForStatement
|
5827
6083
|
| ForInStatement
|
5828
6084
|
| ForOfStatement
|
5829
|
-
| ImportDeclaration
|
5830
|
-
| ExportNamedDeclaration
|
5831
6085
|
| ExportDefaultDeclaration
|
5832
|
-
| ExportAllDeclaration
|
5833
6086
|
],
|
5834
6087
|
boolean | void
|
5835
6088
|
>;
|
@@ -5854,25 +6107,34 @@ declare class JavascriptParser extends Parser {
|
|
5854
6107
|
boolean | void
|
5855
6108
|
>;
|
5856
6109
|
label: HookMap<SyncBailHook<[LabeledStatement], boolean | void>>;
|
5857
|
-
import: SyncBailHook<
|
6110
|
+
import: SyncBailHook<
|
6111
|
+
[ImportDeclarationJavascriptParser, ImportSource],
|
6112
|
+
boolean | void
|
6113
|
+
>;
|
5858
6114
|
importSpecifier: SyncBailHook<
|
5859
|
-
[
|
6115
|
+
[ImportDeclarationJavascriptParser, ImportSource, null | string, string],
|
5860
6116
|
boolean | void
|
5861
6117
|
>;
|
5862
6118
|
export: SyncBailHook<
|
5863
|
-
[
|
6119
|
+
[ExportNamedDeclarationJavascriptParser | ExportDefaultDeclaration],
|
5864
6120
|
boolean | void
|
5865
6121
|
>;
|
5866
6122
|
exportImport: SyncBailHook<
|
5867
|
-
[
|
6123
|
+
[
|
6124
|
+
(
|
6125
|
+
| ExportNamedDeclarationJavascriptParser
|
6126
|
+
| ExportAllDeclarationJavascriptParser
|
6127
|
+
),
|
6128
|
+
ImportSource
|
6129
|
+
],
|
5868
6130
|
boolean | void
|
5869
6131
|
>;
|
5870
6132
|
exportDeclaration: SyncBailHook<
|
5871
6133
|
[
|
5872
6134
|
(
|
5873
|
-
|
|
6135
|
+
| ExportNamedDeclarationJavascriptParser
|
6136
|
+
| ExportAllDeclarationJavascriptParser
|
5874
6137
|
| ExportDefaultDeclaration
|
5875
|
-
| ExportAllDeclaration
|
5876
6138
|
),
|
5877
6139
|
Declaration
|
5878
6140
|
],
|
@@ -5885,9 +6147,9 @@ declare class JavascriptParser extends Parser {
|
|
5885
6147
|
exportSpecifier: SyncBailHook<
|
5886
6148
|
[
|
5887
6149
|
(
|
5888
|
-
|
|
6150
|
+
| ExportNamedDeclarationJavascriptParser
|
6151
|
+
| ExportAllDeclarationJavascriptParser
|
5889
6152
|
| ExportDefaultDeclaration
|
5890
|
-
| ExportAllDeclaration
|
5891
6153
|
),
|
5892
6154
|
string,
|
5893
6155
|
string,
|
@@ -5897,10 +6159,13 @@ declare class JavascriptParser extends Parser {
|
|
5897
6159
|
>;
|
5898
6160
|
exportImportSpecifier: SyncBailHook<
|
5899
6161
|
[
|
5900
|
-
|
6162
|
+
(
|
6163
|
+
| ExportNamedDeclarationJavascriptParser
|
6164
|
+
| ExportAllDeclarationJavascriptParser
|
6165
|
+
),
|
5901
6166
|
ImportSource,
|
5902
|
-
string,
|
5903
|
-
string,
|
6167
|
+
null | string,
|
6168
|
+
null | string,
|
5904
6169
|
undefined | number
|
5905
6170
|
],
|
5906
6171
|
boolean | void
|
@@ -5922,9 +6187,13 @@ declare class JavascriptParser extends Parser {
|
|
5922
6187
|
SyncBailHook<[AssignmentExpression, string[]], boolean | void>
|
5923
6188
|
>;
|
5924
6189
|
typeof: HookMap<SyncBailHook<[Expression], boolean | void>>;
|
5925
|
-
importCall: SyncBailHook<
|
6190
|
+
importCall: SyncBailHook<
|
6191
|
+
[ImportExpressionJavascriptParser],
|
6192
|
+
boolean | void
|
6193
|
+
>;
|
5926
6194
|
topLevelAwait: SyncBailHook<
|
5927
6195
|
[
|
6196
|
+
| ImportExpressionImport
|
5928
6197
|
| UnaryExpression
|
5929
6198
|
| ArrayExpression
|
5930
6199
|
| ArrowFunctionExpression
|
@@ -5938,7 +6207,6 @@ declare class JavascriptParser extends Parser {
|
|
5938
6207
|
| ConditionalExpression
|
5939
6208
|
| FunctionExpression
|
5940
6209
|
| Identifier
|
5941
|
-
| ImportExpression
|
5942
6210
|
| SimpleLiteral
|
5943
6211
|
| RegExpLiteral
|
5944
6212
|
| BigIntLiteral
|
@@ -6010,8 +6278,12 @@ declare class JavascriptParser extends Parser {
|
|
6010
6278
|
state: ParserState;
|
6011
6279
|
comments?: Comment[];
|
6012
6280
|
semicolons?: Set<number>;
|
6013
|
-
statementPath
|
6281
|
+
statementPath?: StatementPathItem[];
|
6014
6282
|
prevStatement?:
|
6283
|
+
| ImportDeclarationJavascriptParser
|
6284
|
+
| ExportNamedDeclarationJavascriptParser
|
6285
|
+
| ExportAllDeclarationJavascriptParser
|
6286
|
+
| ImportExpressionImport
|
6015
6287
|
| UnaryExpression
|
6016
6288
|
| ArrayExpression
|
6017
6289
|
| ArrowFunctionExpression
|
@@ -6025,7 +6297,6 @@ declare class JavascriptParser extends Parser {
|
|
6025
6297
|
| ConditionalExpression
|
6026
6298
|
| FunctionExpression
|
6027
6299
|
| Identifier
|
6028
|
-
| ImportExpression
|
6029
6300
|
| SimpleLiteral
|
6030
6301
|
| RegExpLiteral
|
6031
6302
|
| BigIntLiteral
|
@@ -6061,10 +6332,7 @@ declare class JavascriptParser extends Parser {
|
|
6061
6332
|
| ForStatement
|
6062
6333
|
| ForInStatement
|
6063
6334
|
| ForOfStatement
|
6064
|
-
|
|
6065
|
-
| ExportNamedDeclaration
|
6066
|
-
| ExportDefaultDeclaration
|
6067
|
-
| ExportAllDeclaration;
|
6335
|
+
| ExportDefaultDeclaration;
|
6068
6336
|
destructuringAssignmentProperties?: WeakMap<
|
6069
6337
|
Expression,
|
6070
6338
|
Set<DestructuringAssignmentProperty>
|
@@ -6075,7 +6343,35 @@ declare class JavascriptParser extends Parser {
|
|
6075
6343
|
node: Expression
|
6076
6344
|
): undefined | Set<DestructuringAssignmentProperty>;
|
6077
6345
|
getRenameIdentifier(
|
6078
|
-
expr:
|
6346
|
+
expr:
|
6347
|
+
| ImportExpressionImport
|
6348
|
+
| UnaryExpression
|
6349
|
+
| ArrayExpression
|
6350
|
+
| ArrowFunctionExpression
|
6351
|
+
| AssignmentExpression
|
6352
|
+
| AwaitExpression
|
6353
|
+
| BinaryExpression
|
6354
|
+
| SimpleCallExpression
|
6355
|
+
| NewExpression
|
6356
|
+
| ChainExpression
|
6357
|
+
| ClassExpression
|
6358
|
+
| ConditionalExpression
|
6359
|
+
| FunctionExpression
|
6360
|
+
| Identifier
|
6361
|
+
| SimpleLiteral
|
6362
|
+
| RegExpLiteral
|
6363
|
+
| BigIntLiteral
|
6364
|
+
| LogicalExpression
|
6365
|
+
| MemberExpression
|
6366
|
+
| MetaProperty
|
6367
|
+
| ObjectExpression
|
6368
|
+
| SequenceExpression
|
6369
|
+
| TaggedTemplateExpression
|
6370
|
+
| TemplateLiteral
|
6371
|
+
| ThisExpression
|
6372
|
+
| UpdateExpression
|
6373
|
+
| YieldExpression
|
6374
|
+
| SpreadElement
|
6079
6375
|
): undefined | string | VariableInfoInterface;
|
6080
6376
|
walkClass(classy: ClassExpression | ClassDeclaration): void;
|
6081
6377
|
|
@@ -6084,6 +6380,9 @@ declare class JavascriptParser extends Parser {
|
|
6084
6380
|
*/
|
6085
6381
|
preWalkStatements(
|
6086
6382
|
statements: (
|
6383
|
+
| ImportDeclarationJavascriptParser
|
6384
|
+
| ExportNamedDeclarationJavascriptParser
|
6385
|
+
| ExportAllDeclarationJavascriptParser
|
6087
6386
|
| FunctionDeclaration
|
6088
6387
|
| VariableDeclaration
|
6089
6388
|
| ClassDeclaration
|
@@ -6106,10 +6405,7 @@ declare class JavascriptParser extends Parser {
|
|
6106
6405
|
| ForStatement
|
6107
6406
|
| ForInStatement
|
6108
6407
|
| ForOfStatement
|
6109
|
-
| ImportDeclaration
|
6110
|
-
| ExportNamedDeclaration
|
6111
6408
|
| ExportDefaultDeclaration
|
6112
|
-
| ExportAllDeclaration
|
6113
6409
|
)[]
|
6114
6410
|
): void;
|
6115
6411
|
|
@@ -6118,6 +6414,9 @@ declare class JavascriptParser extends Parser {
|
|
6118
6414
|
*/
|
6119
6415
|
blockPreWalkStatements(
|
6120
6416
|
statements: (
|
6417
|
+
| ImportDeclarationJavascriptParser
|
6418
|
+
| ExportNamedDeclarationJavascriptParser
|
6419
|
+
| ExportAllDeclarationJavascriptParser
|
6121
6420
|
| FunctionDeclaration
|
6122
6421
|
| VariableDeclaration
|
6123
6422
|
| ClassDeclaration
|
@@ -6140,10 +6439,7 @@ declare class JavascriptParser extends Parser {
|
|
6140
6439
|
| ForStatement
|
6141
6440
|
| ForInStatement
|
6142
6441
|
| ForOfStatement
|
6143
|
-
| ImportDeclaration
|
6144
|
-
| ExportNamedDeclaration
|
6145
6442
|
| ExportDefaultDeclaration
|
6146
|
-
| ExportAllDeclaration
|
6147
6443
|
)[]
|
6148
6444
|
): void;
|
6149
6445
|
|
@@ -6152,6 +6448,9 @@ declare class JavascriptParser extends Parser {
|
|
6152
6448
|
*/
|
6153
6449
|
walkStatements(
|
6154
6450
|
statements: (
|
6451
|
+
| ImportDeclarationJavascriptParser
|
6452
|
+
| ExportNamedDeclarationJavascriptParser
|
6453
|
+
| ExportAllDeclarationJavascriptParser
|
6155
6454
|
| FunctionDeclaration
|
6156
6455
|
| VariableDeclaration
|
6157
6456
|
| ClassDeclaration
|
@@ -6174,10 +6473,7 @@ declare class JavascriptParser extends Parser {
|
|
6174
6473
|
| ForStatement
|
6175
6474
|
| ForInStatement
|
6176
6475
|
| ForOfStatement
|
6177
|
-
| ImportDeclaration
|
6178
|
-
| ExportNamedDeclaration
|
6179
6476
|
| ExportDefaultDeclaration
|
6180
|
-
| ExportAllDeclaration
|
6181
6477
|
)[]
|
6182
6478
|
): void;
|
6183
6479
|
|
@@ -6186,6 +6482,9 @@ declare class JavascriptParser extends Parser {
|
|
6186
6482
|
*/
|
6187
6483
|
preWalkStatement(
|
6188
6484
|
statement:
|
6485
|
+
| ImportDeclarationJavascriptParser
|
6486
|
+
| ExportNamedDeclarationJavascriptParser
|
6487
|
+
| ExportAllDeclarationJavascriptParser
|
6189
6488
|
| FunctionDeclaration
|
6190
6489
|
| VariableDeclaration
|
6191
6490
|
| ClassDeclaration
|
@@ -6208,13 +6507,13 @@ declare class JavascriptParser extends Parser {
|
|
6208
6507
|
| ForStatement
|
6209
6508
|
| ForInStatement
|
6210
6509
|
| ForOfStatement
|
6211
|
-
| ImportDeclaration
|
6212
|
-
| ExportNamedDeclaration
|
6213
6510
|
| ExportDefaultDeclaration
|
6214
|
-
| ExportAllDeclaration
|
6215
6511
|
): void;
|
6216
6512
|
blockPreWalkStatement(
|
6217
6513
|
statement:
|
6514
|
+
| ImportDeclarationJavascriptParser
|
6515
|
+
| ExportNamedDeclarationJavascriptParser
|
6516
|
+
| ExportAllDeclarationJavascriptParser
|
6218
6517
|
| FunctionDeclaration
|
6219
6518
|
| VariableDeclaration
|
6220
6519
|
| ClassDeclaration
|
@@ -6237,13 +6536,13 @@ declare class JavascriptParser extends Parser {
|
|
6237
6536
|
| ForStatement
|
6238
6537
|
| ForInStatement
|
6239
6538
|
| ForOfStatement
|
6240
|
-
| ImportDeclaration
|
6241
|
-
| ExportNamedDeclaration
|
6242
6539
|
| ExportDefaultDeclaration
|
6243
|
-
| ExportAllDeclaration
|
6244
6540
|
): void;
|
6245
6541
|
walkStatement(
|
6246
6542
|
statement:
|
6543
|
+
| ImportDeclarationJavascriptParser
|
6544
|
+
| ExportNamedDeclarationJavascriptParser
|
6545
|
+
| ExportAllDeclarationJavascriptParser
|
6247
6546
|
| FunctionDeclaration
|
6248
6547
|
| VariableDeclaration
|
6249
6548
|
| ClassDeclaration
|
@@ -6266,10 +6565,7 @@ declare class JavascriptParser extends Parser {
|
|
6266
6565
|
| ForStatement
|
6267
6566
|
| ForInStatement
|
6268
6567
|
| ForOfStatement
|
6269
|
-
| ImportDeclaration
|
6270
|
-
| ExportNamedDeclaration
|
6271
6568
|
| ExportDefaultDeclaration
|
6272
|
-
| ExportAllDeclaration
|
6273
6569
|
): void;
|
6274
6570
|
|
6275
6571
|
/**
|
@@ -6308,13 +6604,24 @@ declare class JavascriptParser extends Parser {
|
|
6308
6604
|
walkFunctionDeclaration(statement: FunctionDeclaration): void;
|
6309
6605
|
blockPreWalkExpressionStatement(statement: ExpressionStatement): void;
|
6310
6606
|
preWalkAssignmentExpression(expression: AssignmentExpression): void;
|
6311
|
-
blockPreWalkImportDeclaration(
|
6312
|
-
|
6313
|
-
|
6314
|
-
|
6607
|
+
blockPreWalkImportDeclaration(
|
6608
|
+
statement: ImportDeclarationJavascriptParser
|
6609
|
+
): void;
|
6610
|
+
enterDeclaration(
|
6611
|
+
declaration: Declaration,
|
6612
|
+
onIdent: (arg0: string, arg1: Identifier) => void
|
6613
|
+
): void;
|
6614
|
+
blockPreWalkExportNamedDeclaration(
|
6615
|
+
statement: ExportNamedDeclarationJavascriptParser
|
6616
|
+
): void;
|
6617
|
+
walkExportNamedDeclaration(
|
6618
|
+
statement: ExportNamedDeclarationJavascriptParser
|
6619
|
+
): void;
|
6315
6620
|
blockPreWalkExportDefaultDeclaration(statement?: any): void;
|
6316
6621
|
walkExportDefaultDeclaration(statement: ExportDefaultDeclaration): void;
|
6317
|
-
blockPreWalkExportAllDeclaration(
|
6622
|
+
blockPreWalkExportAllDeclaration(
|
6623
|
+
statement: ExportAllDeclarationJavascriptParser
|
6624
|
+
): void;
|
6318
6625
|
preWalkVariableDeclaration(statement: VariableDeclaration): void;
|
6319
6626
|
blockPreWalkVariableDeclaration(statement: VariableDeclaration): void;
|
6320
6627
|
preWalkVariableDeclarator(declarator: VariableDeclarator): void;
|
@@ -6333,6 +6640,7 @@ declare class JavascriptParser extends Parser {
|
|
6333
6640
|
walkExpressions(
|
6334
6641
|
expressions: (
|
6335
6642
|
| null
|
6643
|
+
| ImportExpressionImport
|
6336
6644
|
| UnaryExpression
|
6337
6645
|
| ArrayExpression
|
6338
6646
|
| ArrowFunctionExpression
|
@@ -6346,7 +6654,6 @@ declare class JavascriptParser extends Parser {
|
|
6346
6654
|
| ConditionalExpression
|
6347
6655
|
| FunctionExpression
|
6348
6656
|
| Identifier
|
6349
|
-
| ImportExpression
|
6350
6657
|
| SimpleLiteral
|
6351
6658
|
| RegExpLiteral
|
6352
6659
|
| BigIntLiteral
|
@@ -6387,7 +6694,7 @@ declare class JavascriptParser extends Parser {
|
|
6387
6694
|
walkTaggedTemplateExpression(expression: TaggedTemplateExpression): void;
|
6388
6695
|
walkClassExpression(expression: ClassExpression): void;
|
6389
6696
|
walkChainExpression(expression: ChainExpression): void;
|
6390
|
-
walkImportExpression(expression:
|
6697
|
+
walkImportExpression(expression: ImportExpressionJavascriptParser): void;
|
6391
6698
|
walkCallExpression(expression: CallExpression): void;
|
6392
6699
|
walkMemberExpression(expression: MemberExpression): void;
|
6393
6700
|
walkMemberExpressionWithExpressionName(
|
@@ -6402,12 +6709,68 @@ declare class JavascriptParser extends Parser {
|
|
6402
6709
|
walkMetaProperty(metaProperty: MetaProperty): void;
|
6403
6710
|
callHooksForExpression<T, R>(
|
6404
6711
|
hookMap: HookMap<SyncBailHook<T, R>>,
|
6405
|
-
expr:
|
6712
|
+
expr:
|
6713
|
+
| ImportExpressionImport
|
6714
|
+
| UnaryExpression
|
6715
|
+
| ArrayExpression
|
6716
|
+
| ArrowFunctionExpression
|
6717
|
+
| AssignmentExpression
|
6718
|
+
| AwaitExpression
|
6719
|
+
| BinaryExpression
|
6720
|
+
| SimpleCallExpression
|
6721
|
+
| NewExpression
|
6722
|
+
| ChainExpression
|
6723
|
+
| ClassExpression
|
6724
|
+
| ConditionalExpression
|
6725
|
+
| FunctionExpression
|
6726
|
+
| Identifier
|
6727
|
+
| SimpleLiteral
|
6728
|
+
| RegExpLiteral
|
6729
|
+
| BigIntLiteral
|
6730
|
+
| LogicalExpression
|
6731
|
+
| MemberExpression
|
6732
|
+
| MetaProperty
|
6733
|
+
| ObjectExpression
|
6734
|
+
| SequenceExpression
|
6735
|
+
| TaggedTemplateExpression
|
6736
|
+
| TemplateLiteral
|
6737
|
+
| ThisExpression
|
6738
|
+
| UpdateExpression
|
6739
|
+
| YieldExpression
|
6740
|
+
| Super,
|
6406
6741
|
...args: AsArray<T>
|
6407
6742
|
): undefined | R;
|
6408
6743
|
callHooksForExpressionWithFallback<T, R>(
|
6409
6744
|
hookMap: HookMap<SyncBailHook<T, R>>,
|
6410
|
-
expr:
|
6745
|
+
expr:
|
6746
|
+
| ImportExpressionImport
|
6747
|
+
| UnaryExpression
|
6748
|
+
| ArrayExpression
|
6749
|
+
| ArrowFunctionExpression
|
6750
|
+
| AssignmentExpression
|
6751
|
+
| AwaitExpression
|
6752
|
+
| BinaryExpression
|
6753
|
+
| SimpleCallExpression
|
6754
|
+
| NewExpression
|
6755
|
+
| ChainExpression
|
6756
|
+
| ClassExpression
|
6757
|
+
| ConditionalExpression
|
6758
|
+
| FunctionExpression
|
6759
|
+
| Identifier
|
6760
|
+
| SimpleLiteral
|
6761
|
+
| RegExpLiteral
|
6762
|
+
| BigIntLiteral
|
6763
|
+
| LogicalExpression
|
6764
|
+
| MemberExpression
|
6765
|
+
| MetaProperty
|
6766
|
+
| ObjectExpression
|
6767
|
+
| SequenceExpression
|
6768
|
+
| TaggedTemplateExpression
|
6769
|
+
| TemplateLiteral
|
6770
|
+
| ThisExpression
|
6771
|
+
| UpdateExpression
|
6772
|
+
| YieldExpression
|
6773
|
+
| Super,
|
6411
6774
|
fallback:
|
6412
6775
|
| undefined
|
6413
6776
|
| ((
|
@@ -6432,7 +6795,7 @@ declare class JavascriptParser extends Parser {
|
|
6432
6795
|
hookMap: HookMap<SyncBailHook<T, R>>,
|
6433
6796
|
info: ExportedVariableInfo,
|
6434
6797
|
fallback: undefined | ((arg0: string) => any),
|
6435
|
-
defined: undefined | (() => any),
|
6798
|
+
defined: undefined | ((arg0?: string) => any),
|
6436
6799
|
...args: AsArray<T>
|
6437
6800
|
): undefined | R;
|
6438
6801
|
callHooksForNameWithFallback<T, R>(
|
@@ -6443,11 +6806,26 @@ declare class JavascriptParser extends Parser {
|
|
6443
6806
|
...args: AsArray<T>
|
6444
6807
|
): undefined | R;
|
6445
6808
|
inScope(params: any, fn: () => void): void;
|
6446
|
-
inClassScope(hasThis: boolean, params:
|
6447
|
-
inFunctionScope(
|
6809
|
+
inClassScope(hasThis: boolean, params: Identifier[], fn: () => void): void;
|
6810
|
+
inFunctionScope(
|
6811
|
+
hasThis: boolean,
|
6812
|
+
params: (
|
6813
|
+
| string
|
6814
|
+
| Identifier
|
6815
|
+
| MemberExpression
|
6816
|
+
| ObjectPattern
|
6817
|
+
| ArrayPattern
|
6818
|
+
| RestElement
|
6819
|
+
| AssignmentPattern
|
6820
|
+
)[],
|
6821
|
+
fn: () => void
|
6822
|
+
): void;
|
6448
6823
|
inBlockScope(fn: () => void): void;
|
6449
6824
|
detectMode(
|
6450
6825
|
statements: (
|
6826
|
+
| ImportDeclarationJavascriptParser
|
6827
|
+
| ExportNamedDeclarationJavascriptParser
|
6828
|
+
| ExportAllDeclarationJavascriptParser
|
6451
6829
|
| FunctionDeclaration
|
6452
6830
|
| VariableDeclaration
|
6453
6831
|
| ClassDeclaration
|
@@ -6470,10 +6848,7 @@ declare class JavascriptParser extends Parser {
|
|
6470
6848
|
| ForStatement
|
6471
6849
|
| ForInStatement
|
6472
6850
|
| ForOfStatement
|
6473
|
-
| ImportDeclaration
|
6474
|
-
| ExportNamedDeclaration
|
6475
6851
|
| ExportDefaultDeclaration
|
6476
|
-
| ExportAllDeclaration
|
6477
6852
|
| Directive
|
6478
6853
|
)[]
|
6479
6854
|
): void;
|
@@ -6488,7 +6863,7 @@ declare class JavascriptParser extends Parser {
|
|
6488
6863
|
| AssignmentPattern
|
6489
6864
|
| Property
|
6490
6865
|
)[],
|
6491
|
-
onIdent
|
6866
|
+
onIdent: (arg0: string) => void
|
6492
6867
|
): void;
|
6493
6868
|
enterPattern(
|
6494
6869
|
pattern:
|
@@ -6499,15 +6874,31 @@ declare class JavascriptParser extends Parser {
|
|
6499
6874
|
| RestElement
|
6500
6875
|
| AssignmentPattern
|
6501
6876
|
| Property,
|
6502
|
-
onIdent
|
6877
|
+
onIdent: (arg0: string, arg1: Identifier) => void
|
6878
|
+
): void;
|
6879
|
+
enterIdentifier(
|
6880
|
+
pattern: Identifier,
|
6881
|
+
onIdent: (arg0: string, arg1: Identifier) => void
|
6882
|
+
): void;
|
6883
|
+
enterObjectPattern(
|
6884
|
+
pattern: ObjectPattern,
|
6885
|
+
onIdent: (arg0: string, arg1: Identifier) => void
|
6886
|
+
): void;
|
6887
|
+
enterArrayPattern(
|
6888
|
+
pattern: ArrayPattern,
|
6889
|
+
onIdent: (arg0: string, arg1: Identifier) => void
|
6890
|
+
): void;
|
6891
|
+
enterRestElement(
|
6892
|
+
pattern: RestElement,
|
6893
|
+
onIdent: (arg0: string, arg1: Identifier) => void
|
6894
|
+
): void;
|
6895
|
+
enterAssignmentPattern(
|
6896
|
+
pattern: AssignmentPattern,
|
6897
|
+
onIdent: (arg0: string, arg1: Identifier) => void
|
6503
6898
|
): void;
|
6504
|
-
enterIdentifier(pattern: Identifier, onIdent?: any): void;
|
6505
|
-
enterObjectPattern(pattern: ObjectPattern, onIdent?: any): void;
|
6506
|
-
enterArrayPattern(pattern: ArrayPattern, onIdent?: any): void;
|
6507
|
-
enterRestElement(pattern: RestElement, onIdent?: any): void;
|
6508
|
-
enterAssignmentPattern(pattern: AssignmentPattern, onIdent?: any): void;
|
6509
6899
|
evaluateExpression(
|
6510
6900
|
expression:
|
6901
|
+
| ImportExpressionImport
|
6511
6902
|
| UnaryExpression
|
6512
6903
|
| ArrayExpression
|
6513
6904
|
| ArrowFunctionExpression
|
@@ -6521,7 +6912,6 @@ declare class JavascriptParser extends Parser {
|
|
6521
6912
|
| ConditionalExpression
|
6522
6913
|
| FunctionExpression
|
6523
6914
|
| Identifier
|
6524
|
-
| ImportExpression
|
6525
6915
|
| SimpleLiteral
|
6526
6916
|
| RegExpLiteral
|
6527
6917
|
| BigIntLiteral
|
@@ -6536,14 +6926,21 @@ declare class JavascriptParser extends Parser {
|
|
6536
6926
|
| UpdateExpression
|
6537
6927
|
| YieldExpression
|
6538
6928
|
| SpreadElement
|
6929
|
+
| PrivateIdentifier
|
6539
6930
|
): BasicEvaluatedExpression;
|
6540
6931
|
parseString(expression: Expression): string;
|
6541
|
-
parseCalculatedString(expression: Expression):
|
6932
|
+
parseCalculatedString(expression: Expression): {
|
6933
|
+
range?: [number, number];
|
6934
|
+
value: string;
|
6935
|
+
code: boolean;
|
6936
|
+
conditional: any;
|
6937
|
+
};
|
6542
6938
|
evaluate(source: string): BasicEvaluatedExpression;
|
6543
6939
|
isPure(
|
6544
6940
|
expr:
|
6545
6941
|
| undefined
|
6546
6942
|
| null
|
6943
|
+
| ImportExpressionImport
|
6547
6944
|
| UnaryExpression
|
6548
6945
|
| ArrayExpression
|
6549
6946
|
| ArrowFunctionExpression
|
@@ -6557,7 +6954,6 @@ declare class JavascriptParser extends Parser {
|
|
6557
6954
|
| ConditionalExpression
|
6558
6955
|
| FunctionExpression
|
6559
6956
|
| Identifier
|
6560
|
-
| ImportExpression
|
6561
6957
|
| SimpleLiteral
|
6562
6958
|
| RegExpLiteral
|
6563
6959
|
| BigIntLiteral
|
@@ -6571,10 +6967,10 @@ declare class JavascriptParser extends Parser {
|
|
6571
6967
|
| ThisExpression
|
6572
6968
|
| UpdateExpression
|
6573
6969
|
| YieldExpression
|
6970
|
+
| PrivateIdentifier
|
6574
6971
|
| FunctionDeclaration
|
6575
6972
|
| VariableDeclaration
|
6576
|
-
| ClassDeclaration
|
6577
|
-
| PrivateIdentifier,
|
6973
|
+
| ClassDeclaration,
|
6578
6974
|
commentsStartPos: number
|
6579
6975
|
): boolean;
|
6580
6976
|
getComments(range: [number, number]): Comment[];
|
@@ -6582,18 +6978,52 @@ declare class JavascriptParser extends Parser {
|
|
6582
6978
|
setAsiPosition(pos: number): void;
|
6583
6979
|
unsetAsiPosition(pos: number): void;
|
6584
6980
|
isStatementLevelExpression(expr: Expression): boolean;
|
6585
|
-
getTagData(name: string, tag
|
6586
|
-
tagVariable(name: string, tag
|
6981
|
+
getTagData(name: string, tag: symbol): any;
|
6982
|
+
tagVariable(name: string, tag: symbol, data?: any): void;
|
6587
6983
|
defineVariable(name: string): void;
|
6588
6984
|
undefineVariable(name: string): void;
|
6589
6985
|
isVariableDefined(name: string): boolean;
|
6590
6986
|
getVariableInfo(name: string): ExportedVariableInfo;
|
6591
6987
|
setVariable(name: string, variableInfo: ExportedVariableInfo): void;
|
6592
6988
|
evaluatedVariable(tagInfo: TagInfo): VariableInfo;
|
6593
|
-
parseCommentOptions(range: [number, number]):
|
6594
|
-
|
6989
|
+
parseCommentOptions(range: [number, number]): {
|
6990
|
+
options: null | Record<string, any>;
|
6991
|
+
errors: null | (Error & { comment: Comment })[];
|
6992
|
+
};
|
6993
|
+
extractMemberExpressionChain(
|
6994
|
+
expression:
|
6995
|
+
| ImportExpressionImport
|
6996
|
+
| UnaryExpression
|
6997
|
+
| ArrayExpression
|
6998
|
+
| ArrowFunctionExpression
|
6999
|
+
| AssignmentExpression
|
7000
|
+
| AwaitExpression
|
7001
|
+
| BinaryExpression
|
7002
|
+
| SimpleCallExpression
|
7003
|
+
| NewExpression
|
7004
|
+
| ChainExpression
|
7005
|
+
| ClassExpression
|
7006
|
+
| ConditionalExpression
|
7007
|
+
| FunctionExpression
|
7008
|
+
| Identifier
|
7009
|
+
| SimpleLiteral
|
7010
|
+
| RegExpLiteral
|
7011
|
+
| BigIntLiteral
|
7012
|
+
| LogicalExpression
|
7013
|
+
| MemberExpression
|
7014
|
+
| MetaProperty
|
7015
|
+
| ObjectExpression
|
7016
|
+
| SequenceExpression
|
7017
|
+
| TaggedTemplateExpression
|
7018
|
+
| TemplateLiteral
|
7019
|
+
| ThisExpression
|
7020
|
+
| UpdateExpression
|
7021
|
+
| YieldExpression
|
7022
|
+
| Super
|
7023
|
+
): {
|
6595
7024
|
members: string[];
|
6596
7025
|
object:
|
7026
|
+
| ImportExpressionImport
|
6597
7027
|
| UnaryExpression
|
6598
7028
|
| ArrayExpression
|
6599
7029
|
| ArrowFunctionExpression
|
@@ -6607,7 +7037,6 @@ declare class JavascriptParser extends Parser {
|
|
6607
7037
|
| ConditionalExpression
|
6608
7038
|
| FunctionExpression
|
6609
7039
|
| Identifier
|
6610
|
-
| ImportExpression
|
6611
7040
|
| SimpleLiteral
|
6612
7041
|
| RegExpLiteral
|
6613
7042
|
| BigIntLiteral
|
@@ -6629,7 +7058,35 @@ declare class JavascriptParser extends Parser {
|
|
6629
7058
|
varName: string
|
6630
7059
|
): undefined | { name: string; info: string | VariableInfo };
|
6631
7060
|
getMemberExpressionInfo(
|
6632
|
-
expression:
|
7061
|
+
expression:
|
7062
|
+
| ImportExpressionImport
|
7063
|
+
| UnaryExpression
|
7064
|
+
| ArrayExpression
|
7065
|
+
| ArrowFunctionExpression
|
7066
|
+
| AssignmentExpression
|
7067
|
+
| AwaitExpression
|
7068
|
+
| BinaryExpression
|
7069
|
+
| SimpleCallExpression
|
7070
|
+
| NewExpression
|
7071
|
+
| ChainExpression
|
7072
|
+
| ClassExpression
|
7073
|
+
| ConditionalExpression
|
7074
|
+
| FunctionExpression
|
7075
|
+
| Identifier
|
7076
|
+
| SimpleLiteral
|
7077
|
+
| RegExpLiteral
|
7078
|
+
| BigIntLiteral
|
7079
|
+
| LogicalExpression
|
7080
|
+
| MemberExpression
|
7081
|
+
| MetaProperty
|
7082
|
+
| ObjectExpression
|
7083
|
+
| SequenceExpression
|
7084
|
+
| TaggedTemplateExpression
|
7085
|
+
| TemplateLiteral
|
7086
|
+
| ThisExpression
|
7087
|
+
| UpdateExpression
|
7088
|
+
| YieldExpression
|
7089
|
+
| Super,
|
6633
7090
|
allowedTypes: number
|
6634
7091
|
): undefined | CallExpressionInfo | ExpressionExpressionInfo;
|
6635
7092
|
getNameForExpression(
|
@@ -6644,6 +7101,13 @@ declare class JavascriptParser extends Parser {
|
|
6644
7101
|
static ALLOWED_MEMBER_TYPES_ALL: 3;
|
6645
7102
|
static ALLOWED_MEMBER_TYPES_EXPRESSION: 2;
|
6646
7103
|
static ALLOWED_MEMBER_TYPES_CALL_EXPRESSION: 1;
|
7104
|
+
static getImportAttributes: (
|
7105
|
+
node:
|
7106
|
+
| ImportDeclarationJavascriptParser
|
7107
|
+
| ExportNamedDeclarationJavascriptParser
|
7108
|
+
| ExportAllDeclarationJavascriptParser
|
7109
|
+
| ImportExpressionJavascriptParser
|
7110
|
+
) => undefined | ImportAttributes;
|
6647
7111
|
}
|
6648
7112
|
|
6649
7113
|
/**
|
@@ -6985,7 +7449,7 @@ declare interface KnownBuildInfo {
|
|
6985
7449
|
contextDependencies?: LazySet<string>;
|
6986
7450
|
missingDependencies?: LazySet<string>;
|
6987
7451
|
buildDependencies?: LazySet<string>;
|
6988
|
-
valueDependencies?: Map<string,
|
7452
|
+
valueDependencies?: Map<string, string | Set<string>>;
|
6989
7453
|
hash?: any;
|
6990
7454
|
assets?: Record<string, Source>;
|
6991
7455
|
assetsInfo?: Map<string, undefined | AssetInfo>;
|
@@ -7107,7 +7571,7 @@ declare interface KnownStatsChunk {
|
|
7107
7571
|
origins?: StatsChunkOrigin[];
|
7108
7572
|
}
|
7109
7573
|
declare interface KnownStatsChunkGroup {
|
7110
|
-
name?: string;
|
7574
|
+
name?: null | string;
|
7111
7575
|
chunks?: (string | number)[];
|
7112
7576
|
assets?: { name: string; size?: number }[];
|
7113
7577
|
filteredAssets?: number;
|
@@ -7422,7 +7886,7 @@ declare interface LazyCompilationOptions {
|
|
7422
7886
|
backend?:
|
7423
7887
|
| ((
|
7424
7888
|
compiler: Compiler,
|
7425
|
-
callback: (err
|
7889
|
+
callback: (err: null | Error, api?: BackendApi) => void
|
7426
7890
|
) => void)
|
7427
7891
|
| ((compiler: Compiler) => Promise<BackendApi>)
|
7428
7892
|
| LazyCompilationDefaultBackendOptions;
|
@@ -7622,7 +8086,7 @@ declare class LibraryTemplatePlugin {
|
|
7622
8086
|
}
|
7623
8087
|
declare class LimitChunkCountPlugin {
|
7624
8088
|
constructor(options?: LimitChunkCountPluginOptions);
|
7625
|
-
options
|
8089
|
+
options: LimitChunkCountPluginOptions;
|
7626
8090
|
apply(compiler: Compiler): void;
|
7627
8091
|
}
|
7628
8092
|
declare interface LimitChunkCountPluginOptions {
|
@@ -7641,6 +8105,7 @@ declare interface LimitChunkCountPluginOptions {
|
|
7641
8105
|
*/
|
7642
8106
|
maxChunks: number;
|
7643
8107
|
}
|
8108
|
+
type Literal = SimpleLiteral | RegExpLiteral | BigIntLiteral;
|
7644
8109
|
declare interface LoadScriptCompilationHooks {
|
7645
8110
|
createScript: SyncWaterfallHook<[string, Chunk]>;
|
7646
8111
|
}
|
@@ -8109,6 +8574,7 @@ declare interface MatchObject {
|
|
8109
8574
|
exclude?: string | RegExp | (string | RegExp)[];
|
8110
8575
|
}
|
8111
8576
|
type Matcher = string | RegExp | (string | RegExp)[];
|
8577
|
+
type Media = undefined | string;
|
8112
8578
|
|
8113
8579
|
/**
|
8114
8580
|
* Options object for in-memory caching.
|
@@ -8297,7 +8763,7 @@ declare class Module extends DependenciesBlock {
|
|
8297
8763
|
fs: InputFileSystem,
|
8298
8764
|
callback: (arg0?: WebpackError) => void
|
8299
8765
|
): void;
|
8300
|
-
getSourceTypes():
|
8766
|
+
getSourceTypes(): ReadonlySet<string>;
|
8301
8767
|
source(
|
8302
8768
|
dependencyTemplates: DependencyTemplates,
|
8303
8769
|
runtimeTemplate: RuntimeTemplate,
|
@@ -8344,6 +8810,32 @@ declare class Module extends DependenciesBlock {
|
|
8344
8810
|
get warnings(): any;
|
8345
8811
|
used: any;
|
8346
8812
|
}
|
8813
|
+
declare class ModuleChunkLoadingRuntimeModule extends RuntimeModule {
|
8814
|
+
constructor(runtimeRequirements: ReadonlySet<string>);
|
8815
|
+
static getCompilationHooks(
|
8816
|
+
compilation: Compilation
|
8817
|
+
): JsonpCompilationPluginHooks;
|
8818
|
+
|
8819
|
+
/**
|
8820
|
+
* Runtime modules without any dependencies to other runtime modules
|
8821
|
+
*/
|
8822
|
+
static STAGE_NORMAL: number;
|
8823
|
+
|
8824
|
+
/**
|
8825
|
+
* Runtime modules with simple dependencies on other runtime modules
|
8826
|
+
*/
|
8827
|
+
static STAGE_BASIC: number;
|
8828
|
+
|
8829
|
+
/**
|
8830
|
+
* Runtime modules which attach to handlers of other runtime modules
|
8831
|
+
*/
|
8832
|
+
static STAGE_ATTACH: number;
|
8833
|
+
|
8834
|
+
/**
|
8835
|
+
* Runtime modules which trigger actions on bootstrap
|
8836
|
+
*/
|
8837
|
+
static STAGE_TRIGGER: number;
|
8838
|
+
}
|
8347
8839
|
declare class ModuleConcatenationPlugin {
|
8348
8840
|
constructor();
|
8349
8841
|
|
@@ -8401,6 +8893,13 @@ declare class ModuleFederationPlugin {
|
|
8401
8893
|
* Apply the plugin
|
8402
8894
|
*/
|
8403
8895
|
apply(compiler: Compiler): void;
|
8896
|
+
|
8897
|
+
/**
|
8898
|
+
* Get the compilation hooks associated with this plugin.
|
8899
|
+
*/
|
8900
|
+
static getCompilationHooks(
|
8901
|
+
compilation: Compilation
|
8902
|
+
): CompilationHooksModuleFederationPlugin;
|
8404
8903
|
}
|
8405
8904
|
declare interface ModuleFederationPluginOptions {
|
8406
8905
|
/**
|
@@ -8626,6 +9125,16 @@ declare class ModuleGraphConnection {
|
|
8626
9125
|
}
|
8627
9126
|
type ModuleId = string | number;
|
8628
9127
|
type ModuleInfo = ConcatenatedModuleInfo | ExternalModuleInfo;
|
9128
|
+
declare interface ModuleMemCachesItem {
|
9129
|
+
buildInfo: BuildInfo;
|
9130
|
+
references?: WeakMap<Dependency, Module>;
|
9131
|
+
memCache: WeakTupleMap<any, any>;
|
9132
|
+
}
|
9133
|
+
declare interface ModuleObject {
|
9134
|
+
id: string;
|
9135
|
+
exports: any;
|
9136
|
+
loaded: boolean;
|
9137
|
+
}
|
8629
9138
|
|
8630
9139
|
/**
|
8631
9140
|
* Options affecting the normal modules (`NormalModuleFactory`).
|
@@ -8876,7 +9385,7 @@ declare abstract class ModuleTemplate {
|
|
8876
9385
|
fn: (
|
8877
9386
|
arg0: Source,
|
8878
9387
|
arg1: Module,
|
8879
|
-
arg2:
|
9388
|
+
arg2: ChunkRenderContextJavascriptModulesPlugin,
|
8880
9389
|
arg3: DependencyTemplates
|
8881
9390
|
) => Source
|
8882
9391
|
) => void;
|
@@ -8889,7 +9398,7 @@ declare abstract class ModuleTemplate {
|
|
8889
9398
|
fn: (
|
8890
9399
|
arg0: Source,
|
8891
9400
|
arg1: Module,
|
8892
|
-
arg2:
|
9401
|
+
arg2: ChunkRenderContextJavascriptModulesPlugin,
|
8893
9402
|
arg3: DependencyTemplates
|
8894
9403
|
) => Source
|
8895
9404
|
) => void;
|
@@ -8902,7 +9411,7 @@ declare abstract class ModuleTemplate {
|
|
8902
9411
|
fn: (
|
8903
9412
|
arg0: Source,
|
8904
9413
|
arg1: Module,
|
8905
|
-
arg2:
|
9414
|
+
arg2: ChunkRenderContextJavascriptModulesPlugin,
|
8906
9415
|
arg3: DependencyTemplates
|
8907
9416
|
) => Source
|
8908
9417
|
) => void;
|
@@ -8915,7 +9424,7 @@ declare abstract class ModuleTemplate {
|
|
8915
9424
|
fn: (
|
8916
9425
|
arg0: Source,
|
8917
9426
|
arg1: Module,
|
8918
|
-
arg2:
|
9427
|
+
arg2: ChunkRenderContextJavascriptModulesPlugin,
|
8919
9428
|
arg3: DependencyTemplates
|
8920
9429
|
) => Source
|
8921
9430
|
) => void;
|
@@ -9164,7 +9673,7 @@ declare class NormalModule extends Module {
|
|
9164
9673
|
static getCompilationHooks(
|
9165
9674
|
compilation: Compilation
|
9166
9675
|
): NormalModuleCompilationHooks;
|
9167
|
-
static deserialize(context
|
9676
|
+
static deserialize(context: ObjectDeserializerContext): any;
|
9168
9677
|
}
|
9169
9678
|
declare interface NormalModuleCompilationHooks {
|
9170
9679
|
loader: SyncHook<[LoaderContextNormalModule<any>, NormalModule]>;
|
@@ -9286,14 +9795,15 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
9286
9795
|
Module,
|
9287
9796
|
Partial<NormalModuleCreateData & { settings: ModuleSettings }>,
|
9288
9797
|
ResolveData
|
9289
|
-
]
|
9290
|
-
Module
|
9798
|
+
]
|
9291
9799
|
>;
|
9292
|
-
createParser: HookMap<SyncBailHook<[ParserOptions], Parser>>;
|
9800
|
+
createParser: HookMap<SyncBailHook<[ParserOptions], void | Parser>>;
|
9293
9801
|
parser: HookMap<SyncBailHook<[any, ParserOptions], void>>;
|
9294
|
-
createGenerator: HookMap<
|
9802
|
+
createGenerator: HookMap<
|
9803
|
+
SyncBailHook<[GeneratorOptions], void | Generator>
|
9804
|
+
>;
|
9295
9805
|
generator: HookMap<SyncBailHook<[any, GeneratorOptions], void>>;
|
9296
|
-
createModuleClass: HookMap<SyncBailHook<[any, ResolveData], Module>>;
|
9806
|
+
createModuleClass: HookMap<SyncBailHook<[any, ResolveData], void | Module>>;
|
9297
9807
|
}>;
|
9298
9808
|
resolverFactory: ResolverFactory;
|
9299
9809
|
ruleSet: RuleSet;
|
@@ -9380,6 +9890,10 @@ declare interface NormalModuleLoaderContext<OptionsType> {
|
|
9380
9890
|
sourceMap?: boolean;
|
9381
9891
|
mode: "none" | "development" | "production";
|
9382
9892
|
webpack?: boolean;
|
9893
|
+
hashFunction: HashFunction;
|
9894
|
+
hashDigest: string;
|
9895
|
+
hashDigestLength: number;
|
9896
|
+
hashSalt: string;
|
9383
9897
|
_module?: NormalModule;
|
9384
9898
|
_compilation?: Compilation;
|
9385
9899
|
_compiler?: Compiler;
|
@@ -9544,6 +10058,11 @@ declare interface Open {
|
|
9544
10058
|
* Enables/Disables integrated optimizations.
|
9545
10059
|
*/
|
9546
10060
|
declare interface Optimization {
|
10061
|
+
/**
|
10062
|
+
* Avoid wrapping the entry module in an IIFE.
|
10063
|
+
*/
|
10064
|
+
avoidEntryIife?: boolean;
|
10065
|
+
|
9547
10066
|
/**
|
9548
10067
|
* Check for incompatible wasm types when importing/exporting from/to ESM.
|
9549
10068
|
*/
|
@@ -9971,7 +10490,10 @@ declare interface Options {
|
|
9971
10490
|
associatedObjectForCache?: object;
|
9972
10491
|
}
|
9973
10492
|
declare abstract class OptionsApply {
|
9974
|
-
process(
|
10493
|
+
process(
|
10494
|
+
options: WebpackOptionsNormalized,
|
10495
|
+
compiler: Compiler
|
10496
|
+
): WebpackOptionsNormalized;
|
9975
10497
|
}
|
9976
10498
|
declare interface OriginRecord {
|
9977
10499
|
module: null | Module;
|
@@ -10392,22 +10914,22 @@ declare interface OutputNormalized {
|
|
10392
10914
|
/**
|
10393
10915
|
* List of chunk loading types enabled for use by entry points.
|
10394
10916
|
*/
|
10395
|
-
enabledChunkLoadingTypes
|
10917
|
+
enabledChunkLoadingTypes: string[];
|
10396
10918
|
|
10397
10919
|
/**
|
10398
10920
|
* List of library types enabled for use by entry points.
|
10399
10921
|
*/
|
10400
|
-
enabledLibraryTypes
|
10922
|
+
enabledLibraryTypes: string[];
|
10401
10923
|
|
10402
10924
|
/**
|
10403
10925
|
* List of wasm loading types enabled for use by entry points.
|
10404
10926
|
*/
|
10405
|
-
enabledWasmLoadingTypes
|
10927
|
+
enabledWasmLoadingTypes: string[];
|
10406
10928
|
|
10407
10929
|
/**
|
10408
10930
|
* The abilities of the environment where the webpack generated code should run.
|
10409
10931
|
*/
|
10410
|
-
environment
|
10932
|
+
environment: Environment;
|
10411
10933
|
|
10412
10934
|
/**
|
10413
10935
|
* 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.
|
@@ -11672,7 +12194,48 @@ declare interface RenderBootstrapContext {
|
|
11672
12194
|
*/
|
11673
12195
|
hash: string;
|
11674
12196
|
}
|
11675
|
-
declare interface
|
12197
|
+
declare interface RenderContextCssModulesPlugin {
|
12198
|
+
/**
|
12199
|
+
* the chunk
|
12200
|
+
*/
|
12201
|
+
chunk: Chunk;
|
12202
|
+
|
12203
|
+
/**
|
12204
|
+
* the chunk graph
|
12205
|
+
*/
|
12206
|
+
chunkGraph: ChunkGraph;
|
12207
|
+
|
12208
|
+
/**
|
12209
|
+
* results of code generation
|
12210
|
+
*/
|
12211
|
+
codeGenerationResults: CodeGenerationResults;
|
12212
|
+
|
12213
|
+
/**
|
12214
|
+
* the runtime template
|
12215
|
+
*/
|
12216
|
+
runtimeTemplate: RuntimeTemplate;
|
12217
|
+
|
12218
|
+
/**
|
12219
|
+
* the unique name
|
12220
|
+
*/
|
12221
|
+
uniqueName: string;
|
12222
|
+
|
12223
|
+
/**
|
12224
|
+
* need compress
|
12225
|
+
*/
|
12226
|
+
cssHeadDataCompression: boolean;
|
12227
|
+
|
12228
|
+
/**
|
12229
|
+
* undo path to css file
|
12230
|
+
*/
|
12231
|
+
undoPath: string;
|
12232
|
+
|
12233
|
+
/**
|
12234
|
+
* modules
|
12235
|
+
*/
|
12236
|
+
modules: CssModule[];
|
12237
|
+
}
|
12238
|
+
declare interface RenderContextJavascriptModulesPlugin {
|
11676
12239
|
/**
|
11677
12240
|
* the chunk
|
11678
12241
|
*/
|
@@ -11843,6 +12406,7 @@ declare interface ResolveData {
|
|
11843
12406
|
fileDependencies: LazySet<string>;
|
11844
12407
|
missingDependencies: LazySet<string>;
|
11845
12408
|
contextDependencies: LazySet<string>;
|
12409
|
+
ignoredModule?: Module;
|
11846
12410
|
|
11847
12411
|
/**
|
11848
12412
|
* allow to use the unsafe cache
|
@@ -12913,7 +13477,7 @@ declare abstract class RuntimeTemplate {
|
|
12913
13477
|
/**
|
12914
13478
|
* name of the chunk referenced
|
12915
13479
|
*/
|
12916
|
-
chunkName?: string;
|
13480
|
+
chunkName?: null | string;
|
12917
13481
|
/**
|
12918
13482
|
* reason information of the chunk
|
12919
13483
|
*/
|
@@ -13271,20 +13835,6 @@ declare abstract class RuntimeTemplate {
|
|
13271
13835
|
*/
|
13272
13836
|
runtimeRequirements: Set<string>;
|
13273
13837
|
}): string;
|
13274
|
-
assetUrl(__0: {
|
13275
|
-
/**
|
13276
|
-
* the module
|
13277
|
-
*/
|
13278
|
-
module: Module;
|
13279
|
-
/**
|
13280
|
-
* runtime
|
13281
|
-
*/
|
13282
|
-
runtime?: RuntimeSpec;
|
13283
|
-
/**
|
13284
|
-
* the code generation results
|
13285
|
-
*/
|
13286
|
-
codeGenerationResults: CodeGenerationResults;
|
13287
|
-
}): string;
|
13288
13838
|
}
|
13289
13839
|
declare abstract class RuntimeValue {
|
13290
13840
|
fn: (arg0: {
|
@@ -13296,7 +13846,7 @@ declare abstract class RuntimeValue {
|
|
13296
13846
|
get fileDependencies(): true | string[];
|
13297
13847
|
exec(
|
13298
13848
|
parser: JavascriptParser,
|
13299
|
-
valueCacheVersions: Map<string,
|
13849
|
+
valueCacheVersions: Map<string, string | Set<string>>,
|
13300
13850
|
key: string
|
13301
13851
|
): CodeValuePrimitive;
|
13302
13852
|
getCacheVersion(): undefined | string;
|
@@ -13604,11 +14154,6 @@ declare abstract class SortableSet<T> extends Set<T> {
|
|
13604
14154
|
*/
|
13605
14155
|
getFromUnorderedCache<R>(fn: (arg0: SortableSet<T>) => R): R;
|
13606
14156
|
toJSON(): T[];
|
13607
|
-
|
13608
|
-
/**
|
13609
|
-
* Iterates over values in the set.
|
13610
|
-
*/
|
13611
|
-
[Symbol.iterator](): IterableIterator<T>;
|
13612
14157
|
}
|
13613
14158
|
declare class Source {
|
13614
14159
|
constructor();
|
@@ -13798,7 +14343,9 @@ declare abstract class StackedMap<K, V> {
|
|
13798
14343
|
get size(): number;
|
13799
14344
|
createChild(): StackedMap<K, V>;
|
13800
14345
|
}
|
13801
|
-
type StartupRenderContext =
|
14346
|
+
type StartupRenderContext = RenderContextJavascriptModulesPlugin & {
|
14347
|
+
inlined: boolean;
|
14348
|
+
};
|
13802
14349
|
declare interface StatFs {
|
13803
14350
|
(
|
13804
14351
|
path: PathLikeFs,
|
@@ -13899,6 +14446,10 @@ type Statement =
|
|
13899
14446
|
| ForInStatement
|
13900
14447
|
| ForOfStatement;
|
13901
14448
|
type StatementPathItem =
|
14449
|
+
| ImportDeclarationJavascriptParser
|
14450
|
+
| ExportNamedDeclarationJavascriptParser
|
14451
|
+
| ExportAllDeclarationJavascriptParser
|
14452
|
+
| ImportExpressionImport
|
13902
14453
|
| UnaryExpression
|
13903
14454
|
| ArrayExpression
|
13904
14455
|
| ArrowFunctionExpression
|
@@ -13912,7 +14463,6 @@ type StatementPathItem =
|
|
13912
14463
|
| ConditionalExpression
|
13913
14464
|
| FunctionExpression
|
13914
14465
|
| Identifier
|
13915
|
-
| ImportExpression
|
13916
14466
|
| SimpleLiteral
|
13917
14467
|
| RegExpLiteral
|
13918
14468
|
| BigIntLiteral
|
@@ -13948,10 +14498,7 @@ type StatementPathItem =
|
|
13948
14498
|
| ForStatement
|
13949
14499
|
| ForInStatement
|
13950
14500
|
| ForOfStatement
|
13951
|
-
|
|
13952
|
-
| ExportNamedDeclaration
|
13953
|
-
| ExportDefaultDeclaration
|
13954
|
-
| ExportAllDeclaration;
|
14501
|
+
| ExportDefaultDeclaration;
|
13955
14502
|
declare class Stats {
|
13956
14503
|
constructor(compilation: Compilation);
|
13957
14504
|
compilation: Compilation;
|
@@ -13980,46 +14527,37 @@ declare abstract class StatsFactory {
|
|
13980
14527
|
type StatsFactoryContext = Record<string, any> & KnownStatsFactoryContext;
|
13981
14528
|
declare interface StatsFactoryHooks {
|
13982
14529
|
extract: HookMap<
|
13983
|
-
SyncBailHook<[ObjectForExtract, any, StatsFactoryContext],
|
14530
|
+
SyncBailHook<[ObjectForExtract, any, StatsFactoryContext], void>
|
13984
14531
|
>;
|
13985
14532
|
filter: HookMap<
|
13986
|
-
SyncBailHook<
|
13987
|
-
[any, StatsFactoryContext, number, number],
|
13988
|
-
undefined | boolean
|
13989
|
-
>
|
14533
|
+
SyncBailHook<[any, StatsFactoryContext, number, number], boolean | void>
|
13990
14534
|
>;
|
13991
14535
|
sort: HookMap<
|
13992
14536
|
SyncBailHook<
|
13993
14537
|
[((arg0?: any, arg1?: any) => 0 | 1 | -1)[], StatsFactoryContext],
|
13994
|
-
|
14538
|
+
void
|
13995
14539
|
>
|
13996
14540
|
>;
|
13997
14541
|
filterSorted: HookMap<
|
13998
|
-
SyncBailHook<
|
13999
|
-
[any, StatsFactoryContext, number, number],
|
14000
|
-
undefined | boolean
|
14001
|
-
>
|
14542
|
+
SyncBailHook<[any, StatsFactoryContext, number, number], boolean | void>
|
14002
14543
|
>;
|
14003
14544
|
groupResults: HookMap<
|
14004
|
-
SyncBailHook<[GroupConfig[], StatsFactoryContext],
|
14545
|
+
SyncBailHook<[GroupConfig[], StatsFactoryContext], void>
|
14005
14546
|
>;
|
14006
14547
|
sortResults: HookMap<
|
14007
14548
|
SyncBailHook<
|
14008
14549
|
[((arg0?: any, arg1?: any) => 0 | 1 | -1)[], StatsFactoryContext],
|
14009
|
-
|
14550
|
+
void
|
14010
14551
|
>
|
14011
14552
|
>;
|
14012
14553
|
filterResults: HookMap<
|
14013
|
-
SyncBailHook<
|
14014
|
-
[any, StatsFactoryContext, number, number],
|
14015
|
-
undefined | boolean
|
14016
|
-
>
|
14554
|
+
SyncBailHook<[any, StatsFactoryContext, number, number], boolean | void>
|
14017
14555
|
>;
|
14018
14556
|
merge: HookMap<SyncBailHook<[any[], StatsFactoryContext], any>>;
|
14019
14557
|
result: HookMap<SyncBailHook<[any, StatsFactoryContext], any>>;
|
14020
|
-
getItemName: HookMap<SyncBailHook<[any, StatsFactoryContext], string>>;
|
14558
|
+
getItemName: HookMap<SyncBailHook<[any, StatsFactoryContext], string | void>>;
|
14021
14559
|
getItemFactory: HookMap<
|
14022
|
-
SyncBailHook<[any, StatsFactoryContext],
|
14560
|
+
SyncBailHook<[any, StatsFactoryContext], void | StatsFactory>
|
14023
14561
|
>;
|
14024
14562
|
}
|
14025
14563
|
type StatsLogging = Record<string, any> & KnownStatsLogging;
|
@@ -14481,12 +15019,14 @@ declare interface StatsOptions {
|
|
14481
15019
|
declare interface StatsPrintHooks {
|
14482
15020
|
sortElements: HookMap<SyncBailHook<[string[], StatsPrinterContext], void>>;
|
14483
15021
|
printElements: HookMap<
|
14484
|
-
SyncBailHook<[PrintedElement[], StatsPrinterContext],
|
15022
|
+
SyncBailHook<[PrintedElement[], StatsPrinterContext], string | void>
|
15023
|
+
>;
|
15024
|
+
sortItems: HookMap<
|
15025
|
+
SyncBailHook<[any[], StatsPrinterContext], boolean | void>
|
14485
15026
|
>;
|
14486
|
-
|
14487
|
-
getItemName: HookMap<SyncBailHook<[any, StatsPrinterContext], string>>;
|
15027
|
+
getItemName: HookMap<SyncBailHook<[any, StatsPrinterContext], string | void>>;
|
14488
15028
|
printItems: HookMap<
|
14489
|
-
SyncBailHook<[string[], StatsPrinterContext],
|
15029
|
+
SyncBailHook<[string[], StatsPrinterContext], string | void>
|
14490
15030
|
>;
|
14491
15031
|
print: HookMap<SyncBailHook<[any, StatsPrinterContext], string | void>>;
|
14492
15032
|
result: HookMap<SyncWaterfallHook<[string, StatsPrinterContext]>>;
|
@@ -14511,6 +15051,7 @@ type StatsValue =
|
|
14511
15051
|
| "minimal"
|
14512
15052
|
| "normal"
|
14513
15053
|
| "detailed";
|
15054
|
+
type Supports = undefined | string;
|
14514
15055
|
declare class SyncModuleIdsPlugin {
|
14515
15056
|
constructor(__0: {
|
14516
15057
|
/**
|
@@ -14577,20 +15118,20 @@ declare class Template {
|
|
14577
15118
|
static asString(str: string | string[]): string;
|
14578
15119
|
static getModulesArrayBounds(modules: WithId[]): false | [number, number];
|
14579
15120
|
static renderChunkModules(
|
14580
|
-
renderContext:
|
15121
|
+
renderContext: ChunkRenderContextJavascriptModulesPlugin,
|
14581
15122
|
modules: Module[],
|
14582
15123
|
renderModule: (arg0: Module) => null | Source,
|
14583
15124
|
prefix?: string
|
14584
15125
|
): null | Source;
|
14585
15126
|
static renderRuntimeModules(
|
14586
15127
|
runtimeModules: RuntimeModule[],
|
14587
|
-
renderContext:
|
15128
|
+
renderContext: RenderContextJavascriptModulesPlugin & {
|
14588
15129
|
codeGenerationResults?: CodeGenerationResults;
|
14589
15130
|
}
|
14590
15131
|
): Source;
|
14591
15132
|
static renderChunkRuntimeModules(
|
14592
15133
|
runtimeModules: RuntimeModule[],
|
14593
|
-
renderContext:
|
15134
|
+
renderContext: RenderContextJavascriptModulesPlugin
|
14594
15135
|
): Source;
|
14595
15136
|
static NUMBER_OF_IDENTIFIER_START_CHARS: number;
|
14596
15137
|
static NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS: number;
|
@@ -14648,7 +15189,7 @@ declare interface UpdateHashContextGenerator {
|
|
14648
15189
|
type UsageStateType = 0 | 1 | 2 | 3 | 4;
|
14649
15190
|
type UsedName = string | false | string[];
|
14650
15191
|
type Value = string | number | boolean | RegExp;
|
14651
|
-
type ValueCacheVersion =
|
15192
|
+
type ValueCacheVersion = string | Set<string>;
|
14652
15193
|
declare abstract class VariableInfo {
|
14653
15194
|
declaredScope: ScopeInfo;
|
14654
15195
|
freeName?: string | true;
|
@@ -14656,7 +15197,7 @@ declare abstract class VariableInfo {
|
|
14656
15197
|
}
|
14657
15198
|
declare interface VariableInfoInterface {
|
14658
15199
|
declaredScope: ScopeInfo;
|
14659
|
-
freeName
|
15200
|
+
freeName?: string | true;
|
14660
15201
|
tagInfo?: TagInfo;
|
14661
15202
|
}
|
14662
15203
|
type WarningFilterItemTypes =
|
@@ -14739,12 +15280,12 @@ declare interface Watcher {
|
|
14739
15280
|
/**
|
14740
15281
|
* get current aggregated changes that have not yet send to callback
|
14741
15282
|
*/
|
14742
|
-
getAggregatedChanges?: () => Set<string>;
|
15283
|
+
getAggregatedChanges?: () => null | Set<string>;
|
14743
15284
|
|
14744
15285
|
/**
|
14745
15286
|
* get current aggregated removals that have not yet send to callback
|
14746
15287
|
*/
|
14747
|
-
getAggregatedRemovals?: () => Set<string>;
|
15288
|
+
getAggregatedRemovals?: () => null | Set<string>;
|
14748
15289
|
|
14749
15290
|
/**
|
14750
15291
|
* get info about files
|
@@ -14765,12 +15306,12 @@ declare interface WatcherInfo {
|
|
14765
15306
|
/**
|
14766
15307
|
* get current aggregated changes that have not yet send to callback
|
14767
15308
|
*/
|
14768
|
-
changes: Set<string>;
|
15309
|
+
changes: null | Set<string>;
|
14769
15310
|
|
14770
15311
|
/**
|
14771
15312
|
* get current aggregated removals that have not yet send to callback
|
14772
15313
|
*/
|
14773
|
-
removals: Set<string>;
|
15314
|
+
removals: null | Set<string>;
|
14774
15315
|
|
14775
15316
|
/**
|
14776
15317
|
* get info about files
|
@@ -15298,7 +15839,7 @@ declare namespace exports {
|
|
15298
15839
|
callback?: CallbackWebpack<MultiStats>
|
15299
15840
|
): MultiCompiler;
|
15300
15841
|
};
|
15301
|
-
export const validate: (
|
15842
|
+
export const validate: (arg0: Configuration) => void;
|
15302
15843
|
export const validateSchema: (
|
15303
15844
|
schema: Parameters<typeof validateFunction>[0],
|
15304
15845
|
options: Parameters<typeof validateFunction>[1],
|
@@ -15560,9 +16101,13 @@ declare namespace exports {
|
|
15560
16101
|
FetchCompileAsyncWasmPlugin,
|
15561
16102
|
FetchCompileWasmPlugin,
|
15562
16103
|
JsonpChunkLoadingRuntimeModule,
|
15563
|
-
JsonpTemplatePlugin
|
16104
|
+
JsonpTemplatePlugin,
|
16105
|
+
CssLoadingRuntimeModule
|
15564
16106
|
};
|
15565
16107
|
}
|
16108
|
+
export namespace esm {
|
16109
|
+
export { ModuleChunkLoadingRuntimeModule };
|
16110
|
+
}
|
15566
16111
|
export namespace webworker {
|
15567
16112
|
export { WebWorkerTemplatePlugin };
|
15568
16113
|
}
|
@@ -15581,6 +16126,9 @@ declare namespace exports {
|
|
15581
16126
|
export namespace wasm {
|
15582
16127
|
export { AsyncWebAssemblyModulesPlugin, EnableWasmLoadingPlugin };
|
15583
16128
|
}
|
16129
|
+
export namespace css {
|
16130
|
+
export { CssModulesPlugin };
|
16131
|
+
}
|
15584
16132
|
export namespace library {
|
15585
16133
|
export { AbstractLibraryPlugin, EnableLibraryPlugin };
|
15586
16134
|
}
|