webpack 5.59.0 → 5.71.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 +1 -7
- 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 +10 -4
- package/lib/Cache.js +1 -1
- package/lib/CacheFacade.js +4 -11
- package/lib/Chunk.js +6 -3
- package/lib/ChunkGraph.js +1 -2
- package/lib/ChunkGroup.js +1 -1
- package/lib/CleanPlugin.js +81 -20
- package/lib/Compilation.js +179 -91
- package/lib/Compiler.js +86 -17
- 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/EntryOptionPlugin.js +2 -0
- package/lib/ErrorHelpers.js +2 -2
- package/lib/EvalDevToolModulePlugin.js +16 -1
- package/lib/EvalSourceMapDevToolPlugin.js +18 -1
- package/lib/ExportsInfo.js +4 -4
- package/lib/ExternalModule.js +94 -54
- package/lib/ExternalModuleFactoryPlugin.js +5 -5
- package/lib/FileSystemInfo.js +89 -44
- 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 +27 -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 +10 -0
- package/lib/NormalModule.js +41 -26
- 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 +77 -1
- package/lib/RuntimeTemplate.js +114 -2
- package/lib/Template.js +2 -1
- package/lib/TemplatedPathPlugin.js +48 -23
- package/lib/WatchIgnorePlugin.js +19 -7
- package/lib/Watching.js +33 -19
- package/lib/WebpackOptionsApply.js +57 -11
- package/lib/asset/AssetGenerator.js +193 -63
- package/lib/asset/AssetModulesPlugin.js +3 -0
- package/lib/asset/RawDataUrlModule.js +148 -0
- package/lib/async-modules/AwaitDependenciesInitFragment.js +4 -4
- package/lib/buildChunkGraph.js +36 -6
- package/lib/cache/PackFileCacheStrategy.js +7 -4
- 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 +115 -19
- package/lib/config/normalization.js +9 -0
- package/lib/config/target.js +10 -0
- package/lib/container/ContainerEntryModule.js +8 -5
- package/lib/container/FallbackModule.js +4 -4
- package/lib/container/RemoteModule.js +4 -2
- package/lib/css/CssExportsGenerator.js +139 -0
- package/lib/css/CssGenerator.js +109 -0
- package/lib/css/CssLoadingRuntimeModule.js +440 -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 +5 -3
- package/lib/dependencies/CommonJsRequireContextDependency.js +5 -1
- package/lib/dependencies/ContextDependency.js +1 -0
- package/lib/dependencies/ContextDependencyHelpers.js +3 -3
- package/lib/dependencies/ContextDependencyTemplateAsRequireCall.js +4 -1
- package/lib/dependencies/ContextElementDependency.js +41 -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 +95 -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/LoaderPlugin.js +4 -2
- package/lib/dependencies/RequireContextDependency.js +0 -16
- package/lib/dependencies/RequireEnsureDependency.js +2 -2
- package/lib/dependencies/URLDependency.js +3 -8
- package/lib/dependencies/URLPlugin.js +1 -1
- 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 +25 -11
- 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 +13 -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 +82 -48
- package/lib/javascript/StartupHelpers.js +7 -30
- 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 +21 -9
- package/lib/optimize/ModuleConcatenationPlugin.js +5 -2
- package/lib/optimize/SplitChunksPlugin.js +8 -1
- package/lib/runtime/AsyncModuleRuntimeModule.js +27 -17
- 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/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/ShareRuntimeModule.js +1 -1
- package/lib/sharing/utils.js +1 -1
- package/lib/stats/DefaultStatsFactoryPlugin.js +113 -68
- package/lib/stats/DefaultStatsPrinterPlugin.js +89 -24
- 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/web/JsonpChunkLoadingRuntimeModule.js +20 -9
- 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 +23 -28
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +254 -29
- 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 +628 -179
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;
|
@@ -459,9 +474,10 @@ declare abstract class BasicEvaluatedExpression {
|
|
459
474
|
prefix?: BasicEvaluatedExpression;
|
460
475
|
postfix?: BasicEvaluatedExpression;
|
461
476
|
wrappedInnerExpressions: any;
|
462
|
-
identifier?: string;
|
477
|
+
identifier?: string | VariableInfoInterface;
|
463
478
|
rootInfo: VariableInfoInterface;
|
464
479
|
getMembers: () => string[];
|
480
|
+
getMembersOptionals: () => boolean[];
|
465
481
|
expression: NodeEstreeIndex;
|
466
482
|
isUnknown(): boolean;
|
467
483
|
isNull(): boolean;
|
@@ -513,7 +529,8 @@ declare abstract class BasicEvaluatedExpression {
|
|
513
529
|
setIdentifier(
|
514
530
|
identifier?: any,
|
515
531
|
rootInfo?: any,
|
516
|
-
getMembers?: any
|
532
|
+
getMembers?: any,
|
533
|
+
getMembersOptionals?: any
|
517
534
|
): BasicEvaluatedExpression;
|
518
535
|
setWrapped(
|
519
536
|
prefix?: any,
|
@@ -649,7 +666,7 @@ declare interface CacheGroupsContext {
|
|
649
666
|
moduleGraph: ModuleGraph;
|
650
667
|
chunkGraph: ChunkGraph;
|
651
668
|
}
|
652
|
-
type CacheOptionsNormalized = false |
|
669
|
+
type CacheOptionsNormalized = false | FileCacheOptions | MemoryCacheOptions;
|
653
670
|
declare class CachedSource extends Source {
|
654
671
|
constructor(source: Source);
|
655
672
|
constructor(source: Source | (() => Source), cachedData?: any);
|
@@ -666,25 +683,26 @@ declare interface CallExpressionInfo {
|
|
666
683
|
getCalleeMembers: () => string[];
|
667
684
|
name: string;
|
668
685
|
getMembers: () => string[];
|
686
|
+
getMembersOptionals: () => boolean[];
|
669
687
|
}
|
670
688
|
declare interface CallbackAsyncQueue<T> {
|
671
|
-
(err?: WebpackError, result?: T): any;
|
689
|
+
(err?: null | WebpackError, result?: T): any;
|
672
690
|
}
|
673
691
|
declare interface CallbackCache<T> {
|
674
|
-
(err?: WebpackError, result?: T): void;
|
692
|
+
(err?: null | WebpackError, result?: T): void;
|
675
693
|
}
|
676
694
|
declare interface CallbackFunction<T> {
|
677
|
-
(err?: Error, result?: T): any;
|
695
|
+
(err?: null | Error, result?: T): any;
|
678
696
|
}
|
679
697
|
declare interface CallbackNormalErrorCache<T> {
|
680
|
-
(err?: Error, result?: T): void;
|
698
|
+
(err?: null | Error, result?: T): void;
|
681
699
|
}
|
682
700
|
declare interface CallbackWebpack<T> {
|
683
701
|
(err?: Error, stats?: T): void;
|
684
702
|
}
|
685
703
|
type Cell<T> = undefined | T;
|
686
704
|
declare class Chunk {
|
687
|
-
constructor(name?: string);
|
705
|
+
constructor(name?: string, backCompat?: boolean);
|
688
706
|
id: null | string | number;
|
689
707
|
ids: null | (string | number)[];
|
690
708
|
debugId: number;
|
@@ -695,6 +713,10 @@ declare class Chunk {
|
|
695
713
|
| null
|
696
714
|
| string
|
697
715
|
| ((arg0: PathData, arg1?: AssetInfo) => string);
|
716
|
+
cssFilenameTemplate:
|
717
|
+
| null
|
718
|
+
| string
|
719
|
+
| ((arg0: PathData, arg1?: AssetInfo) => string);
|
698
720
|
runtime: RuntimeSpec;
|
699
721
|
files: Set<string>;
|
700
722
|
auxiliaryFiles: Set<string>;
|
@@ -1030,6 +1052,11 @@ declare abstract class ChunkGroup {
|
|
1030
1052
|
}
|
1031
1053
|
type ChunkGroupOptions = RawChunkGroupOptions & { name?: string };
|
1032
1054
|
declare interface ChunkHashContext {
|
1055
|
+
/**
|
1056
|
+
* results of code generation
|
1057
|
+
*/
|
1058
|
+
codeGenerationResults: CodeGenerationResults;
|
1059
|
+
|
1033
1060
|
/**
|
1034
1061
|
* the runtime template
|
1035
1062
|
*/
|
@@ -1210,6 +1237,16 @@ declare interface CodeGenerationContext {
|
|
1210
1237
|
* when in concatenated module, information about other concatenated modules
|
1211
1238
|
*/
|
1212
1239
|
concatenationScope?: ConcatenationScope;
|
1240
|
+
|
1241
|
+
/**
|
1242
|
+
* code generation results of other modules (need to have a codeGenerationDependency to use that)
|
1243
|
+
*/
|
1244
|
+
codeGenerationResults: CodeGenerationResults;
|
1245
|
+
|
1246
|
+
/**
|
1247
|
+
* the compilation
|
1248
|
+
*/
|
1249
|
+
compilation?: Compilation;
|
1213
1250
|
}
|
1214
1251
|
declare interface CodeGenerationResult {
|
1215
1252
|
/**
|
@@ -1386,22 +1423,22 @@ declare class Compilation {
|
|
1386
1423
|
additionalChunkAssets: FakeHook<
|
1387
1424
|
Pick<
|
1388
1425
|
AsyncSeriesHook<[Set<Chunk>]>,
|
1389
|
-
"
|
1426
|
+
"name" | "tap" | "tapAsync" | "tapPromise"
|
1390
1427
|
>
|
1391
1428
|
>;
|
1392
1429
|
additionalAssets: FakeHook<
|
1393
|
-
Pick<AsyncSeriesHook<[]>, "
|
1430
|
+
Pick<AsyncSeriesHook<[]>, "name" | "tap" | "tapAsync" | "tapPromise">
|
1394
1431
|
>;
|
1395
1432
|
optimizeChunkAssets: FakeHook<
|
1396
1433
|
Pick<
|
1397
1434
|
AsyncSeriesHook<[Set<Chunk>]>,
|
1398
|
-
"
|
1435
|
+
"name" | "tap" | "tapAsync" | "tapPromise"
|
1399
1436
|
>
|
1400
1437
|
>;
|
1401
1438
|
afterOptimizeChunkAssets: FakeHook<
|
1402
1439
|
Pick<
|
1403
1440
|
AsyncSeriesHook<[Set<Chunk>]>,
|
1404
|
-
"
|
1441
|
+
"name" | "tap" | "tapAsync" | "tapPromise"
|
1405
1442
|
>
|
1406
1443
|
>;
|
1407
1444
|
optimizeAssets: AsyncSeriesHook<
|
@@ -1525,7 +1562,7 @@ declare class Compilation {
|
|
1525
1562
|
getLogger(name: string | (() => string)): WebpackLogger;
|
1526
1563
|
addModule(
|
1527
1564
|
module: Module,
|
1528
|
-
callback: (err?: WebpackError, result?: Module) => void
|
1565
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
1529
1566
|
): void;
|
1530
1567
|
|
1531
1568
|
/**
|
@@ -1543,21 +1580,21 @@ declare class Compilation {
|
|
1543
1580
|
*/
|
1544
1581
|
buildModule(
|
1545
1582
|
module: Module,
|
1546
|
-
callback: (err?: WebpackError, result?: Module) => void
|
1583
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
1547
1584
|
): void;
|
1548
1585
|
processModuleDependencies(
|
1549
1586
|
module: Module,
|
1550
|
-
callback: (err?: WebpackError, result?: Module) => void
|
1587
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
1551
1588
|
): void;
|
1552
1589
|
processModuleDependenciesNonRecursive(module: Module): void;
|
1553
1590
|
handleModuleCreation(
|
1554
1591
|
__0: HandleModuleCreationOptions,
|
1555
|
-
callback: (err?: WebpackError, result?: Module) => void
|
1592
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
1556
1593
|
): void;
|
1557
1594
|
addModuleChain(
|
1558
1595
|
context: string,
|
1559
1596
|
dependency: Dependency,
|
1560
|
-
callback: (err?: WebpackError, result?: Module) => void
|
1597
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
1561
1598
|
): void;
|
1562
1599
|
addModuleTree(
|
1563
1600
|
__0: {
|
@@ -1574,27 +1611,27 @@ declare class Compilation {
|
|
1574
1611
|
*/
|
1575
1612
|
contextInfo?: Partial<ModuleFactoryCreateDataContextInfo>;
|
1576
1613
|
},
|
1577
|
-
callback: (err?: WebpackError, result?: Module) => void
|
1614
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
1578
1615
|
): void;
|
1579
1616
|
addEntry(
|
1580
1617
|
context: string,
|
1581
1618
|
entry: Dependency,
|
1582
1619
|
optionsOrName: string | EntryOptions,
|
1583
|
-
callback: (err?: WebpackError, result?: Module) => void
|
1620
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
1584
1621
|
): void;
|
1585
1622
|
addInclude(
|
1586
1623
|
context: string,
|
1587
1624
|
dependency: Dependency,
|
1588
1625
|
options: EntryOptions,
|
1589
|
-
callback: (err?: WebpackError, result?: Module) => void
|
1626
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
1590
1627
|
): void;
|
1591
1628
|
rebuildModule(
|
1592
1629
|
module: Module,
|
1593
|
-
callback: (err?: WebpackError, result?: Module) => void
|
1630
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
1594
1631
|
): void;
|
1595
1632
|
finish(callback?: any): void;
|
1596
1633
|
unseal(): void;
|
1597
|
-
seal(callback: (err?: WebpackError) => void): void;
|
1634
|
+
seal(callback: (err?: null | WebpackError) => void): void;
|
1598
1635
|
reportDependencyErrorsAndWarnings(
|
1599
1636
|
module: Module,
|
1600
1637
|
blocks: DependenciesBlock[]
|
@@ -1627,11 +1664,15 @@ declare class Compilation {
|
|
1627
1664
|
module: RuntimeModule,
|
1628
1665
|
chunkGraph?: ChunkGraph
|
1629
1666
|
): void;
|
1667
|
+
|
1668
|
+
/**
|
1669
|
+
* If `module` is passed, `loc` and `request` must also be passed.
|
1670
|
+
*/
|
1630
1671
|
addChunkInGroup(
|
1631
1672
|
groupOptions: string | ChunkGroupOptions,
|
1632
|
-
module
|
1633
|
-
loc
|
1634
|
-
request
|
1673
|
+
module?: Module,
|
1674
|
+
loc?: SyntheticDependencyLocation | RealDependencyLocation,
|
1675
|
+
request?: string
|
1635
1676
|
): ChunkGroup;
|
1636
1677
|
addAsyncEntrypoint(
|
1637
1678
|
options: EntryOptions,
|
@@ -1682,7 +1723,7 @@ declare class Compilation {
|
|
1682
1723
|
clearAssets(): void;
|
1683
1724
|
createModuleAssets(): void;
|
1684
1725
|
getRenderManifest(options: RenderManifestOptions): RenderManifestEntry[];
|
1685
|
-
createChunkAssets(callback: (err?: WebpackError) => void): void;
|
1726
|
+
createChunkAssets(callback: (err?: null | WebpackError) => void): void;
|
1686
1727
|
getPath(
|
1687
1728
|
filename: string | ((arg0: PathData, arg1?: AssetInfo) => string),
|
1688
1729
|
data?: PathData
|
@@ -1718,17 +1759,20 @@ declare class Compilation {
|
|
1718
1759
|
executeModule(
|
1719
1760
|
module: Module,
|
1720
1761
|
options: ExecuteModuleOptions,
|
1721
|
-
callback: (err?: WebpackError, result?: ExecuteModuleResult) => void
|
1762
|
+
callback: (err?: null | WebpackError, result?: ExecuteModuleResult) => void
|
1722
1763
|
): void;
|
1723
1764
|
checkConstraints(): void;
|
1724
1765
|
factorizeModule: {
|
1725
1766
|
(
|
1726
1767
|
options: FactorizeModuleOptions & { factoryResult?: false },
|
1727
|
-
callback: (err?: WebpackError, result?: Module) => void
|
1768
|
+
callback: (err?: null | WebpackError, result?: Module) => void
|
1728
1769
|
): void;
|
1729
1770
|
(
|
1730
1771
|
options: FactorizeModuleOptions & { factoryResult: true },
|
1731
|
-
callback: (
|
1772
|
+
callback: (
|
1773
|
+
err?: null | WebpackError,
|
1774
|
+
result?: ModuleFactoryResult
|
1775
|
+
) => void
|
1732
1776
|
): void;
|
1733
1777
|
};
|
1734
1778
|
|
@@ -1850,7 +1894,7 @@ declare interface CompilationParams {
|
|
1850
1894
|
contextModuleFactory: ContextModuleFactory;
|
1851
1895
|
}
|
1852
1896
|
declare class Compiler {
|
1853
|
-
constructor(context: string);
|
1897
|
+
constructor(context: string, options?: WebpackOptionsNormalized);
|
1854
1898
|
hooks: Readonly<{
|
1855
1899
|
initialize: SyncHook<[]>;
|
1856
1900
|
shouldEmit: SyncBailHook<[Compilation], boolean>;
|
@@ -1871,6 +1915,8 @@ declare class Compiler {
|
|
1871
1915
|
make: AsyncParallelHook<[Compilation]>;
|
1872
1916
|
finishMake: AsyncParallelHook<[Compilation]>;
|
1873
1917
|
afterCompile: AsyncSeriesHook<[Compilation]>;
|
1918
|
+
readRecords: AsyncSeriesHook<[]>;
|
1919
|
+
emitRecords: AsyncSeriesHook<[]>;
|
1874
1920
|
watchRun: AsyncSeriesHook<[Compiler]>;
|
1875
1921
|
failed: SyncHook<[Error]>;
|
1876
1922
|
invalid: SyncHook<[null | string, number]>;
|
@@ -1926,7 +1972,11 @@ declare class Compiler {
|
|
1926
1972
|
watch(watchOptions: WatchOptions, handler: CallbackFunction<Stats>): Watching;
|
1927
1973
|
run(callback: CallbackFunction<Stats>): void;
|
1928
1974
|
runAsChild(
|
1929
|
-
callback: (
|
1975
|
+
callback: (
|
1976
|
+
err?: null | Error,
|
1977
|
+
entries?: Chunk[],
|
1978
|
+
compilation?: Compilation
|
1979
|
+
) => any
|
1930
1980
|
): void;
|
1931
1981
|
purgeInputFileSystem(): void;
|
1932
1982
|
emitAssets(compilation: Compilation, callback: CallbackFunction<void>): void;
|
@@ -2021,7 +2071,7 @@ declare interface Configuration {
|
|
2021
2071
|
/**
|
2022
2072
|
* Cache generated modules and chunks to improve performance for multiple incremental builds.
|
2023
2073
|
*/
|
2024
|
-
cache?: boolean |
|
2074
|
+
cache?: boolean | FileCacheOptions | MemoryCacheOptions;
|
2025
2075
|
|
2026
2076
|
/**
|
2027
2077
|
* 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 +2128,7 @@ declare interface Configuration {
|
|
2078
2128
|
* Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
|
2079
2129
|
*/
|
2080
2130
|
externalsType?:
|
2131
|
+
| "import"
|
2081
2132
|
| "var"
|
2082
2133
|
| "module"
|
2083
2134
|
| "assign"
|
@@ -2088,6 +2139,7 @@ declare interface Configuration {
|
|
2088
2139
|
| "commonjs"
|
2089
2140
|
| "commonjs2"
|
2090
2141
|
| "commonjs-module"
|
2142
|
+
| "commonjs-static"
|
2091
2143
|
| "amd"
|
2092
2144
|
| "amd-require"
|
2093
2145
|
| "umd"
|
@@ -2095,7 +2147,6 @@ declare interface Configuration {
|
|
2095
2147
|
| "jsonp"
|
2096
2148
|
| "system"
|
2097
2149
|
| "promise"
|
2098
|
-
| "import"
|
2099
2150
|
| "script"
|
2100
2151
|
| "node-commonjs";
|
2101
2152
|
|
@@ -2134,7 +2185,7 @@ declare interface Configuration {
|
|
2134
2185
|
/**
|
2135
2186
|
* Enable production optimizations or development hints.
|
2136
2187
|
*/
|
2137
|
-
mode?: "
|
2188
|
+
mode?: "none" | "development" | "production";
|
2138
2189
|
|
2139
2190
|
/**
|
2140
2191
|
* Options affecting the normal modules (`NormalModuleFactory`).
|
@@ -2219,15 +2270,15 @@ declare interface Configuration {
|
|
2219
2270
|
*/
|
2220
2271
|
stats?:
|
2221
2272
|
| boolean
|
2273
|
+
| StatsOptions
|
2222
2274
|
| "none"
|
2275
|
+
| "verbose"
|
2223
2276
|
| "summary"
|
2224
2277
|
| "errors-only"
|
2225
2278
|
| "errors-warnings"
|
2226
2279
|
| "minimal"
|
2227
2280
|
| "normal"
|
2228
|
-
| "detailed"
|
2229
|
-
| "verbose"
|
2230
|
-
| StatsOptions;
|
2281
|
+
| "detailed";
|
2231
2282
|
|
2232
2283
|
/**
|
2233
2284
|
* Environment to build for. An array of environments to build for all of them when possible.
|
@@ -2411,7 +2462,7 @@ declare interface ContainerReferencePluginOptions {
|
|
2411
2462
|
shareScope?: string;
|
2412
2463
|
}
|
2413
2464
|
declare abstract class ContextElementDependency extends ModuleDependency {
|
2414
|
-
referencedExports
|
2465
|
+
referencedExports?: string[][];
|
2415
2466
|
}
|
2416
2467
|
declare class ContextExclusionPlugin {
|
2417
2468
|
constructor(negativeMatcher: RegExp);
|
@@ -2434,9 +2485,9 @@ declare interface ContextHash {
|
|
2434
2485
|
symlinks?: Set<string>;
|
2435
2486
|
}
|
2436
2487
|
type ContextMode =
|
2488
|
+
| "weak"
|
2437
2489
|
| "sync"
|
2438
2490
|
| "eager"
|
2439
|
-
| "weak"
|
2440
2491
|
| "async-weak"
|
2441
2492
|
| "lazy"
|
2442
2493
|
| "lazy-once";
|
@@ -2448,7 +2499,7 @@ declare abstract class ContextModuleFactory extends ModuleFactory {
|
|
2448
2499
|
alternatives: FakeHook<
|
2449
2500
|
Pick<
|
2450
2501
|
AsyncSeriesWaterfallHook<[any[]]>,
|
2451
|
-
"
|
2502
|
+
"name" | "tap" | "tapAsync" | "tapPromise"
|
2452
2503
|
>
|
2453
2504
|
>;
|
2454
2505
|
alternativeRequests: AsyncSeriesWaterfallHook<
|
@@ -2459,7 +2510,10 @@ declare abstract class ContextModuleFactory extends ModuleFactory {
|
|
2459
2510
|
resolveDependencies(
|
2460
2511
|
fs: InputFileSystem,
|
2461
2512
|
options: ContextModuleOptions,
|
2462
|
-
callback: (
|
2513
|
+
callback: (
|
2514
|
+
err?: null | Error,
|
2515
|
+
dependencies?: ContextElementDependency[]
|
2516
|
+
) => any
|
2463
2517
|
): void;
|
2464
2518
|
}
|
2465
2519
|
|
@@ -2480,7 +2534,7 @@ declare interface ContextModuleOptions {
|
|
2480
2534
|
* exports referenced from modules (won't be mangled)
|
2481
2535
|
*/
|
2482
2536
|
referencedExports?: string[][];
|
2483
|
-
resource: string;
|
2537
|
+
resource: string | false | string[];
|
2484
2538
|
resourceQuery?: string;
|
2485
2539
|
resourceFragment?: string;
|
2486
2540
|
resolveOptions: any;
|
@@ -2509,6 +2563,16 @@ declare interface ContextTimestampAndHash {
|
|
2509
2563
|
}
|
2510
2564
|
type CreateStatsOptionsContext = KnownCreateStatsOptionsContext &
|
2511
2565
|
Record<string, any>;
|
2566
|
+
|
2567
|
+
/**
|
2568
|
+
* Options for css handling.
|
2569
|
+
*/
|
2570
|
+
declare interface CssExperimentOptions {
|
2571
|
+
/**
|
2572
|
+
* Avoid generating and loading a stylesheet and only embed exports from css into output javascript files.
|
2573
|
+
*/
|
2574
|
+
exportsOnly?: boolean;
|
2575
|
+
}
|
2512
2576
|
type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration;
|
2513
2577
|
declare class DefinePlugin {
|
2514
2578
|
/**
|
@@ -2575,6 +2639,13 @@ declare class Dependency {
|
|
2575
2639
|
readonly type: string;
|
2576
2640
|
readonly category: string;
|
2577
2641
|
loc: DependencyLocation;
|
2642
|
+
setLoc(
|
2643
|
+
startLine?: any,
|
2644
|
+
startColumn?: any,
|
2645
|
+
endLine?: any,
|
2646
|
+
endColumn?: any
|
2647
|
+
): void;
|
2648
|
+
getContext(): undefined | string;
|
2578
2649
|
getResourceIdentifier(): null | string;
|
2579
2650
|
couldAffectReferencingModule(): boolean | typeof TRANSITIVE;
|
2580
2651
|
|
@@ -2690,6 +2761,11 @@ declare interface DependencyTemplateContext {
|
|
2690
2761
|
* when in a concatenated module, information about other concatenated modules
|
2691
2762
|
*/
|
2692
2763
|
concatenationScope?: ConcatenationScope;
|
2764
|
+
|
2765
|
+
/**
|
2766
|
+
* the code generation results
|
2767
|
+
*/
|
2768
|
+
codeGenerationResults: CodeGenerationResults;
|
2693
2769
|
}
|
2694
2770
|
declare abstract class DependencyTemplates {
|
2695
2771
|
get(dependency: DependencyConstructor): DependencyTemplate;
|
@@ -2711,8 +2787,58 @@ declare class DeterministicChunkIdsPlugin {
|
|
2711
2787
|
apply(compiler: Compiler): void;
|
2712
2788
|
}
|
2713
2789
|
declare class DeterministicModuleIdsPlugin {
|
2714
|
-
constructor(options?:
|
2715
|
-
|
2790
|
+
constructor(options?: {
|
2791
|
+
/**
|
2792
|
+
* context relative to which module identifiers are computed
|
2793
|
+
*/
|
2794
|
+
context?: string;
|
2795
|
+
/**
|
2796
|
+
* selector function for modules
|
2797
|
+
*/
|
2798
|
+
test?: (arg0: Module) => boolean;
|
2799
|
+
/**
|
2800
|
+
* maximum id length in digits (used as starting point)
|
2801
|
+
*/
|
2802
|
+
maxLength?: number;
|
2803
|
+
/**
|
2804
|
+
* hash salt for ids
|
2805
|
+
*/
|
2806
|
+
salt?: number;
|
2807
|
+
/**
|
2808
|
+
* do not increase the maxLength to find an optimal id space size
|
2809
|
+
*/
|
2810
|
+
fixedLength?: boolean;
|
2811
|
+
/**
|
2812
|
+
* throw an error when id conflicts occur (instead of rehashing)
|
2813
|
+
*/
|
2814
|
+
failOnConflict?: boolean;
|
2815
|
+
});
|
2816
|
+
options: {
|
2817
|
+
/**
|
2818
|
+
* context relative to which module identifiers are computed
|
2819
|
+
*/
|
2820
|
+
context?: string;
|
2821
|
+
/**
|
2822
|
+
* selector function for modules
|
2823
|
+
*/
|
2824
|
+
test?: (arg0: Module) => boolean;
|
2825
|
+
/**
|
2826
|
+
* maximum id length in digits (used as starting point)
|
2827
|
+
*/
|
2828
|
+
maxLength?: number;
|
2829
|
+
/**
|
2830
|
+
* hash salt for ids
|
2831
|
+
*/
|
2832
|
+
salt?: number;
|
2833
|
+
/**
|
2834
|
+
* do not increase the maxLength to find an optimal id space size
|
2835
|
+
*/
|
2836
|
+
fixedLength?: boolean;
|
2837
|
+
/**
|
2838
|
+
* throw an error when id conflicts occur (instead of rehashing)
|
2839
|
+
*/
|
2840
|
+
failOnConflict?: boolean;
|
2841
|
+
};
|
2716
2842
|
|
2717
2843
|
/**
|
2718
2844
|
* Apply the plugin
|
@@ -3017,6 +3143,16 @@ declare abstract class EntryDependency extends ModuleDependency {}
|
|
3017
3143
|
* An object with entry point description.
|
3018
3144
|
*/
|
3019
3145
|
declare interface EntryDescription {
|
3146
|
+
/**
|
3147
|
+
* Enable/disable creating async chunks that are loaded on demand.
|
3148
|
+
*/
|
3149
|
+
asyncChunks?: boolean;
|
3150
|
+
|
3151
|
+
/**
|
3152
|
+
* Base uri for this entry.
|
3153
|
+
*/
|
3154
|
+
baseUri?: string;
|
3155
|
+
|
3020
3156
|
/**
|
3021
3157
|
* 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
3158
|
*/
|
@@ -3067,6 +3203,16 @@ declare interface EntryDescription {
|
|
3067
3203
|
* An object with entry point description.
|
3068
3204
|
*/
|
3069
3205
|
declare interface EntryDescriptionNormalized {
|
3206
|
+
/**
|
3207
|
+
* Enable/disable creating async chunks that are loaded on demand.
|
3208
|
+
*/
|
3209
|
+
asyncChunks?: boolean;
|
3210
|
+
|
3211
|
+
/**
|
3212
|
+
* Base uri for this entry.
|
3213
|
+
*/
|
3214
|
+
baseUri?: string;
|
3215
|
+
|
3070
3216
|
/**
|
3071
3217
|
* 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
3218
|
*/
|
@@ -3229,6 +3375,16 @@ declare interface Environment {
|
|
3229
3375
|
* The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from '...').
|
3230
3376
|
*/
|
3231
3377
|
module?: boolean;
|
3378
|
+
|
3379
|
+
/**
|
3380
|
+
* The environment supports optional chaining ('obj?.a' or 'obj?.()').
|
3381
|
+
*/
|
3382
|
+
optionalChaining?: boolean;
|
3383
|
+
|
3384
|
+
/**
|
3385
|
+
* The environment supports template literals.
|
3386
|
+
*/
|
3387
|
+
templateLiteral?: boolean;
|
3232
3388
|
}
|
3233
3389
|
declare class EnvironmentPlugin {
|
3234
3390
|
constructor(...keys: any[]);
|
@@ -3297,14 +3453,14 @@ type Experiments = ExperimentsCommon & ExperimentsExtra;
|
|
3297
3453
|
*/
|
3298
3454
|
declare interface ExperimentsCommon {
|
3299
3455
|
/**
|
3300
|
-
*
|
3456
|
+
* Support WebAssembly as asynchronous EcmaScript Module.
|
3301
3457
|
*/
|
3302
|
-
|
3458
|
+
asyncWebAssembly?: boolean;
|
3303
3459
|
|
3304
3460
|
/**
|
3305
|
-
*
|
3461
|
+
* Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.
|
3306
3462
|
*/
|
3307
|
-
|
3463
|
+
backCompat?: boolean;
|
3308
3464
|
|
3309
3465
|
/**
|
3310
3466
|
* Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.
|
@@ -3317,7 +3473,7 @@ declare interface ExperimentsCommon {
|
|
3317
3473
|
futureDefaults?: boolean;
|
3318
3474
|
|
3319
3475
|
/**
|
3320
|
-
* Enable module
|
3476
|
+
* Enable module layers.
|
3321
3477
|
*/
|
3322
3478
|
layers?: boolean;
|
3323
3479
|
|
@@ -3346,6 +3502,11 @@ declare interface ExperimentsExtra {
|
|
3346
3502
|
*/
|
3347
3503
|
buildHttp?: HttpUriOptions | (string | RegExp | ((uri: string) => boolean))[];
|
3348
3504
|
|
3505
|
+
/**
|
3506
|
+
* Enable css support.
|
3507
|
+
*/
|
3508
|
+
css?: boolean | CssExperimentOptions;
|
3509
|
+
|
3349
3510
|
/**
|
3350
3511
|
* Compile entrypoints and import()s only when they are accessed.
|
3351
3512
|
*/
|
@@ -3362,6 +3523,11 @@ declare interface ExperimentsNormalizedExtra {
|
|
3362
3523
|
*/
|
3363
3524
|
buildHttp?: HttpUriOptions;
|
3364
3525
|
|
3526
|
+
/**
|
3527
|
+
* Enable css support.
|
3528
|
+
*/
|
3529
|
+
css?: CssExperimentOptions;
|
3530
|
+
|
3365
3531
|
/**
|
3366
3532
|
* Compile entrypoints and import()s only when they are accessed.
|
3367
3533
|
*/
|
@@ -3662,6 +3828,7 @@ declare interface ExpressionExpressionInfo {
|
|
3662
3828
|
rootInfo: string | VariableInfo;
|
3663
3829
|
name: string;
|
3664
3830
|
getMembers: () => string[];
|
3831
|
+
getMembersOptionals: () => boolean[];
|
3665
3832
|
}
|
3666
3833
|
type ExternalItem =
|
3667
3834
|
| string
|
@@ -3816,6 +3983,7 @@ declare interface ExternalsPresets {
|
|
3816
3983
|
webAsync?: boolean;
|
3817
3984
|
}
|
3818
3985
|
type ExternalsType =
|
3986
|
+
| "import"
|
3819
3987
|
| "var"
|
3820
3988
|
| "module"
|
3821
3989
|
| "assign"
|
@@ -3826,6 +3994,7 @@ type ExternalsType =
|
|
3826
3994
|
| "commonjs"
|
3827
3995
|
| "commonjs2"
|
3828
3996
|
| "commonjs-module"
|
3997
|
+
| "commonjs-static"
|
3829
3998
|
| "amd"
|
3830
3999
|
| "amd-require"
|
3831
4000
|
| "umd"
|
@@ -3833,7 +4002,6 @@ type ExternalsType =
|
|
3833
4002
|
| "jsonp"
|
3834
4003
|
| "system"
|
3835
4004
|
| "promise"
|
3836
|
-
| "import"
|
3837
4005
|
| "script"
|
3838
4006
|
| "node-commonjs";
|
3839
4007
|
declare interface FactorizeModuleOptions {
|
@@ -3852,6 +4020,7 @@ declare interface FactorizeModuleOptions {
|
|
3852
4020
|
type FakeHook<T> = T & FakeHookMarker;
|
3853
4021
|
declare interface FakeHookMarker {}
|
3854
4022
|
declare interface FallbackCacheGroup {
|
4023
|
+
chunksFilter: (chunk: Chunk) => boolean;
|
3855
4024
|
minSize: SplitChunksSizes;
|
3856
4025
|
maxAsyncSize: SplitChunksSizes;
|
3857
4026
|
maxInitialSize: SplitChunksSizes;
|
@@ -4064,40 +4233,43 @@ declare abstract class FileSystemInfo {
|
|
4064
4233
|
getFileTimestamp(
|
4065
4234
|
path: string,
|
4066
4235
|
callback: (
|
4067
|
-
arg0?: WebpackError,
|
4236
|
+
arg0?: null | WebpackError,
|
4068
4237
|
arg1?: null | FileSystemInfoEntry | "ignore"
|
4069
4238
|
) => void
|
4070
4239
|
): void;
|
4071
4240
|
getContextTimestamp(
|
4072
4241
|
path: string,
|
4073
4242
|
callback: (
|
4074
|
-
arg0?: WebpackError,
|
4243
|
+
arg0?: null | WebpackError,
|
4075
4244
|
arg1?: null | "ignore" | ResolvedContextFileSystemInfoEntry
|
4076
4245
|
) => void
|
4077
4246
|
): void;
|
4078
4247
|
getFileHash(
|
4079
4248
|
path: string,
|
4080
|
-
callback: (arg0?: WebpackError, arg1?: string) => void
|
4249
|
+
callback: (arg0?: null | WebpackError, arg1?: string) => void
|
4081
4250
|
): void;
|
4082
4251
|
getContextHash(
|
4083
4252
|
path: string,
|
4084
|
-
callback: (arg0?: WebpackError, arg1?: string) => void
|
4253
|
+
callback: (arg0?: null | WebpackError, arg1?: string) => void
|
4085
4254
|
): void;
|
4086
4255
|
getContextTsh(
|
4087
4256
|
path: string,
|
4088
4257
|
callback: (
|
4089
|
-
arg0?: WebpackError,
|
4258
|
+
arg0?: null | WebpackError,
|
4090
4259
|
arg1?: ResolvedContextTimestampAndHash
|
4091
4260
|
) => void
|
4092
4261
|
): void;
|
4093
4262
|
resolveBuildDependencies(
|
4094
4263
|
context: string,
|
4095
4264
|
deps: Iterable<string>,
|
4096
|
-
callback: (
|
4265
|
+
callback: (
|
4266
|
+
arg0?: null | Error,
|
4267
|
+
arg1?: ResolveBuildDependenciesResult
|
4268
|
+
) => void
|
4097
4269
|
): void;
|
4098
4270
|
checkResolveResultsValid(
|
4099
4271
|
resolveResults: Map<string, string | false>,
|
4100
|
-
callback: (arg0?: Error, arg1?: boolean) => void
|
4272
|
+
callback: (arg0?: null | Error, arg1?: boolean) => void
|
4101
4273
|
): void;
|
4102
4274
|
createSnapshot(
|
4103
4275
|
startTime: number,
|
@@ -4114,12 +4286,12 @@ declare abstract class FileSystemInfo {
|
|
4114
4286
|
*/
|
4115
4287
|
timestamp?: boolean;
|
4116
4288
|
},
|
4117
|
-
callback: (arg0?: WebpackError, arg1?: Snapshot) => void
|
4289
|
+
callback: (arg0?: null | WebpackError, arg1?: null | Snapshot) => void
|
4118
4290
|
): void;
|
4119
4291
|
mergeSnapshots(snapshot1: Snapshot, snapshot2: Snapshot): Snapshot;
|
4120
4292
|
checkSnapshotValid(
|
4121
4293
|
snapshot: Snapshot,
|
4122
|
-
callback: (arg0?: WebpackError, arg1?: boolean) => void
|
4294
|
+
callback: (arg0?: null | WebpackError, arg1?: boolean) => void
|
4123
4295
|
): void;
|
4124
4296
|
getDeprecatedFileTimestamps(): Map<any, any>;
|
4125
4297
|
getDeprecatedContextTimestamps(): Map<any, any>;
|
@@ -4169,6 +4341,11 @@ declare interface GenerateContext {
|
|
4169
4341
|
*/
|
4170
4342
|
concatenationScope?: ConcatenationScope;
|
4171
4343
|
|
4344
|
+
/**
|
4345
|
+
* code generation results of other modules (need to have a codeGenerationDependency to use that)
|
4346
|
+
*/
|
4347
|
+
codeGenerationResults?: CodeGenerationResults;
|
4348
|
+
|
4172
4349
|
/**
|
4173
4350
|
* which kind of code should be generated
|
4174
4351
|
*/
|
@@ -4312,12 +4489,12 @@ declare class Hash {
|
|
4312
4489
|
constructor();
|
4313
4490
|
|
4314
4491
|
/**
|
4315
|
-
* Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
|
4492
|
+
* Update hash {@link https ://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
|
4316
4493
|
*/
|
4317
4494
|
update(data: string | Buffer, inputEncoding?: string): Hash;
|
4318
4495
|
|
4319
4496
|
/**
|
4320
|
-
* Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
|
4497
|
+
* Calculates the digest {@link https ://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
|
4321
4498
|
*/
|
4322
4499
|
digest(encoding?: string): string | Buffer;
|
4323
4500
|
}
|
@@ -4338,7 +4515,7 @@ declare interface HashedModuleIdsPluginOptions {
|
|
4338
4515
|
/**
|
4339
4516
|
* The encoding to use when generating the hash, defaults to 'base64'. All encodings from Node.JS' hash.digest are supported.
|
4340
4517
|
*/
|
4341
|
-
hashDigest?: "
|
4518
|
+
hashDigest?: "latin1" | "hex" | "base64";
|
4342
4519
|
|
4343
4520
|
/**
|
4344
4521
|
* The prefix length of the hash digest to use, defaults to 4.
|
@@ -4396,6 +4573,11 @@ declare interface HttpUriOptions {
|
|
4396
4573
|
*/
|
4397
4574
|
lockfileLocation?: string;
|
4398
4575
|
|
4576
|
+
/**
|
4577
|
+
* Proxy configuration, which can be used to specify a proxy server to use for HTTP requests.
|
4578
|
+
*/
|
4579
|
+
proxy?: string;
|
4580
|
+
|
4399
4581
|
/**
|
4400
4582
|
* When set, resources of existing lockfile entries will be fetched and entries will be upgraded when resource content has changed.
|
4401
4583
|
*/
|
@@ -4488,6 +4670,11 @@ declare interface ImportModuleOptions {
|
|
4488
4670
|
* the target public path
|
4489
4671
|
*/
|
4490
4672
|
publicPath?: string;
|
4673
|
+
|
4674
|
+
/**
|
4675
|
+
* target base uri
|
4676
|
+
*/
|
4677
|
+
baseUri?: string;
|
4491
4678
|
}
|
4492
4679
|
type ImportSource =
|
4493
4680
|
| undefined
|
@@ -4529,7 +4716,7 @@ declare interface InfrastructureLogging {
|
|
4529
4716
|
/**
|
4530
4717
|
* Log level.
|
4531
4718
|
*/
|
4532
|
-
level?: "none" | "
|
4719
|
+
level?: "none" | "error" | "warn" | "info" | "log" | "verbose";
|
4533
4720
|
|
4534
4721
|
/**
|
4535
4722
|
* Stream used for logging output. Defaults to process.stderr. This option is only used when no custom console is provided.
|
@@ -4675,7 +4862,7 @@ declare class JavascriptModulesPlugin {
|
|
4675
4862
|
static chunkHasJs: (chunk: Chunk, chunkGraph: ChunkGraph) => boolean;
|
4676
4863
|
}
|
4677
4864
|
declare class JavascriptParser extends Parser {
|
4678
|
-
constructor(sourceType?: "module" | "
|
4865
|
+
constructor(sourceType?: "module" | "auto" | "script");
|
4679
4866
|
hooks: Readonly<{
|
4680
4867
|
evaluateTypeof: HookMap<
|
4681
4868
|
SyncBailHook<
|
@@ -4752,6 +4939,7 @@ declare class JavascriptParser extends Parser {
|
|
4752
4939
|
| ClassDeclaration
|
4753
4940
|
| ExpressionStatement
|
4754
4941
|
| BlockStatement
|
4942
|
+
| StaticBlock
|
4755
4943
|
| EmptyStatement
|
4756
4944
|
| DebuggerStatement
|
4757
4945
|
| WithStatement
|
@@ -4782,6 +4970,7 @@ declare class JavascriptParser extends Parser {
|
|
4782
4970
|
| ClassDeclaration
|
4783
4971
|
| ExpressionStatement
|
4784
4972
|
| BlockStatement
|
4973
|
+
| StaticBlock
|
4785
4974
|
| EmptyStatement
|
4786
4975
|
| DebuggerStatement
|
4787
4976
|
| WithStatement
|
@@ -4812,6 +5001,7 @@ declare class JavascriptParser extends Parser {
|
|
4812
5001
|
| ClassDeclaration
|
4813
5002
|
| ExpressionStatement
|
4814
5003
|
| BlockStatement
|
5004
|
+
| StaticBlock
|
4815
5005
|
| EmptyStatement
|
4816
5006
|
| DebuggerStatement
|
4817
5007
|
| WithStatement
|
@@ -4917,7 +5107,7 @@ declare class JavascriptParser extends Parser {
|
|
4917
5107
|
topLevelAwait: SyncBailHook<[Expression], boolean | void>;
|
4918
5108
|
call: HookMap<SyncBailHook<[Expression], boolean | void>>;
|
4919
5109
|
callMemberChain: HookMap<
|
4920
|
-
SyncBailHook<[CallExpression, string[]], boolean | void>
|
5110
|
+
SyncBailHook<[CallExpression, string[], boolean[]], boolean | void>
|
4921
5111
|
>;
|
4922
5112
|
memberChainOfCallMemberChain: HookMap<
|
4923
5113
|
SyncBailHook<
|
@@ -4933,9 +5123,10 @@ declare class JavascriptParser extends Parser {
|
|
4933
5123
|
>;
|
4934
5124
|
optionalChaining: SyncBailHook<[ChainExpression], boolean | void>;
|
4935
5125
|
new: HookMap<SyncBailHook<[NewExpression], boolean | void>>;
|
5126
|
+
binaryExpression: SyncBailHook<[BinaryExpression], boolean | void>;
|
4936
5127
|
expression: HookMap<SyncBailHook<[Expression], boolean | void>>;
|
4937
5128
|
expressionMemberChain: HookMap<
|
4938
|
-
SyncBailHook<[Expression, string[]], boolean | void>
|
5129
|
+
SyncBailHook<[Expression, string[], boolean[]], boolean | void>
|
4939
5130
|
>;
|
4940
5131
|
unhandledExpressionMemberChain: HookMap<
|
4941
5132
|
SyncBailHook<[Expression, string[]], boolean | void>
|
@@ -4945,7 +5136,7 @@ declare class JavascriptParser extends Parser {
|
|
4945
5136
|
program: SyncBailHook<[Program, Comment[]], boolean | void>;
|
4946
5137
|
finish: SyncBailHook<[Program, Comment[]], boolean | void>;
|
4947
5138
|
}>;
|
4948
|
-
sourceType: "module" | "
|
5139
|
+
sourceType: "module" | "auto" | "script";
|
4949
5140
|
scope: ScopeInfo;
|
4950
5141
|
state: ParserState;
|
4951
5142
|
comments: any;
|
@@ -4983,6 +5174,7 @@ declare class JavascriptParser extends Parser {
|
|
4983
5174
|
| ClassDeclaration
|
4984
5175
|
| ExpressionStatement
|
4985
5176
|
| BlockStatement
|
5177
|
+
| StaticBlock
|
4986
5178
|
| EmptyStatement
|
4987
5179
|
| DebuggerStatement
|
4988
5180
|
| WithStatement
|
@@ -5002,7 +5194,7 @@ declare class JavascriptParser extends Parser {
|
|
5002
5194
|
)[];
|
5003
5195
|
prevStatement: any;
|
5004
5196
|
currentTagData: any;
|
5005
|
-
getRenameIdentifier(expr?: any): undefined | string;
|
5197
|
+
getRenameIdentifier(expr?: any): undefined | string | VariableInfoInterface;
|
5006
5198
|
walkClass(classy: ClassExpression | ClassDeclaration): void;
|
5007
5199
|
preWalkStatements(statements?: any): void;
|
5008
5200
|
blockPreWalkStatements(statements?: any): void;
|
@@ -5149,12 +5341,10 @@ declare class JavascriptParser extends Parser {
|
|
5149
5341
|
enterArrayPattern(pattern?: any, onIdent?: any): void;
|
5150
5342
|
enterRestElement(pattern?: any, onIdent?: any): void;
|
5151
5343
|
enterAssignmentPattern(pattern?: any, onIdent?: any): void;
|
5152
|
-
evaluateExpression(
|
5153
|
-
expression: Expression
|
5154
|
-
): undefined | BasicEvaluatedExpression;
|
5344
|
+
evaluateExpression(expression: Expression): BasicEvaluatedExpression;
|
5155
5345
|
parseString(expression?: any): any;
|
5156
5346
|
parseCalculatedString(expression?: any): any;
|
5157
|
-
evaluate(source
|
5347
|
+
evaluate(source: string): BasicEvaluatedExpression;
|
5158
5348
|
isPure(
|
5159
5349
|
expr:
|
5160
5350
|
| undefined
|
@@ -5205,7 +5395,7 @@ declare class JavascriptParser extends Parser {
|
|
5205
5395
|
setVariable(name: string, variableInfo: ExportedVariableInfo): void;
|
5206
5396
|
parseCommentOptions(
|
5207
5397
|
range?: any
|
5208
|
-
): { options: null; errors: null } | { options: object; errors:
|
5398
|
+
): { options: null; errors: null } | { options: object; errors: unknown[] };
|
5209
5399
|
extractMemberExpressionChain(expression: MemberExpression): {
|
5210
5400
|
members: string[];
|
5211
5401
|
object:
|
@@ -5237,6 +5427,7 @@ declare class JavascriptParser extends Parser {
|
|
5237
5427
|
| ImportExpression
|
5238
5428
|
| ChainExpression
|
5239
5429
|
| Super;
|
5430
|
+
membersOptionals: boolean[];
|
5240
5431
|
};
|
5241
5432
|
getFreeInfoFromVariable(varName: string): {
|
5242
5433
|
name: string;
|
@@ -5282,6 +5473,11 @@ declare interface JavascriptParserOptions {
|
|
5282
5473
|
*/
|
5283
5474
|
commonjsMagicComments?: boolean;
|
5284
5475
|
|
5476
|
+
/**
|
5477
|
+
* Specifies the behavior of invalid export names in "import ... from ..." and "export ... from ...".
|
5478
|
+
*/
|
5479
|
+
exportsPresence?: false | "auto" | "error" | "warn";
|
5480
|
+
|
5285
5481
|
/**
|
5286
5482
|
* Enable warnings for full dynamic dependencies.
|
5287
5483
|
*/
|
@@ -5312,11 +5508,31 @@ declare interface JavascriptParserOptions {
|
|
5312
5508
|
*/
|
5313
5509
|
import?: boolean;
|
5314
5510
|
|
5511
|
+
/**
|
5512
|
+
* Specifies the behavior of invalid export names in "import ... from ...".
|
5513
|
+
*/
|
5514
|
+
importExportsPresence?: false | "auto" | "error" | "warn";
|
5515
|
+
|
5516
|
+
/**
|
5517
|
+
* Enable/disable evaluating import.meta.
|
5518
|
+
*/
|
5519
|
+
importMeta?: boolean;
|
5520
|
+
|
5521
|
+
/**
|
5522
|
+
* Enable/disable evaluating import.meta.webpackContext.
|
5523
|
+
*/
|
5524
|
+
importMetaContext?: boolean;
|
5525
|
+
|
5315
5526
|
/**
|
5316
5527
|
* Include polyfills or mocks for various node stuff.
|
5317
5528
|
*/
|
5318
5529
|
node?: false | NodeOptions;
|
5319
5530
|
|
5531
|
+
/**
|
5532
|
+
* 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.
|
5533
|
+
*/
|
5534
|
+
reexportExportsPresence?: false | "auto" | "error" | "warn";
|
5535
|
+
|
5320
5536
|
/**
|
5321
5537
|
* Enable/disable parsing of require.context syntax.
|
5322
5538
|
*/
|
@@ -5338,7 +5554,7 @@ declare interface JavascriptParserOptions {
|
|
5338
5554
|
requireJs?: boolean;
|
5339
5555
|
|
5340
5556
|
/**
|
5341
|
-
* Emit errors instead of warnings when imported names don't exist in imported module.
|
5557
|
+
* Deprecated in favor of "exportsPresence". Emit errors instead of warnings when imported names don't exist in imported module.
|
5342
5558
|
*/
|
5343
5559
|
strictExportPresence?: boolean;
|
5344
5560
|
|
@@ -5552,7 +5768,7 @@ declare interface KnownNormalizedStatsOptions {
|
|
5552
5768
|
modulesSpace: number;
|
5553
5769
|
chunkModulesSpace: number;
|
5554
5770
|
nestedModulesSpace: number;
|
5555
|
-
logging: false | "none" | "
|
5771
|
+
logging: false | "none" | "error" | "warn" | "info" | "log" | "verbose";
|
5556
5772
|
loggingDebug: ((value: string) => boolean)[];
|
5557
5773
|
loggingTrace: boolean;
|
5558
5774
|
}
|
@@ -5794,25 +6010,45 @@ declare interface KnownStatsProfile {
|
|
5794
6010
|
dependencies: number;
|
5795
6011
|
}
|
5796
6012
|
|
6013
|
+
/**
|
6014
|
+
* Options for the default backend.
|
6015
|
+
*/
|
6016
|
+
declare interface LazyCompilationDefaultBackendOptions {
|
6017
|
+
/**
|
6018
|
+
* A custom client.
|
6019
|
+
*/
|
6020
|
+
client?: string;
|
6021
|
+
|
6022
|
+
/**
|
6023
|
+
* Specifies where to listen to from the server.
|
6024
|
+
*/
|
6025
|
+
listen?: number | ListenOptions | ((server: typeof Server) => void);
|
6026
|
+
|
6027
|
+
/**
|
6028
|
+
* Specifies the protocol the client should use to connect to the server.
|
6029
|
+
*/
|
6030
|
+
protocol?: "http" | "https";
|
6031
|
+
|
6032
|
+
/**
|
6033
|
+
* Specifies how to create the server handling the EventSource requests.
|
6034
|
+
*/
|
6035
|
+
server?: ServerOptionsImport | ServerOptionsHttps | (() => typeof Server);
|
6036
|
+
}
|
6037
|
+
|
5797
6038
|
/**
|
5798
6039
|
* Options for compiling entrypoints and import()s only when they are accessed.
|
5799
6040
|
*/
|
5800
6041
|
declare interface LazyCompilationOptions {
|
5801
6042
|
/**
|
5802
|
-
*
|
6043
|
+
* Specifies the backend that should be used for handling client keep alive.
|
5803
6044
|
*/
|
5804
6045
|
backend?:
|
5805
6046
|
| ((
|
5806
6047
|
compiler: Compiler,
|
5807
|
-
|
5808
|
-
callback: (err?: Error, api?: any) => void
|
6048
|
+
callback: (err?: Error, api?: BackendApi) => void
|
5809
6049
|
) => void)
|
5810
|
-
| ((compiler: Compiler
|
5811
|
-
|
5812
|
-
/**
|
5813
|
-
* A custom client.
|
5814
|
-
*/
|
5815
|
-
client?: string;
|
6050
|
+
| ((compiler: Compiler) => Promise<BackendApi>)
|
6051
|
+
| LazyCompilationDefaultBackendOptions;
|
5816
6052
|
|
5817
6053
|
/**
|
5818
6054
|
* Enable/disable lazy compilation for entries.
|
@@ -5844,9 +6080,8 @@ declare class LazySet<T> {
|
|
5844
6080
|
has(item: T): boolean;
|
5845
6081
|
keys(): IterableIterator<T>;
|
5846
6082
|
values(): IterableIterator<T>;
|
5847
|
-
[Symbol.iterator](): IterableIterator<T>;
|
5848
|
-
readonly [Symbol.toStringTag]: string;
|
5849
6083
|
serialize(__0: { write: any }): void;
|
6084
|
+
[Symbol.iterator](): IterableIterator<T>;
|
5850
6085
|
static deserialize(__0: { read: any }): LazySet<any>;
|
5851
6086
|
}
|
5852
6087
|
declare interface LibIdentOptions {
|
@@ -5942,7 +6177,7 @@ declare interface LibraryOptions {
|
|
5942
6177
|
name?: string | string[] | LibraryCustomUmdObject;
|
5943
6178
|
|
5944
6179
|
/**
|
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).
|
6180
|
+
* 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
6181
|
*/
|
5947
6182
|
type: string;
|
5948
6183
|
|
@@ -6124,7 +6359,7 @@ declare interface LoaderPluginLoaderContext {
|
|
6124
6359
|
importModule(
|
6125
6360
|
request: string,
|
6126
6361
|
options: ImportModuleOptions,
|
6127
|
-
callback: (err?: Error, exports?: any) => any
|
6362
|
+
callback: (err?: null | Error, exports?: any) => any
|
6128
6363
|
): void;
|
6129
6364
|
importModule(request: string, options?: ImportModuleOptions): Promise<any>;
|
6130
6365
|
}
|
@@ -6429,6 +6664,7 @@ declare class Module extends DependenciesBlock {
|
|
6429
6664
|
buildMeta: BuildMeta;
|
6430
6665
|
buildInfo: Record<string, any>;
|
6431
6666
|
presentationalDependencies?: Dependency[];
|
6667
|
+
codeGenerationDependencies?: Dependency[];
|
6432
6668
|
id: string | number;
|
6433
6669
|
readonly hash: string;
|
6434
6670
|
readonly renderedHash: string;
|
@@ -6458,6 +6694,7 @@ declare class Module extends DependenciesBlock {
|
|
6458
6694
|
strict: boolean
|
6459
6695
|
): "namespace" | "default-only" | "default-with-named" | "dynamic";
|
6460
6696
|
addPresentationalDependency(presentationalDependency: Dependency): void;
|
6697
|
+
addCodeGenerationDependency(codeGenerationDependency: Dependency): void;
|
6461
6698
|
addWarning(warning: WebpackError): void;
|
6462
6699
|
getWarnings(): undefined | Iterable<WebpackError>;
|
6463
6700
|
getNumberOfWarnings(): number;
|
@@ -6488,7 +6725,7 @@ declare class Module extends DependenciesBlock {
|
|
6488
6725
|
hasReasons(moduleGraph: ModuleGraph, runtime: RuntimeSpec): boolean;
|
6489
6726
|
needBuild(
|
6490
6727
|
context: NeedBuildContext,
|
6491
|
-
callback: (arg0?: WebpackError, arg1?: boolean) => void
|
6728
|
+
callback: (arg0?: null | WebpackError, arg1?: boolean) => void
|
6492
6729
|
): void;
|
6493
6730
|
needRebuild(
|
6494
6731
|
fileTimestamps: Map<string, null | number>,
|
@@ -6635,6 +6872,7 @@ declare interface ModuleFederationPluginOptions {
|
|
6635
6872
|
* The external type of the remote containers.
|
6636
6873
|
*/
|
6637
6874
|
remoteType?:
|
6875
|
+
| "import"
|
6638
6876
|
| "var"
|
6639
6877
|
| "module"
|
6640
6878
|
| "assign"
|
@@ -6645,6 +6883,7 @@ declare interface ModuleFederationPluginOptions {
|
|
6645
6883
|
| "commonjs"
|
6646
6884
|
| "commonjs2"
|
6647
6885
|
| "commonjs-module"
|
6886
|
+
| "commonjs-static"
|
6648
6887
|
| "amd"
|
6649
6888
|
| "amd-require"
|
6650
6889
|
| "umd"
|
@@ -6652,7 +6891,6 @@ declare interface ModuleFederationPluginOptions {
|
|
6652
6891
|
| "jsonp"
|
6653
6892
|
| "system"
|
6654
6893
|
| "promise"
|
6655
|
-
| "import"
|
6656
6894
|
| "script"
|
6657
6895
|
| "node-commonjs";
|
6658
6896
|
|
@@ -7033,6 +7271,37 @@ declare interface ModuleReferenceOptions {
|
|
7033
7271
|
*/
|
7034
7272
|
asiSafe?: boolean;
|
7035
7273
|
}
|
7274
|
+
declare interface ModuleSettings {
|
7275
|
+
/**
|
7276
|
+
* Specifies the layer in which the module should be placed in.
|
7277
|
+
*/
|
7278
|
+
layer?: string;
|
7279
|
+
|
7280
|
+
/**
|
7281
|
+
* Module type to use for the module.
|
7282
|
+
*/
|
7283
|
+
type?: string;
|
7284
|
+
|
7285
|
+
/**
|
7286
|
+
* Options for the resolver.
|
7287
|
+
*/
|
7288
|
+
resolve?: ResolveOptionsWebpackOptions;
|
7289
|
+
|
7290
|
+
/**
|
7291
|
+
* Options for parsing.
|
7292
|
+
*/
|
7293
|
+
parser?: { [index: string]: any };
|
7294
|
+
|
7295
|
+
/**
|
7296
|
+
* The options for the module generator.
|
7297
|
+
*/
|
7298
|
+
generator?: { [index: string]: any };
|
7299
|
+
|
7300
|
+
/**
|
7301
|
+
* Flags a module as with or without side effects.
|
7302
|
+
*/
|
7303
|
+
sideEffects?: boolean;
|
7304
|
+
}
|
7036
7305
|
declare abstract class ModuleTemplate {
|
7037
7306
|
type: string;
|
7038
7307
|
hooks: Readonly<{
|
@@ -7197,6 +7466,7 @@ type NodeEstreeIndex =
|
|
7197
7466
|
| PrivateIdentifier
|
7198
7467
|
| ExpressionStatement
|
7199
7468
|
| BlockStatement
|
7469
|
+
| StaticBlock
|
7200
7470
|
| EmptyStatement
|
7201
7471
|
| DebuggerStatement
|
7202
7472
|
| WithStatement
|
@@ -7221,11 +7491,11 @@ type NodeEstreeIndex =
|
|
7221
7491
|
| PropertyDefinition
|
7222
7492
|
| VariableDeclarator
|
7223
7493
|
| Program
|
7224
|
-
| Super
|
7225
7494
|
| SwitchCase
|
7226
7495
|
| CatchClause
|
7227
7496
|
| Property
|
7228
7497
|
| AssignmentProperty
|
7498
|
+
| Super
|
7229
7499
|
| TemplateElement
|
7230
7500
|
| SpreadElement
|
7231
7501
|
| ObjectPattern
|
@@ -7283,81 +7553,20 @@ declare class NodeTemplatePlugin {
|
|
7283
7553
|
}
|
7284
7554
|
type NodeWebpackOptions = false | NodeOptions;
|
7285
7555
|
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
|
-
});
|
7556
|
+
constructor(__0: NormalModuleCreateData);
|
7348
7557
|
request: string;
|
7349
7558
|
userRequest: string;
|
7350
7559
|
rawRequest: string;
|
7351
7560
|
binary: boolean;
|
7352
7561
|
parser: Parser;
|
7353
|
-
parserOptions
|
7562
|
+
parserOptions?: Record<string, any>;
|
7354
7563
|
generator: Generator;
|
7355
|
-
generatorOptions
|
7564
|
+
generatorOptions?: Record<string, any>;
|
7356
7565
|
resource: string;
|
7357
7566
|
resourceResolveData?: Record<string, any>;
|
7358
7567
|
matchResource?: string;
|
7359
7568
|
loaders: LoaderItem[];
|
7360
|
-
error?: WebpackError;
|
7569
|
+
error?: null | WebpackError;
|
7361
7570
|
restoreFromUnsafeCache(
|
7362
7571
|
unsafeCacheData?: any,
|
7363
7572
|
normalModuleFactory?: any
|
@@ -7395,20 +7604,109 @@ declare interface NormalModuleCompilationHooks {
|
|
7395
7604
|
readResource: HookMap<AsyncSeriesBailHook<[object], string | Buffer>>;
|
7396
7605
|
needBuild: AsyncSeriesBailHook<[NormalModule, NeedBuildContext], boolean>;
|
7397
7606
|
}
|
7607
|
+
declare interface NormalModuleCreateData {
|
7608
|
+
/**
|
7609
|
+
* an optional layer in which the module is
|
7610
|
+
*/
|
7611
|
+
layer?: string;
|
7612
|
+
|
7613
|
+
/**
|
7614
|
+
* module type
|
7615
|
+
*/
|
7616
|
+
type: string;
|
7617
|
+
|
7618
|
+
/**
|
7619
|
+
* request string
|
7620
|
+
*/
|
7621
|
+
request: string;
|
7622
|
+
|
7623
|
+
/**
|
7624
|
+
* request intended by user (without loaders from config)
|
7625
|
+
*/
|
7626
|
+
userRequest: string;
|
7627
|
+
|
7628
|
+
/**
|
7629
|
+
* request without resolving
|
7630
|
+
*/
|
7631
|
+
rawRequest: string;
|
7632
|
+
|
7633
|
+
/**
|
7634
|
+
* list of loaders
|
7635
|
+
*/
|
7636
|
+
loaders: LoaderItem[];
|
7637
|
+
|
7638
|
+
/**
|
7639
|
+
* path + query of the real resource
|
7640
|
+
*/
|
7641
|
+
resource: string;
|
7642
|
+
|
7643
|
+
/**
|
7644
|
+
* resource resolve data
|
7645
|
+
*/
|
7646
|
+
resourceResolveData?: Record<string, any>;
|
7647
|
+
|
7648
|
+
/**
|
7649
|
+
* context directory for resolving
|
7650
|
+
*/
|
7651
|
+
context: string;
|
7652
|
+
|
7653
|
+
/**
|
7654
|
+
* path + query of the matched resource (virtual)
|
7655
|
+
*/
|
7656
|
+
matchResource?: string;
|
7657
|
+
|
7658
|
+
/**
|
7659
|
+
* the parser used
|
7660
|
+
*/
|
7661
|
+
parser: Parser;
|
7662
|
+
|
7663
|
+
/**
|
7664
|
+
* the options of the parser used
|
7665
|
+
*/
|
7666
|
+
parserOptions?: Record<string, any>;
|
7667
|
+
|
7668
|
+
/**
|
7669
|
+
* the generator used
|
7670
|
+
*/
|
7671
|
+
generator: Generator;
|
7672
|
+
|
7673
|
+
/**
|
7674
|
+
* the options of the generator used
|
7675
|
+
*/
|
7676
|
+
generatorOptions?: Record<string, any>;
|
7677
|
+
|
7678
|
+
/**
|
7679
|
+
* options used for resolving requests from this module
|
7680
|
+
*/
|
7681
|
+
resolveOptions?: ResolveOptionsWebpackOptions;
|
7682
|
+
}
|
7398
7683
|
declare abstract class NormalModuleFactory extends ModuleFactory {
|
7399
7684
|
hooks: Readonly<{
|
7400
|
-
resolve: AsyncSeriesBailHook<[ResolveData],
|
7685
|
+
resolve: AsyncSeriesBailHook<[ResolveData], false | void | Module>;
|
7401
7686
|
resolveForScheme: HookMap<
|
7402
7687
|
AsyncSeriesBailHook<[ResourceDataWithData, ResolveData], true | void>
|
7403
7688
|
>;
|
7404
7689
|
resolveInScheme: HookMap<
|
7405
7690
|
AsyncSeriesBailHook<[ResourceDataWithData, ResolveData], true | void>
|
7406
7691
|
>;
|
7407
|
-
factorize: AsyncSeriesBailHook<[ResolveData],
|
7408
|
-
beforeResolve: AsyncSeriesBailHook<[ResolveData],
|
7409
|
-
afterResolve: AsyncSeriesBailHook<[ResolveData],
|
7410
|
-
createModule: AsyncSeriesBailHook<
|
7411
|
-
|
7692
|
+
factorize: AsyncSeriesBailHook<[ResolveData], Module>;
|
7693
|
+
beforeResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
|
7694
|
+
afterResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
|
7695
|
+
createModule: AsyncSeriesBailHook<
|
7696
|
+
[
|
7697
|
+
Partial<NormalModuleCreateData & { settings: ModuleSettings }>,
|
7698
|
+
ResolveData
|
7699
|
+
],
|
7700
|
+
void | Module
|
7701
|
+
>;
|
7702
|
+
module: SyncWaterfallHook<
|
7703
|
+
[
|
7704
|
+
Module,
|
7705
|
+
Partial<NormalModuleCreateData & { settings: ModuleSettings }>,
|
7706
|
+
ResolveData
|
7707
|
+
],
|
7708
|
+
Module
|
7709
|
+
>;
|
7412
7710
|
createParser: HookMap<SyncBailHook<any, any>>;
|
7413
7711
|
parser: HookMap<SyncHook<any>>;
|
7414
7712
|
createGenerator: HookMap<SyncBailHook<any, any>>;
|
@@ -7485,11 +7783,12 @@ declare interface NormalModuleLoaderContext<OptionsType> {
|
|
7485
7783
|
utils: {
|
7486
7784
|
absolutify: (context: string, request: string) => string;
|
7487
7785
|
contextify: (context: string, request: string) => string;
|
7786
|
+
createHash: (algorithm?: string) => Hash;
|
7488
7787
|
};
|
7489
7788
|
rootContext: string;
|
7490
7789
|
fs: InputFileSystem;
|
7491
7790
|
sourceMap?: boolean;
|
7492
|
-
mode: "
|
7791
|
+
mode: "none" | "development" | "production";
|
7493
7792
|
webpack?: boolean;
|
7494
7793
|
_module?: NormalModule;
|
7495
7794
|
_compilation?: Compilation;
|
@@ -7515,8 +7814,8 @@ type NormalizedStatsOptions = KnownNormalizedStatsOptions &
|
|
7515
7814
|
Omit<
|
7516
7815
|
StatsOptions,
|
7517
7816
|
| "context"
|
7518
|
-
| "requestShortener"
|
7519
7817
|
| "chunkGroups"
|
7818
|
+
| "requestShortener"
|
7520
7819
|
| "chunksSort"
|
7521
7820
|
| "modulesSort"
|
7522
7821
|
| "chunkModulesSort"
|
@@ -7903,6 +8202,10 @@ declare interface OptimizationSplitChunksOptions {
|
|
7903
8202
|
* Sets the name delimiter for created chunks.
|
7904
8203
|
*/
|
7905
8204
|
automaticNameDelimiter?: string;
|
8205
|
+
/**
|
8206
|
+
* Select chunks for determining shared modules (defaults to "async", "initial" and "all" requires adding these chunks to the HTML).
|
8207
|
+
*/
|
8208
|
+
chunks?: "all" | "initial" | "async" | ((chunk: Chunk) => boolean);
|
7906
8209
|
/**
|
7907
8210
|
* Maximal size hint for the on-demand chunks.
|
7908
8211
|
*/
|
@@ -8014,6 +8317,11 @@ declare interface Output {
|
|
8014
8317
|
| string
|
8015
8318
|
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
8016
8319
|
|
8320
|
+
/**
|
8321
|
+
* Enable/disable creating async chunks that are loaded on demand.
|
8322
|
+
*/
|
8323
|
+
asyncChunks?: boolean;
|
8324
|
+
|
8017
8325
|
/**
|
8018
8326
|
* Add a comment in the UMD wrapper.
|
8019
8327
|
*/
|
@@ -8066,6 +8374,20 @@ declare interface Output {
|
|
8066
8374
|
*/
|
8067
8375
|
crossOriginLoading?: false | "anonymous" | "use-credentials";
|
8068
8376
|
|
8377
|
+
/**
|
8378
|
+
* 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.
|
8379
|
+
*/
|
8380
|
+
cssChunkFilename?:
|
8381
|
+
| string
|
8382
|
+
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
8383
|
+
|
8384
|
+
/**
|
8385
|
+
* 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.
|
8386
|
+
*/
|
8387
|
+
cssFilename?:
|
8388
|
+
| string
|
8389
|
+
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
8390
|
+
|
8069
8391
|
/**
|
8070
8392
|
* Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
|
8071
8393
|
*/
|
@@ -8172,7 +8494,7 @@ declare interface Output {
|
|
8172
8494
|
libraryExport?: string | string[];
|
8173
8495
|
|
8174
8496
|
/**
|
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).
|
8497
|
+
* 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
8498
|
*/
|
8177
8499
|
libraryTarget?: string;
|
8178
8500
|
|
@@ -8285,6 +8607,10 @@ declare interface OutputFileSystem {
|
|
8285
8607
|
arg0: string,
|
8286
8608
|
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: IStats) => void
|
8287
8609
|
) => void;
|
8610
|
+
lstat?: (
|
8611
|
+
arg0: string,
|
8612
|
+
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: IStats) => void
|
8613
|
+
) => void;
|
8288
8614
|
readFile: (
|
8289
8615
|
arg0: string,
|
8290
8616
|
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: string | Buffer) => void
|
@@ -8305,6 +8631,11 @@ declare interface OutputNormalized {
|
|
8305
8631
|
| string
|
8306
8632
|
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
8307
8633
|
|
8634
|
+
/**
|
8635
|
+
* Enable/disable creating async chunks that are loaded on demand.
|
8636
|
+
*/
|
8637
|
+
asyncChunks?: boolean;
|
8638
|
+
|
8308
8639
|
/**
|
8309
8640
|
* Add charset attribute for script tag.
|
8310
8641
|
*/
|
@@ -8352,6 +8683,20 @@ declare interface OutputNormalized {
|
|
8352
8683
|
*/
|
8353
8684
|
crossOriginLoading?: false | "anonymous" | "use-credentials";
|
8354
8685
|
|
8686
|
+
/**
|
8687
|
+
* 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.
|
8688
|
+
*/
|
8689
|
+
cssChunkFilename?:
|
8690
|
+
| string
|
8691
|
+
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
8692
|
+
|
8693
|
+
/**
|
8694
|
+
* 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.
|
8695
|
+
*/
|
8696
|
+
cssFilename?:
|
8697
|
+
| string
|
8698
|
+
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
8699
|
+
|
8355
8700
|
/**
|
8356
8701
|
* Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
|
8357
8702
|
*/
|
@@ -8747,7 +9092,7 @@ declare class ProgressPlugin {
|
|
8747
9092
|
showModules?: boolean;
|
8748
9093
|
showDependencies?: boolean;
|
8749
9094
|
showActiveModules?: boolean;
|
8750
|
-
percentBy?: null | "
|
9095
|
+
percentBy?: null | "modules" | "dependencies" | "entries";
|
8751
9096
|
apply(compiler: Compiler | MultiCompiler): void;
|
8752
9097
|
static getReporter(
|
8753
9098
|
compiler: Compiler
|
@@ -8808,7 +9153,7 @@ declare interface ProgressPluginOptions {
|
|
8808
9153
|
/**
|
8809
9154
|
* Collect percent algorithm. By default it calculates by a median from modules, entries and dependencies percent.
|
8810
9155
|
*/
|
8811
|
-
percentBy?: null | "
|
9156
|
+
percentBy?: null | "modules" | "dependencies" | "entries";
|
8812
9157
|
|
8813
9158
|
/**
|
8814
9159
|
* Collect profile data for progress steps. Default: false.
|
@@ -8975,6 +9320,11 @@ declare interface RenderBootstrapContext {
|
|
8975
9320
|
*/
|
8976
9321
|
chunk: Chunk;
|
8977
9322
|
|
9323
|
+
/**
|
9324
|
+
* results of code generation
|
9325
|
+
*/
|
9326
|
+
codeGenerationResults: CodeGenerationResults;
|
9327
|
+
|
8978
9328
|
/**
|
8979
9329
|
* the runtime template
|
8980
9330
|
*/
|
@@ -9149,6 +9499,11 @@ declare interface ResolveContext {
|
|
9149
9499
|
* log function
|
9150
9500
|
*/
|
9151
9501
|
log?: (arg0: string) => void;
|
9502
|
+
|
9503
|
+
/**
|
9504
|
+
* yield result, if provided plugins can return several results
|
9505
|
+
*/
|
9506
|
+
yield?: (arg0: ResolveRequest) => void;
|
9152
9507
|
}
|
9153
9508
|
declare interface ResolveData {
|
9154
9509
|
contextInfo: ModuleFactoryCreateDataContextInfo;
|
@@ -9158,7 +9513,7 @@ declare interface ResolveData {
|
|
9158
9513
|
assertions?: Record<string, any>;
|
9159
9514
|
dependencies: ModuleDependency[];
|
9160
9515
|
dependencyType: string;
|
9161
|
-
createData:
|
9516
|
+
createData: Partial<NormalModuleCreateData & { settings: ModuleSettings }>;
|
9162
9517
|
fileDependencies: LazySet<string>;
|
9163
9518
|
missingDependencies: LazySet<string>;
|
9164
9519
|
contextDependencies: LazySet<string>;
|
@@ -9328,7 +9683,7 @@ declare interface ResolveOptionsWebpackOptions {
|
|
9328
9683
|
/**
|
9329
9684
|
* Plugins for the resolver.
|
9330
9685
|
*/
|
9331
|
-
plugins?: ("..."
|
9686
|
+
plugins?: (ResolvePluginInstance | "...")[];
|
9332
9687
|
|
9333
9688
|
/**
|
9334
9689
|
* Prefer to resolve server-relative URLs (starting with '/') as absolute paths before falling back to resolve in 'resolve.roots'.
|
@@ -9933,25 +10288,29 @@ declare class RuntimeSpecSet {
|
|
9933
10288
|
constructor(iterable?: any);
|
9934
10289
|
add(runtime?: any): void;
|
9935
10290
|
has(runtime?: any): boolean;
|
9936
|
-
[Symbol.iterator](): IterableIterator<RuntimeSpec>;
|
9937
10291
|
readonly size: number;
|
10292
|
+
[Symbol.iterator](): IterableIterator<RuntimeSpec>;
|
9938
10293
|
}
|
9939
10294
|
declare abstract class RuntimeTemplate {
|
9940
10295
|
compilation: Compilation;
|
9941
10296
|
outputOptions: OutputNormalized;
|
9942
10297
|
requestShortener: RequestShortener;
|
10298
|
+
globalObject: string;
|
10299
|
+
contentHashReplacement: string;
|
9943
10300
|
isIIFE(): undefined | boolean;
|
9944
10301
|
isModule(): undefined | boolean;
|
9945
10302
|
supportsConst(): undefined | boolean;
|
9946
10303
|
supportsArrowFunction(): undefined | boolean;
|
10304
|
+
supportsOptionalChaining(): undefined | boolean;
|
9947
10305
|
supportsForOf(): undefined | boolean;
|
9948
10306
|
supportsDestructuring(): undefined | boolean;
|
9949
10307
|
supportsBigIntLiteral(): undefined | boolean;
|
9950
10308
|
supportsDynamicImport(): undefined | boolean;
|
9951
10309
|
supportsEcmaScriptModuleSyntax(): undefined | boolean;
|
9952
|
-
supportTemplateLiteral(): boolean;
|
10310
|
+
supportTemplateLiteral(): undefined | boolean;
|
9953
10311
|
returningFunction(returnValue?: any, args?: string): string;
|
9954
10312
|
basicFunction(args?: any, body?: any): string;
|
10313
|
+
concatenation(...args: (string | { expr: string })[]): string;
|
9955
10314
|
expressionFunction(expression?: any, args?: string): string;
|
9956
10315
|
emptyFunction(): "x => {}" | "function() {}";
|
9957
10316
|
destructureArray(items?: any, value?: any): string;
|
@@ -10328,6 +10687,24 @@ declare abstract class RuntimeTemplate {
|
|
10328
10687
|
*/
|
10329
10688
|
runtimeRequirements: Set<string>;
|
10330
10689
|
}): string;
|
10690
|
+
assetUrl(__0: {
|
10691
|
+
/**
|
10692
|
+
* the module
|
10693
|
+
*/
|
10694
|
+
module: Module;
|
10695
|
+
/**
|
10696
|
+
* the public path
|
10697
|
+
*/
|
10698
|
+
publicPath: string;
|
10699
|
+
/**
|
10700
|
+
* runtime
|
10701
|
+
*/
|
10702
|
+
runtime?: RuntimeSpec;
|
10703
|
+
/**
|
10704
|
+
* the code generation results
|
10705
|
+
*/
|
10706
|
+
codeGenerationResults: CodeGenerationResults;
|
10707
|
+
}): string;
|
10331
10708
|
}
|
10332
10709
|
declare abstract class RuntimeValue {
|
10333
10710
|
fn: (arg0: {
|
@@ -10369,6 +10746,9 @@ declare abstract class Serializer {
|
|
10369
10746
|
serialize(obj?: any, context?: any): any;
|
10370
10747
|
deserialize(value?: any, context?: any): any;
|
10371
10748
|
}
|
10749
|
+
type ServerOptionsHttps = SecureContextOptions &
|
10750
|
+
TlsOptions &
|
10751
|
+
ServerOptionsImport;
|
10372
10752
|
declare class SharePlugin {
|
10373
10753
|
constructor(options: SharePluginOptions);
|
10374
10754
|
|
@@ -10607,7 +10987,6 @@ declare abstract class SortableSet<T> extends Set<T> {
|
|
10607
10987
|
* Iterates over values in the set.
|
10608
10988
|
*/
|
10609
10989
|
[Symbol.iterator](): IterableIterator<T>;
|
10610
|
-
readonly [Symbol.toStringTag]: string;
|
10611
10990
|
}
|
10612
10991
|
declare class Source {
|
10613
10992
|
constructor();
|
@@ -10797,6 +11176,7 @@ type Statement =
|
|
10797
11176
|
| ClassDeclaration
|
10798
11177
|
| ExpressionStatement
|
10799
11178
|
| BlockStatement
|
11179
|
+
| StaticBlock
|
10800
11180
|
| EmptyStatement
|
10801
11181
|
| DebuggerStatement
|
10802
11182
|
| WithStatement
|
@@ -11164,7 +11544,7 @@ declare interface StatsOptions {
|
|
11164
11544
|
/**
|
11165
11545
|
* Add logging output.
|
11166
11546
|
*/
|
11167
|
-
logging?: boolean | "none" | "
|
11547
|
+
logging?: boolean | "none" | "error" | "warn" | "info" | "log" | "verbose";
|
11168
11548
|
|
11169
11549
|
/**
|
11170
11550
|
* Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions.
|
@@ -11333,15 +11713,40 @@ type StatsPrinterContext = KnownStatsPrinterContext & Record<string, any>;
|
|
11333
11713
|
type StatsProfile = KnownStatsProfile & Record<string, any>;
|
11334
11714
|
type StatsValue =
|
11335
11715
|
| boolean
|
11716
|
+
| StatsOptions
|
11336
11717
|
| "none"
|
11718
|
+
| "verbose"
|
11337
11719
|
| "summary"
|
11338
11720
|
| "errors-only"
|
11339
11721
|
| "errors-warnings"
|
11340
11722
|
| "minimal"
|
11341
11723
|
| "normal"
|
11342
|
-
| "detailed"
|
11343
|
-
|
11344
|
-
|
11724
|
+
| "detailed";
|
11725
|
+
declare class SyncModuleIdsPlugin {
|
11726
|
+
constructor(__0: {
|
11727
|
+
/**
|
11728
|
+
* path to file
|
11729
|
+
*/
|
11730
|
+
path: string;
|
11731
|
+
/**
|
11732
|
+
* context for module names
|
11733
|
+
*/
|
11734
|
+
context?: string;
|
11735
|
+
/**
|
11736
|
+
* selector for modules
|
11737
|
+
*/
|
11738
|
+
test: (arg0: Module) => boolean;
|
11739
|
+
/**
|
11740
|
+
* operation mode (defaults to merge)
|
11741
|
+
*/
|
11742
|
+
mode?: "read" | "create" | "merge" | "update";
|
11743
|
+
});
|
11744
|
+
|
11745
|
+
/**
|
11746
|
+
* Apply the plugin
|
11747
|
+
*/
|
11748
|
+
apply(compiler: Compiler): void;
|
11749
|
+
}
|
11345
11750
|
declare interface SyntheticDependencyLocation {
|
11346
11751
|
name: string;
|
11347
11752
|
index?: number;
|
@@ -11418,6 +11823,7 @@ declare interface UpdateHashContextGenerator {
|
|
11418
11823
|
module: NormalModule;
|
11419
11824
|
chunkGraph: ChunkGraph;
|
11420
11825
|
runtime: RuntimeSpec;
|
11826
|
+
runtimeTemplate?: RuntimeTemplate;
|
11421
11827
|
}
|
11422
11828
|
type UsageStateType = 0 | 1 | 2 | 3 | 4;
|
11423
11829
|
declare interface UserResolveOptions {
|
@@ -11546,7 +11952,7 @@ declare interface UserResolveOptions {
|
|
11546
11952
|
restrictions?: (string | RegExp)[];
|
11547
11953
|
|
11548
11954
|
/**
|
11549
|
-
* Use only the sync
|
11955
|
+
* Use only the sync constraints of the file system calls
|
11550
11956
|
*/
|
11551
11957
|
useSyncFileSystemCalls?: boolean;
|
11552
11958
|
|
@@ -11666,6 +12072,32 @@ declare interface Watcher {
|
|
11666
12072
|
* get info about directories
|
11667
12073
|
*/
|
11668
12074
|
getContextTimeInfoEntries: () => Map<string, FileSystemInfoEntry | "ignore">;
|
12075
|
+
|
12076
|
+
/**
|
12077
|
+
* get info about timestamps and changes
|
12078
|
+
*/
|
12079
|
+
getInfo?: () => WatcherInfo;
|
12080
|
+
}
|
12081
|
+
declare interface WatcherInfo {
|
12082
|
+
/**
|
12083
|
+
* get current aggregated changes that have not yet send to callback
|
12084
|
+
*/
|
12085
|
+
changes: Set<string>;
|
12086
|
+
|
12087
|
+
/**
|
12088
|
+
* get current aggregated removals that have not yet send to callback
|
12089
|
+
*/
|
12090
|
+
removals: Set<string>;
|
12091
|
+
|
12092
|
+
/**
|
12093
|
+
* get info about files
|
12094
|
+
*/
|
12095
|
+
fileTimeInfoEntries: Map<string, FileSystemInfoEntry | "ignore">;
|
12096
|
+
|
12097
|
+
/**
|
12098
|
+
* get info about directories
|
12099
|
+
*/
|
12100
|
+
contextTimeInfoEntries: Map<string, FileSystemInfoEntry | "ignore">;
|
11669
12101
|
}
|
11670
12102
|
declare abstract class Watching {
|
11671
12103
|
startTime: null | number;
|
@@ -11883,6 +12315,7 @@ declare interface WebpackOptionsNormalized {
|
|
11883
12315
|
* Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
|
11884
12316
|
*/
|
11885
12317
|
externalsType?:
|
12318
|
+
| "import"
|
11886
12319
|
| "var"
|
11887
12320
|
| "module"
|
11888
12321
|
| "assign"
|
@@ -11893,6 +12326,7 @@ declare interface WebpackOptionsNormalized {
|
|
11893
12326
|
| "commonjs"
|
11894
12327
|
| "commonjs2"
|
11895
12328
|
| "commonjs-module"
|
12329
|
+
| "commonjs-static"
|
11896
12330
|
| "amd"
|
11897
12331
|
| "amd-require"
|
11898
12332
|
| "umd"
|
@@ -11900,7 +12334,6 @@ declare interface WebpackOptionsNormalized {
|
|
11900
12334
|
| "jsonp"
|
11901
12335
|
| "system"
|
11902
12336
|
| "promise"
|
11903
|
-
| "import"
|
11904
12337
|
| "script"
|
11905
12338
|
| "node-commonjs";
|
11906
12339
|
|
@@ -11925,7 +12358,7 @@ declare interface WebpackOptionsNormalized {
|
|
11925
12358
|
/**
|
11926
12359
|
* Enable production optimizations or development hints.
|
11927
12360
|
*/
|
11928
|
-
mode?: "
|
12361
|
+
mode?: "none" | "development" | "production";
|
11929
12362
|
|
11930
12363
|
/**
|
11931
12364
|
* Options affecting the normal modules (`NormalModuleFactory`).
|
@@ -12184,11 +12617,16 @@ declare namespace exports {
|
|
12184
12617
|
export let uncaughtErrorHandler: string;
|
12185
12618
|
export let scriptNonce: string;
|
12186
12619
|
export let loadScript: string;
|
12620
|
+
export let createScript: string;
|
12187
12621
|
export let createScriptUrl: string;
|
12622
|
+
export let getTrustedTypesPolicy: string;
|
12188
12623
|
export let chunkName: string;
|
12189
12624
|
export let runtimeId: string;
|
12190
12625
|
export let getChunkScriptFilename: string;
|
12626
|
+
export let getChunkCssFilename: string;
|
12627
|
+
export let hasCssModules: string;
|
12191
12628
|
export let getChunkUpdateScriptFilename: string;
|
12629
|
+
export let getChunkUpdateCssFilename: string;
|
12192
12630
|
export let startup: string;
|
12193
12631
|
export let startupNoDefault: string;
|
12194
12632
|
export let startupOnlyAfter: string;
|
@@ -12524,6 +12962,9 @@ declare namespace exports {
|
|
12524
12962
|
export namespace schemes {
|
12525
12963
|
export { HttpUriPlugin };
|
12526
12964
|
}
|
12965
|
+
export namespace ids {
|
12966
|
+
export { SyncModuleIdsPlugin };
|
12967
|
+
}
|
12527
12968
|
}
|
12528
12969
|
export type WebpackPluginFunction = (
|
12529
12970
|
this: Compiler,
|
@@ -12589,6 +13030,7 @@ declare namespace exports {
|
|
12589
13030
|
Entry,
|
12590
13031
|
EntryNormalized,
|
12591
13032
|
EntryObject,
|
13033
|
+
FileCacheOptions,
|
12592
13034
|
LibraryOptions,
|
12593
13035
|
ModuleOptions,
|
12594
13036
|
ResolveOptionsWebpackOptions as ResolveOptions,
|
@@ -12597,14 +13039,21 @@ declare namespace exports {
|
|
12597
13039
|
RuleSetRule,
|
12598
13040
|
RuleSetUse,
|
12599
13041
|
RuleSetUseItem,
|
13042
|
+
StatsOptions,
|
12600
13043
|
Configuration,
|
12601
13044
|
WebpackOptionsNormalized,
|
12602
13045
|
WebpackPluginInstance,
|
12603
13046
|
Asset,
|
12604
13047
|
AssetInfo,
|
13048
|
+
EntryOptions,
|
13049
|
+
AssetEmittedInfo,
|
12605
13050
|
MultiStats,
|
12606
13051
|
ParserState,
|
13052
|
+
ResolvePluginInstance,
|
13053
|
+
Resolver,
|
12607
13054
|
Watching,
|
13055
|
+
Argument,
|
13056
|
+
Problem,
|
12608
13057
|
StatsAsset,
|
12609
13058
|
StatsChunk,
|
12610
13059
|
StatsChunkGroup,
|