webpack 5.59.0 → 5.76.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.
Potentially problematic release.
This version of webpack might be problematic. Click here for more details.
- package/README.md +22 -24
- package/bin/webpack.js +0 -0
- package/hot/dev-server.js +17 -4
- package/hot/lazy-compilation-node.js +3 -1
- package/hot/poll.js +1 -1
- package/hot/signal.js +1 -1
- package/lib/APIPlugin.js +33 -0
- package/lib/BannerPlugin.js +13 -5
- package/lib/Cache.js +1 -1
- package/lib/CacheFacade.js +4 -11
- package/lib/Chunk.js +6 -3
- package/lib/ChunkGraph.js +94 -8
- package/lib/ChunkGroup.js +1 -1
- package/lib/CleanPlugin.js +81 -20
- package/lib/Compilation.js +188 -93
- package/lib/Compiler.js +87 -18
- package/lib/ConstPlugin.js +2 -2
- package/lib/ContextModule.js +142 -51
- package/lib/ContextModuleFactory.js +65 -25
- package/lib/DelegatedModule.js +1 -1
- package/lib/DelegatedModuleFactoryPlugin.js +1 -1
- package/lib/Dependency.js +17 -0
- package/lib/DependencyTemplate.js +9 -0
- package/lib/DependencyTemplates.js +1 -1
- package/lib/DllModule.js +1 -1
- package/lib/DllReferencePlugin.js +1 -1
- package/lib/EntryOptionPlugin.js +2 -0
- package/lib/ErrorHelpers.js +2 -2
- package/lib/EvalDevToolModulePlugin.js +16 -1
- package/lib/EvalSourceMapDevToolPlugin.js +25 -4
- package/lib/ExportsInfo.js +5 -5
- package/lib/ExternalModule.js +94 -54
- package/lib/ExternalModuleFactoryPlugin.js +5 -5
- package/lib/FileSystemInfo.js +124 -58
- package/lib/Generator.js +3 -0
- package/lib/HookWebpackError.js +1 -1
- package/lib/HotModuleReplacementPlugin.js +3 -1
- package/lib/LoaderOptionsPlugin.js +1 -1
- package/lib/Module.js +28 -4
- package/lib/ModuleFilenameHelpers.js +8 -4
- package/lib/ModuleHashingError.js +29 -0
- package/lib/MultiCompiler.js +1 -1
- package/lib/MultiWatching.js +1 -1
- package/lib/NodeStuffPlugin.js +13 -3
- package/lib/NormalModule.js +51 -33
- package/lib/NormalModuleFactory.js +42 -37
- package/lib/ProgressPlugin.js +4 -5
- package/lib/RawModule.js +1 -1
- package/lib/RuntimeGlobals.js +29 -1
- package/lib/RuntimeModule.js +1 -1
- package/lib/RuntimePlugin.js +84 -1
- package/lib/RuntimeTemplate.js +114 -2
- package/lib/Template.js +3 -2
- package/lib/TemplatedPathPlugin.js +48 -23
- package/lib/WatchIgnorePlugin.js +19 -7
- package/lib/Watching.js +33 -19
- package/lib/WebpackOptionsApply.js +79 -11
- package/lib/asset/AssetGenerator.js +228 -71
- package/lib/asset/AssetModulesPlugin.js +3 -0
- package/lib/asset/AssetParser.js +1 -0
- package/lib/asset/AssetSourceGenerator.js +31 -6
- package/lib/asset/AssetSourceParser.js +1 -0
- package/lib/asset/RawDataUrlModule.js +148 -0
- package/lib/async-modules/AwaitDependenciesInitFragment.js +4 -4
- package/lib/buildChunkGraph.js +38 -7
- package/lib/cache/PackFileCacheStrategy.js +15 -8
- package/lib/cache/ResolverCachePlugin.js +90 -29
- package/lib/cli.js +44 -3
- package/lib/config/browserslistTargetHandler.js +41 -6
- package/lib/config/defaults.js +123 -19
- package/lib/config/normalization.js +10 -2
- package/lib/config/target.js +10 -0
- package/lib/container/ContainerEntryModule.js +8 -5
- package/lib/container/FallbackModule.js +4 -4
- package/lib/container/ModuleFederationPlugin.js +2 -0
- package/lib/container/RemoteModule.js +4 -2
- package/lib/container/RemoteRuntimeModule.js +8 -7
- package/lib/css/CssExportsGenerator.js +139 -0
- package/lib/css/CssGenerator.js +109 -0
- package/lib/css/CssLoadingRuntimeModule.js +442 -0
- package/lib/css/CssModulesPlugin.js +462 -0
- package/lib/css/CssParser.js +618 -0
- package/lib/css/walkCssTokens.js +659 -0
- package/lib/debug/ProfilingPlugin.js +24 -21
- package/lib/dependencies/AMDRequireDependency.js +6 -6
- package/lib/dependencies/CommonJsExportsParserPlugin.js +1 -2
- package/lib/dependencies/CommonJsFullRequireDependency.js +5 -1
- package/lib/dependencies/CommonJsImportsParserPlugin.js +344 -61
- package/lib/dependencies/CommonJsRequireContextDependency.js +6 -2
- package/lib/dependencies/CommonJsRequireDependency.js +2 -1
- package/lib/dependencies/ContextDependency.js +16 -2
- package/lib/dependencies/ContextDependencyHelpers.js +21 -8
- package/lib/dependencies/ContextDependencyTemplateAsRequireCall.js +4 -1
- package/lib/dependencies/ContextElementDependency.js +25 -3
- package/lib/dependencies/CreateScriptUrlDependency.js +12 -0
- package/lib/dependencies/CssExportDependency.js +85 -0
- package/lib/dependencies/CssImportDependency.js +75 -0
- package/lib/dependencies/CssLocalIdentifierDependency.js +119 -0
- package/lib/dependencies/CssSelfLocalIdentifierDependency.js +101 -0
- package/lib/dependencies/CssUrlDependency.js +132 -0
- package/lib/dependencies/ExportsInfoDependency.js +6 -0
- package/lib/dependencies/HarmonyAcceptImportDependency.js +5 -3
- package/lib/dependencies/HarmonyCompatibilityDependency.js +5 -5
- package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +127 -0
- package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +12 -3
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +25 -17
- package/lib/dependencies/HarmonyExportInitFragment.js +4 -1
- package/lib/dependencies/HarmonyImportDependency.js +23 -0
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +142 -45
- package/lib/dependencies/HarmonyImportSpecifierDependency.js +46 -22
- package/lib/dependencies/HarmonyModulesPlugin.js +10 -0
- package/lib/dependencies/ImportContextDependency.js +0 -2
- package/lib/dependencies/ImportMetaContextDependency.js +35 -0
- package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +252 -0
- package/lib/dependencies/ImportMetaContextPlugin.js +59 -0
- package/lib/dependencies/ImportMetaPlugin.js +22 -3
- package/lib/dependencies/ImportParserPlugin.js +35 -29
- package/lib/dependencies/JsonExportsDependency.js +17 -21
- package/lib/dependencies/LoaderDependency.js +13 -0
- package/lib/dependencies/LoaderImportDependency.js +13 -0
- package/lib/dependencies/LoaderPlugin.js +4 -2
- package/lib/dependencies/ModuleDependency.js +11 -1
- package/lib/dependencies/ProvidedDependency.js +31 -8
- package/lib/dependencies/RequireContextDependency.js +0 -16
- package/lib/dependencies/RequireEnsureDependency.js +2 -2
- package/lib/dependencies/RequireResolveContextDependency.js +2 -2
- package/lib/dependencies/RequireResolveDependency.js +2 -1
- package/lib/dependencies/URLDependency.js +3 -8
- package/lib/dependencies/URLPlugin.js +22 -1
- package/lib/dependencies/WorkerPlugin.js +2 -0
- package/lib/esm/ModuleChunkFormatPlugin.js +74 -49
- package/lib/esm/ModuleChunkLoadingPlugin.js +3 -1
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +25 -9
- package/lib/hmr/HotModuleReplacement.runtime.js +29 -14
- package/lib/hmr/JavascriptHotModuleReplacement.runtime.js +4 -3
- package/lib/hmr/LazyCompilationPlugin.js +54 -26
- package/lib/hmr/lazyCompilationBackend.js +51 -12
- package/lib/ids/DeterministicModuleIdsPlugin.js +55 -35
- package/lib/ids/HashedModuleIdsPlugin.js +11 -14
- package/lib/ids/IdHelpers.js +26 -12
- package/lib/ids/NamedModuleIdsPlugin.js +6 -9
- package/lib/ids/NaturalModuleIdsPlugin.js +10 -13
- package/lib/ids/OccurrenceModuleIdsPlugin.js +13 -10
- package/lib/ids/SyncModuleIdsPlugin.js +140 -0
- package/lib/index.js +20 -0
- package/lib/javascript/ArrayPushCallbackChunkFormatPlugin.js +2 -2
- package/lib/javascript/BasicEvaluatedExpression.js +5 -2
- package/lib/javascript/ChunkHelpers.js +33 -0
- package/lib/javascript/JavascriptGenerator.js +1 -0
- package/lib/javascript/JavascriptModulesPlugin.js +27 -2
- package/lib/javascript/JavascriptParser.js +143 -73
- package/lib/javascript/StartupHelpers.js +7 -30
- package/lib/json/JsonData.js +8 -0
- package/lib/json/JsonParser.js +4 -6
- package/lib/library/AssignLibraryPlugin.js +39 -15
- package/lib/library/EnableLibraryPlugin.js +11 -0
- package/lib/library/UmdLibraryPlugin.js +5 -3
- package/lib/node/NodeTargetPlugin.js +3 -0
- package/lib/node/NodeWatchFileSystem.js +85 -31
- package/lib/node/ReadFileChunkLoadingRuntimeModule.js +23 -8
- package/lib/node/RequireChunkLoadingRuntimeModule.js +24 -9
- package/lib/optimize/ConcatenatedModule.js +62 -26
- package/lib/optimize/ModuleConcatenationPlugin.js +26 -4
- package/lib/optimize/RealContentHashPlugin.js +45 -15
- package/lib/optimize/SplitChunksPlugin.js +8 -1
- package/lib/runtime/AsyncModuleRuntimeModule.js +50 -66
- package/lib/runtime/BaseUriRuntimeModule.js +31 -0
- package/lib/runtime/CreateScriptRuntimeModule.js +36 -0
- package/lib/runtime/CreateScriptUrlRuntimeModule.js +9 -34
- package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +76 -0
- package/lib/runtime/LoadScriptRuntimeModule.js +11 -9
- package/lib/runtime/NonceRuntimeModule.js +24 -0
- package/lib/schemes/HttpUriPlugin.js +77 -14
- package/lib/serialization/FileMiddleware.js +44 -9
- package/lib/sharing/ConsumeSharedModule.js +8 -2
- package/lib/sharing/ConsumeSharedRuntimeModule.js +26 -5
- package/lib/sharing/ProvideSharedModule.js +4 -2
- package/lib/sharing/ProvideSharedPlugin.js +1 -2
- package/lib/sharing/ShareRuntimeModule.js +1 -1
- package/lib/sharing/utils.js +1 -1
- package/lib/stats/DefaultStatsFactoryPlugin.js +113 -68
- package/lib/stats/DefaultStatsPrinterPlugin.js +90 -25
- package/lib/util/ArrayHelpers.js +30 -0
- package/lib/util/AsyncQueue.js +1 -1
- package/lib/util/compileBooleanMatcher.js +1 -1
- package/lib/util/create-schema-validation.js +9 -2
- package/lib/util/createHash.js +12 -0
- package/lib/util/deprecation.js +10 -2
- package/lib/util/deterministicGrouping.js +1 -1
- package/lib/util/extractUrlAndGlobal.js +3 -0
- package/lib/util/fs.js +11 -0
- package/lib/util/hash/BatchedHash.js +7 -4
- package/lib/util/hash/md4.js +20 -0
- package/lib/util/hash/wasm-hash.js +163 -0
- package/lib/util/hash/xxhash64.js +5 -139
- package/lib/util/identifier.js +65 -44
- package/lib/util/internalSerializables.js +15 -0
- package/lib/util/nonNumericOnlyHash.js +22 -0
- package/lib/util/semver.js +17 -10
- package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +9 -3
- package/lib/wasm-sync/WebAssemblyParser.js +1 -1
- package/lib/web/JsonpChunkLoadingRuntimeModule.js +31 -18
- package/lib/webpack.js +10 -3
- package/lib/webworker/ImportScriptsChunkLoadingPlugin.js +3 -11
- package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +33 -22
- package/module.d.ts +215 -0
- package/package.json +28 -32
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +321 -30
- package/schemas/plugins/BannerPlugin.check.js +1 -1
- package/schemas/plugins/BannerPlugin.json +4 -0
- package/schemas/plugins/DllReferencePlugin.check.js +1 -1
- package/schemas/plugins/HashedModuleIdsPlugin.check.js +1 -1
- package/schemas/plugins/ProgressPlugin.check.js +1 -1
- package/schemas/plugins/asset/AssetGeneratorOptions.check.js +1 -1
- package/schemas/plugins/asset/AssetParserOptions.check.js +1 -1
- package/schemas/plugins/asset/AssetResourceGeneratorOptions.check.js +1 -1
- package/schemas/plugins/container/ContainerPlugin.check.js +1 -1
- package/schemas/plugins/container/ContainerPlugin.json +2 -1
- package/schemas/plugins/container/ContainerReferencePlugin.check.js +1 -1
- package/schemas/plugins/container/ContainerReferencePlugin.json +1 -0
- package/schemas/plugins/container/ExternalsType.check.js +1 -1
- package/schemas/plugins/container/ModuleFederationPlugin.check.js +1 -1
- package/schemas/plugins/container/ModuleFederationPlugin.json +3 -1
- package/schemas/plugins/css/CssGeneratorOptions.check.d.ts +7 -0
- package/schemas/plugins/css/CssGeneratorOptions.check.js +6 -0
- package/schemas/plugins/css/CssGeneratorOptions.json +3 -0
- package/schemas/plugins/css/CssParserOptions.check.d.ts +7 -0
- package/schemas/plugins/css/CssParserOptions.check.js +6 -0
- package/schemas/plugins/css/CssParserOptions.json +3 -0
- package/schemas/plugins/optimize/AggressiveSplittingPlugin.check.js +1 -1
- package/schemas/plugins/optimize/LimitChunkCountPlugin.check.js +1 -1
- package/schemas/plugins/optimize/MinChunkSizePlugin.check.js +1 -1
- package/schemas/plugins/schemes/HttpUriPlugin.check.js +1 -1
- package/schemas/plugins/schemes/HttpUriPlugin.json +4 -0
- package/types.d.ts +869 -296
package/types.d.ts
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
* Run `yarn special-lint-fix` to update
|
5
5
|
*/
|
6
6
|
|
7
|
+
import { Buffer } from "buffer";
|
7
8
|
import {
|
8
9
|
ArrayExpression,
|
9
10
|
ArrayPattern,
|
@@ -63,6 +64,7 @@ import {
|
|
63
64
|
SimpleCallExpression,
|
64
65
|
SimpleLiteral,
|
65
66
|
SpreadElement,
|
67
|
+
StaticBlock,
|
66
68
|
Super,
|
67
69
|
SwitchCase,
|
68
70
|
SwitchStatement,
|
@@ -80,6 +82,8 @@ import {
|
|
80
82
|
WithStatement,
|
81
83
|
YieldExpression
|
82
84
|
} from "estree";
|
85
|
+
import { ServerOptions as ServerOptionsImport } from "http";
|
86
|
+
import { ListenOptions, Server } from "net";
|
83
87
|
import { validate as validateFunction } from "schema-utils";
|
84
88
|
import { default as ValidationError } from "schema-utils/declarations/ValidationError";
|
85
89
|
import { ValidationErrorConfiguration } from "schema-utils/declarations/validate";
|
@@ -95,6 +99,7 @@ import {
|
|
95
99
|
SyncHook,
|
96
100
|
SyncWaterfallHook
|
97
101
|
} from "tapable";
|
102
|
+
import { SecureContextOptions, TlsOptions } from "tls";
|
98
103
|
|
99
104
|
declare class AbstractLibraryPlugin<T> {
|
100
105
|
constructor(__0: {
|
@@ -212,6 +217,7 @@ declare interface Argument {
|
|
212
217
|
}
|
213
218
|
declare interface ArgumentConfig {
|
214
219
|
description: string;
|
220
|
+
negatedDescription?: string;
|
215
221
|
path: string;
|
216
222
|
multiple: boolean;
|
217
223
|
type: "string" | "number" | "boolean" | "path" | "enum" | "RegExp" | "reset";
|
@@ -317,6 +323,11 @@ declare interface AssetResourceGeneratorOptions {
|
|
317
323
|
*/
|
318
324
|
filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
319
325
|
|
326
|
+
/**
|
327
|
+
* Emit the asset in the specified folder relative to 'output.path'. This should only be needed when custom 'publicPath' is specified to match the folder structure there.
|
328
|
+
*/
|
329
|
+
outputPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
330
|
+
|
320
331
|
/**
|
321
332
|
* The 'publicPath' specifies the public URL address of the output files when referenced in a browser.
|
322
333
|
*/
|
@@ -383,6 +394,10 @@ declare class AutomaticPrefetchPlugin {
|
|
383
394
|
apply(compiler: Compiler): void;
|
384
395
|
}
|
385
396
|
type AuxiliaryComment = string | LibraryCustomUmdCommentObject;
|
397
|
+
declare interface BackendApi {
|
398
|
+
dispose: (arg0?: Error) => void;
|
399
|
+
module: (arg0: Module) => { client: string; data: string; active: boolean };
|
400
|
+
}
|
386
401
|
declare class BannerPlugin {
|
387
402
|
constructor(options: BannerPluginArgument);
|
388
403
|
options: BannerPluginOptions;
|
@@ -415,6 +430,11 @@ declare interface BannerPluginOptions {
|
|
415
430
|
*/
|
416
431
|
exclude?: string | RegExp | Rule[];
|
417
432
|
|
433
|
+
/**
|
434
|
+
* If true, banner will be placed at the end of the output.
|
435
|
+
*/
|
436
|
+
footer?: boolean;
|
437
|
+
|
418
438
|
/**
|
419
439
|
* Include all modules matching any of these conditions.
|
420
440
|
*/
|
@@ -459,9 +479,10 @@ declare abstract class BasicEvaluatedExpression {
|
|
459
479
|
prefix?: BasicEvaluatedExpression;
|
460
480
|
postfix?: BasicEvaluatedExpression;
|
461
481
|
wrappedInnerExpressions: any;
|
462
|
-
identifier?: string;
|
482
|
+
identifier?: string | VariableInfoInterface;
|
463
483
|
rootInfo: VariableInfoInterface;
|
464
484
|
getMembers: () => string[];
|
485
|
+
getMembersOptionals: () => boolean[];
|
465
486
|
expression: NodeEstreeIndex;
|
466
487
|
isUnknown(): boolean;
|
467
488
|
isNull(): boolean;
|
@@ -513,7 +534,8 @@ declare abstract class BasicEvaluatedExpression {
|
|
513
534
|
setIdentifier(
|
514
535
|
identifier?: any,
|
515
536
|
rootInfo?: any,
|
516
|
-
getMembers?: any
|
537
|
+
getMembers?: any,
|
538
|
+
getMembersOptionals?: any
|
517
539
|
): BasicEvaluatedExpression;
|
518
540
|
setWrapped(
|
519
541
|
prefix?: any,
|
@@ -649,7 +671,7 @@ declare interface CacheGroupsContext {
|
|
649
671
|
moduleGraph: ModuleGraph;
|
650
672
|
chunkGraph: ChunkGraph;
|
651
673
|
}
|
652
|
-
type CacheOptionsNormalized = false |
|
674
|
+
type CacheOptionsNormalized = false | FileCacheOptions | MemoryCacheOptions;
|
653
675
|
declare class CachedSource extends Source {
|
654
676
|
constructor(source: Source);
|
655
677
|
constructor(source: Source | (() => Source), cachedData?: any);
|
@@ -666,25 +688,26 @@ declare interface CallExpressionInfo {
|
|
666
688
|
getCalleeMembers: () => string[];
|
667
689
|
name: string;
|
668
690
|
getMembers: () => string[];
|
691
|
+
getMembersOptionals: () => boolean[];
|
669
692
|
}
|
670
693
|
declare interface CallbackAsyncQueue<T> {
|
671
|
-
(err?: WebpackError, result?: T): any;
|
694
|
+
(err?: null | WebpackError, result?: T): any;
|
672
695
|
}
|
673
696
|
declare interface CallbackCache<T> {
|
674
|
-
(err?: WebpackError, result?: T): void;
|
697
|
+
(err?: null | WebpackError, result?: T): void;
|
675
698
|
}
|
676
699
|
declare interface CallbackFunction<T> {
|
677
|
-
(err?: Error, result?: T): any;
|
700
|
+
(err?: null | Error, result?: T): any;
|
678
701
|
}
|
679
702
|
declare interface CallbackNormalErrorCache<T> {
|
680
|
-
(err?: Error, result?: T): void;
|
703
|
+
(err?: null | Error, result?: T): void;
|
681
704
|
}
|
682
705
|
declare interface CallbackWebpack<T> {
|
683
706
|
(err?: Error, stats?: T): void;
|
684
707
|
}
|
685
708
|
type Cell<T> = undefined | T;
|
686
709
|
declare class Chunk {
|
687
|
-
constructor(name?: string);
|
710
|
+
constructor(name?: string, backCompat?: boolean);
|
688
711
|
id: null | string | number;
|
689
712
|
ids: null | (string | number)[];
|
690
713
|
debugId: number;
|
@@ -695,6 +718,10 @@ declare class Chunk {
|
|
695
718
|
| null
|
696
719
|
| string
|
697
720
|
| ((arg0: PathData, arg1?: AssetInfo) => string);
|
721
|
+
cssFilenameTemplate:
|
722
|
+
| null
|
723
|
+
| string
|
724
|
+
| ((arg0: PathData, arg1?: AssetInfo) => string);
|
698
725
|
runtime: RuntimeSpec;
|
699
726
|
files: Set<string>;
|
700
727
|
auxiliaryFiles: Set<string>;
|
@@ -704,12 +731,12 @@ declare class Chunk {
|
|
704
731
|
renderedHash?: string;
|
705
732
|
chunkReason?: string;
|
706
733
|
extraAsync: boolean;
|
707
|
-
|
734
|
+
get entryModule(): Module;
|
708
735
|
hasEntryModule(): boolean;
|
709
736
|
addModule(module: Module): boolean;
|
710
737
|
removeModule(module: Module): void;
|
711
738
|
getNumberOfModules(): number;
|
712
|
-
|
739
|
+
get modulesIterable(): Iterable<Module>;
|
713
740
|
compareTo(otherChunk: Chunk): 0 | 1 | -1;
|
714
741
|
containsModule(module: Module): boolean;
|
715
742
|
getModules(): Module[];
|
@@ -735,7 +762,7 @@ declare class Chunk {
|
|
735
762
|
removeGroup(chunkGroup: ChunkGroup): void;
|
736
763
|
isInGroup(chunkGroup: ChunkGroup): boolean;
|
737
764
|
getNumberOfGroups(): number;
|
738
|
-
|
765
|
+
get groupsIterable(): Iterable<ChunkGroup>;
|
739
766
|
disconnectFromGroups(): void;
|
740
767
|
split(newChunk: Chunk): void;
|
741
768
|
updateHash(hash: Hash, chunkGraph: ChunkGraph): void;
|
@@ -790,6 +817,13 @@ declare class ChunkGraph {
|
|
790
817
|
chunk: Chunk,
|
791
818
|
sourceType: string
|
792
819
|
): undefined | Iterable<Module>;
|
820
|
+
setChunkModuleSourceTypes(
|
821
|
+
chunk: Chunk,
|
822
|
+
module: Module,
|
823
|
+
sourceTypes: Set<string>
|
824
|
+
): void;
|
825
|
+
getChunkModuleSourceTypes(chunk: Chunk, module: Module): Set<string>;
|
826
|
+
getModuleSourceTypes(module: Module): Set<string>;
|
793
827
|
getOrderedChunkModulesIterable(
|
794
828
|
chunk: Chunk,
|
795
829
|
comparator: (arg0: Module, arg1: Module) => 0 | 1 | -1
|
@@ -948,12 +982,12 @@ declare abstract class ChunkGroup {
|
|
948
982
|
/**
|
949
983
|
* get a uniqueId for ChunkGroup, made up of its member Chunk debugId's
|
950
984
|
*/
|
951
|
-
|
985
|
+
get debugId(): string;
|
952
986
|
|
953
987
|
/**
|
954
988
|
* get a unique id for ChunkGroup, made up of its member Chunk id's
|
955
989
|
*/
|
956
|
-
|
990
|
+
get id(): string;
|
957
991
|
|
958
992
|
/**
|
959
993
|
* Performs an unshift of a specific chunk
|
@@ -975,20 +1009,20 @@ declare abstract class ChunkGroup {
|
|
975
1009
|
addChild(group: ChunkGroup): boolean;
|
976
1010
|
getChildren(): ChunkGroup[];
|
977
1011
|
getNumberOfChildren(): number;
|
978
|
-
|
1012
|
+
get childrenIterable(): SortableSet<ChunkGroup>;
|
979
1013
|
removeChild(group: ChunkGroup): boolean;
|
980
1014
|
addParent(parentChunk: ChunkGroup): boolean;
|
981
1015
|
getParents(): ChunkGroup[];
|
982
1016
|
getNumberOfParents(): number;
|
983
1017
|
hasParent(parent: ChunkGroup): boolean;
|
984
|
-
|
1018
|
+
get parentsIterable(): SortableSet<ChunkGroup>;
|
985
1019
|
removeParent(chunkGroup: ChunkGroup): boolean;
|
986
1020
|
addAsyncEntrypoint(entrypoint: Entrypoint): boolean;
|
987
|
-
|
1021
|
+
get asyncEntrypointsIterable(): SortableSet<ChunkGroup>;
|
988
1022
|
getBlocks(): any[];
|
989
1023
|
getNumberOfBlocks(): number;
|
990
1024
|
hasBlock(block?: any): boolean;
|
991
|
-
|
1025
|
+
get blocksIterable(): Iterable<AsyncDependenciesBlock>;
|
992
1026
|
addBlock(block: AsyncDependenciesBlock): boolean;
|
993
1027
|
addOrigin(module: Module, loc: DependencyLocation, request: string): void;
|
994
1028
|
getFiles(): string[];
|
@@ -1030,6 +1064,11 @@ declare abstract class ChunkGroup {
|
|
1030
1064
|
}
|
1031
1065
|
type ChunkGroupOptions = RawChunkGroupOptions & { name?: string };
|
1032
1066
|
declare interface ChunkHashContext {
|
1067
|
+
/**
|
1068
|
+
* results of code generation
|
1069
|
+
*/
|
1070
|
+
codeGenerationResults: CodeGenerationResults;
|
1071
|
+
|
1033
1072
|
/**
|
1034
1073
|
* the runtime template
|
1035
1074
|
*/
|
@@ -1136,7 +1175,7 @@ declare abstract class ChunkTemplate {
|
|
1136
1175
|
hash: { tap: (options?: any, fn?: any) => void };
|
1137
1176
|
hashForChunk: { tap: (options?: any, fn?: any) => void };
|
1138
1177
|
}>;
|
1139
|
-
|
1178
|
+
get outputOptions(): Output;
|
1140
1179
|
}
|
1141
1180
|
|
1142
1181
|
/**
|
@@ -1210,6 +1249,21 @@ declare interface CodeGenerationContext {
|
|
1210
1249
|
* when in concatenated module, information about other concatenated modules
|
1211
1250
|
*/
|
1212
1251
|
concatenationScope?: ConcatenationScope;
|
1252
|
+
|
1253
|
+
/**
|
1254
|
+
* code generation results of other modules (need to have a codeGenerationDependency to use that)
|
1255
|
+
*/
|
1256
|
+
codeGenerationResults: CodeGenerationResults;
|
1257
|
+
|
1258
|
+
/**
|
1259
|
+
* the compilation
|
1260
|
+
*/
|
1261
|
+
compilation?: Compilation;
|
1262
|
+
|
1263
|
+
/**
|
1264
|
+
* source types
|
1265
|
+
*/
|
1266
|
+
sourceTypes?: ReadonlySet<string>;
|
1213
1267
|
}
|
1214
1268
|
declare interface CodeGenerationResult {
|
1215
1269
|
/**
|
@@ -1386,22 +1440,22 @@ declare class Compilation {
|
|
1386
1440
|
additionalChunkAssets: FakeHook<
|
1387
1441
|
Pick<
|
1388
1442
|
AsyncSeriesHook<[Set<Chunk>]>,
|
1389
|
-
"
|
1443
|
+
"name" | "tap" | "tapAsync" | "tapPromise"
|
1390
1444
|
>
|
1391
1445
|
>;
|
1392
1446
|
additionalAssets: FakeHook<
|
1393
|
-
Pick<AsyncSeriesHook<[]>, "
|
1447
|
+
Pick<AsyncSeriesHook<[]>, "name" | "tap" | "tapAsync" | "tapPromise">
|
1394
1448
|
>;
|
1395
1449
|
optimizeChunkAssets: FakeHook<
|
1396
1450
|
Pick<
|
1397
1451
|
AsyncSeriesHook<[Set<Chunk>]>,
|
1398
|
-
"
|
1452
|
+
"name" | "tap" | "tapAsync" | "tapPromise"
|
1399
1453
|
>
|
1400
1454
|
>;
|
1401
1455
|
afterOptimizeChunkAssets: FakeHook<
|
1402
1456
|
Pick<
|
1403
1457
|
AsyncSeriesHook<[Set<Chunk>]>,
|
1404
|
-
"
|
1458
|
+
"name" | "tap" | "tapAsync" | "tapPromise"
|
1405
1459
|
>
|
1406
1460
|
>;
|
1407
1461
|
optimizeAssets: AsyncSeriesHook<
|
@@ -1438,7 +1492,7 @@ declare class Compilation {
|
|
1438
1492
|
>;
|
1439
1493
|
statsFactory: SyncHook<[StatsFactory, NormalizedStatsOptions]>;
|
1440
1494
|
statsPrinter: SyncHook<[StatsPrinter, NormalizedStatsOptions]>;
|
1441
|
-
|
1495
|
+
get normalModuleLoader(): SyncHook<[object, NormalModule]>;
|
1442
1496
|
}>;
|
1443
1497
|
name?: string;
|
1444
1498
|
startTime: any;
|
@@ -1525,7 +1579,7 @@ declare class Compilation {
|
|
1525
1579
|
getLogger(name: string | (() => string)): WebpackLogger;
|
1526
1580
|
addModule(
|
1527
1581
|
module: Module,
|
1528
|
-
callback: (err?: WebpackError, result?: Module) => void
|
1582
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
1529
1583
|
): void;
|
1530
1584
|
|
1531
1585
|
/**
|
@@ -1543,21 +1597,21 @@ declare class Compilation {
|
|
1543
1597
|
*/
|
1544
1598
|
buildModule(
|
1545
1599
|
module: Module,
|
1546
|
-
callback: (err?: WebpackError, result?: Module) => void
|
1600
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
1547
1601
|
): void;
|
1548
1602
|
processModuleDependencies(
|
1549
1603
|
module: Module,
|
1550
|
-
callback: (err?: WebpackError, result?: Module) => void
|
1604
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
1551
1605
|
): void;
|
1552
1606
|
processModuleDependenciesNonRecursive(module: Module): void;
|
1553
1607
|
handleModuleCreation(
|
1554
1608
|
__0: HandleModuleCreationOptions,
|
1555
|
-
callback: (err?: WebpackError, result?: Module) => void
|
1609
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
1556
1610
|
): void;
|
1557
1611
|
addModuleChain(
|
1558
1612
|
context: string,
|
1559
1613
|
dependency: Dependency,
|
1560
|
-
callback: (err?: WebpackError, result?: Module) => void
|
1614
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
1561
1615
|
): void;
|
1562
1616
|
addModuleTree(
|
1563
1617
|
__0: {
|
@@ -1574,27 +1628,27 @@ declare class Compilation {
|
|
1574
1628
|
*/
|
1575
1629
|
contextInfo?: Partial<ModuleFactoryCreateDataContextInfo>;
|
1576
1630
|
},
|
1577
|
-
callback: (err?: WebpackError, result?: Module) => void
|
1631
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
1578
1632
|
): void;
|
1579
1633
|
addEntry(
|
1580
1634
|
context: string,
|
1581
1635
|
entry: Dependency,
|
1582
1636
|
optionsOrName: string | EntryOptions,
|
1583
|
-
callback: (err?: WebpackError, result?: Module) => void
|
1637
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
1584
1638
|
): void;
|
1585
1639
|
addInclude(
|
1586
1640
|
context: string,
|
1587
1641
|
dependency: Dependency,
|
1588
1642
|
options: EntryOptions,
|
1589
|
-
callback: (err?: WebpackError, result?: Module) => void
|
1643
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
1590
1644
|
): void;
|
1591
1645
|
rebuildModule(
|
1592
1646
|
module: Module,
|
1593
|
-
callback: (err?: WebpackError, result?: Module) => void
|
1647
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
1594
1648
|
): void;
|
1595
1649
|
finish(callback?: any): void;
|
1596
1650
|
unseal(): void;
|
1597
|
-
seal(callback: (err?: WebpackError) => void): void;
|
1651
|
+
seal(callback: (err?: null | WebpackError) => void): void;
|
1598
1652
|
reportDependencyErrorsAndWarnings(
|
1599
1653
|
module: Module,
|
1600
1654
|
blocks: DependenciesBlock[]
|
@@ -1627,11 +1681,15 @@ declare class Compilation {
|
|
1627
1681
|
module: RuntimeModule,
|
1628
1682
|
chunkGraph?: ChunkGraph
|
1629
1683
|
): void;
|
1684
|
+
|
1685
|
+
/**
|
1686
|
+
* If `module` is passed, `loc` and `request` must also be passed.
|
1687
|
+
*/
|
1630
1688
|
addChunkInGroup(
|
1631
1689
|
groupOptions: string | ChunkGroupOptions,
|
1632
|
-
module
|
1633
|
-
loc
|
1634
|
-
request
|
1690
|
+
module?: Module,
|
1691
|
+
loc?: SyntheticDependencyLocation | RealDependencyLocation,
|
1692
|
+
request?: string
|
1635
1693
|
): ChunkGroup;
|
1636
1694
|
addAsyncEntrypoint(
|
1637
1695
|
options: EntryOptions,
|
@@ -1682,7 +1740,7 @@ declare class Compilation {
|
|
1682
1740
|
clearAssets(): void;
|
1683
1741
|
createModuleAssets(): void;
|
1684
1742
|
getRenderManifest(options: RenderManifestOptions): RenderManifestEntry[];
|
1685
|
-
createChunkAssets(callback: (err?: WebpackError) => void): void;
|
1743
|
+
createChunkAssets(callback: (err?: null | WebpackError) => void): void;
|
1686
1744
|
getPath(
|
1687
1745
|
filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
|
1688
1746
|
data?: PathData
|
@@ -1718,17 +1776,20 @@ declare class Compilation {
|
|
1718
1776
|
executeModule(
|
1719
1777
|
module: Module,
|
1720
1778
|
options: ExecuteModuleOptions,
|
1721
|
-
callback: (err?: WebpackError, result?: ExecuteModuleResult) => void
|
1779
|
+
callback: (err?: null | WebpackError, result?: ExecuteModuleResult) => void
|
1722
1780
|
): void;
|
1723
1781
|
checkConstraints(): void;
|
1724
1782
|
factorizeModule: {
|
1725
1783
|
(
|
1726
1784
|
options: FactorizeModuleOptions & { factoryResult?: false },
|
1727
|
-
callback: (err?: WebpackError, result?: Module) => void
|
1785
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
1728
1786
|
): void;
|
1729
1787
|
(
|
1730
1788
|
options: FactorizeModuleOptions & { factoryResult: true },
|
1731
|
-
callback: (
|
1789
|
+
callback: (
|
1790
|
+
err?: null | WebpackError,
|
1791
|
+
result?: ModuleFactoryResult
|
1792
|
+
) => void
|
1732
1793
|
): void;
|
1733
1794
|
};
|
1734
1795
|
|
@@ -1850,7 +1911,7 @@ declare interface CompilationParams {
|
|
1850
1911
|
contextModuleFactory: ContextModuleFactory;
|
1851
1912
|
}
|
1852
1913
|
declare class Compiler {
|
1853
|
-
constructor(context: string);
|
1914
|
+
constructor(context: string, options?: WebpackOptionsNormalized);
|
1854
1915
|
hooks: Readonly<{
|
1855
1916
|
initialize: SyncHook<[]>;
|
1856
1917
|
shouldEmit: SyncBailHook<[Compilation], boolean>;
|
@@ -1871,6 +1932,8 @@ declare class Compiler {
|
|
1871
1932
|
make: AsyncParallelHook<[Compilation]>;
|
1872
1933
|
finishMake: AsyncParallelHook<[Compilation]>;
|
1873
1934
|
afterCompile: AsyncSeriesHook<[Compilation]>;
|
1935
|
+
readRecords: AsyncSeriesHook<[]>;
|
1936
|
+
emitRecords: AsyncSeriesHook<[]>;
|
1874
1937
|
watchRun: AsyncSeriesHook<[Compiler]>;
|
1875
1938
|
failed: SyncHook<[Error]>;
|
1876
1939
|
invalid: SyncHook<[null | string, number]>;
|
@@ -1926,7 +1989,11 @@ declare class Compiler {
|
|
1926
1989
|
watch(watchOptions: WatchOptions, handler: CallbackFunction<Stats>): Watching;
|
1927
1990
|
run(callback: CallbackFunction<Stats>): void;
|
1928
1991
|
runAsChild(
|
1929
|
-
callback: (
|
1992
|
+
callback: (
|
1993
|
+
err?: null | Error,
|
1994
|
+
entries?: Chunk[],
|
1995
|
+
compilation?: Compilation
|
1996
|
+
) => any
|
1930
1997
|
): void;
|
1931
1998
|
purgeInputFileSystem(): void;
|
1932
1999
|
emitAssets(compilation: Compilation, callback: CallbackFunction<void>): void;
|
@@ -2021,7 +2088,7 @@ declare interface Configuration {
|
|
2021
2088
|
/**
|
2022
2089
|
* Cache generated modules and chunks to improve performance for multiple incremental builds.
|
2023
2090
|
*/
|
2024
|
-
cache?: boolean |
|
2091
|
+
cache?: boolean | FileCacheOptions | MemoryCacheOptions;
|
2025
2092
|
|
2026
2093
|
/**
|
2027
2094
|
* The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.
|
@@ -2078,6 +2145,7 @@ declare interface Configuration {
|
|
2078
2145
|
* Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
|
2079
2146
|
*/
|
2080
2147
|
externalsType?:
|
2148
|
+
| "import"
|
2081
2149
|
| "var"
|
2082
2150
|
| "module"
|
2083
2151
|
| "assign"
|
@@ -2088,6 +2156,7 @@ declare interface Configuration {
|
|
2088
2156
|
| "commonjs"
|
2089
2157
|
| "commonjs2"
|
2090
2158
|
| "commonjs-module"
|
2159
|
+
| "commonjs-static"
|
2091
2160
|
| "amd"
|
2092
2161
|
| "amd-require"
|
2093
2162
|
| "umd"
|
@@ -2095,7 +2164,6 @@ declare interface Configuration {
|
|
2095
2164
|
| "jsonp"
|
2096
2165
|
| "system"
|
2097
2166
|
| "promise"
|
2098
|
-
| "import"
|
2099
2167
|
| "script"
|
2100
2168
|
| "node-commonjs";
|
2101
2169
|
|
@@ -2134,7 +2202,7 @@ declare interface Configuration {
|
|
2134
2202
|
/**
|
2135
2203
|
* Enable production optimizations or development hints.
|
2136
2204
|
*/
|
2137
|
-
mode?: "
|
2205
|
+
mode?: "none" | "development" | "production";
|
2138
2206
|
|
2139
2207
|
/**
|
2140
2208
|
* Options affecting the normal modules (`NormalModuleFactory`).
|
@@ -2219,15 +2287,15 @@ declare interface Configuration {
|
|
2219
2287
|
*/
|
2220
2288
|
stats?:
|
2221
2289
|
| boolean
|
2290
|
+
| StatsOptions
|
2222
2291
|
| "none"
|
2292
|
+
| "verbose"
|
2223
2293
|
| "summary"
|
2224
2294
|
| "errors-only"
|
2225
2295
|
| "errors-warnings"
|
2226
2296
|
| "minimal"
|
2227
2297
|
| "normal"
|
2228
|
-
| "detailed"
|
2229
|
-
| "verbose"
|
2230
|
-
| StatsOptions;
|
2298
|
+
| "detailed";
|
2231
2299
|
|
2232
2300
|
/**
|
2233
2301
|
* Environment to build for. An array of environments to build for all of them when possible.
|
@@ -2411,7 +2479,7 @@ declare interface ContainerReferencePluginOptions {
|
|
2411
2479
|
shareScope?: string;
|
2412
2480
|
}
|
2413
2481
|
declare abstract class ContextElementDependency extends ModuleDependency {
|
2414
|
-
referencedExports
|
2482
|
+
referencedExports?: string[][];
|
2415
2483
|
}
|
2416
2484
|
declare class ContextExclusionPlugin {
|
2417
2485
|
constructor(negativeMatcher: RegExp);
|
@@ -2434,12 +2502,12 @@ declare interface ContextHash {
|
|
2434
2502
|
symlinks?: Set<string>;
|
2435
2503
|
}
|
2436
2504
|
type ContextMode =
|
2437
|
-
| "sync"
|
2438
|
-
| "eager"
|
2439
2505
|
| "weak"
|
2440
|
-
| "
|
2506
|
+
| "eager"
|
2441
2507
|
| "lazy"
|
2442
|
-
| "lazy-once"
|
2508
|
+
| "lazy-once"
|
2509
|
+
| "sync"
|
2510
|
+
| "async-weak";
|
2443
2511
|
declare abstract class ContextModuleFactory extends ModuleFactory {
|
2444
2512
|
hooks: Readonly<{
|
2445
2513
|
beforeResolve: AsyncSeriesWaterfallHook<[any]>;
|
@@ -2448,7 +2516,7 @@ declare abstract class ContextModuleFactory extends ModuleFactory {
|
|
2448
2516
|
alternatives: FakeHook<
|
2449
2517
|
Pick<
|
2450
2518
|
AsyncSeriesWaterfallHook<[any[]]>,
|
2451
|
-
"
|
2519
|
+
"name" | "tap" | "tapAsync" | "tapPromise"
|
2452
2520
|
>
|
2453
2521
|
>;
|
2454
2522
|
alternativeRequests: AsyncSeriesWaterfallHook<
|
@@ -2459,7 +2527,10 @@ declare abstract class ContextModuleFactory extends ModuleFactory {
|
|
2459
2527
|
resolveDependencies(
|
2460
2528
|
fs: InputFileSystem,
|
2461
2529
|
options: ContextModuleOptions,
|
2462
|
-
callback: (
|
2530
|
+
callback: (
|
2531
|
+
err?: null | Error,
|
2532
|
+
dependencies?: ContextElementDependency[]
|
2533
|
+
) => any
|
2463
2534
|
): void;
|
2464
2535
|
}
|
2465
2536
|
|
@@ -2480,7 +2551,7 @@ declare interface ContextModuleOptions {
|
|
2480
2551
|
* exports referenced from modules (won't be mangled)
|
2481
2552
|
*/
|
2482
2553
|
referencedExports?: string[][];
|
2483
|
-
resource: string;
|
2554
|
+
resource: string | false | string[];
|
2484
2555
|
resourceQuery?: string;
|
2485
2556
|
resourceFragment?: string;
|
2486
2557
|
resolveOptions: any;
|
@@ -2509,6 +2580,16 @@ declare interface ContextTimestampAndHash {
|
|
2509
2580
|
}
|
2510
2581
|
type CreateStatsOptionsContext = KnownCreateStatsOptionsContext &
|
2511
2582
|
Record<string, any>;
|
2583
|
+
|
2584
|
+
/**
|
2585
|
+
* Options for css handling.
|
2586
|
+
*/
|
2587
|
+
declare interface CssExperimentOptions {
|
2588
|
+
/**
|
2589
|
+
* Avoid generating and loading a stylesheet and only embed exports from css into output javascript files.
|
2590
|
+
*/
|
2591
|
+
exportsOnly?: boolean;
|
2592
|
+
}
|
2512
2593
|
type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration;
|
2513
2594
|
declare class DefinePlugin {
|
2514
2595
|
/**
|
@@ -2572,9 +2653,16 @@ declare class Dependency {
|
|
2572
2653
|
constructor();
|
2573
2654
|
weak: boolean;
|
2574
2655
|
optional: boolean;
|
2575
|
-
|
2576
|
-
|
2656
|
+
get type(): string;
|
2657
|
+
get category(): string;
|
2577
2658
|
loc: DependencyLocation;
|
2659
|
+
setLoc(
|
2660
|
+
startLine?: any,
|
2661
|
+
startColumn?: any,
|
2662
|
+
endLine?: any,
|
2663
|
+
endColumn?: any
|
2664
|
+
): void;
|
2665
|
+
getContext(): undefined | string;
|
2578
2666
|
getResourceIdentifier(): null | string;
|
2579
2667
|
couldAffectReferencingModule(): boolean | typeof TRANSITIVE;
|
2580
2668
|
|
@@ -2628,7 +2716,7 @@ declare class Dependency {
|
|
2628
2716
|
serialize(__0: { write: any }): void;
|
2629
2717
|
deserialize(__0: { read: any }): void;
|
2630
2718
|
module: any;
|
2631
|
-
|
2719
|
+
get disconnect(): any;
|
2632
2720
|
static NO_EXPORTS_REFERENCED: string[][];
|
2633
2721
|
static EXPORTS_OBJECT_REFERENCED: string[][];
|
2634
2722
|
static TRANSITIVE: typeof TRANSITIVE;
|
@@ -2690,6 +2778,11 @@ declare interface DependencyTemplateContext {
|
|
2690
2778
|
* when in a concatenated module, information about other concatenated modules
|
2691
2779
|
*/
|
2692
2780
|
concatenationScope?: ConcatenationScope;
|
2781
|
+
|
2782
|
+
/**
|
2783
|
+
* the code generation results
|
2784
|
+
*/
|
2785
|
+
codeGenerationResults: CodeGenerationResults;
|
2693
2786
|
}
|
2694
2787
|
declare abstract class DependencyTemplates {
|
2695
2788
|
get(dependency: DependencyConstructor): DependencyTemplate;
|
@@ -2711,8 +2804,58 @@ declare class DeterministicChunkIdsPlugin {
|
|
2711
2804
|
apply(compiler: Compiler): void;
|
2712
2805
|
}
|
2713
2806
|
declare class DeterministicModuleIdsPlugin {
|
2714
|
-
constructor(options?:
|
2715
|
-
|
2807
|
+
constructor(options?: {
|
2808
|
+
/**
|
2809
|
+
* context relative to which module identifiers are computed
|
2810
|
+
*/
|
2811
|
+
context?: string;
|
2812
|
+
/**
|
2813
|
+
* selector function for modules
|
2814
|
+
*/
|
2815
|
+
test?: (arg0: Module) => boolean;
|
2816
|
+
/**
|
2817
|
+
* maximum id length in digits (used as starting point)
|
2818
|
+
*/
|
2819
|
+
maxLength?: number;
|
2820
|
+
/**
|
2821
|
+
* hash salt for ids
|
2822
|
+
*/
|
2823
|
+
salt?: number;
|
2824
|
+
/**
|
2825
|
+
* do not increase the maxLength to find an optimal id space size
|
2826
|
+
*/
|
2827
|
+
fixedLength?: boolean;
|
2828
|
+
/**
|
2829
|
+
* throw an error when id conflicts occur (instead of rehashing)
|
2830
|
+
*/
|
2831
|
+
failOnConflict?: boolean;
|
2832
|
+
});
|
2833
|
+
options: {
|
2834
|
+
/**
|
2835
|
+
* context relative to which module identifiers are computed
|
2836
|
+
*/
|
2837
|
+
context?: string;
|
2838
|
+
/**
|
2839
|
+
* selector function for modules
|
2840
|
+
*/
|
2841
|
+
test?: (arg0: Module) => boolean;
|
2842
|
+
/**
|
2843
|
+
* maximum id length in digits (used as starting point)
|
2844
|
+
*/
|
2845
|
+
maxLength?: number;
|
2846
|
+
/**
|
2847
|
+
* hash salt for ids
|
2848
|
+
*/
|
2849
|
+
salt?: number;
|
2850
|
+
/**
|
2851
|
+
* do not increase the maxLength to find an optimal id space size
|
2852
|
+
*/
|
2853
|
+
fixedLength?: boolean;
|
2854
|
+
/**
|
2855
|
+
* throw an error when id conflicts occur (instead of rehashing)
|
2856
|
+
*/
|
2857
|
+
failOnConflict?: boolean;
|
2858
|
+
};
|
2716
2859
|
|
2717
2860
|
/**
|
2718
2861
|
* Apply the plugin
|
@@ -2990,6 +3133,17 @@ declare class EnableLibraryPlugin {
|
|
2990
3133
|
static setEnabled(compiler: Compiler, type: string): void;
|
2991
3134
|
static checkEnabled(compiler: Compiler, type: string): void;
|
2992
3135
|
}
|
3136
|
+
declare class EnableWasmLoadingPlugin {
|
3137
|
+
constructor(type: string);
|
3138
|
+
type: string;
|
3139
|
+
|
3140
|
+
/**
|
3141
|
+
* Apply the plugin
|
3142
|
+
*/
|
3143
|
+
apply(compiler: Compiler): void;
|
3144
|
+
static setEnabled(compiler: Compiler, type: string): void;
|
3145
|
+
static checkEnabled(compiler: Compiler, type: string): void;
|
3146
|
+
}
|
2993
3147
|
type Entry =
|
2994
3148
|
| string
|
2995
3149
|
| (() => string | EntryObject | string[] | Promise<EntryStatic>)
|
@@ -3017,6 +3171,16 @@ declare abstract class EntryDependency extends ModuleDependency {}
|
|
3017
3171
|
* An object with entry point description.
|
3018
3172
|
*/
|
3019
3173
|
declare interface EntryDescription {
|
3174
|
+
/**
|
3175
|
+
* Enable/disable creating async chunks that are loaded on demand.
|
3176
|
+
*/
|
3177
|
+
asyncChunks?: boolean;
|
3178
|
+
|
3179
|
+
/**
|
3180
|
+
* Base uri for this entry.
|
3181
|
+
*/
|
3182
|
+
baseUri?: string;
|
3183
|
+
|
3020
3184
|
/**
|
3021
3185
|
* The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
|
3022
3186
|
*/
|
@@ -3067,6 +3231,16 @@ declare interface EntryDescription {
|
|
3067
3231
|
* An object with entry point description.
|
3068
3232
|
*/
|
3069
3233
|
declare interface EntryDescriptionNormalized {
|
3234
|
+
/**
|
3235
|
+
* Enable/disable creating async chunks that are loaded on demand.
|
3236
|
+
*/
|
3237
|
+
asyncChunks?: boolean;
|
3238
|
+
|
3239
|
+
/**
|
3240
|
+
* Base uri for this entry.
|
3241
|
+
*/
|
3242
|
+
baseUri?: string;
|
3243
|
+
|
3070
3244
|
/**
|
3071
3245
|
* The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
|
3072
3246
|
*/
|
@@ -3229,6 +3403,16 @@ declare interface Environment {
|
|
3229
3403
|
* The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from '...').
|
3230
3404
|
*/
|
3231
3405
|
module?: boolean;
|
3406
|
+
|
3407
|
+
/**
|
3408
|
+
* The environment supports optional chaining ('obj?.a' or 'obj?.()').
|
3409
|
+
*/
|
3410
|
+
optionalChaining?: boolean;
|
3411
|
+
|
3412
|
+
/**
|
3413
|
+
* The environment supports template literals.
|
3414
|
+
*/
|
3415
|
+
templateLiteral?: boolean;
|
3232
3416
|
}
|
3233
3417
|
declare class EnvironmentPlugin {
|
3234
3418
|
constructor(...keys: any[]);
|
@@ -3297,14 +3481,14 @@ type Experiments = ExperimentsCommon & ExperimentsExtra;
|
|
3297
3481
|
*/
|
3298
3482
|
declare interface ExperimentsCommon {
|
3299
3483
|
/**
|
3300
|
-
*
|
3484
|
+
* Support WebAssembly as asynchronous EcmaScript Module.
|
3301
3485
|
*/
|
3302
|
-
|
3486
|
+
asyncWebAssembly?: boolean;
|
3303
3487
|
|
3304
3488
|
/**
|
3305
|
-
*
|
3489
|
+
* Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.
|
3306
3490
|
*/
|
3307
|
-
|
3491
|
+
backCompat?: boolean;
|
3308
3492
|
|
3309
3493
|
/**
|
3310
3494
|
* Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.
|
@@ -3317,7 +3501,7 @@ declare interface ExperimentsCommon {
|
|
3317
3501
|
futureDefaults?: boolean;
|
3318
3502
|
|
3319
3503
|
/**
|
3320
|
-
* Enable module
|
3504
|
+
* Enable module layers.
|
3321
3505
|
*/
|
3322
3506
|
layers?: boolean;
|
3323
3507
|
|
@@ -3346,6 +3530,11 @@ declare interface ExperimentsExtra {
|
|
3346
3530
|
*/
|
3347
3531
|
buildHttp?: HttpUriOptions | (string | RegExp | ((uri: string) => boolean))[];
|
3348
3532
|
|
3533
|
+
/**
|
3534
|
+
* Enable css support.
|
3535
|
+
*/
|
3536
|
+
css?: boolean | CssExperimentOptions;
|
3537
|
+
|
3349
3538
|
/**
|
3350
3539
|
* Compile entrypoints and import()s only when they are accessed.
|
3351
3540
|
*/
|
@@ -3362,10 +3551,15 @@ declare interface ExperimentsNormalizedExtra {
|
|
3362
3551
|
*/
|
3363
3552
|
buildHttp?: HttpUriOptions;
|
3364
3553
|
|
3554
|
+
/**
|
3555
|
+
* Enable css support.
|
3556
|
+
*/
|
3557
|
+
css?: false | CssExperimentOptions;
|
3558
|
+
|
3365
3559
|
/**
|
3366
3560
|
* Compile entrypoints and import()s only when they are accessed.
|
3367
3561
|
*/
|
3368
|
-
lazyCompilation?: LazyCompilationOptions;
|
3562
|
+
lazyCompilation?: false | LazyCompilationOptions;
|
3369
3563
|
}
|
3370
3564
|
declare abstract class ExportInfo {
|
3371
3565
|
name: string;
|
@@ -3398,7 +3592,7 @@ declare abstract class ExportInfo {
|
|
3398
3592
|
canMangleUse?: boolean;
|
3399
3593
|
exportsInfoOwned: boolean;
|
3400
3594
|
exportsInfo?: ExportsInfo;
|
3401
|
-
|
3595
|
+
get canMangle(): boolean;
|
3402
3596
|
setUsedInUnknownWay(runtime: RuntimeSpec): boolean;
|
3403
3597
|
setUsedWithoutInfo(runtime: RuntimeSpec): boolean;
|
3404
3598
|
setHasUseInfo(): void;
|
@@ -3519,11 +3713,11 @@ declare interface ExportSpec {
|
|
3519
3713
|
}
|
3520
3714
|
type ExportedVariableInfo = string | ScopeInfo | VariableInfo;
|
3521
3715
|
declare abstract class ExportsInfo {
|
3522
|
-
|
3523
|
-
|
3524
|
-
|
3525
|
-
|
3526
|
-
|
3716
|
+
get ownedExports(): Iterable<ExportInfo>;
|
3717
|
+
get orderedOwnedExports(): Iterable<ExportInfo>;
|
3718
|
+
get exports(): Iterable<ExportInfo>;
|
3719
|
+
get orderedExports(): Iterable<ExportInfo>;
|
3720
|
+
get otherExportsInfo(): ExportInfo;
|
3527
3721
|
setRedirectNamedTo(exportsInfo?: any): boolean;
|
3528
3722
|
setHasProvideInfo(): void;
|
3529
3723
|
setHasUseInfo(): void;
|
@@ -3662,6 +3856,14 @@ declare interface ExpressionExpressionInfo {
|
|
3662
3856
|
rootInfo: string | VariableInfo;
|
3663
3857
|
name: string;
|
3664
3858
|
getMembers: () => string[];
|
3859
|
+
getMembersOptionals: () => boolean[];
|
3860
|
+
}
|
3861
|
+
declare interface ExtensionAliasOption {
|
3862
|
+
alias: string | string[];
|
3863
|
+
extension: string;
|
3864
|
+
}
|
3865
|
+
declare interface ExtensionAliasOptions {
|
3866
|
+
[index: string]: string | string[];
|
3665
3867
|
}
|
3666
3868
|
type ExternalItem =
|
3667
3869
|
| string
|
@@ -3816,6 +4018,7 @@ declare interface ExternalsPresets {
|
|
3816
4018
|
webAsync?: boolean;
|
3817
4019
|
}
|
3818
4020
|
type ExternalsType =
|
4021
|
+
| "import"
|
3819
4022
|
| "var"
|
3820
4023
|
| "module"
|
3821
4024
|
| "assign"
|
@@ -3826,6 +4029,7 @@ type ExternalsType =
|
|
3826
4029
|
| "commonjs"
|
3827
4030
|
| "commonjs2"
|
3828
4031
|
| "commonjs-module"
|
4032
|
+
| "commonjs-static"
|
3829
4033
|
| "amd"
|
3830
4034
|
| "amd-require"
|
3831
4035
|
| "umd"
|
@@ -3833,7 +4037,6 @@ type ExternalsType =
|
|
3833
4037
|
| "jsonp"
|
3834
4038
|
| "system"
|
3835
4039
|
| "promise"
|
3836
|
-
| "import"
|
3837
4040
|
| "script"
|
3838
4041
|
| "node-commonjs";
|
3839
4042
|
declare interface FactorizeModuleOptions {
|
@@ -3852,6 +4055,7 @@ declare interface FactorizeModuleOptions {
|
|
3852
4055
|
type FakeHook<T> = T & FakeHookMarker;
|
3853
4056
|
declare interface FakeHookMarker {}
|
3854
4057
|
declare interface FallbackCacheGroup {
|
4058
|
+
chunksFilter: (chunk: Chunk) => boolean;
|
3855
4059
|
minSize: SplitChunksSizes;
|
3856
4060
|
maxAsyncSize: SplitChunksSizes;
|
3857
4061
|
maxInitialSize: SplitChunksSizes;
|
@@ -4064,40 +4268,43 @@ declare abstract class FileSystemInfo {
|
|
4064
4268
|
getFileTimestamp(
|
4065
4269
|
path: string,
|
4066
4270
|
callback: (
|
4067
|
-
arg0?: WebpackError,
|
4271
|
+
arg0?: null | WebpackError,
|
4068
4272
|
arg1?: null | FileSystemInfoEntry | "ignore"
|
4069
4273
|
) => void
|
4070
4274
|
): void;
|
4071
4275
|
getContextTimestamp(
|
4072
4276
|
path: string,
|
4073
4277
|
callback: (
|
4074
|
-
arg0?: WebpackError,
|
4278
|
+
arg0?: null | WebpackError,
|
4075
4279
|
arg1?: null | "ignore" | ResolvedContextFileSystemInfoEntry
|
4076
4280
|
) => void
|
4077
4281
|
): void;
|
4078
4282
|
getFileHash(
|
4079
4283
|
path: string,
|
4080
|
-
callback: (arg0?: WebpackError, arg1?: string) => void
|
4284
|
+
callback: (arg0?: null | WebpackError, arg1?: string) => void
|
4081
4285
|
): void;
|
4082
4286
|
getContextHash(
|
4083
4287
|
path: string,
|
4084
|
-
callback: (arg0?: WebpackError, arg1?: string) => void
|
4288
|
+
callback: (arg0?: null | WebpackError, arg1?: string) => void
|
4085
4289
|
): void;
|
4086
4290
|
getContextTsh(
|
4087
4291
|
path: string,
|
4088
4292
|
callback: (
|
4089
|
-
arg0?: WebpackError,
|
4293
|
+
arg0?: null | WebpackError,
|
4090
4294
|
arg1?: ResolvedContextTimestampAndHash
|
4091
4295
|
) => void
|
4092
4296
|
): void;
|
4093
4297
|
resolveBuildDependencies(
|
4094
4298
|
context: string,
|
4095
4299
|
deps: Iterable<string>,
|
4096
|
-
callback: (
|
4300
|
+
callback: (
|
4301
|
+
arg0?: null | Error,
|
4302
|
+
arg1?: ResolveBuildDependenciesResult
|
4303
|
+
) => void
|
4097
4304
|
): void;
|
4098
4305
|
checkResolveResultsValid(
|
4099
4306
|
resolveResults: Map<string, string | false>,
|
4100
|
-
callback: (arg0?: Error, arg1?: boolean) => void
|
4307
|
+
callback: (arg0?: null | Error, arg1?: boolean) => void
|
4101
4308
|
): void;
|
4102
4309
|
createSnapshot(
|
4103
4310
|
startTime: number,
|
@@ -4114,12 +4321,12 @@ declare abstract class FileSystemInfo {
|
|
4114
4321
|
*/
|
4115
4322
|
timestamp?: boolean;
|
4116
4323
|
},
|
4117
|
-
callback: (arg0?: WebpackError, arg1?: Snapshot) => void
|
4324
|
+
callback: (arg0?: null | WebpackError, arg1?: null | Snapshot) => void
|
4118
4325
|
): void;
|
4119
4326
|
mergeSnapshots(snapshot1: Snapshot, snapshot2: Snapshot): Snapshot;
|
4120
4327
|
checkSnapshotValid(
|
4121
4328
|
snapshot: Snapshot,
|
4122
|
-
callback: (arg0?: WebpackError, arg1?: boolean) => void
|
4329
|
+
callback: (arg0?: null | WebpackError, arg1?: boolean) => void
|
4123
4330
|
): void;
|
4124
4331
|
getDeprecatedFileTimestamps(): Map<any, any>;
|
4125
4332
|
getDeprecatedContextTimestamps(): Map<any, any>;
|
@@ -4169,6 +4376,11 @@ declare interface GenerateContext {
|
|
4169
4376
|
*/
|
4170
4377
|
concatenationScope?: ConcatenationScope;
|
4171
4378
|
|
4379
|
+
/**
|
4380
|
+
* code generation results of other modules (need to have a codeGenerationDependency to use that)
|
4381
|
+
*/
|
4382
|
+
codeGenerationResults?: CodeGenerationResults;
|
4383
|
+
|
4172
4384
|
/**
|
4173
4385
|
* which kind of code should be generated
|
4174
4386
|
*/
|
@@ -4308,6 +4520,42 @@ declare interface HandleModuleCreationOptions {
|
|
4308
4520
|
*/
|
4309
4521
|
connectOrigin?: boolean;
|
4310
4522
|
}
|
4523
|
+
declare class HarmonyImportDependency extends ModuleDependency {
|
4524
|
+
constructor(
|
4525
|
+
request: string,
|
4526
|
+
sourceOrder: number,
|
4527
|
+
assertions?: Record<string, any>
|
4528
|
+
);
|
4529
|
+
sourceOrder: number;
|
4530
|
+
getImportVar(moduleGraph: ModuleGraph): string;
|
4531
|
+
getImportStatement(
|
4532
|
+
update: boolean,
|
4533
|
+
__1: DependencyTemplateContext
|
4534
|
+
): [string, string];
|
4535
|
+
getLinkingErrors(
|
4536
|
+
moduleGraph: ModuleGraph,
|
4537
|
+
ids: string[],
|
4538
|
+
additionalMessage: string
|
4539
|
+
): undefined | WebpackError[];
|
4540
|
+
static Template: typeof HarmonyImportDependencyTemplate;
|
4541
|
+
static ExportPresenceModes: {
|
4542
|
+
NONE: 0;
|
4543
|
+
WARN: 1;
|
4544
|
+
AUTO: 2;
|
4545
|
+
ERROR: 3;
|
4546
|
+
fromUserOption(str?: any): 0 | 1 | 2 | 3;
|
4547
|
+
};
|
4548
|
+
static NO_EXPORTS_REFERENCED: string[][];
|
4549
|
+
static EXPORTS_OBJECT_REFERENCED: string[][];
|
4550
|
+
static TRANSITIVE: typeof TRANSITIVE;
|
4551
|
+
}
|
4552
|
+
declare class HarmonyImportDependencyTemplate extends DependencyTemplate {
|
4553
|
+
constructor();
|
4554
|
+
static getImportEmittedRuntime(
|
4555
|
+
module: Module,
|
4556
|
+
referencedModule: Module
|
4557
|
+
): undefined | string | boolean | SortableSet<string>;
|
4558
|
+
}
|
4311
4559
|
declare class Hash {
|
4312
4560
|
constructor();
|
4313
4561
|
|
@@ -4338,7 +4586,7 @@ declare interface HashedModuleIdsPluginOptions {
|
|
4338
4586
|
/**
|
4339
4587
|
* The encoding to use when generating the hash, defaults to 'base64'. All encodings from Node.JS' hash.digest are supported.
|
4340
4588
|
*/
|
4341
|
-
hashDigest?: "
|
4589
|
+
hashDigest?: "latin1" | "hex" | "base64";
|
4342
4590
|
|
4343
4591
|
/**
|
4344
4592
|
* The prefix length of the hash digest to use, defaults to 4.
|
@@ -4396,6 +4644,11 @@ declare interface HttpUriOptions {
|
|
4396
4644
|
*/
|
4397
4645
|
lockfileLocation?: string;
|
4398
4646
|
|
4647
|
+
/**
|
4648
|
+
* Proxy configuration, which can be used to specify a proxy server to use for HTTP requests.
|
4649
|
+
*/
|
4650
|
+
proxy?: string;
|
4651
|
+
|
4399
4652
|
/**
|
4400
4653
|
* When set, resources of existing lockfile entries will be fetched and entries will be upgraded when resource content has changed.
|
4401
4654
|
*/
|
@@ -4488,6 +4741,11 @@ declare interface ImportModuleOptions {
|
|
4488
4741
|
* the target public path
|
4489
4742
|
*/
|
4490
4743
|
publicPath?: string;
|
4744
|
+
|
4745
|
+
/**
|
4746
|
+
* target base uri
|
4747
|
+
*/
|
4748
|
+
baseUri?: string;
|
4491
4749
|
}
|
4492
4750
|
type ImportSource =
|
4493
4751
|
| undefined
|
@@ -4529,7 +4787,7 @@ declare interface InfrastructureLogging {
|
|
4529
4787
|
/**
|
4530
4788
|
* Log level.
|
4531
4789
|
*/
|
4532
|
-
level?: "none" | "
|
4790
|
+
level?: "none" | "error" | "warn" | "info" | "log" | "verbose";
|
4533
4791
|
|
4534
4792
|
/**
|
4535
4793
|
* Stream used for logging output. Defaults to process.stderr. This option is only used when no custom console is provided.
|
@@ -4675,7 +4933,7 @@ declare class JavascriptModulesPlugin {
|
|
4675
4933
|
static chunkHasJs: (chunk: Chunk, chunkGraph: ChunkGraph) => boolean;
|
4676
4934
|
}
|
4677
4935
|
declare class JavascriptParser extends Parser {
|
4678
|
-
constructor(sourceType?: "module" | "
|
4936
|
+
constructor(sourceType?: "module" | "auto" | "script");
|
4679
4937
|
hooks: Readonly<{
|
4680
4938
|
evaluateTypeof: HookMap<
|
4681
4939
|
SyncBailHook<
|
@@ -4698,6 +4956,15 @@ declare class JavascriptParser extends Parser {
|
|
4698
4956
|
undefined | null | BasicEvaluatedExpression
|
4699
4957
|
>
|
4700
4958
|
>;
|
4959
|
+
evaluateNewExpression: HookMap<
|
4960
|
+
SyncBailHook<[NewExpression], undefined | null | BasicEvaluatedExpression>
|
4961
|
+
>;
|
4962
|
+
evaluateCallExpression: HookMap<
|
4963
|
+
SyncBailHook<
|
4964
|
+
[CallExpression],
|
4965
|
+
undefined | null | BasicEvaluatedExpression
|
4966
|
+
>
|
4967
|
+
>;
|
4701
4968
|
evaluateCallExpressionMember: HookMap<
|
4702
4969
|
SyncBailHook<
|
4703
4970
|
[CallExpression, undefined | BasicEvaluatedExpression],
|
@@ -4752,6 +5019,7 @@ declare class JavascriptParser extends Parser {
|
|
4752
5019
|
| ClassDeclaration
|
4753
5020
|
| ExpressionStatement
|
4754
5021
|
| BlockStatement
|
5022
|
+
| StaticBlock
|
4755
5023
|
| EmptyStatement
|
4756
5024
|
| DebuggerStatement
|
4757
5025
|
| WithStatement
|
@@ -4782,6 +5050,7 @@ declare class JavascriptParser extends Parser {
|
|
4782
5050
|
| ClassDeclaration
|
4783
5051
|
| ExpressionStatement
|
4784
5052
|
| BlockStatement
|
5053
|
+
| StaticBlock
|
4785
5054
|
| EmptyStatement
|
4786
5055
|
| DebuggerStatement
|
4787
5056
|
| WithStatement
|
@@ -4812,6 +5081,7 @@ declare class JavascriptParser extends Parser {
|
|
4812
5081
|
| ClassDeclaration
|
4813
5082
|
| ExpressionStatement
|
4814
5083
|
| BlockStatement
|
5084
|
+
| StaticBlock
|
4815
5085
|
| EmptyStatement
|
4816
5086
|
| DebuggerStatement
|
4817
5087
|
| WithStatement
|
@@ -4917,7 +5187,7 @@ declare class JavascriptParser extends Parser {
|
|
4917
5187
|
topLevelAwait: SyncBailHook<[Expression], boolean | void>;
|
4918
5188
|
call: HookMap<SyncBailHook<[Expression], boolean | void>>;
|
4919
5189
|
callMemberChain: HookMap<
|
4920
|
-
SyncBailHook<[CallExpression, string[]], boolean | void>
|
5190
|
+
SyncBailHook<[CallExpression, string[], boolean[]], boolean | void>
|
4921
5191
|
>;
|
4922
5192
|
memberChainOfCallMemberChain: HookMap<
|
4923
5193
|
SyncBailHook<
|
@@ -4933,9 +5203,10 @@ declare class JavascriptParser extends Parser {
|
|
4933
5203
|
>;
|
4934
5204
|
optionalChaining: SyncBailHook<[ChainExpression], boolean | void>;
|
4935
5205
|
new: HookMap<SyncBailHook<[NewExpression], boolean | void>>;
|
5206
|
+
binaryExpression: SyncBailHook<[BinaryExpression], boolean | void>;
|
4936
5207
|
expression: HookMap<SyncBailHook<[Expression], boolean | void>>;
|
4937
5208
|
expressionMemberChain: HookMap<
|
4938
|
-
SyncBailHook<[Expression, string[]], boolean | void>
|
5209
|
+
SyncBailHook<[Expression, string[], boolean[]], boolean | void>
|
4939
5210
|
>;
|
4940
5211
|
unhandledExpressionMemberChain: HookMap<
|
4941
5212
|
SyncBailHook<[Expression, string[]], boolean | void>
|
@@ -4945,7 +5216,7 @@ declare class JavascriptParser extends Parser {
|
|
4945
5216
|
program: SyncBailHook<[Program, Comment[]], boolean | void>;
|
4946
5217
|
finish: SyncBailHook<[Program, Comment[]], boolean | void>;
|
4947
5218
|
}>;
|
4948
|
-
sourceType: "module" | "
|
5219
|
+
sourceType: "module" | "auto" | "script";
|
4949
5220
|
scope: ScopeInfo;
|
4950
5221
|
state: ParserState;
|
4951
5222
|
comments: any;
|
@@ -4983,6 +5254,7 @@ declare class JavascriptParser extends Parser {
|
|
4983
5254
|
| ClassDeclaration
|
4984
5255
|
| ExpressionStatement
|
4985
5256
|
| BlockStatement
|
5257
|
+
| StaticBlock
|
4986
5258
|
| EmptyStatement
|
4987
5259
|
| DebuggerStatement
|
4988
5260
|
| WithStatement
|
@@ -5002,7 +5274,7 @@ declare class JavascriptParser extends Parser {
|
|
5002
5274
|
)[];
|
5003
5275
|
prevStatement: any;
|
5004
5276
|
currentTagData: any;
|
5005
|
-
getRenameIdentifier(expr?: any): undefined | string;
|
5277
|
+
getRenameIdentifier(expr?: any): undefined | string | VariableInfoInterface;
|
5006
5278
|
walkClass(classy: ClassExpression | ClassDeclaration): void;
|
5007
5279
|
preWalkStatements(statements?: any): void;
|
5008
5280
|
blockPreWalkStatements(statements?: any): void;
|
@@ -5149,12 +5421,10 @@ declare class JavascriptParser extends Parser {
|
|
5149
5421
|
enterArrayPattern(pattern?: any, onIdent?: any): void;
|
5150
5422
|
enterRestElement(pattern?: any, onIdent?: any): void;
|
5151
5423
|
enterAssignmentPattern(pattern?: any, onIdent?: any): void;
|
5152
|
-
evaluateExpression(
|
5153
|
-
expression: Expression
|
5154
|
-
): undefined | BasicEvaluatedExpression;
|
5424
|
+
evaluateExpression(expression: Expression): BasicEvaluatedExpression;
|
5155
5425
|
parseString(expression?: any): any;
|
5156
5426
|
parseCalculatedString(expression?: any): any;
|
5157
|
-
evaluate(source
|
5427
|
+
evaluate(source: string): BasicEvaluatedExpression;
|
5158
5428
|
isPure(
|
5159
5429
|
expr:
|
5160
5430
|
| undefined
|
@@ -5203,9 +5473,10 @@ declare class JavascriptParser extends Parser {
|
|
5203
5473
|
isVariableDefined(name?: any): boolean;
|
5204
5474
|
getVariableInfo(name: string): ExportedVariableInfo;
|
5205
5475
|
setVariable(name: string, variableInfo: ExportedVariableInfo): void;
|
5476
|
+
evaluatedVariable(tagInfo?: any): VariableInfo;
|
5206
5477
|
parseCommentOptions(
|
5207
5478
|
range?: any
|
5208
|
-
): { options: null; errors: null } | { options: object; errors:
|
5479
|
+
): { options: null; errors: null } | { options: object; errors: unknown[] };
|
5209
5480
|
extractMemberExpressionChain(expression: MemberExpression): {
|
5210
5481
|
members: string[];
|
5211
5482
|
object:
|
@@ -5237,6 +5508,7 @@ declare class JavascriptParser extends Parser {
|
|
5237
5508
|
| ImportExpression
|
5238
5509
|
| ChainExpression
|
5239
5510
|
| Super;
|
5511
|
+
membersOptionals: boolean[];
|
5240
5512
|
};
|
5241
5513
|
getFreeInfoFromVariable(varName: string): {
|
5242
5514
|
name: string;
|
@@ -5282,6 +5554,31 @@ declare interface JavascriptParserOptions {
|
|
5282
5554
|
*/
|
5283
5555
|
commonjsMagicComments?: boolean;
|
5284
5556
|
|
5557
|
+
/**
|
5558
|
+
* Enable/disable parsing "import { createRequire } from "module"" and evaluating createRequire().
|
5559
|
+
*/
|
5560
|
+
createRequire?: string | boolean;
|
5561
|
+
|
5562
|
+
/**
|
5563
|
+
* Specifies global mode for dynamic import.
|
5564
|
+
*/
|
5565
|
+
dynamicImportMode?: "weak" | "eager" | "lazy" | "lazy-once";
|
5566
|
+
|
5567
|
+
/**
|
5568
|
+
* Specifies global prefetch for dynamic import.
|
5569
|
+
*/
|
5570
|
+
dynamicImportPrefetch?: number | boolean;
|
5571
|
+
|
5572
|
+
/**
|
5573
|
+
* Specifies global preload for dynamic import.
|
5574
|
+
*/
|
5575
|
+
dynamicImportPreload?: number | boolean;
|
5576
|
+
|
5577
|
+
/**
|
5578
|
+
* Specifies the behavior of invalid export names in "import ... from ..." and "export ... from ...".
|
5579
|
+
*/
|
5580
|
+
exportsPresence?: false | "auto" | "error" | "warn";
|
5581
|
+
|
5285
5582
|
/**
|
5286
5583
|
* Enable warnings for full dynamic dependencies.
|
5287
5584
|
*/
|
@@ -5312,11 +5609,31 @@ declare interface JavascriptParserOptions {
|
|
5312
5609
|
*/
|
5313
5610
|
import?: boolean;
|
5314
5611
|
|
5612
|
+
/**
|
5613
|
+
* Specifies the behavior of invalid export names in "import ... from ...".
|
5614
|
+
*/
|
5615
|
+
importExportsPresence?: false | "auto" | "error" | "warn";
|
5616
|
+
|
5617
|
+
/**
|
5618
|
+
* Enable/disable evaluating import.meta.
|
5619
|
+
*/
|
5620
|
+
importMeta?: boolean;
|
5621
|
+
|
5622
|
+
/**
|
5623
|
+
* Enable/disable evaluating import.meta.webpackContext.
|
5624
|
+
*/
|
5625
|
+
importMetaContext?: boolean;
|
5626
|
+
|
5315
5627
|
/**
|
5316
5628
|
* Include polyfills or mocks for various node stuff.
|
5317
5629
|
*/
|
5318
5630
|
node?: false | NodeOptions;
|
5319
5631
|
|
5632
|
+
/**
|
5633
|
+
* Specifies the behavior of invalid export names in "export ... from ...". This might be useful to disable during the migration from "export ... from ..." to "export type ... from ..." when reexporting types in TypeScript.
|
5634
|
+
*/
|
5635
|
+
reexportExportsPresence?: false | "auto" | "error" | "warn";
|
5636
|
+
|
5320
5637
|
/**
|
5321
5638
|
* Enable/disable parsing of require.context syntax.
|
5322
5639
|
*/
|
@@ -5338,7 +5655,7 @@ declare interface JavascriptParserOptions {
|
|
5338
5655
|
requireJs?: boolean;
|
5339
5656
|
|
5340
5657
|
/**
|
5341
|
-
* Emit errors instead of warnings when imported names don't exist in imported module.
|
5658
|
+
* Deprecated in favor of "exportsPresence". Emit errors instead of warnings when imported names don't exist in imported module.
|
5342
5659
|
*/
|
5343
5660
|
strictExportPresence?: boolean;
|
5344
5661
|
|
@@ -5552,7 +5869,7 @@ declare interface KnownNormalizedStatsOptions {
|
|
5552
5869
|
modulesSpace: number;
|
5553
5870
|
chunkModulesSpace: number;
|
5554
5871
|
nestedModulesSpace: number;
|
5555
|
-
logging: false | "none" | "
|
5872
|
+
logging: false | "none" | "error" | "warn" | "info" | "log" | "verbose";
|
5556
5873
|
loggingDebug: ((value: string) => boolean)[];
|
5557
5874
|
loggingTrace: boolean;
|
5558
5875
|
}
|
@@ -5794,25 +6111,45 @@ declare interface KnownStatsProfile {
|
|
5794
6111
|
dependencies: number;
|
5795
6112
|
}
|
5796
6113
|
|
6114
|
+
/**
|
6115
|
+
* Options for the default backend.
|
6116
|
+
*/
|
6117
|
+
declare interface LazyCompilationDefaultBackendOptions {
|
6118
|
+
/**
|
6119
|
+
* A custom client.
|
6120
|
+
*/
|
6121
|
+
client?: string;
|
6122
|
+
|
6123
|
+
/**
|
6124
|
+
* Specifies where to listen to from the server.
|
6125
|
+
*/
|
6126
|
+
listen?: number | ListenOptions | ((server: typeof Server) => void);
|
6127
|
+
|
6128
|
+
/**
|
6129
|
+
* Specifies the protocol the client should use to connect to the server.
|
6130
|
+
*/
|
6131
|
+
protocol?: "http" | "https";
|
6132
|
+
|
6133
|
+
/**
|
6134
|
+
* Specifies how to create the server handling the EventSource requests.
|
6135
|
+
*/
|
6136
|
+
server?: ServerOptionsImport | ServerOptionsHttps | (() => typeof Server);
|
6137
|
+
}
|
6138
|
+
|
5797
6139
|
/**
|
5798
6140
|
* Options for compiling entrypoints and import()s only when they are accessed.
|
5799
6141
|
*/
|
5800
6142
|
declare interface LazyCompilationOptions {
|
5801
6143
|
/**
|
5802
|
-
*
|
6144
|
+
* Specifies the backend that should be used for handling client keep alive.
|
5803
6145
|
*/
|
5804
6146
|
backend?:
|
5805
6147
|
| ((
|
5806
6148
|
compiler: Compiler,
|
5807
|
-
|
5808
|
-
callback: (err?: Error, api?: any) => void
|
6149
|
+
callback: (err?: Error, api?: BackendApi) => void
|
5809
6150
|
) => void)
|
5810
|
-
| ((compiler: Compiler
|
5811
|
-
|
5812
|
-
/**
|
5813
|
-
* A custom client.
|
5814
|
-
*/
|
5815
|
-
client?: string;
|
6151
|
+
| ((compiler: Compiler) => Promise<BackendApi>)
|
6152
|
+
| LazyCompilationDefaultBackendOptions;
|
5816
6153
|
|
5817
6154
|
/**
|
5818
6155
|
* Enable/disable lazy compilation for entries.
|
@@ -5831,7 +6168,7 @@ declare interface LazyCompilationOptions {
|
|
5831
6168
|
}
|
5832
6169
|
declare class LazySet<T> {
|
5833
6170
|
constructor(iterable?: Iterable<T>);
|
5834
|
-
|
6171
|
+
get size(): number;
|
5835
6172
|
add(item: T): LazySet<T>;
|
5836
6173
|
addAll(iterable: LazySet<T> | Iterable<T>): LazySet<T>;
|
5837
6174
|
clear(): void;
|
@@ -5844,9 +6181,8 @@ declare class LazySet<T> {
|
|
5844
6181
|
has(item: T): boolean;
|
5845
6182
|
keys(): IterableIterator<T>;
|
5846
6183
|
values(): IterableIterator<T>;
|
5847
|
-
[Symbol.iterator](): IterableIterator<T>;
|
5848
|
-
readonly [Symbol.toStringTag]: string;
|
5849
6184
|
serialize(__0: { write: any }): void;
|
6185
|
+
[Symbol.iterator](): IterableIterator<T>;
|
5850
6186
|
static deserialize(__0: { read: any }): LazySet<any>;
|
5851
6187
|
}
|
5852
6188
|
declare interface LibIdentOptions {
|
@@ -5942,7 +6278,7 @@ declare interface LibraryOptions {
|
|
5942
6278
|
name?: string | string[] | LibraryCustomUmdObject;
|
5943
6279
|
|
5944
6280
|
/**
|
5945
|
-
* Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).
|
6281
|
+
* Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'commonjs-static', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).
|
5946
6282
|
*/
|
5947
6283
|
type: string;
|
5948
6284
|
|
@@ -6124,7 +6460,7 @@ declare interface LoaderPluginLoaderContext {
|
|
6124
6460
|
importModule(
|
6125
6461
|
request: string,
|
6126
6462
|
options: ImportModuleOptions,
|
6127
|
-
callback: (err?: Error, exports?: any) => any
|
6463
|
+
callback: (err?: null | Error, exports?: any) => any
|
6128
6464
|
): void;
|
6129
6465
|
importModule(request: string, options?: ImportModuleOptions): Promise<any>;
|
6130
6466
|
}
|
@@ -6259,6 +6595,12 @@ declare interface LoaderRunnerLoaderContext<OptionsType> {
|
|
6259
6595
|
* Example: "/abc/resource.js?query#frag"
|
6260
6596
|
*/
|
6261
6597
|
resource: string;
|
6598
|
+
|
6599
|
+
/**
|
6600
|
+
* Target of compilation.
|
6601
|
+
* Example: "web"
|
6602
|
+
*/
|
6603
|
+
target: string;
|
6262
6604
|
}
|
6263
6605
|
declare class LoaderTargetPlugin {
|
6264
6606
|
constructor(target: string);
|
@@ -6344,9 +6686,9 @@ declare abstract class MainTemplate {
|
|
6344
6686
|
localVars: SyncWaterfallHook<[string, Chunk, string]>;
|
6345
6687
|
requireExtensions: SyncWaterfallHook<[string, Chunk, string]>;
|
6346
6688
|
requireEnsure: SyncWaterfallHook<[string, Chunk, string, string]>;
|
6347
|
-
|
6348
|
-
|
6349
|
-
|
6689
|
+
get jsonpScript(): SyncWaterfallHook<[string, Chunk]>;
|
6690
|
+
get linkPrefetch(): SyncWaterfallHook<[string, Chunk]>;
|
6691
|
+
get linkPreload(): SyncWaterfallHook<[string, Chunk]>;
|
6350
6692
|
}>;
|
6351
6693
|
renderCurrentHashCode: (hash: string, length?: number) => string;
|
6352
6694
|
getPublicPath: (options: object) => string;
|
@@ -6355,8 +6697,8 @@ declare abstract class MainTemplate {
|
|
6355
6697
|
path?: any,
|
6356
6698
|
options?: any
|
6357
6699
|
) => { path: string; info: AssetInfo };
|
6358
|
-
|
6359
|
-
|
6700
|
+
get requireFn(): "__webpack_require__";
|
6701
|
+
get outputOptions(): Output;
|
6360
6702
|
}
|
6361
6703
|
declare interface MapOptions {
|
6362
6704
|
columns?: boolean;
|
@@ -6429,35 +6771,37 @@ declare class Module extends DependenciesBlock {
|
|
6429
6771
|
buildMeta: BuildMeta;
|
6430
6772
|
buildInfo: Record<string, any>;
|
6431
6773
|
presentationalDependencies?: Dependency[];
|
6774
|
+
codeGenerationDependencies?: Dependency[];
|
6432
6775
|
id: string | number;
|
6433
|
-
|
6434
|
-
|
6776
|
+
get hash(): string;
|
6777
|
+
get renderedHash(): string;
|
6435
6778
|
profile: null | ModuleProfile;
|
6436
6779
|
index: number;
|
6437
6780
|
index2: number;
|
6438
6781
|
depth: number;
|
6439
6782
|
issuer: null | Module;
|
6440
|
-
|
6441
|
-
|
6783
|
+
get usedExports(): null | boolean | SortableSet<string>;
|
6784
|
+
get optimizationBailout(): (
|
6442
6785
|
| string
|
6443
6786
|
| ((requestShortener: RequestShortener) => string)
|
6444
6787
|
)[];
|
6445
|
-
|
6788
|
+
get optional(): boolean;
|
6446
6789
|
addChunk(chunk?: any): boolean;
|
6447
6790
|
removeChunk(chunk?: any): void;
|
6448
6791
|
isInChunk(chunk?: any): boolean;
|
6449
6792
|
isEntryModule(): boolean;
|
6450
6793
|
getChunks(): Chunk[];
|
6451
6794
|
getNumberOfChunks(): number;
|
6452
|
-
|
6795
|
+
get chunksIterable(): Iterable<Chunk>;
|
6453
6796
|
isProvided(exportName: string): null | boolean;
|
6454
|
-
|
6455
|
-
|
6797
|
+
get exportsArgument(): string;
|
6798
|
+
get moduleArgument(): string;
|
6456
6799
|
getExportsType(
|
6457
6800
|
moduleGraph: ModuleGraph,
|
6458
6801
|
strict: boolean
|
6459
6802
|
): "namespace" | "default-only" | "default-with-named" | "dynamic";
|
6460
6803
|
addPresentationalDependency(presentationalDependency: Dependency): void;
|
6804
|
+
addCodeGenerationDependency(codeGenerationDependency: Dependency): void;
|
6461
6805
|
addWarning(warning: WebpackError): void;
|
6462
6806
|
getWarnings(): undefined | Iterable<WebpackError>;
|
6463
6807
|
getNumberOfWarnings(): number;
|
@@ -6488,7 +6832,7 @@ declare class Module extends DependenciesBlock {
|
|
6488
6832
|
hasReasons(moduleGraph: ModuleGraph, runtime: RuntimeSpec): boolean;
|
6489
6833
|
needBuild(
|
6490
6834
|
context: NeedBuildContext,
|
6491
|
-
callback: (arg0?: WebpackError, arg1?: boolean) => void
|
6835
|
+
callback: (arg0?: null | WebpackError, arg1?: boolean) => void
|
6492
6836
|
): void;
|
6493
6837
|
needRebuild(
|
6494
6838
|
fileTimestamps: Map<string, null | number>,
|
@@ -6545,10 +6889,10 @@ declare class Module extends DependenciesBlock {
|
|
6545
6889
|
missingDependencies: LazySet<string>,
|
6546
6890
|
buildDependencies: LazySet<string>
|
6547
6891
|
): void;
|
6548
|
-
|
6549
|
-
|
6550
|
-
|
6551
|
-
|
6892
|
+
get hasEqualsChunks(): any;
|
6893
|
+
get isUsed(): any;
|
6894
|
+
get errors(): any;
|
6895
|
+
get warnings(): any;
|
6552
6896
|
used: any;
|
6553
6897
|
}
|
6554
6898
|
declare class ModuleConcatenationPlugin {
|
@@ -6635,6 +6979,7 @@ declare interface ModuleFederationPluginOptions {
|
|
6635
6979
|
* The external type of the remote containers.
|
6636
6980
|
*/
|
6637
6981
|
remoteType?:
|
6982
|
+
| "import"
|
6638
6983
|
| "var"
|
6639
6984
|
| "module"
|
6640
6985
|
| "assign"
|
@@ -6645,6 +6990,7 @@ declare interface ModuleFederationPluginOptions {
|
|
6645
6990
|
| "commonjs"
|
6646
6991
|
| "commonjs2"
|
6647
6992
|
| "commonjs-module"
|
6993
|
+
| "commonjs-static"
|
6648
6994
|
| "amd"
|
6649
6995
|
| "amd-require"
|
6650
6996
|
| "umd"
|
@@ -6652,7 +6998,6 @@ declare interface ModuleFederationPluginOptions {
|
|
6652
6998
|
| "jsonp"
|
6653
6999
|
| "system"
|
6654
7000
|
| "promise"
|
6655
|
-
| "import"
|
6656
7001
|
| "script"
|
6657
7002
|
| "node-commonjs";
|
6658
7003
|
|
@@ -6816,7 +7161,7 @@ declare class ModuleGraphConnection {
|
|
6816
7161
|
) => ConnectionState
|
6817
7162
|
): void;
|
6818
7163
|
addExplanation(explanation: string): void;
|
6819
|
-
|
7164
|
+
get explanation(): string;
|
6820
7165
|
active: void;
|
6821
7166
|
isActive(runtime: RuntimeSpec): boolean;
|
6822
7167
|
isTargetActive(runtime: RuntimeSpec): boolean;
|
@@ -7033,6 +7378,37 @@ declare interface ModuleReferenceOptions {
|
|
7033
7378
|
*/
|
7034
7379
|
asiSafe?: boolean;
|
7035
7380
|
}
|
7381
|
+
declare interface ModuleSettings {
|
7382
|
+
/**
|
7383
|
+
* Specifies the layer in which the module should be placed in.
|
7384
|
+
*/
|
7385
|
+
layer?: string;
|
7386
|
+
|
7387
|
+
/**
|
7388
|
+
* Module type to use for the module.
|
7389
|
+
*/
|
7390
|
+
type?: string;
|
7391
|
+
|
7392
|
+
/**
|
7393
|
+
* Options for the resolver.
|
7394
|
+
*/
|
7395
|
+
resolve?: ResolveOptionsWebpackOptions;
|
7396
|
+
|
7397
|
+
/**
|
7398
|
+
* Options for parsing.
|
7399
|
+
*/
|
7400
|
+
parser?: { [index: string]: any };
|
7401
|
+
|
7402
|
+
/**
|
7403
|
+
* The options for the module generator.
|
7404
|
+
*/
|
7405
|
+
generator?: { [index: string]: any };
|
7406
|
+
|
7407
|
+
/**
|
7408
|
+
* Flags a module as with or without side effects.
|
7409
|
+
*/
|
7410
|
+
sideEffects?: boolean;
|
7411
|
+
}
|
7036
7412
|
declare abstract class ModuleTemplate {
|
7037
7413
|
type: string;
|
7038
7414
|
hooks: Readonly<{
|
@@ -7042,7 +7418,7 @@ declare abstract class ModuleTemplate {
|
|
7042
7418
|
package: { tap: (options?: any, fn?: any) => void };
|
7043
7419
|
hash: { tap: (options?: any, fn?: any) => void };
|
7044
7420
|
}>;
|
7045
|
-
|
7421
|
+
get runtimeTemplate(): any;
|
7046
7422
|
}
|
7047
7423
|
declare class MultiCompiler {
|
7048
7424
|
constructor(
|
@@ -7060,8 +7436,8 @@ declare class MultiCompiler {
|
|
7060
7436
|
compilers: Compiler[];
|
7061
7437
|
dependencies: WeakMap<Compiler, string[]>;
|
7062
7438
|
running: boolean;
|
7063
|
-
|
7064
|
-
|
7439
|
+
get options(): WebpackOptionsNormalized[] & MultiCompilerOptions;
|
7440
|
+
get outputPath(): string;
|
7065
7441
|
inputFileSystem: InputFileSystem;
|
7066
7442
|
outputFileSystem: OutputFileSystem;
|
7067
7443
|
watchFileSystem: WatchFileSystem;
|
@@ -7090,7 +7466,7 @@ declare interface MultiCompilerOptions {
|
|
7090
7466
|
}
|
7091
7467
|
declare abstract class MultiStats {
|
7092
7468
|
stats: Stats[];
|
7093
|
-
|
7469
|
+
get hash(): string;
|
7094
7470
|
hasErrors(): boolean;
|
7095
7471
|
hasWarnings(): boolean;
|
7096
7472
|
toJson(options?: any): StatsCompilation;
|
@@ -7197,6 +7573,7 @@ type NodeEstreeIndex =
|
|
7197
7573
|
| PrivateIdentifier
|
7198
7574
|
| ExpressionStatement
|
7199
7575
|
| BlockStatement
|
7576
|
+
| StaticBlock
|
7200
7577
|
| EmptyStatement
|
7201
7578
|
| DebuggerStatement
|
7202
7579
|
| WithStatement
|
@@ -7221,11 +7598,11 @@ type NodeEstreeIndex =
|
|
7221
7598
|
| PropertyDefinition
|
7222
7599
|
| VariableDeclarator
|
7223
7600
|
| Program
|
7224
|
-
| Super
|
7225
7601
|
| SwitchCase
|
7226
7602
|
| CatchClause
|
7227
7603
|
| Property
|
7228
7604
|
| AssignmentProperty
|
7605
|
+
| Super
|
7229
7606
|
| TemplateElement
|
7230
7607
|
| SpreadElement
|
7231
7608
|
| ObjectPattern
|
@@ -7283,81 +7660,20 @@ declare class NodeTemplatePlugin {
|
|
7283
7660
|
}
|
7284
7661
|
type NodeWebpackOptions = false | NodeOptions;
|
7285
7662
|
declare class NormalModule extends Module {
|
7286
|
-
constructor(__0:
|
7287
|
-
/**
|
7288
|
-
* an optional layer in which the module is
|
7289
|
-
*/
|
7290
|
-
layer?: string;
|
7291
|
-
/**
|
7292
|
-
* module type
|
7293
|
-
*/
|
7294
|
-
type: string;
|
7295
|
-
/**
|
7296
|
-
* request string
|
7297
|
-
*/
|
7298
|
-
request: string;
|
7299
|
-
/**
|
7300
|
-
* request intended by user (without loaders from config)
|
7301
|
-
*/
|
7302
|
-
userRequest: string;
|
7303
|
-
/**
|
7304
|
-
* request without resolving
|
7305
|
-
*/
|
7306
|
-
rawRequest: string;
|
7307
|
-
/**
|
7308
|
-
* list of loaders
|
7309
|
-
*/
|
7310
|
-
loaders: LoaderItem[];
|
7311
|
-
/**
|
7312
|
-
* path + query of the real resource
|
7313
|
-
*/
|
7314
|
-
resource: string;
|
7315
|
-
/**
|
7316
|
-
* resource resolve data
|
7317
|
-
*/
|
7318
|
-
resourceResolveData?: Record<string, any>;
|
7319
|
-
/**
|
7320
|
-
* context directory for resolving
|
7321
|
-
*/
|
7322
|
-
context: string;
|
7323
|
-
/**
|
7324
|
-
* path + query of the matched resource (virtual)
|
7325
|
-
*/
|
7326
|
-
matchResource?: string;
|
7327
|
-
/**
|
7328
|
-
* the parser used
|
7329
|
-
*/
|
7330
|
-
parser: Parser;
|
7331
|
-
/**
|
7332
|
-
* the options of the parser used
|
7333
|
-
*/
|
7334
|
-
parserOptions: object;
|
7335
|
-
/**
|
7336
|
-
* the generator used
|
7337
|
-
*/
|
7338
|
-
generator: Generator;
|
7339
|
-
/**
|
7340
|
-
* the options of the generator used
|
7341
|
-
*/
|
7342
|
-
generatorOptions: object;
|
7343
|
-
/**
|
7344
|
-
* options used for resolving requests from this module
|
7345
|
-
*/
|
7346
|
-
resolveOptions: Object;
|
7347
|
-
});
|
7663
|
+
constructor(__0: NormalModuleCreateData);
|
7348
7664
|
request: string;
|
7349
7665
|
userRequest: string;
|
7350
7666
|
rawRequest: string;
|
7351
7667
|
binary: boolean;
|
7352
7668
|
parser: Parser;
|
7353
|
-
parserOptions
|
7669
|
+
parserOptions?: Record<string, any>;
|
7354
7670
|
generator: Generator;
|
7355
|
-
generatorOptions
|
7671
|
+
generatorOptions?: Record<string, any>;
|
7356
7672
|
resource: string;
|
7357
7673
|
resourceResolveData?: Record<string, any>;
|
7358
7674
|
matchResource?: string;
|
7359
7675
|
loaders: LoaderItem[];
|
7360
|
-
error?: WebpackError;
|
7676
|
+
error?: null | WebpackError;
|
7361
7677
|
restoreFromUnsafeCache(
|
7362
7678
|
unsafeCacheData?: any,
|
7363
7679
|
normalModuleFactory?: any
|
@@ -7395,20 +7711,109 @@ declare interface NormalModuleCompilationHooks {
|
|
7395
7711
|
readResource: HookMap<AsyncSeriesBailHook<[object], string | Buffer>>;
|
7396
7712
|
needBuild: AsyncSeriesBailHook<[NormalModule, NeedBuildContext], boolean>;
|
7397
7713
|
}
|
7714
|
+
declare interface NormalModuleCreateData {
|
7715
|
+
/**
|
7716
|
+
* an optional layer in which the module is
|
7717
|
+
*/
|
7718
|
+
layer?: string;
|
7719
|
+
|
7720
|
+
/**
|
7721
|
+
* module type
|
7722
|
+
*/
|
7723
|
+
type: string;
|
7724
|
+
|
7725
|
+
/**
|
7726
|
+
* request string
|
7727
|
+
*/
|
7728
|
+
request: string;
|
7729
|
+
|
7730
|
+
/**
|
7731
|
+
* request intended by user (without loaders from config)
|
7732
|
+
*/
|
7733
|
+
userRequest: string;
|
7734
|
+
|
7735
|
+
/**
|
7736
|
+
* request without resolving
|
7737
|
+
*/
|
7738
|
+
rawRequest: string;
|
7739
|
+
|
7740
|
+
/**
|
7741
|
+
* list of loaders
|
7742
|
+
*/
|
7743
|
+
loaders: LoaderItem[];
|
7744
|
+
|
7745
|
+
/**
|
7746
|
+
* path + query of the real resource
|
7747
|
+
*/
|
7748
|
+
resource: string;
|
7749
|
+
|
7750
|
+
/**
|
7751
|
+
* resource resolve data
|
7752
|
+
*/
|
7753
|
+
resourceResolveData?: Record<string, any>;
|
7754
|
+
|
7755
|
+
/**
|
7756
|
+
* context directory for resolving
|
7757
|
+
*/
|
7758
|
+
context: string;
|
7759
|
+
|
7760
|
+
/**
|
7761
|
+
* path + query of the matched resource (virtual)
|
7762
|
+
*/
|
7763
|
+
matchResource?: string;
|
7764
|
+
|
7765
|
+
/**
|
7766
|
+
* the parser used
|
7767
|
+
*/
|
7768
|
+
parser: Parser;
|
7769
|
+
|
7770
|
+
/**
|
7771
|
+
* the options of the parser used
|
7772
|
+
*/
|
7773
|
+
parserOptions?: Record<string, any>;
|
7774
|
+
|
7775
|
+
/**
|
7776
|
+
* the generator used
|
7777
|
+
*/
|
7778
|
+
generator: Generator;
|
7779
|
+
|
7780
|
+
/**
|
7781
|
+
* the options of the generator used
|
7782
|
+
*/
|
7783
|
+
generatorOptions?: Record<string, any>;
|
7784
|
+
|
7785
|
+
/**
|
7786
|
+
* options used for resolving requests from this module
|
7787
|
+
*/
|
7788
|
+
resolveOptions?: ResolveOptionsWebpackOptions;
|
7789
|
+
}
|
7398
7790
|
declare abstract class NormalModuleFactory extends ModuleFactory {
|
7399
7791
|
hooks: Readonly<{
|
7400
|
-
resolve: AsyncSeriesBailHook<[ResolveData],
|
7792
|
+
resolve: AsyncSeriesBailHook<[ResolveData], false | void | Module>;
|
7401
7793
|
resolveForScheme: HookMap<
|
7402
7794
|
AsyncSeriesBailHook<[ResourceDataWithData, ResolveData], true | void>
|
7403
7795
|
>;
|
7404
7796
|
resolveInScheme: HookMap<
|
7405
7797
|
AsyncSeriesBailHook<[ResourceDataWithData, ResolveData], true | void>
|
7406
7798
|
>;
|
7407
|
-
factorize: AsyncSeriesBailHook<[ResolveData],
|
7408
|
-
beforeResolve: AsyncSeriesBailHook<[ResolveData],
|
7409
|
-
afterResolve: AsyncSeriesBailHook<[ResolveData],
|
7410
|
-
createModule: AsyncSeriesBailHook<
|
7411
|
-
|
7799
|
+
factorize: AsyncSeriesBailHook<[ResolveData], Module>;
|
7800
|
+
beforeResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
|
7801
|
+
afterResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
|
7802
|
+
createModule: AsyncSeriesBailHook<
|
7803
|
+
[
|
7804
|
+
Partial<NormalModuleCreateData & { settings: ModuleSettings }>,
|
7805
|
+
ResolveData
|
7806
|
+
],
|
7807
|
+
void | Module
|
7808
|
+
>;
|
7809
|
+
module: SyncWaterfallHook<
|
7810
|
+
[
|
7811
|
+
Module,
|
7812
|
+
Partial<NormalModuleCreateData & { settings: ModuleSettings }>,
|
7813
|
+
ResolveData
|
7814
|
+
],
|
7815
|
+
Module
|
7816
|
+
>;
|
7412
7817
|
createParser: HookMap<SyncBailHook<any, any>>;
|
7413
7818
|
parser: HookMap<SyncHook<any>>;
|
7414
7819
|
createGenerator: HookMap<SyncBailHook<any, any>>;
|
@@ -7485,11 +7890,12 @@ declare interface NormalModuleLoaderContext<OptionsType> {
|
|
7485
7890
|
utils: {
|
7486
7891
|
absolutify: (context: string, request: string) => string;
|
7487
7892
|
contextify: (context: string, request: string) => string;
|
7893
|
+
createHash: (algorithm?: string) => Hash;
|
7488
7894
|
};
|
7489
7895
|
rootContext: string;
|
7490
7896
|
fs: InputFileSystem;
|
7491
7897
|
sourceMap?: boolean;
|
7492
|
-
mode: "
|
7898
|
+
mode: "none" | "development" | "production";
|
7493
7899
|
webpack?: boolean;
|
7494
7900
|
_module?: NormalModule;
|
7495
7901
|
_compilation?: Compilation;
|
@@ -7515,8 +7921,8 @@ type NormalizedStatsOptions = KnownNormalizedStatsOptions &
|
|
7515
7921
|
Omit<
|
7516
7922
|
StatsOptions,
|
7517
7923
|
| "context"
|
7518
|
-
| "requestShortener"
|
7519
7924
|
| "chunkGroups"
|
7925
|
+
| "requestShortener"
|
7520
7926
|
| "chunksSort"
|
7521
7927
|
| "modulesSort"
|
7522
7928
|
| "chunkModulesSort"
|
@@ -7903,6 +8309,10 @@ declare interface OptimizationSplitChunksOptions {
|
|
7903
8309
|
* Sets the name delimiter for created chunks.
|
7904
8310
|
*/
|
7905
8311
|
automaticNameDelimiter?: string;
|
8312
|
+
/**
|
8313
|
+
* Select chunks for determining shared modules (defaults to "async", "initial" and "all" requires adding these chunks to the HTML).
|
8314
|
+
*/
|
8315
|
+
chunks?: "all" | "initial" | "async" | ((chunk: Chunk) => boolean);
|
7906
8316
|
/**
|
7907
8317
|
* Maximal size hint for the on-demand chunks.
|
7908
8318
|
*/
|
@@ -8014,6 +8424,11 @@ declare interface Output {
|
|
8014
8424
|
| string
|
8015
8425
|
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
8016
8426
|
|
8427
|
+
/**
|
8428
|
+
* Enable/disable creating async chunks that are loaded on demand.
|
8429
|
+
*/
|
8430
|
+
asyncChunks?: boolean;
|
8431
|
+
|
8017
8432
|
/**
|
8018
8433
|
* Add a comment in the UMD wrapper.
|
8019
8434
|
*/
|
@@ -8066,6 +8481,20 @@ declare interface Output {
|
|
8066
8481
|
*/
|
8067
8482
|
crossOriginLoading?: false | "anonymous" | "use-credentials";
|
8068
8483
|
|
8484
|
+
/**
|
8485
|
+
* Specifies the filename template of non-initial output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
|
8486
|
+
*/
|
8487
|
+
cssChunkFilename?:
|
8488
|
+
| string
|
8489
|
+
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
8490
|
+
|
8491
|
+
/**
|
8492
|
+
* Specifies the filename template of output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
|
8493
|
+
*/
|
8494
|
+
cssFilename?:
|
8495
|
+
| string
|
8496
|
+
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
8497
|
+
|
8069
8498
|
/**
|
8070
8499
|
* Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
|
8071
8500
|
*/
|
@@ -8172,7 +8601,7 @@ declare interface Output {
|
|
8172
8601
|
libraryExport?: string | string[];
|
8173
8602
|
|
8174
8603
|
/**
|
8175
|
-
* Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).
|
8604
|
+
* Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'commonjs-static', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).
|
8176
8605
|
*/
|
8177
8606
|
libraryTarget?: string;
|
8178
8607
|
|
@@ -8285,6 +8714,10 @@ declare interface OutputFileSystem {
|
|
8285
8714
|
arg0: string,
|
8286
8715
|
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: IStats) => void
|
8287
8716
|
) => void;
|
8717
|
+
lstat?: (
|
8718
|
+
arg0: string,
|
8719
|
+
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: IStats) => void
|
8720
|
+
) => void;
|
8288
8721
|
readFile: (
|
8289
8722
|
arg0: string,
|
8290
8723
|
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: string | Buffer) => void
|
@@ -8305,6 +8738,11 @@ declare interface OutputNormalized {
|
|
8305
8738
|
| string
|
8306
8739
|
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
8307
8740
|
|
8741
|
+
/**
|
8742
|
+
* Enable/disable creating async chunks that are loaded on demand.
|
8743
|
+
*/
|
8744
|
+
asyncChunks?: boolean;
|
8745
|
+
|
8308
8746
|
/**
|
8309
8747
|
* Add charset attribute for script tag.
|
8310
8748
|
*/
|
@@ -8352,6 +8790,20 @@ declare interface OutputNormalized {
|
|
8352
8790
|
*/
|
8353
8791
|
crossOriginLoading?: false | "anonymous" | "use-credentials";
|
8354
8792
|
|
8793
|
+
/**
|
8794
|
+
* Specifies the filename template of non-initial output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
|
8795
|
+
*/
|
8796
|
+
cssChunkFilename?:
|
8797
|
+
| string
|
8798
|
+
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
8799
|
+
|
8800
|
+
/**
|
8801
|
+
* Specifies the filename template of output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
|
8802
|
+
*/
|
8803
|
+
cssFilename?:
|
8804
|
+
| string
|
8805
|
+
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
8806
|
+
|
8355
8807
|
/**
|
8356
8808
|
* Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
|
8357
8809
|
*/
|
@@ -8747,7 +9199,7 @@ declare class ProgressPlugin {
|
|
8747
9199
|
showModules?: boolean;
|
8748
9200
|
showDependencies?: boolean;
|
8749
9201
|
showActiveModules?: boolean;
|
8750
|
-
percentBy?: null | "
|
9202
|
+
percentBy?: null | "modules" | "dependencies" | "entries";
|
8751
9203
|
apply(compiler: Compiler | MultiCompiler): void;
|
8752
9204
|
static getReporter(
|
8753
9205
|
compiler: Compiler
|
@@ -8808,7 +9260,7 @@ declare interface ProgressPluginOptions {
|
|
8808
9260
|
/**
|
8809
9261
|
* Collect percent algorithm. By default it calculates by a median from modules, entries and dependencies percent.
|
8810
9262
|
*/
|
8811
|
-
percentBy?: null | "
|
9263
|
+
percentBy?: null | "modules" | "dependencies" | "entries";
|
8812
9264
|
|
8813
9265
|
/**
|
8814
9266
|
* Collect profile data for progress steps. Default: false.
|
@@ -8975,6 +9427,11 @@ declare interface RenderBootstrapContext {
|
|
8975
9427
|
*/
|
8976
9428
|
chunk: Chunk;
|
8977
9429
|
|
9430
|
+
/**
|
9431
|
+
* results of code generation
|
9432
|
+
*/
|
9433
|
+
codeGenerationResults: CodeGenerationResults;
|
9434
|
+
|
8978
9435
|
/**
|
8979
9436
|
* the runtime template
|
8980
9437
|
*/
|
@@ -9149,6 +9606,11 @@ declare interface ResolveContext {
|
|
9149
9606
|
* log function
|
9150
9607
|
*/
|
9151
9608
|
log?: (arg0: string) => void;
|
9609
|
+
|
9610
|
+
/**
|
9611
|
+
* yield result, if provided plugins can return several results
|
9612
|
+
*/
|
9613
|
+
yield?: (arg0: ResolveRequest) => void;
|
9152
9614
|
}
|
9153
9615
|
declare interface ResolveData {
|
9154
9616
|
contextInfo: ModuleFactoryCreateDataContextInfo;
|
@@ -9158,7 +9620,7 @@ declare interface ResolveData {
|
|
9158
9620
|
assertions?: Record<string, any>;
|
9159
9621
|
dependencies: ModuleDependency[];
|
9160
9622
|
dependencyType: string;
|
9161
|
-
createData:
|
9623
|
+
createData: Partial<NormalModuleCreateData & { settings: ModuleSettings }>;
|
9162
9624
|
fileDependencies: LazySet<string>;
|
9163
9625
|
missingDependencies: LazySet<string>;
|
9164
9626
|
contextDependencies: LazySet<string>;
|
@@ -9172,6 +9634,7 @@ declare interface ResolveOptionsTypes {
|
|
9172
9634
|
alias: AliasOption[];
|
9173
9635
|
fallback: AliasOption[];
|
9174
9636
|
aliasFields: Set<string | string[]>;
|
9637
|
+
extensionAlias: ExtensionAliasOption[];
|
9175
9638
|
cachePredicate: (arg0: ResolveRequest) => boolean;
|
9176
9639
|
cacheWithContext: boolean;
|
9177
9640
|
|
@@ -9270,6 +9733,11 @@ declare interface ResolveOptionsWebpackOptions {
|
|
9270
9733
|
*/
|
9271
9734
|
exportsFields?: string[];
|
9272
9735
|
|
9736
|
+
/**
|
9737
|
+
* An object which maps extension to extension aliases.
|
9738
|
+
*/
|
9739
|
+
extensionAlias?: { [index: string]: string | string[] };
|
9740
|
+
|
9273
9741
|
/**
|
9274
9742
|
* Extensions added to the request when trying to find the file.
|
9275
9743
|
*/
|
@@ -9328,7 +9796,7 @@ declare interface ResolveOptionsWebpackOptions {
|
|
9328
9796
|
/**
|
9329
9797
|
* Plugins for the resolver.
|
9330
9798
|
*/
|
9331
|
-
plugins?: ("..."
|
9799
|
+
plugins?: (ResolvePluginInstance | "...")[];
|
9332
9800
|
|
9333
9801
|
/**
|
9334
9802
|
* Prefer to resolve server-relative URLs (starting with '/') as absolute paths before falling back to resolve in 'resolve.roots'.
|
@@ -9927,31 +10395,35 @@ declare class RuntimeSpecMap<T> {
|
|
9927
10395
|
update(runtime?: any, fn?: any): void;
|
9928
10396
|
keys(): RuntimeSpec[];
|
9929
10397
|
values(): IterableIterator<T>;
|
9930
|
-
|
10398
|
+
get size(): number;
|
9931
10399
|
}
|
9932
10400
|
declare class RuntimeSpecSet {
|
9933
10401
|
constructor(iterable?: any);
|
9934
10402
|
add(runtime?: any): void;
|
9935
10403
|
has(runtime?: any): boolean;
|
10404
|
+
get size(): number;
|
9936
10405
|
[Symbol.iterator](): IterableIterator<RuntimeSpec>;
|
9937
|
-
readonly size: number;
|
9938
10406
|
}
|
9939
10407
|
declare abstract class RuntimeTemplate {
|
9940
10408
|
compilation: Compilation;
|
9941
10409
|
outputOptions: OutputNormalized;
|
9942
10410
|
requestShortener: RequestShortener;
|
10411
|
+
globalObject: string;
|
10412
|
+
contentHashReplacement: string;
|
9943
10413
|
isIIFE(): undefined | boolean;
|
9944
10414
|
isModule(): undefined | boolean;
|
9945
10415
|
supportsConst(): undefined | boolean;
|
9946
10416
|
supportsArrowFunction(): undefined | boolean;
|
10417
|
+
supportsOptionalChaining(): undefined | boolean;
|
9947
10418
|
supportsForOf(): undefined | boolean;
|
9948
10419
|
supportsDestructuring(): undefined | boolean;
|
9949
10420
|
supportsBigIntLiteral(): undefined | boolean;
|
9950
10421
|
supportsDynamicImport(): undefined | boolean;
|
9951
10422
|
supportsEcmaScriptModuleSyntax(): undefined | boolean;
|
9952
|
-
supportTemplateLiteral(): boolean;
|
10423
|
+
supportTemplateLiteral(): undefined | boolean;
|
9953
10424
|
returningFunction(returnValue?: any, args?: string): string;
|
9954
10425
|
basicFunction(args?: any, body?: any): string;
|
10426
|
+
concatenation(...args: (string | { expr: string })[]): string;
|
9955
10427
|
expressionFunction(expression?: any, args?: string): string;
|
9956
10428
|
emptyFunction(): "x => {}" | "function() {}";
|
9957
10429
|
destructureArray(items?: any, value?: any): string;
|
@@ -10328,6 +10800,24 @@ declare abstract class RuntimeTemplate {
|
|
10328
10800
|
*/
|
10329
10801
|
runtimeRequirements: Set<string>;
|
10330
10802
|
}): string;
|
10803
|
+
assetUrl(__0: {
|
10804
|
+
/**
|
10805
|
+
* the module
|
10806
|
+
*/
|
10807
|
+
module: Module;
|
10808
|
+
/**
|
10809
|
+
* the public path
|
10810
|
+
*/
|
10811
|
+
publicPath: string;
|
10812
|
+
/**
|
10813
|
+
* runtime
|
10814
|
+
*/
|
10815
|
+
runtime?: RuntimeSpec;
|
10816
|
+
/**
|
10817
|
+
* the code generation results
|
10818
|
+
*/
|
10819
|
+
codeGenerationResults: CodeGenerationResults;
|
10820
|
+
}): string;
|
10331
10821
|
}
|
10332
10822
|
declare abstract class RuntimeValue {
|
10333
10823
|
fn: (arg0: {
|
@@ -10336,7 +10826,7 @@ declare abstract class RuntimeValue {
|
|
10336
10826
|
readonly version?: string;
|
10337
10827
|
}) => CodeValuePrimitive;
|
10338
10828
|
options: true | RuntimeValueOptions;
|
10339
|
-
|
10829
|
+
get fileDependencies(): true | string[];
|
10340
10830
|
exec(
|
10341
10831
|
parser: JavascriptParser,
|
10342
10832
|
valueCacheVersions: Map<string, string | Set<string>>,
|
@@ -10369,6 +10859,9 @@ declare abstract class Serializer {
|
|
10369
10859
|
serialize(obj?: any, context?: any): any;
|
10370
10860
|
deserialize(value?: any, context?: any): any;
|
10371
10861
|
}
|
10862
|
+
type ServerOptionsHttps = SecureContextOptions &
|
10863
|
+
TlsOptions &
|
10864
|
+
ServerOptionsImport;
|
10372
10865
|
declare class SharePlugin {
|
10373
10866
|
constructor(options: SharePluginOptions);
|
10374
10867
|
|
@@ -10607,7 +11100,6 @@ declare abstract class SortableSet<T> extends Set<T> {
|
|
10607
11100
|
* Iterates over values in the set.
|
10608
11101
|
*/
|
10609
11102
|
[Symbol.iterator](): IterableIterator<T>;
|
10610
|
-
readonly [Symbol.toStringTag]: string;
|
10611
11103
|
}
|
10612
11104
|
declare class Source {
|
10613
11105
|
constructor();
|
@@ -10787,7 +11279,7 @@ declare abstract class StackedMap<K, V> {
|
|
10787
11279
|
asSet(): Set<K>;
|
10788
11280
|
asPairArray(): [K, Cell<V>][];
|
10789
11281
|
asMap(): Map<K, Cell<V>>;
|
10790
|
-
|
11282
|
+
get size(): number;
|
10791
11283
|
createChild(): StackedMap<K, V>;
|
10792
11284
|
}
|
10793
11285
|
type StartupRenderContext = RenderContext & { inlined: boolean };
|
@@ -10797,6 +11289,7 @@ type Statement =
|
|
10797
11289
|
| ClassDeclaration
|
10798
11290
|
| ExpressionStatement
|
10799
11291
|
| BlockStatement
|
11292
|
+
| StaticBlock
|
10800
11293
|
| EmptyStatement
|
10801
11294
|
| DebuggerStatement
|
10802
11295
|
| WithStatement
|
@@ -10816,9 +11309,9 @@ type Statement =
|
|
10816
11309
|
declare class Stats {
|
10817
11310
|
constructor(compilation: Compilation);
|
10818
11311
|
compilation: Compilation;
|
10819
|
-
|
10820
|
-
|
10821
|
-
|
11312
|
+
get hash(): string;
|
11313
|
+
get startTime(): any;
|
11314
|
+
get endTime(): any;
|
10822
11315
|
hasWarnings(): boolean;
|
10823
11316
|
hasErrors(): boolean;
|
10824
11317
|
toJson(options?: string | StatsOptions): StatsCompilation;
|
@@ -11164,7 +11657,7 @@ declare interface StatsOptions {
|
|
11164
11657
|
/**
|
11165
11658
|
* Add logging output.
|
11166
11659
|
*/
|
11167
|
-
logging?: boolean | "none" | "
|
11660
|
+
logging?: boolean | "none" | "error" | "warn" | "info" | "log" | "verbose";
|
11168
11661
|
|
11169
11662
|
/**
|
11170
11663
|
* Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions.
|
@@ -11333,15 +11826,40 @@ type StatsPrinterContext = KnownStatsPrinterContext & Record<string, any>;
|
|
11333
11826
|
type StatsProfile = KnownStatsProfile & Record<string, any>;
|
11334
11827
|
type StatsValue =
|
11335
11828
|
| boolean
|
11829
|
+
| StatsOptions
|
11336
11830
|
| "none"
|
11831
|
+
| "verbose"
|
11337
11832
|
| "summary"
|
11338
11833
|
| "errors-only"
|
11339
11834
|
| "errors-warnings"
|
11340
11835
|
| "minimal"
|
11341
11836
|
| "normal"
|
11342
|
-
| "detailed"
|
11343
|
-
|
11344
|
-
|
11837
|
+
| "detailed";
|
11838
|
+
declare class SyncModuleIdsPlugin {
|
11839
|
+
constructor(__0: {
|
11840
|
+
/**
|
11841
|
+
* path to file
|
11842
|
+
*/
|
11843
|
+
path: string;
|
11844
|
+
/**
|
11845
|
+
* context for module names
|
11846
|
+
*/
|
11847
|
+
context?: string;
|
11848
|
+
/**
|
11849
|
+
* selector for modules
|
11850
|
+
*/
|
11851
|
+
test: (arg0: Module) => boolean;
|
11852
|
+
/**
|
11853
|
+
* operation mode (defaults to merge)
|
11854
|
+
*/
|
11855
|
+
mode?: "read" | "merge" | "create" | "update";
|
11856
|
+
});
|
11857
|
+
|
11858
|
+
/**
|
11859
|
+
* Apply the plugin
|
11860
|
+
*/
|
11861
|
+
apply(compiler: Compiler): void;
|
11862
|
+
}
|
11345
11863
|
declare interface SyntheticDependencyLocation {
|
11346
11864
|
name: string;
|
11347
11865
|
index?: number;
|
@@ -11418,6 +11936,7 @@ declare interface UpdateHashContextGenerator {
|
|
11418
11936
|
module: NormalModule;
|
11419
11937
|
chunkGraph: ChunkGraph;
|
11420
11938
|
runtime: RuntimeSpec;
|
11939
|
+
runtimeTemplate?: RuntimeTemplate;
|
11421
11940
|
}
|
11422
11941
|
type UsageStateType = 0 | 1 | 2 | 3 | 4;
|
11423
11942
|
declare interface UserResolveOptions {
|
@@ -11431,6 +11950,11 @@ declare interface UserResolveOptions {
|
|
11431
11950
|
*/
|
11432
11951
|
fallback?: AliasOption[] | AliasOptions;
|
11433
11952
|
|
11953
|
+
/**
|
11954
|
+
* An object which maps extension to extension aliases
|
11955
|
+
*/
|
11956
|
+
extensionAlias?: ExtensionAliasOptions;
|
11957
|
+
|
11434
11958
|
/**
|
11435
11959
|
* A list of alias fields in description files
|
11436
11960
|
*/
|
@@ -11546,7 +12070,7 @@ declare interface UserResolveOptions {
|
|
11546
12070
|
restrictions?: (string | RegExp)[];
|
11547
12071
|
|
11548
12072
|
/**
|
11549
|
-
* Use only the sync
|
12073
|
+
* Use only the sync constraints of the file system calls
|
11550
12074
|
*/
|
11551
12075
|
useSyncFileSystemCalls?: boolean;
|
11552
12076
|
|
@@ -11666,6 +12190,32 @@ declare interface Watcher {
|
|
11666
12190
|
* get info about directories
|
11667
12191
|
*/
|
11668
12192
|
getContextTimeInfoEntries: () => Map<string, FileSystemInfoEntry | "ignore">;
|
12193
|
+
|
12194
|
+
/**
|
12195
|
+
* get info about timestamps and changes
|
12196
|
+
*/
|
12197
|
+
getInfo?: () => WatcherInfo;
|
12198
|
+
}
|
12199
|
+
declare interface WatcherInfo {
|
12200
|
+
/**
|
12201
|
+
* get current aggregated changes that have not yet send to callback
|
12202
|
+
*/
|
12203
|
+
changes: Set<string>;
|
12204
|
+
|
12205
|
+
/**
|
12206
|
+
* get current aggregated removals that have not yet send to callback
|
12207
|
+
*/
|
12208
|
+
removals: Set<string>;
|
12209
|
+
|
12210
|
+
/**
|
12211
|
+
* get info about files
|
12212
|
+
*/
|
12213
|
+
fileTimeInfoEntries: Map<string, FileSystemInfoEntry | "ignore">;
|
12214
|
+
|
12215
|
+
/**
|
12216
|
+
* get info about directories
|
12217
|
+
*/
|
12218
|
+
contextTimeInfoEntries: Map<string, FileSystemInfoEntry | "ignore">;
|
11669
12219
|
}
|
11670
12220
|
declare abstract class Watching {
|
11671
12221
|
startTime: null | number;
|
@@ -11883,6 +12433,7 @@ declare interface WebpackOptionsNormalized {
|
|
11883
12433
|
* Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
|
11884
12434
|
*/
|
11885
12435
|
externalsType?:
|
12436
|
+
| "import"
|
11886
12437
|
| "var"
|
11887
12438
|
| "module"
|
11888
12439
|
| "assign"
|
@@ -11893,6 +12444,7 @@ declare interface WebpackOptionsNormalized {
|
|
11893
12444
|
| "commonjs"
|
11894
12445
|
| "commonjs2"
|
11895
12446
|
| "commonjs-module"
|
12447
|
+
| "commonjs-static"
|
11896
12448
|
| "amd"
|
11897
12449
|
| "amd-require"
|
11898
12450
|
| "umd"
|
@@ -11900,7 +12452,6 @@ declare interface WebpackOptionsNormalized {
|
|
11900
12452
|
| "jsonp"
|
11901
12453
|
| "system"
|
11902
12454
|
| "promise"
|
11903
|
-
| "import"
|
11904
12455
|
| "script"
|
11905
12456
|
| "node-commonjs";
|
11906
12457
|
|
@@ -11925,7 +12476,7 @@ declare interface WebpackOptionsNormalized {
|
|
11925
12476
|
/**
|
11926
12477
|
* Enable production optimizations or development hints.
|
11927
12478
|
*/
|
11928
|
-
mode?: "
|
12479
|
+
mode?: "none" | "development" | "production";
|
11929
12480
|
|
11930
12481
|
/**
|
11931
12482
|
* Options affecting the normal modules (`NormalModuleFactory`).
|
@@ -12152,70 +12703,75 @@ declare namespace exports {
|
|
12152
12703
|
export let matchObject: (obj?: any, str?: any) => boolean;
|
12153
12704
|
}
|
12154
12705
|
export namespace RuntimeGlobals {
|
12155
|
-
export let require:
|
12156
|
-
export let requireScope:
|
12157
|
-
export let exports:
|
12158
|
-
export let thisAsExports:
|
12159
|
-
export let returnExportsFromRuntime:
|
12160
|
-
export let module:
|
12161
|
-
export let moduleId:
|
12162
|
-
export let moduleLoaded:
|
12163
|
-
export let publicPath:
|
12164
|
-
export let entryModuleId:
|
12165
|
-
export let moduleCache:
|
12166
|
-
export let moduleFactories:
|
12167
|
-
export let moduleFactoriesAddOnly:
|
12168
|
-
export let ensureChunk:
|
12169
|
-
export let ensureChunkHandlers:
|
12170
|
-
export let ensureChunkIncludeEntries:
|
12171
|
-
export let prefetchChunk:
|
12172
|
-
export let prefetchChunkHandlers:
|
12173
|
-
export let preloadChunk:
|
12174
|
-
export let preloadChunkHandlers:
|
12175
|
-
export let definePropertyGetters:
|
12176
|
-
export let makeNamespaceObject:
|
12177
|
-
export let createFakeNamespaceObject:
|
12178
|
-
export let compatGetDefaultExport:
|
12179
|
-
export let harmonyModuleDecorator:
|
12180
|
-
export let nodeModuleDecorator:
|
12181
|
-
export let getFullHash:
|
12182
|
-
export let wasmInstances:
|
12183
|
-
export let instantiateWasm:
|
12184
|
-
export let uncaughtErrorHandler:
|
12185
|
-
export let scriptNonce:
|
12186
|
-
export let loadScript:
|
12187
|
-
export let
|
12188
|
-
export let
|
12189
|
-
export let
|
12190
|
-
export let
|
12191
|
-
export let
|
12192
|
-
export let
|
12193
|
-
export let
|
12194
|
-
export let
|
12195
|
-
export let
|
12196
|
-
export let
|
12197
|
-
export let
|
12198
|
-
export let
|
12199
|
-
export let
|
12200
|
-
export let
|
12201
|
-
export let
|
12202
|
-
export let
|
12203
|
-
export let
|
12204
|
-
export let
|
12205
|
-
export let
|
12206
|
-
export let
|
12207
|
-
export let
|
12208
|
-
export let
|
12209
|
-
export let
|
12210
|
-
export let
|
12211
|
-
export let
|
12212
|
-
export let
|
12213
|
-
export let
|
12214
|
-
export let
|
12215
|
-
export let
|
12216
|
-
export let
|
12217
|
-
export let
|
12218
|
-
export let
|
12706
|
+
export let require: "__webpack_require__";
|
12707
|
+
export let requireScope: "__webpack_require__.*";
|
12708
|
+
export let exports: "__webpack_exports__";
|
12709
|
+
export let thisAsExports: "top-level-this-exports";
|
12710
|
+
export let returnExportsFromRuntime: "return-exports-from-runtime";
|
12711
|
+
export let module: "module";
|
12712
|
+
export let moduleId: "module.id";
|
12713
|
+
export let moduleLoaded: "module.loaded";
|
12714
|
+
export let publicPath: "__webpack_require__.p";
|
12715
|
+
export let entryModuleId: "__webpack_require__.s";
|
12716
|
+
export let moduleCache: "__webpack_require__.c";
|
12717
|
+
export let moduleFactories: "__webpack_require__.m";
|
12718
|
+
export let moduleFactoriesAddOnly: "__webpack_require__.m (add only)";
|
12719
|
+
export let ensureChunk: "__webpack_require__.e";
|
12720
|
+
export let ensureChunkHandlers: "__webpack_require__.f";
|
12721
|
+
export let ensureChunkIncludeEntries: "__webpack_require__.f (include entries)";
|
12722
|
+
export let prefetchChunk: "__webpack_require__.E";
|
12723
|
+
export let prefetchChunkHandlers: "__webpack_require__.F";
|
12724
|
+
export let preloadChunk: "__webpack_require__.G";
|
12725
|
+
export let preloadChunkHandlers: "__webpack_require__.H";
|
12726
|
+
export let definePropertyGetters: "__webpack_require__.d";
|
12727
|
+
export let makeNamespaceObject: "__webpack_require__.r";
|
12728
|
+
export let createFakeNamespaceObject: "__webpack_require__.t";
|
12729
|
+
export let compatGetDefaultExport: "__webpack_require__.n";
|
12730
|
+
export let harmonyModuleDecorator: "__webpack_require__.hmd";
|
12731
|
+
export let nodeModuleDecorator: "__webpack_require__.nmd";
|
12732
|
+
export let getFullHash: "__webpack_require__.h";
|
12733
|
+
export let wasmInstances: "__webpack_require__.w";
|
12734
|
+
export let instantiateWasm: "__webpack_require__.v";
|
12735
|
+
export let uncaughtErrorHandler: "__webpack_require__.oe";
|
12736
|
+
export let scriptNonce: "__webpack_require__.nc";
|
12737
|
+
export let loadScript: "__webpack_require__.l";
|
12738
|
+
export let createScript: "__webpack_require__.ts";
|
12739
|
+
export let createScriptUrl: "__webpack_require__.tu";
|
12740
|
+
export let getTrustedTypesPolicy: "__webpack_require__.tt";
|
12741
|
+
export let chunkName: "__webpack_require__.cn";
|
12742
|
+
export let runtimeId: "__webpack_require__.j";
|
12743
|
+
export let getChunkScriptFilename: "__webpack_require__.u";
|
12744
|
+
export let getChunkCssFilename: "__webpack_require__.k";
|
12745
|
+
export let hasCssModules: "has css modules";
|
12746
|
+
export let getChunkUpdateScriptFilename: "__webpack_require__.hu";
|
12747
|
+
export let getChunkUpdateCssFilename: "__webpack_require__.hk";
|
12748
|
+
export let startup: "__webpack_require__.x";
|
12749
|
+
export let startupNoDefault: "__webpack_require__.x (no default handler)";
|
12750
|
+
export let startupOnlyAfter: "__webpack_require__.x (only after)";
|
12751
|
+
export let startupOnlyBefore: "__webpack_require__.x (only before)";
|
12752
|
+
export let chunkCallback: "webpackChunk";
|
12753
|
+
export let startupEntrypoint: "__webpack_require__.X";
|
12754
|
+
export let onChunksLoaded: "__webpack_require__.O";
|
12755
|
+
export let externalInstallChunk: "__webpack_require__.C";
|
12756
|
+
export let interceptModuleExecution: "__webpack_require__.i";
|
12757
|
+
export let global: "__webpack_require__.g";
|
12758
|
+
export let shareScopeMap: "__webpack_require__.S";
|
12759
|
+
export let initializeSharing: "__webpack_require__.I";
|
12760
|
+
export let currentRemoteGetScope: "__webpack_require__.R";
|
12761
|
+
export let getUpdateManifestFilename: "__webpack_require__.hmrF";
|
12762
|
+
export let hmrDownloadManifest: "__webpack_require__.hmrM";
|
12763
|
+
export let hmrDownloadUpdateHandlers: "__webpack_require__.hmrC";
|
12764
|
+
export let hmrModuleData: "__webpack_require__.hmrD";
|
12765
|
+
export let hmrInvalidateModuleHandlers: "__webpack_require__.hmrI";
|
12766
|
+
export let hmrRuntimeStatePrefix: "__webpack_require__.hmrS";
|
12767
|
+
export let amdDefine: "__webpack_require__.amdD";
|
12768
|
+
export let amdOptions: "__webpack_require__.amdO";
|
12769
|
+
export let system: "__webpack_require__.System";
|
12770
|
+
export let hasOwnProperty: "__webpack_require__.o";
|
12771
|
+
export let systemContext: "__webpack_require__.y";
|
12772
|
+
export let baseURI: "__webpack_require__.b";
|
12773
|
+
export let relativeUrl: "__webpack_require__.U";
|
12774
|
+
export let asyncModule: "__webpack_require__.a";
|
12219
12775
|
}
|
12220
12776
|
export const UsageState: Readonly<{
|
12221
12777
|
Unused: 0;
|
@@ -12236,7 +12792,12 @@ declare namespace exports {
|
|
12236
12792
|
) => void;
|
12237
12793
|
}
|
12238
12794
|
export namespace dependencies {
|
12239
|
-
export {
|
12795
|
+
export {
|
12796
|
+
ModuleDependency,
|
12797
|
+
HarmonyImportDependency,
|
12798
|
+
ConstDependency,
|
12799
|
+
NullDependency
|
12800
|
+
};
|
12240
12801
|
}
|
12241
12802
|
export namespace ids {
|
12242
12803
|
export {
|
@@ -12347,7 +12908,7 @@ declare namespace exports {
|
|
12347
12908
|
export { ElectronTargetPlugin };
|
12348
12909
|
}
|
12349
12910
|
export namespace wasm {
|
12350
|
-
export { AsyncWebAssemblyModulesPlugin };
|
12911
|
+
export { AsyncWebAssemblyModulesPlugin, EnableWasmLoadingPlugin };
|
12351
12912
|
}
|
12352
12913
|
export namespace library {
|
12353
12914
|
export { AbstractLibraryPlugin, EnableLibraryPlugin };
|
@@ -12524,6 +13085,9 @@ declare namespace exports {
|
|
12524
13085
|
export namespace schemes {
|
12525
13086
|
export { HttpUriPlugin };
|
12526
13087
|
}
|
13088
|
+
export namespace ids {
|
13089
|
+
export { SyncModuleIdsPlugin };
|
13090
|
+
}
|
12527
13091
|
}
|
12528
13092
|
export type WebpackPluginFunction = (
|
12529
13093
|
this: Compiler,
|
@@ -12589,6 +13153,7 @@ declare namespace exports {
|
|
12589
13153
|
Entry,
|
12590
13154
|
EntryNormalized,
|
12591
13155
|
EntryObject,
|
13156
|
+
FileCacheOptions,
|
12592
13157
|
LibraryOptions,
|
12593
13158
|
ModuleOptions,
|
12594
13159
|
ResolveOptionsWebpackOptions as ResolveOptions,
|
@@ -12597,14 +13162,22 @@ declare namespace exports {
|
|
12597
13162
|
RuleSetRule,
|
12598
13163
|
RuleSetUse,
|
12599
13164
|
RuleSetUseItem,
|
13165
|
+
StatsOptions,
|
12600
13166
|
Configuration,
|
12601
13167
|
WebpackOptionsNormalized,
|
12602
13168
|
WebpackPluginInstance,
|
12603
13169
|
Asset,
|
12604
13170
|
AssetInfo,
|
13171
|
+
EntryOptions,
|
13172
|
+
PathData,
|
13173
|
+
AssetEmittedInfo,
|
12605
13174
|
MultiStats,
|
12606
13175
|
ParserState,
|
13176
|
+
ResolvePluginInstance,
|
13177
|
+
Resolver,
|
12607
13178
|
Watching,
|
13179
|
+
Argument,
|
13180
|
+
Problem,
|
12608
13181
|
StatsAsset,
|
12609
13182
|
StatsChunk,
|
12610
13183
|
StatsChunkGroup,
|