webpack 5.108.3 → 5.109.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/APIPlugin.js +48 -29
- package/lib/CacheFacade.js +8 -0
- package/lib/ChunkGroup.js +1 -0
- package/lib/CompatibilityPlugin.js +31 -29
- package/lib/Compilation.js +50 -8
- package/lib/ConstPlugin.js +11 -11
- package/lib/ContextModule.js +239 -6
- package/lib/ContextModuleFactory.js +139 -14
- package/lib/DefinePlugin.js +396 -101
- package/lib/Entrypoint.js +1 -1
- package/lib/ExportsInfoApiPlugin.js +2 -2
- package/lib/ExternalModule.js +107 -5
- package/lib/ExternalModuleFactoryPlugin.js +20 -1
- package/lib/FileSystemInfo.js +130 -74
- package/lib/FlagDependencyExportsPlugin.js +55 -8
- package/lib/HotModuleReplacementPlugin.js +18 -15
- package/lib/LazyBarrel.js +30 -3
- package/lib/Module.js +3 -0
- package/lib/ModuleFilenameHelpers.js +2 -2
- package/lib/ModuleTypeConstants.js +8 -1
- package/lib/MultiCompiler.js +13 -2
- package/lib/MultiWatching.js +1 -0
- package/lib/NodeStuffPlugin.js +51 -33
- package/lib/NormalModule.js +169 -405
- package/lib/NormalModuleFactory.js +76 -2
- package/lib/ProgressPlugin.js +211 -119
- package/lib/ProvidePlugin.js +2 -2
- package/lib/RuntimeGlobals.js +47 -0
- package/lib/RuntimePlugin.js +33 -0
- package/lib/RuntimeTemplate.js +304 -16
- package/lib/UseStrictPlugin.js +1 -1
- package/lib/WebpackIsIncludedPlugin.js +1 -1
- package/lib/WebpackOptionsApply.js +24 -19
- package/lib/asset/AssetGenerator.js +110 -28
- package/lib/asset/AssetModulesPlugin.js +92 -2
- package/lib/asset/WebManifestGenerator.js +164 -0
- package/lib/asset/WebManifestParser.js +130 -0
- package/lib/async-modules/AwaitDependenciesInitFragment.js +14 -4
- package/lib/async-modules/isGeneratorLowered.js +26 -0
- package/lib/cache/PackFileCacheStrategy.js +9 -3
- package/lib/config/browserslistTargetHandler.js +40 -0
- package/lib/config/defaults.js +222 -32
- package/lib/config/normalization.js +26 -0
- package/lib/config/target.js +9 -1
- package/lib/css/CssGenerator.js +73 -73
- package/lib/css/CssLoadingRuntimeModule.js +5 -1
- package/lib/css/CssModulesPlugin.js +92 -53
- package/lib/css/CssParser.js +843 -302
- package/lib/css/syntax.js +1219 -483
- package/lib/dependencies/AMDDefineDependencyParserPlugin.js +6 -6
- package/lib/dependencies/AMDPlugin.js +2 -2
- package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +13 -13
- package/lib/dependencies/CommonJsDependencyHelpers.js +39 -0
- package/lib/dependencies/CommonJsExportsDependency.js +47 -2
- package/lib/dependencies/CommonJsExportsParserPlugin.js +10 -10
- package/lib/dependencies/CommonJsImportsParserPlugin.js +18 -18
- package/lib/dependencies/CommonJsPlugin.js +2 -2
- package/lib/dependencies/CommonJsRequireDependency.js +26 -1
- package/lib/dependencies/CommonJsSelfReferenceDependency.js +32 -1
- package/lib/dependencies/ContextDependencyHelpers.js +3 -3
- package/lib/dependencies/CreateRequireParserPlugin.js +6 -6
- package/lib/dependencies/CssIcssExportDependency.js +190 -87
- package/lib/dependencies/CssUrlDependency.js +35 -4
- package/lib/dependencies/ExternalModuleInitFragmentDependency.js +2 -2
- package/lib/dependencies/HarmonyCompatibilityDependency.js +32 -14
- package/lib/dependencies/HarmonyDetectionParserPlugin.js +43 -13
- package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +7 -19
- package/lib/dependencies/HarmonyImportDependency.js +12 -1
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +34 -107
- package/lib/dependencies/HarmonyImportGuard.js +192 -20
- package/lib/dependencies/HarmonyModulesPlugin.js +6 -0
- package/lib/dependencies/HarmonyTopLevelThisParserPlugin.js +1 -1
- package/lib/dependencies/HtmlEntryDependency.js +797 -172
- package/lib/dependencies/HtmlSourceDependency.js +26 -0
- package/lib/dependencies/ImportDependency.js +43 -1
- package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +31 -18
- package/lib/dependencies/ImportMetaContextPlugin.js +38 -7
- package/lib/dependencies/ImportMetaGlobDependency.js +81 -0
- package/lib/dependencies/ImportMetaGlobDependencyParserPlugin.js +78 -0
- package/lib/dependencies/ImportMetaGlobHelpers.js +660 -0
- package/lib/dependencies/ImportMetaPlugin.js +532 -180
- package/lib/dependencies/ImportMetaResolveDependency.js +90 -0
- package/lib/dependencies/ImportParserPlugin.js +87 -26
- package/lib/dependencies/ImportPhase.js +10 -8
- package/lib/dependencies/LoaderPlugin.js +5 -1
- package/lib/dependencies/RequireContextDependencyParserPlugin.js +1 -1
- package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +3 -6
- package/lib/dependencies/RequireIncludeDependencyParserPlugin.js +4 -11
- package/lib/dependencies/SystemPlugin.js +2 -4
- package/lib/dependencies/TopLevelAwaitDependency.js +93 -0
- package/lib/dependencies/URLDependency.js +141 -21
- package/lib/dependencies/{WorkerPlugin.js → WorkerAndWorkletPlugin.js} +324 -112
- package/lib/dependencies/WorkerDependency.js +86 -18
- package/lib/dependencies/WorkletDependency.js +278 -0
- package/lib/dll/DelegatedModuleFactoryPlugin.js +19 -0
- package/lib/errors/EnvironmentNotSupportAsyncWarning.js +1 -1
- package/lib/errors/LoaderLoadingError.js +20 -0
- package/lib/errors/ModuleParseError.js +39 -22
- package/lib/errors/NodeStuffInWebError.js +1 -1
- package/lib/esm/ModuleChunkFormatPlugin.js +47 -14
- package/lib/esm/ModuleChunkLoadingPlugin.js +8 -1
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +29 -1
- package/lib/hmr/lazyCompilationBackend.js +32 -8
- package/lib/html/HtmlGenerator.js +940 -91
- package/lib/html/HtmlModule.js +3 -2
- package/lib/html/HtmlModulesPlugin.js +625 -170
- package/lib/html/HtmlParser.js +812 -340
- package/lib/html/favicon.svg +1 -0
- package/lib/html/syntax.js +2116 -834
- package/lib/ids/IdHelpers.js +1 -1
- package/lib/index.js +6 -0
- package/lib/javascript/ArrayPushCallbackChunkFormatPlugin.js +4 -5
- package/lib/javascript/BasicEvaluatedExpression.js +366 -48
- package/lib/javascript/JavascriptGenerator.js +197 -49
- package/lib/javascript/JavascriptModulesPlugin.js +178 -24
- package/lib/javascript/JavascriptParser.js +711 -355
- package/lib/javascript/JavascriptParserHelpers.js +3 -6
- package/lib/javascript/syntax.js +4380 -0
- package/lib/library/ModuleLibraryPlugin.js +38 -1
- package/lib/loaders/LoaderRunner.js +714 -0
- package/lib/loaders/loadLoader.js +100 -0
- package/lib/node/ReadFileCompileAsyncWasmPlugin.js +19 -0
- package/lib/node/ReadFileCompileWasmPlugin.js +14 -0
- package/lib/optimize/ConcatenatedModule.js +120 -16
- package/lib/optimize/FlagIncludedChunksPlugin.js +13 -3
- package/lib/optimize/InnerGraphPlugin.js +50 -30
- package/lib/optimize/ModuleConcatenationPlugin.js +69 -3
- package/lib/optimize/SideEffectsFlagPlugin.js +86 -43
- package/lib/prefetch/ChunkPrefetchPreloadPlugin.js +15 -0
- package/lib/prefetch/ChunkPreloadTriggerRuntimeModule.js +24 -13
- package/lib/prefetch/ResourceHintPlugin.js +663 -0
- package/lib/prefetch/ResourceHintRuntimeModule.js +149 -0
- package/lib/prefetch/StartupAssetHintRuntimeModule.js +210 -0
- package/lib/prefetch/parseResourceHintOptions.js +103 -0
- package/lib/rules/RuleSetCompiler.js +114 -0
- package/lib/runtime/AsyncModuleGeneratorRuntimeModule.js +56 -0
- package/lib/runtime/AsyncModuleRuntimeModule.js +24 -8
- package/lib/runtime/AutoPublicPathRuntimeModule.js +7 -1
- package/lib/runtime/CommonJsWrapRuntimeModule.js +37 -0
- package/lib/runtime/GetWorkletBootstrapRuntimeModule.js +59 -0
- package/lib/runtime/MakeDeferredNamespaceObjectRuntime.js +204 -8
- package/lib/runtime/SetAnonymousDefaultNameRuntimeModule.js +4 -1
- package/lib/schemes/HttpUriPlugin.js +40 -1
- package/lib/schemes/VirtualUrlPlugin.js +1 -2
- package/lib/serialization/FileMiddleware.js +29 -3
- package/lib/stats/DefaultStatsFactoryPlugin.js +32 -3
- package/lib/stats/DefaultStatsPresetPlugin.js +2 -0
- package/lib/stats/DefaultStatsPrinterPlugin.js +12 -2
- package/lib/stats/StatsFactory.js +15 -8
- package/lib/url/URLParserPlugin.js +98 -19
- package/lib/util/AsyncQueue.js +122 -72
- package/lib/util/LocConverter.js +9 -8
- package/lib/util/SetHelpers.js +1 -1
- package/lib/util/SourceProcessor.js +41 -28
- package/lib/util/StackedMap.js +122 -48
- package/lib/util/binarySearchBounds.js +2 -2
- package/lib/util/concatenate.js +40 -14
- package/lib/util/createHooksRegistry.js +13 -5
- package/lib/util/dataURL.js +2 -2
- package/lib/util/deterministicGrouping.js +7 -5
- package/lib/util/formatSize.js +6 -2
- package/lib/util/globUtils.js +710 -0
- package/lib/util/identifier.js +23 -6
- package/lib/util/implicitTypeLoaderFallback.js +62 -0
- package/lib/util/internalSerializables.js +88 -71
- package/lib/util/magicComment.js +121 -25
- package/lib/util/numberHash.js +2 -2
- package/lib/wasm-async/AsyncWasmCompileRuntimeModule.js +24 -18
- package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +33 -22
- package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +79 -16
- package/lib/web/FetchCompileAsyncWasmPlugin.js +19 -0
- package/lib/web/FetchCompileWasmPlugin.js +14 -0
- package/lib/web/JsonpChunkLoadingRuntimeModule.js +2 -0
- package/lib/webpack.js +65 -0
- package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +3 -0
- package/module.d.ts +21 -0
- package/package.json +14 -13
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +759 -36
- package/schemas/plugins/HtmlParserOptions.check.js +1 -1
- package/schemas/plugins/ProgressPlugin.check.js +1 -1
- package/schemas/plugins/ProgressPlugin.json +17 -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 +1 -0
- package/schemas/plugins/css/CssAutoOrModuleParserOptions.check.js +1 -1
- package/schemas/plugins/css/CssModuleParserOptions.check.js +1 -1
- package/schemas/plugins/css/CssParserOptions.check.js +1 -1
- package/types.d.ts +1300 -325
package/types.d.ts
CHANGED
|
@@ -424,9 +424,7 @@ declare interface AssetEmittedInfo {
|
|
|
424
424
|
targetPath: string;
|
|
425
425
|
}
|
|
426
426
|
type AssetFilterItemTypes =
|
|
427
|
-
| string
|
|
428
|
-
| RegExp
|
|
429
|
-
| ((name: string, asset: StatsAsset) => boolean);
|
|
427
|
+
string | RegExp | ((name: string, asset: StatsAsset) => boolean);
|
|
430
428
|
declare abstract class AssetGenerator extends Generator {
|
|
431
429
|
dataUrlOptions?:
|
|
432
430
|
| AssetGeneratorDataUrlOptions
|
|
@@ -853,31 +851,14 @@ declare interface BasenameCacheEntry {
|
|
|
853
851
|
*/
|
|
854
852
|
cache: Map<string, Map<undefined | string, undefined | string>>;
|
|
855
853
|
}
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* An instance is allocated for a large share of walked expressions, so the
|
|
857
|
+
* boolean facts live in one packed flags slot and the scalar/identifier
|
|
858
|
+
* fields in five slots shared by type, with accessors keeping every public
|
|
859
|
+
* field readable. This shrinks instances from 224 to 144 bytes on V8.
|
|
860
|
+
*/
|
|
856
861
|
declare abstract class BasicEvaluatedExpression {
|
|
857
|
-
type: number;
|
|
858
|
-
range?: [number, number];
|
|
859
|
-
falsy: boolean;
|
|
860
|
-
truthy: boolean;
|
|
861
|
-
nullish?: boolean;
|
|
862
|
-
sideEffects: boolean;
|
|
863
|
-
bool?: boolean;
|
|
864
|
-
number?: number;
|
|
865
|
-
bigint?: bigint;
|
|
866
|
-
regExp?: RegExp;
|
|
867
|
-
string?: string;
|
|
868
|
-
quasis?: BasicEvaluatedExpression[];
|
|
869
|
-
parts?: BasicEvaluatedExpression[];
|
|
870
|
-
array?: any[];
|
|
871
|
-
items?: BasicEvaluatedExpression[];
|
|
872
|
-
options?: BasicEvaluatedExpression[];
|
|
873
|
-
prefix?: null | BasicEvaluatedExpression;
|
|
874
|
-
postfix?: null | BasicEvaluatedExpression;
|
|
875
|
-
wrappedInnerExpressions?: BasicEvaluatedExpression[];
|
|
876
|
-
identifier?: string | VariableInfo;
|
|
877
|
-
rootInfo?: string | VariableInfo;
|
|
878
|
-
getMembers?: () => string[];
|
|
879
|
-
getMembersOptionals?: () => boolean[];
|
|
880
|
-
getMemberRanges?: () => [number, number][];
|
|
881
862
|
expression?:
|
|
882
863
|
| Program
|
|
883
864
|
| ImportDeclaration
|
|
@@ -953,6 +934,38 @@ declare abstract class BasicEvaluatedExpression {
|
|
|
953
934
|
| AssignmentPattern
|
|
954
935
|
| SwitchCase
|
|
955
936
|
| TemplateElement;
|
|
937
|
+
quasis?: BasicEvaluatedExpression[];
|
|
938
|
+
parts?: BasicEvaluatedExpression[];
|
|
939
|
+
items?: BasicEvaluatedExpression[];
|
|
940
|
+
options?: BasicEvaluatedExpression[];
|
|
941
|
+
prefix?: null | BasicEvaluatedExpression;
|
|
942
|
+
postfix?: null | BasicEvaluatedExpression;
|
|
943
|
+
wrappedInnerExpressions?: BasicEvaluatedExpression[];
|
|
944
|
+
|
|
945
|
+
/**
|
|
946
|
+
* Served lazily from the attached expression when not set explicitly:
|
|
947
|
+
* `evaluateExpression`'s plain results share the expression's range, and
|
|
948
|
+
* most evaluations never read it, so the node's range array is only
|
|
949
|
+
* materialized on demand.
|
|
950
|
+
*/
|
|
951
|
+
range?: [number, number];
|
|
952
|
+
type: number;
|
|
953
|
+
truthy: boolean;
|
|
954
|
+
falsy: boolean;
|
|
955
|
+
nullish?: boolean;
|
|
956
|
+
sideEffects: boolean;
|
|
957
|
+
bool?: boolean;
|
|
958
|
+
number?: number;
|
|
959
|
+
bigint?: bigint;
|
|
960
|
+
regExp?: RegExp;
|
|
961
|
+
string?: string;
|
|
962
|
+
templateStringKind?: "cooked" | "raw";
|
|
963
|
+
array?: any[];
|
|
964
|
+
identifier?: string | VariableInfo;
|
|
965
|
+
rootInfo?: string | VariableInfo;
|
|
966
|
+
getMembers?: () => string[];
|
|
967
|
+
getMembersOptionals?: () => boolean[];
|
|
968
|
+
getMemberRanges?: () => [number, number][];
|
|
956
969
|
isUnknown(): boolean;
|
|
957
970
|
isNull(): boolean;
|
|
958
971
|
isUndefined(): boolean;
|
|
@@ -982,14 +995,7 @@ declare abstract class BasicEvaluatedExpression {
|
|
|
982
995
|
* As compile time value.
|
|
983
996
|
*/
|
|
984
997
|
asCompileTimeValue():
|
|
985
|
-
|
|
|
986
|
-
| null
|
|
987
|
-
| string
|
|
988
|
-
| number
|
|
989
|
-
| bigint
|
|
990
|
-
| boolean
|
|
991
|
-
| RegExp
|
|
992
|
-
| any[];
|
|
998
|
+
undefined | null | string | number | bigint | boolean | RegExp | any[];
|
|
993
999
|
isTruthy(): boolean;
|
|
994
1000
|
isFalsy(): boolean;
|
|
995
1001
|
isNullish(): undefined | boolean;
|
|
@@ -1090,7 +1096,6 @@ declare abstract class BasicEvaluatedExpression {
|
|
|
1090
1096
|
parts: BasicEvaluatedExpression[],
|
|
1091
1097
|
kind: "cooked" | "raw"
|
|
1092
1098
|
): BasicEvaluatedExpression;
|
|
1093
|
-
templateStringKind?: "cooked" | "raw";
|
|
1094
1099
|
setTruthy(): BasicEvaluatedExpression;
|
|
1095
1100
|
setFalsy(): BasicEvaluatedExpression;
|
|
1096
1101
|
|
|
@@ -1334,6 +1339,11 @@ declare class CacheClass {
|
|
|
1334
1339
|
static STAGE_NETWORK: number;
|
|
1335
1340
|
}
|
|
1336
1341
|
declare abstract class CacheFacade {
|
|
1342
|
+
/**
|
|
1343
|
+
* Returns whether a cache backend is active.
|
|
1344
|
+
*/
|
|
1345
|
+
isEnabled(): boolean;
|
|
1346
|
+
|
|
1337
1347
|
/**
|
|
1338
1348
|
* Returns child cache.
|
|
1339
1349
|
*/
|
|
@@ -1426,8 +1436,7 @@ declare interface CacheGroupSource {
|
|
|
1426
1436
|
maxAsyncRequests?: number;
|
|
1427
1437
|
maxInitialRequests?: number;
|
|
1428
1438
|
filename?:
|
|
1429
|
-
| string
|
|
1430
|
-
| ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
1439
|
+
string | ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
1431
1440
|
idHint?: string;
|
|
1432
1441
|
automaticNameDelimiter?: string;
|
|
1433
1442
|
reuseExistingChunk?: boolean;
|
|
@@ -1568,11 +1577,9 @@ declare class Chunk {
|
|
|
1568
1577
|
idNameHints: SortableSet<string>;
|
|
1569
1578
|
preventIntegration: boolean;
|
|
1570
1579
|
filenameTemplate?:
|
|
1571
|
-
| string
|
|
1572
|
-
| ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
1580
|
+
string | ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
1573
1581
|
cssFilenameTemplate?:
|
|
1574
|
-
| string
|
|
1575
|
-
| ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
1582
|
+
string | ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
1576
1583
|
runtime: RuntimeSpec;
|
|
1577
1584
|
files: Set<string>;
|
|
1578
1585
|
auxiliaryFiles: Set<string>;
|
|
@@ -1841,8 +1848,7 @@ declare interface ChunkConditionMap {
|
|
|
1841
1848
|
[index: string]: boolean;
|
|
1842
1849
|
}
|
|
1843
1850
|
type ChunkFilenameTemplate =
|
|
1844
|
-
| string
|
|
1845
|
-
| ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
1851
|
+
string | ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
1846
1852
|
declare class ChunkGraph {
|
|
1847
1853
|
/**
|
|
1848
1854
|
* Creates an instance of ChunkGraph.
|
|
@@ -2800,6 +2806,16 @@ declare interface ChunkRenderContextJavascriptModulesPlugin {
|
|
|
2800
2806
|
* rendering in strict context
|
|
2801
2807
|
*/
|
|
2802
2808
|
strictMode?: boolean;
|
|
2809
|
+
|
|
2810
|
+
/**
|
|
2811
|
+
* entry module inlined at the chunk top level instead of the registry
|
|
2812
|
+
*/
|
|
2813
|
+
inlinedEntryModule?: Module;
|
|
2814
|
+
|
|
2815
|
+
/**
|
|
2816
|
+
* rendered body of the inlined entry module
|
|
2817
|
+
*/
|
|
2818
|
+
inlinedEntrySource?: Source;
|
|
2803
2819
|
}
|
|
2804
2820
|
declare interface ChunkRuntime {
|
|
2805
2821
|
[index: number]: string;
|
|
@@ -2821,8 +2837,7 @@ declare abstract class ChunkTemplate {
|
|
|
2821
2837
|
renderManifest: {
|
|
2822
2838
|
tap: <AdditionalOptions>(
|
|
2823
2839
|
options:
|
|
2824
|
-
| string
|
|
2825
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
2840
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
2826
2841
|
fn: (
|
|
2827
2842
|
renderManifestEntries: RenderManifestEntry[],
|
|
2828
2843
|
renderManifestOptions: RenderManifestOptions
|
|
@@ -2832,8 +2847,7 @@ declare abstract class ChunkTemplate {
|
|
|
2832
2847
|
modules: {
|
|
2833
2848
|
tap: <AdditionalOptions>(
|
|
2834
2849
|
options:
|
|
2835
|
-
| string
|
|
2836
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
2850
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
2837
2851
|
fn: (
|
|
2838
2852
|
source: Source,
|
|
2839
2853
|
moduleTemplate: ModuleTemplate,
|
|
@@ -2844,8 +2858,7 @@ declare abstract class ChunkTemplate {
|
|
|
2844
2858
|
render: {
|
|
2845
2859
|
tap: <AdditionalOptions>(
|
|
2846
2860
|
options:
|
|
2847
|
-
| string
|
|
2848
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
2861
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
2849
2862
|
fn: (
|
|
2850
2863
|
source: Source,
|
|
2851
2864
|
moduleTemplate: ModuleTemplate,
|
|
@@ -2856,24 +2869,21 @@ declare abstract class ChunkTemplate {
|
|
|
2856
2869
|
renderWithEntry: {
|
|
2857
2870
|
tap: <AdditionalOptions>(
|
|
2858
2871
|
options:
|
|
2859
|
-
| string
|
|
2860
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
2872
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
2861
2873
|
fn: (source: Source, chunk: Chunk) => Source
|
|
2862
2874
|
) => void;
|
|
2863
2875
|
};
|
|
2864
2876
|
hash: {
|
|
2865
2877
|
tap: <AdditionalOptions>(
|
|
2866
2878
|
options:
|
|
2867
|
-
| string
|
|
2868
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
2879
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
2869
2880
|
fn: (hash: Hash) => void
|
|
2870
2881
|
) => void;
|
|
2871
2882
|
};
|
|
2872
2883
|
hashForChunk: {
|
|
2873
2884
|
tap: <AdditionalOptions>(
|
|
2874
2885
|
options:
|
|
2875
|
-
| string
|
|
2876
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
2886
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
2877
2887
|
fn: (
|
|
2878
2888
|
hash: Hash,
|
|
2879
2889
|
chunk: Chunk,
|
|
@@ -3123,14 +3133,7 @@ type CodeValue =
|
|
|
3123
3133
|
| RuntimeValue
|
|
3124
3134
|
>[];
|
|
3125
3135
|
type CodeValuePrimitive =
|
|
3126
|
-
|
|
|
3127
|
-
| null
|
|
3128
|
-
| string
|
|
3129
|
-
| number
|
|
3130
|
-
| bigint
|
|
3131
|
-
| boolean
|
|
3132
|
-
| Function
|
|
3133
|
-
| RegExp;
|
|
3136
|
+
undefined | null | string | number | bigint | boolean | Function | RegExp;
|
|
3134
3137
|
declare interface Colors {
|
|
3135
3138
|
reset: (value?: any) => string;
|
|
3136
3139
|
bold: (value?: any) => string;
|
|
@@ -3187,7 +3190,7 @@ declare interface ColorsOptions {
|
|
|
3187
3190
|
type CommentJavascriptParser = CommentImport & {
|
|
3188
3191
|
start: number;
|
|
3189
3192
|
end: number;
|
|
3190
|
-
loc
|
|
3193
|
+
loc?: null | SourceLocation;
|
|
3191
3194
|
};
|
|
3192
3195
|
declare interface CommonJsImportSettings {
|
|
3193
3196
|
name?: string;
|
|
@@ -3770,8 +3773,7 @@ declare class Compilation {
|
|
|
3770
3773
|
file: string,
|
|
3771
3774
|
newSourceOrFunction: Source | ((source: Source) => Source),
|
|
3772
3775
|
assetInfoUpdateOrFunction?:
|
|
3773
|
-
| AssetInfo
|
|
3774
|
-
| ((assetInfo?: AssetInfo) => undefined | AssetInfo)
|
|
3776
|
+
AssetInfo | ((assetInfo?: AssetInfo) => undefined | AssetInfo)
|
|
3775
3777
|
): void;
|
|
3776
3778
|
|
|
3777
3779
|
/**
|
|
@@ -4347,6 +4349,16 @@ declare class ConcatSource extends Source {
|
|
|
4347
4349
|
): GeneratedSourceInfo;
|
|
4348
4350
|
}
|
|
4349
4351
|
type ConcatSourceChild = string | Source | SourceLike;
|
|
4352
|
+
|
|
4353
|
+
/**
|
|
4354
|
+
* Advanced options for module concatenation.
|
|
4355
|
+
*/
|
|
4356
|
+
declare interface ConcatenateModulesOptions {
|
|
4357
|
+
/**
|
|
4358
|
+
* Also concatenate CommonJS modules with statically analyzable exports. Defaults to 'true'.
|
|
4359
|
+
*/
|
|
4360
|
+
commonjs?: boolean;
|
|
4361
|
+
}
|
|
4350
4362
|
type ConcatenatedModuleBuildInfo = KnownBuildInfo &
|
|
4351
4363
|
Record<string, any> &
|
|
4352
4364
|
KnownConcatenatedModuleBuildInfo;
|
|
@@ -4354,6 +4366,11 @@ declare interface ConcatenatedModuleInfo {
|
|
|
4354
4366
|
type: "concatenated";
|
|
4355
4367
|
module: Module;
|
|
4356
4368
|
index: number;
|
|
4369
|
+
|
|
4370
|
+
/**
|
|
4371
|
+
* a "weird" CommonJS module executed via the CJS wrapper runtime helper with real module/exports objects
|
|
4372
|
+
*/
|
|
4373
|
+
cjsWrapped?: boolean;
|
|
4357
4374
|
ast?: Program;
|
|
4358
4375
|
internalSource?: Source;
|
|
4359
4376
|
source?: ReplaceSource;
|
|
@@ -4407,19 +4424,13 @@ declare interface ConcatenatedModuleInfo {
|
|
|
4407
4424
|
* memoized getExportsType(strict=true)
|
|
4408
4425
|
*/
|
|
4409
4426
|
exportsTypeStrict?:
|
|
4410
|
-
| "
|
|
4411
|
-
| "dynamic"
|
|
4412
|
-
| "default-only"
|
|
4413
|
-
| "default-with-named";
|
|
4427
|
+
"namespace" | "dynamic" | "default-only" | "default-with-named";
|
|
4414
4428
|
|
|
4415
4429
|
/**
|
|
4416
4430
|
* memoized getExportsType(strict=false)
|
|
4417
4431
|
*/
|
|
4418
4432
|
exportsTypeNonStrict?:
|
|
4419
|
-
| "
|
|
4420
|
-
| "dynamic"
|
|
4421
|
-
| "default-only"
|
|
4422
|
-
| "default-with-named";
|
|
4433
|
+
"namespace" | "dynamic" | "default-only" | "default-with-named";
|
|
4423
4434
|
}
|
|
4424
4435
|
declare interface ConcatenationBailoutReasonContext {
|
|
4425
4436
|
/**
|
|
@@ -4431,6 +4442,11 @@ declare interface ConcatenationBailoutReasonContext {
|
|
|
4431
4442
|
* the chunk graph
|
|
4432
4443
|
*/
|
|
4433
4444
|
chunkGraph: ChunkGraph;
|
|
4445
|
+
|
|
4446
|
+
/**
|
|
4447
|
+
* whether eligible CommonJS modules may be concatenated
|
|
4448
|
+
*/
|
|
4449
|
+
concatenateCommonJsModules?: boolean;
|
|
4434
4450
|
}
|
|
4435
4451
|
|
|
4436
4452
|
/**
|
|
@@ -4589,7 +4605,11 @@ declare interface Configuration {
|
|
|
4589
4605
|
data: ExternalItemFunctionData,
|
|
4590
4606
|
callback: (
|
|
4591
4607
|
err?: null | Error,
|
|
4592
|
-
result?:
|
|
4608
|
+
result?:
|
|
4609
|
+
| string
|
|
4610
|
+
| boolean
|
|
4611
|
+
| string[]
|
|
4612
|
+
| (ExternalItemValueObjectKnown & ExternalItemValueObjectUnknown)
|
|
4593
4613
|
) => void
|
|
4594
4614
|
) => void)
|
|
4595
4615
|
| ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>)
|
|
@@ -4622,6 +4642,7 @@ declare interface Configuration {
|
|
|
4622
4642
|
| "umd2"
|
|
4623
4643
|
| "jsonp"
|
|
4624
4644
|
| "system"
|
|
4645
|
+
| "amd-async"
|
|
4625
4646
|
| "promise"
|
|
4626
4647
|
| "module-import"
|
|
4627
4648
|
| "script"
|
|
@@ -4787,9 +4808,7 @@ declare interface Configuration {
|
|
|
4787
4808
|
watchOptions?: WatchOptions;
|
|
4788
4809
|
}
|
|
4789
4810
|
type ConnectionState =
|
|
4790
|
-
|
|
|
4791
|
-
| typeof CIRCULAR_CONNECTION
|
|
4792
|
-
| typeof TRANSITIVE_ONLY;
|
|
4811
|
+
boolean | typeof CIRCULAR_CONNECTION | typeof TRANSITIVE_ONLY;
|
|
4793
4812
|
declare class ConstDependency extends NullDependency {
|
|
4794
4813
|
/**
|
|
4795
4814
|
* Creates an instance of ConstDependency.
|
|
@@ -5035,12 +5054,7 @@ declare interface ContextHash {
|
|
|
5035
5054
|
symlinks?: Set<string>;
|
|
5036
5055
|
}
|
|
5037
5056
|
type ContextMode =
|
|
5038
|
-
| "
|
|
5039
|
-
| "weak"
|
|
5040
|
-
| "lazy"
|
|
5041
|
-
| "lazy-once"
|
|
5042
|
-
| "sync"
|
|
5043
|
-
| "async-weak";
|
|
5057
|
+
"eager" | "weak" | "lazy" | "lazy-once" | "sync" | "async-weak";
|
|
5044
5058
|
type ContextModuleBuildInfo = KnownBuildInfo &
|
|
5045
5059
|
Record<string, any> &
|
|
5046
5060
|
KnownContextModuleBuildInfo;
|
|
@@ -5110,6 +5124,31 @@ declare interface ContextOptions {
|
|
|
5110
5124
|
layer?: null | string;
|
|
5111
5125
|
attributes?: ImportAttributes;
|
|
5112
5126
|
phase?: 0 | 1 | 2;
|
|
5127
|
+
|
|
5128
|
+
/**
|
|
5129
|
+
* glob patterns for import.meta.glob
|
|
5130
|
+
*/
|
|
5131
|
+
patterns?: string[];
|
|
5132
|
+
|
|
5133
|
+
/**
|
|
5134
|
+
* importer context for import.meta.glob
|
|
5135
|
+
*/
|
|
5136
|
+
requestContext?: string;
|
|
5137
|
+
|
|
5138
|
+
/**
|
|
5139
|
+
* import selection for import.meta.glob
|
|
5140
|
+
*/
|
|
5141
|
+
importName?: string;
|
|
5142
|
+
|
|
5143
|
+
/**
|
|
5144
|
+
* exhaustive mode for import.meta.glob
|
|
5145
|
+
*/
|
|
5146
|
+
exhaustive?: boolean;
|
|
5147
|
+
|
|
5148
|
+
/**
|
|
5149
|
+
* case-sensitive matching for import.meta.glob
|
|
5150
|
+
*/
|
|
5151
|
+
caseSensitive?: boolean;
|
|
5113
5152
|
}
|
|
5114
5153
|
declare class ContextReplacementPlugin {
|
|
5115
5154
|
/**
|
|
@@ -5293,6 +5332,16 @@ declare interface CssAutoOrModuleParserOptions {
|
|
|
5293
5332
|
*/
|
|
5294
5333
|
customIdents?: boolean;
|
|
5295
5334
|
|
|
5335
|
+
/**
|
|
5336
|
+
* Enable/disable resolution of `@custom-media` at-rules (file-local build-time substitution).
|
|
5337
|
+
*/
|
|
5338
|
+
customMedia?: boolean;
|
|
5339
|
+
|
|
5340
|
+
/**
|
|
5341
|
+
* Enable/disable resolution of `@custom-selector` at-rules (file-local build-time expansion to `:is(...)`).
|
|
5342
|
+
*/
|
|
5343
|
+
customSelectors?: boolean;
|
|
5344
|
+
|
|
5296
5345
|
/**
|
|
5297
5346
|
* Enable/disable renaming of dashed identifiers, e. g. custom properties.
|
|
5298
5347
|
*/
|
|
@@ -5303,6 +5352,11 @@ declare interface CssAutoOrModuleParserOptions {
|
|
|
5303
5352
|
*/
|
|
5304
5353
|
exportType?: "link" | "text" | "css-style-sheet" | "style";
|
|
5305
5354
|
|
|
5355
|
+
/**
|
|
5356
|
+
* Auto-emit `<link rel="preload" as="font">` for the primary `src` URL of each `@font-face` reachable from an HTML entry's initial CSS. Only the first URL per `@font-face` is preloaded (preloading every format would double-download). Off by default; `parser.css.urlHints` rules and per-URL magic comments still override the seeded defaults. Set `output.crossOriginLoading` so the preload matches the font's CORS fetch.
|
|
5357
|
+
*/
|
|
5358
|
+
fontPreload?: boolean;
|
|
5359
|
+
|
|
5306
5360
|
/**
|
|
5307
5361
|
* Enable/disable renaming of `@function` names.
|
|
5308
5362
|
*/
|
|
@@ -5332,6 +5386,11 @@ declare interface CssAutoOrModuleParserOptions {
|
|
|
5332
5386
|
* Enable/disable `url()`/`image-set()`/`src()`/`image()` functions handling.
|
|
5333
5387
|
*/
|
|
5334
5388
|
url?: boolean;
|
|
5389
|
+
|
|
5390
|
+
/**
|
|
5391
|
+
* URL-referenced-asset default hint rules for this parser (JavaScript `new URL(...)`, CSS `url(...)`, HTML `<img src>` / `<link href>` / `<script src>`).
|
|
5392
|
+
*/
|
|
5393
|
+
urlHints?: UrlHintRule[];
|
|
5335
5394
|
}
|
|
5336
5395
|
declare interface CssData {
|
|
5337
5396
|
/**
|
|
@@ -5356,11 +5415,12 @@ declare abstract class CssGenerator extends Generator {
|
|
|
5356
5415
|
* Processes the provided module.
|
|
5357
5416
|
*/
|
|
5358
5417
|
sourceDependency(
|
|
5359
|
-
module: NormalModule,
|
|
5360
5418
|
dependency: Dependency,
|
|
5361
|
-
initFragments: InitFragment<GenerateContext>[],
|
|
5362
5419
|
source: ReplaceSource,
|
|
5363
|
-
|
|
5420
|
+
templateContext: DependencyTemplateContext & {
|
|
5421
|
+
cssData: CssData;
|
|
5422
|
+
type: string;
|
|
5423
|
+
}
|
|
5364
5424
|
): void;
|
|
5365
5425
|
|
|
5366
5426
|
/**
|
|
@@ -5536,6 +5596,16 @@ declare interface CssModuleParserOptions {
|
|
|
5536
5596
|
*/
|
|
5537
5597
|
customIdents?: boolean;
|
|
5538
5598
|
|
|
5599
|
+
/**
|
|
5600
|
+
* Enable/disable resolution of `@custom-media` at-rules (file-local build-time substitution).
|
|
5601
|
+
*/
|
|
5602
|
+
customMedia?: boolean;
|
|
5603
|
+
|
|
5604
|
+
/**
|
|
5605
|
+
* Enable/disable resolution of `@custom-selector` at-rules (file-local build-time expansion to `:is(...)`).
|
|
5606
|
+
*/
|
|
5607
|
+
customSelectors?: boolean;
|
|
5608
|
+
|
|
5539
5609
|
/**
|
|
5540
5610
|
* Enable/disable renaming of dashed identifiers, e. g. custom properties.
|
|
5541
5611
|
*/
|
|
@@ -5546,6 +5616,11 @@ declare interface CssModuleParserOptions {
|
|
|
5546
5616
|
*/
|
|
5547
5617
|
exportType?: "link" | "text" | "css-style-sheet" | "style";
|
|
5548
5618
|
|
|
5619
|
+
/**
|
|
5620
|
+
* Auto-emit `<link rel="preload" as="font">` for the primary `src` URL of each `@font-face` reachable from an HTML entry's initial CSS. Only the first URL per `@font-face` is preloaded (preloading every format would double-download). Off by default; `parser.css.urlHints` rules and per-URL magic comments still override the seeded defaults. Set `output.crossOriginLoading` so the preload matches the font's CORS fetch.
|
|
5621
|
+
*/
|
|
5622
|
+
fontPreload?: boolean;
|
|
5623
|
+
|
|
5549
5624
|
/**
|
|
5550
5625
|
* Enable/disable renaming of `@function` names.
|
|
5551
5626
|
*/
|
|
@@ -5570,6 +5645,11 @@ declare interface CssModuleParserOptions {
|
|
|
5570
5645
|
* Enable/disable `url()`/`image-set()`/`src()`/`image()` functions handling.
|
|
5571
5646
|
*/
|
|
5572
5647
|
url?: boolean;
|
|
5648
|
+
|
|
5649
|
+
/**
|
|
5650
|
+
* URL-referenced-asset default hint rules for this parser (JavaScript `new URL(...)`, CSS `url(...)`, HTML `<img src>` / `<link href>` / `<script src>`).
|
|
5651
|
+
*/
|
|
5652
|
+
urlHints?: UrlHintRule[];
|
|
5573
5653
|
}
|
|
5574
5654
|
declare class CssModulesPlugin {
|
|
5575
5655
|
constructor();
|
|
@@ -5649,6 +5729,14 @@ declare abstract class CssParser extends ParserClass {
|
|
|
5649
5729
|
* Enable/disable renaming of custom identifiers.
|
|
5650
5730
|
*/
|
|
5651
5731
|
customIdents: boolean;
|
|
5732
|
+
/**
|
|
5733
|
+
* Enable/disable resolution of `@custom-media` at-rules (file-local build-time substitution).
|
|
5734
|
+
*/
|
|
5735
|
+
customMedia: boolean;
|
|
5736
|
+
/**
|
|
5737
|
+
* Enable/disable resolution of `@custom-selector` at-rules (file-local build-time expansion to `:is(...)`).
|
|
5738
|
+
*/
|
|
5739
|
+
customSelectors: boolean;
|
|
5652
5740
|
/**
|
|
5653
5741
|
* Enable/disable renaming of dashed identifiers, e. g. custom properties.
|
|
5654
5742
|
*/
|
|
@@ -5657,6 +5745,10 @@ declare abstract class CssParser extends ParserClass {
|
|
|
5657
5745
|
* Configure how CSS content is exported as default.
|
|
5658
5746
|
*/
|
|
5659
5747
|
exportType?: "link" | "text" | "css-style-sheet" | "style";
|
|
5748
|
+
/**
|
|
5749
|
+
* Auto-emit `<link rel="preload" as="font">` for the primary `src` URL of each `@font-face` reachable from an HTML entry's initial CSS. Only the first URL per `@font-face` is preloaded (preloading every format would double-download). Off by default; `parser.css.urlHints` rules and per-URL magic comments still override the seeded defaults. Set `output.crossOriginLoading` so the preload matches the font's CORS fetch.
|
|
5750
|
+
*/
|
|
5751
|
+
fontPreload?: boolean;
|
|
5660
5752
|
/**
|
|
5661
5753
|
* Enable/disable renaming of `@function` names.
|
|
5662
5754
|
*/
|
|
@@ -5681,6 +5773,10 @@ declare abstract class CssParser extends ParserClass {
|
|
|
5681
5773
|
* Enable/disable `url()`/`image-set()`/`src()`/`image()` functions handling.
|
|
5682
5774
|
*/
|
|
5683
5775
|
url: boolean;
|
|
5776
|
+
/**
|
|
5777
|
+
* URL-referenced-asset default hint rules for this parser (JavaScript `new URL(...)`, CSS `url(...)`, HTML `<img src>` / `<link href>` / `<script src>`).
|
|
5778
|
+
*/
|
|
5779
|
+
urlHints?: UrlHintRule[];
|
|
5684
5780
|
/**
|
|
5685
5781
|
* default mode
|
|
5686
5782
|
*/
|
|
@@ -5698,11 +5794,26 @@ declare interface CssParserOptions {
|
|
|
5698
5794
|
*/
|
|
5699
5795
|
as?: "stylesheet" | "block-contents";
|
|
5700
5796
|
|
|
5797
|
+
/**
|
|
5798
|
+
* Enable/disable resolution of `@custom-media` at-rules (file-local build-time substitution).
|
|
5799
|
+
*/
|
|
5800
|
+
customMedia?: boolean;
|
|
5801
|
+
|
|
5802
|
+
/**
|
|
5803
|
+
* Enable/disable resolution of `@custom-selector` at-rules (file-local build-time expansion to `:is(...)`).
|
|
5804
|
+
*/
|
|
5805
|
+
customSelectors?: boolean;
|
|
5806
|
+
|
|
5701
5807
|
/**
|
|
5702
5808
|
* Configure how CSS content is exported as default.
|
|
5703
5809
|
*/
|
|
5704
5810
|
exportType?: "link" | "text" | "css-style-sheet" | "style";
|
|
5705
5811
|
|
|
5812
|
+
/**
|
|
5813
|
+
* Auto-emit `<link rel="preload" as="font">` for the primary `src` URL of each `@font-face` reachable from an HTML entry's initial CSS. Only the first URL per `@font-face` is preloaded (preloading every format would double-download). Off by default; `parser.css.urlHints` rules and per-URL magic comments still override the seeded defaults. Set `output.crossOriginLoading` so the preload matches the font's CORS fetch.
|
|
5814
|
+
*/
|
|
5815
|
+
fontPreload?: boolean;
|
|
5816
|
+
|
|
5706
5817
|
/**
|
|
5707
5818
|
* Enable/disable `@import` at-rules handling.
|
|
5708
5819
|
*/
|
|
@@ -5717,8 +5828,33 @@ declare interface CssParserOptions {
|
|
|
5717
5828
|
* Enable/disable `url()`/`image-set()`/`src()`/`image()` functions handling.
|
|
5718
5829
|
*/
|
|
5719
5830
|
url?: boolean;
|
|
5831
|
+
|
|
5832
|
+
/**
|
|
5833
|
+
* URL-referenced-asset default hint rules for this parser (JavaScript `new URL(...)`, CSS `url(...)`, HTML `<img src>` / `<link href>` / `<script src>`).
|
|
5834
|
+
*/
|
|
5835
|
+
urlHints?: UrlHintRule[];
|
|
5720
5836
|
}
|
|
5721
5837
|
type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration;
|
|
5838
|
+
declare interface DefaultHandlerOptions {
|
|
5839
|
+
progressBar?:
|
|
5840
|
+
| false
|
|
5841
|
+
| Required<{
|
|
5842
|
+
/**
|
|
5843
|
+
* Color used for the filled portion of the bar.
|
|
5844
|
+
*/
|
|
5845
|
+
color?: string;
|
|
5846
|
+
/**
|
|
5847
|
+
* Name shown before the progress bar.
|
|
5848
|
+
*/
|
|
5849
|
+
name?: string;
|
|
5850
|
+
/**
|
|
5851
|
+
* Width of the progress bar in characters. Default: 25.
|
|
5852
|
+
*/
|
|
5853
|
+
width?: number;
|
|
5854
|
+
}>;
|
|
5855
|
+
estimatedTime?: boolean;
|
|
5856
|
+
phaseTimings?: boolean;
|
|
5857
|
+
}
|
|
5722
5858
|
type DefineConfigInput =
|
|
5723
5859
|
| Configuration
|
|
5724
5860
|
| MultiConfiguration
|
|
@@ -5766,6 +5902,21 @@ declare class DefinePlugin {
|
|
|
5766
5902
|
options?: true | string[] | RuntimeValueOptions
|
|
5767
5903
|
): RuntimeValue;
|
|
5768
5904
|
static getCompilationHooks: (compilation: Compilation) => DefinePluginHooks;
|
|
5905
|
+
static VALUE_DEP_MAIN: "webpack/DefinePlugin_hash";
|
|
5906
|
+
static VALUE_DEP_PREFIX: "webpack/DefinePlugin ";
|
|
5907
|
+
static getMergedDefinitionNode: (
|
|
5908
|
+
compilation: Compilation,
|
|
5909
|
+
key: string
|
|
5910
|
+
) => MergedDefinitionNode;
|
|
5911
|
+
static getRuntimeRequirements: (code: string) => undefined | string[];
|
|
5912
|
+
static stringifyMergedDefinition: (
|
|
5913
|
+
compilation: Compilation,
|
|
5914
|
+
parser: JavascriptParser,
|
|
5915
|
+
node: MergedDefinitionNode,
|
|
5916
|
+
key: string,
|
|
5917
|
+
objKeys?: null | Set<string>
|
|
5918
|
+
) => string;
|
|
5919
|
+
static toPropertyKey: (key: string) => string;
|
|
5769
5920
|
}
|
|
5770
5921
|
declare interface DefinePluginHooks {
|
|
5771
5922
|
definitions: SyncWaterfallHook<
|
|
@@ -6147,7 +6298,6 @@ declare abstract class DependencyTemplates {
|
|
|
6147
6298
|
declare interface DestructuringAssignmentProperty {
|
|
6148
6299
|
id: string;
|
|
6149
6300
|
range: [number, number];
|
|
6150
|
-
loc: SourceLocation;
|
|
6151
6301
|
pattern?: Set<DestructuringAssignmentProperty>;
|
|
6152
6302
|
shorthand: string | boolean;
|
|
6153
6303
|
}
|
|
@@ -6218,11 +6368,9 @@ declare interface DeterministicModuleIdsPluginOptions {
|
|
|
6218
6368
|
failOnConflict?: boolean;
|
|
6219
6369
|
}
|
|
6220
6370
|
type DevtoolFallbackModuleFilenameTemplate =
|
|
6221
|
-
| string
|
|
6222
|
-
| ((context: ModuleFilenameTemplateContext) => string);
|
|
6371
|
+
string | ((context: ModuleFilenameTemplateContext) => string);
|
|
6223
6372
|
type DevtoolModuleFilenameTemplate =
|
|
6224
|
-
| string
|
|
6225
|
-
| ((context: ModuleFilenameTemplateContext) => string);
|
|
6373
|
+
string | ((context: ModuleFilenameTemplateContext) => string);
|
|
6226
6374
|
|
|
6227
6375
|
/**
|
|
6228
6376
|
* Returns location of targetPath relative to rootPath.
|
|
@@ -6620,7 +6768,7 @@ declare class ElectronTargetPlugin {
|
|
|
6620
6768
|
* Creates an instance of ElectronTargetPlugin.
|
|
6621
6769
|
*/
|
|
6622
6770
|
constructor(
|
|
6623
|
-
context?: "
|
|
6771
|
+
context?: "preload" | "main" | "renderer",
|
|
6624
6772
|
type?:
|
|
6625
6773
|
| "import"
|
|
6626
6774
|
| "var"
|
|
@@ -6640,6 +6788,7 @@ declare class ElectronTargetPlugin {
|
|
|
6640
6788
|
| "umd2"
|
|
6641
6789
|
| "jsonp"
|
|
6642
6790
|
| "system"
|
|
6791
|
+
| "amd-async"
|
|
6643
6792
|
| "promise"
|
|
6644
6793
|
| "module-import"
|
|
6645
6794
|
| "script"
|
|
@@ -6949,8 +7098,7 @@ type EntryLibIndex =
|
|
|
6949
7098
|
| EntryObject
|
|
6950
7099
|
| string[];
|
|
6951
7100
|
type EntryNormalized =
|
|
6952
|
-
|
|
6953
|
-
| EntryStaticNormalized;
|
|
7101
|
+
(() => Promise<EntryStaticNormalized>) | EntryStaticNormalized;
|
|
6954
7102
|
|
|
6955
7103
|
/**
|
|
6956
7104
|
* Multiple entry bundles are created. The key is the entry name. The value can be a string, an array or an entry description object.
|
|
@@ -6994,7 +7142,7 @@ declare interface EntryOptionPluginHooks {
|
|
|
6994
7142
|
undefined | string
|
|
6995
7143
|
>;
|
|
6996
7144
|
}
|
|
6997
|
-
type EntryOptions = { name?: string } & Omit<
|
|
7145
|
+
type EntryOptions = { name?: string; worklet?: boolean } & Omit<
|
|
6998
7146
|
EntryDescriptionNormalized,
|
|
6999
7147
|
"import"
|
|
7000
7148
|
>;
|
|
@@ -7020,11 +7168,6 @@ declare class EntryPlugin {
|
|
|
7020
7168
|
options: string | EntryOptions
|
|
7021
7169
|
): EntryDependency;
|
|
7022
7170
|
}
|
|
7023
|
-
declare interface EntryScriptInfo {
|
|
7024
|
-
request: string;
|
|
7025
|
-
entryName: string;
|
|
7026
|
-
type: "script" | "stylesheet" | "script-module" | "modulepreload";
|
|
7027
|
-
}
|
|
7028
7171
|
type EntryStatic = string | EntryObject | string[];
|
|
7029
7172
|
|
|
7030
7173
|
/**
|
|
@@ -7070,12 +7213,7 @@ declare abstract class Entrypoint extends ChunkGroup {
|
|
|
7070
7213
|
dependOn(entrypoint: Entrypoint): boolean;
|
|
7071
7214
|
}
|
|
7072
7215
|
type EnumValue =
|
|
7073
|
-
|
|
|
7074
|
-
| string
|
|
7075
|
-
| number
|
|
7076
|
-
| boolean
|
|
7077
|
-
| EnumValueObject
|
|
7078
|
-
| EnumValue[];
|
|
7216
|
+
null | string | number | boolean | EnumValueObject | EnumValue[];
|
|
7079
7217
|
declare interface EnumValueObject {
|
|
7080
7218
|
[index: string]: EnumValue;
|
|
7081
7219
|
}
|
|
@@ -7129,6 +7267,11 @@ declare interface Environment {
|
|
|
7129
7267
|
*/
|
|
7130
7268
|
forOf?: boolean;
|
|
7131
7269
|
|
|
7270
|
+
/**
|
|
7271
|
+
* The environment supports generator functions and yield ('function* () { yield ... }').
|
|
7272
|
+
*/
|
|
7273
|
+
generator?: boolean;
|
|
7274
|
+
|
|
7132
7275
|
/**
|
|
7133
7276
|
* The environment supports 'globalThis'.
|
|
7134
7277
|
*/
|
|
@@ -7164,6 +7307,11 @@ declare interface Environment {
|
|
|
7164
7307
|
*/
|
|
7165
7308
|
module?: boolean;
|
|
7166
7309
|
|
|
7310
|
+
/**
|
|
7311
|
+
* The environment supports `<link rel="modulepreload">` to preload EcmaScript modules.
|
|
7312
|
+
*/
|
|
7313
|
+
modulePreload?: boolean;
|
|
7314
|
+
|
|
7167
7315
|
/**
|
|
7168
7316
|
* The environment supports `process.getBuiltinModule()` to synchronously load Node.js core modules.
|
|
7169
7317
|
*/
|
|
@@ -7245,8 +7393,7 @@ declare interface EvalDevToolModulePluginOptions {
|
|
|
7245
7393
|
* module filename template
|
|
7246
7394
|
*/
|
|
7247
7395
|
moduleFilenameTemplate?:
|
|
7248
|
-
| string
|
|
7249
|
-
| ((context: ModuleFilenameTemplateContext) => string);
|
|
7396
|
+
string | ((context: ModuleFilenameTemplateContext) => string);
|
|
7250
7397
|
}
|
|
7251
7398
|
declare class EvalSourceMapDevToolPlugin {
|
|
7252
7399
|
/**
|
|
@@ -7302,6 +7449,11 @@ declare interface ExecuteModuleOptions {
|
|
|
7302
7449
|
declare interface ExecuteModuleResult {
|
|
7303
7450
|
exports: any;
|
|
7304
7451
|
cacheable: boolean;
|
|
7452
|
+
|
|
7453
|
+
/**
|
|
7454
|
+
* reasons why the executed modules are not cacheable
|
|
7455
|
+
*/
|
|
7456
|
+
notCacheableReasons: string[];
|
|
7305
7457
|
assets: Map<string, { source: Source; info?: AssetInfo }>;
|
|
7306
7458
|
fileDependencies: LazySet<string>;
|
|
7307
7459
|
contextDependencies: LazySet<string>;
|
|
@@ -7334,10 +7486,10 @@ declare interface Experiments {
|
|
|
7334
7486
|
[index: string]: any;
|
|
7335
7487
|
|
|
7336
7488
|
/**
|
|
7337
|
-
* Support WebAssembly as asynchronous EcmaScript Module.
|
|
7489
|
+
* Support WebAssembly as asynchronous EcmaScript Module. `"auto"` (the default) enables it unless a loader is registered for WebAssembly files.
|
|
7338
7490
|
* @experimental
|
|
7339
7491
|
*/
|
|
7340
|
-
asyncWebAssembly?: boolean;
|
|
7492
|
+
asyncWebAssembly?: boolean | "auto";
|
|
7341
7493
|
|
|
7342
7494
|
/**
|
|
7343
7495
|
* Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.
|
|
@@ -7358,10 +7510,10 @@ declare interface Experiments {
|
|
|
7358
7510
|
cacheUnaffected?: boolean;
|
|
7359
7511
|
|
|
7360
7512
|
/**
|
|
7361
|
-
* Enable css support.
|
|
7513
|
+
* Enable css support. `"auto"` (the default) enables the built-in CSS support unless a loader is registered for CSS files.
|
|
7362
7514
|
* @experimental
|
|
7363
7515
|
*/
|
|
7364
|
-
css?: boolean;
|
|
7516
|
+
css?: boolean | "auto";
|
|
7365
7517
|
|
|
7366
7518
|
/**
|
|
7367
7519
|
* Enable experimental tc39 proposal https://github.com/tc39/proposal-defer-import-eval. This allows to defer execution of a module until it's first use.
|
|
@@ -7376,10 +7528,10 @@ declare interface Experiments {
|
|
|
7376
7528
|
futureDefaults?: boolean;
|
|
7377
7529
|
|
|
7378
7530
|
/**
|
|
7379
|
-
* Enable HTML entry support. Treats `.html` files as a first-class module type so they can be used directly as entry points.
|
|
7531
|
+
* Enable HTML entry support. Treats `.html` files as a first-class module type so they can be used directly as entry points. `"auto"` (the default) enables it unless a loader is registered for HTML files.
|
|
7380
7532
|
* @experimental
|
|
7381
7533
|
*/
|
|
7382
|
-
html?: boolean;
|
|
7534
|
+
html?: boolean | "auto";
|
|
7383
7535
|
|
|
7384
7536
|
/**
|
|
7385
7537
|
* Compile entrypoints and import()s only when they are accessed.
|
|
@@ -7406,10 +7558,10 @@ declare interface Experiments {
|
|
|
7406
7558
|
syncWebAssembly?: boolean;
|
|
7407
7559
|
|
|
7408
7560
|
/**
|
|
7409
|
-
* Enable typescript support.
|
|
7561
|
+
* Enable typescript support. `"auto"` (the default) enables the built-in TypeScript support when Node.js supports it (>= 22.6) and no loader is registered for TypeScript files.
|
|
7410
7562
|
* @experimental
|
|
7411
7563
|
*/
|
|
7412
|
-
typescript?: boolean;
|
|
7564
|
+
typescript?: boolean | "auto";
|
|
7413
7565
|
}
|
|
7414
7566
|
|
|
7415
7567
|
/**
|
|
@@ -7417,10 +7569,10 @@ declare interface Experiments {
|
|
|
7417
7569
|
*/
|
|
7418
7570
|
declare interface ExperimentsNormalized {
|
|
7419
7571
|
/**
|
|
7420
|
-
* Support WebAssembly as asynchronous EcmaScript Module.
|
|
7572
|
+
* Support WebAssembly as asynchronous EcmaScript Module. `"auto"` (the default) enables it unless a loader is registered for WebAssembly files.
|
|
7421
7573
|
* @experimental
|
|
7422
7574
|
*/
|
|
7423
|
-
asyncWebAssembly?: boolean;
|
|
7575
|
+
asyncWebAssembly?: boolean | "auto";
|
|
7424
7576
|
|
|
7425
7577
|
/**
|
|
7426
7578
|
* Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.
|
|
@@ -7441,10 +7593,10 @@ declare interface ExperimentsNormalized {
|
|
|
7441
7593
|
cacheUnaffected?: boolean;
|
|
7442
7594
|
|
|
7443
7595
|
/**
|
|
7444
|
-
* Enable css support.
|
|
7596
|
+
* Enable css support. `"auto"` (the default) enables the built-in CSS support unless a loader is registered for CSS files.
|
|
7445
7597
|
* @experimental
|
|
7446
7598
|
*/
|
|
7447
|
-
css?: boolean;
|
|
7599
|
+
css?: boolean | "auto";
|
|
7448
7600
|
|
|
7449
7601
|
/**
|
|
7450
7602
|
* Enable experimental tc39 proposal https://github.com/tc39/proposal-defer-import-eval. This allows to defer execution of a module until it's first use.
|
|
@@ -7459,10 +7611,10 @@ declare interface ExperimentsNormalized {
|
|
|
7459
7611
|
futureDefaults?: boolean;
|
|
7460
7612
|
|
|
7461
7613
|
/**
|
|
7462
|
-
* Enable HTML entry support. Treats `.html` files as a first-class module type so they can be used directly as entry points.
|
|
7614
|
+
* Enable HTML entry support. Treats `.html` files as a first-class module type so they can be used directly as entry points. `"auto"` (the default) enables it unless a loader is registered for HTML files.
|
|
7463
7615
|
* @experimental
|
|
7464
7616
|
*/
|
|
7465
|
-
html?: boolean;
|
|
7617
|
+
html?: boolean | "auto";
|
|
7466
7618
|
|
|
7467
7619
|
/**
|
|
7468
7620
|
* Compile entrypoints and import()s only when they are accessed.
|
|
@@ -7489,10 +7641,10 @@ declare interface ExperimentsNormalized {
|
|
|
7489
7641
|
syncWebAssembly?: boolean;
|
|
7490
7642
|
|
|
7491
7643
|
/**
|
|
7492
|
-
* Enable typescript support.
|
|
7644
|
+
* Enable typescript support. `"auto"` (the default) enables the built-in TypeScript support when Node.js supports it (>= 22.6) and no loader is registered for TypeScript files.
|
|
7493
7645
|
* @experimental
|
|
7494
7646
|
*/
|
|
7495
|
-
typescript?: boolean;
|
|
7647
|
+
typescript?: boolean | "auto";
|
|
7496
7648
|
}
|
|
7497
7649
|
declare abstract class ExportInfo {
|
|
7498
7650
|
name: string;
|
|
@@ -7957,10 +8109,7 @@ declare interface ExportsSpec {
|
|
|
7957
8109
|
dependencies?: Module[];
|
|
7958
8110
|
}
|
|
7959
8111
|
type ExportsType =
|
|
7960
|
-
| "
|
|
7961
|
-
| "dynamic"
|
|
7962
|
-
| "default-only"
|
|
7963
|
-
| "default-with-named";
|
|
8112
|
+
"namespace" | "dynamic" | "default-only" | "default-with-named";
|
|
7964
8113
|
type Exposes = (string | ExposesObject)[] | ExposesObject;
|
|
7965
8114
|
|
|
7966
8115
|
/**
|
|
@@ -8035,7 +8184,11 @@ type ExternalItem =
|
|
|
8035
8184
|
data: ExternalItemFunctionData,
|
|
8036
8185
|
callback: (
|
|
8037
8186
|
err?: null | Error,
|
|
8038
|
-
result?:
|
|
8187
|
+
result?:
|
|
8188
|
+
| string
|
|
8189
|
+
| boolean
|
|
8190
|
+
| string[]
|
|
8191
|
+
| (ExternalItemValueObjectKnown & ExternalItemValueObjectUnknown)
|
|
8039
8192
|
) => void
|
|
8040
8193
|
) => void)
|
|
8041
8194
|
| ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>);
|
|
@@ -8044,7 +8197,11 @@ type ExternalItemFunction =
|
|
|
8044
8197
|
data: ExternalItemFunctionData,
|
|
8045
8198
|
callback: (
|
|
8046
8199
|
err?: null | Error,
|
|
8047
|
-
result?:
|
|
8200
|
+
result?:
|
|
8201
|
+
| string
|
|
8202
|
+
| boolean
|
|
8203
|
+
| string[]
|
|
8204
|
+
| (ExternalItemValueObjectKnown & ExternalItemValueObjectUnknown)
|
|
8048
8205
|
) => void
|
|
8049
8206
|
) => void)
|
|
8050
8207
|
| ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>);
|
|
@@ -8105,7 +8262,28 @@ declare interface ExternalItemObjectKnown {
|
|
|
8105
8262
|
declare interface ExternalItemObjectUnknown {
|
|
8106
8263
|
[index: string]: ExternalItemValue;
|
|
8107
8264
|
}
|
|
8108
|
-
type ExternalItemValue =
|
|
8265
|
+
type ExternalItemValue =
|
|
8266
|
+
| string
|
|
8267
|
+
| boolean
|
|
8268
|
+
| string[]
|
|
8269
|
+
| (ExternalItemValueObjectKnown & ExternalItemValueObjectUnknown);
|
|
8270
|
+
|
|
8271
|
+
/**
|
|
8272
|
+
* The target of the external with a type, optionally with an 'interop' hint describing how its exports interoperate with ES module imports.
|
|
8273
|
+
*/
|
|
8274
|
+
declare interface ExternalItemValueObjectKnown {
|
|
8275
|
+
/**
|
|
8276
|
+
* How an external's exports interoperate with ES module imports, independent of the importing module's strictness (similar to Rollup's `output.interop`). 'default': treat as CommonJS, the default import is the whole exports (Node.js semantics). 'esModule': treat as an ES module namespace, the default import is unboxed to `.default`.
|
|
8277
|
+
*/
|
|
8278
|
+
interop?: "default" | "esModule";
|
|
8279
|
+
}
|
|
8280
|
+
|
|
8281
|
+
/**
|
|
8282
|
+
* The target of the external with a type, optionally with an 'interop' hint describing how its exports interoperate with ES module imports.
|
|
8283
|
+
*/
|
|
8284
|
+
declare interface ExternalItemValueObjectUnknown {
|
|
8285
|
+
[index: string]: string | string[];
|
|
8286
|
+
}
|
|
8109
8287
|
declare class ExternalModule extends Module {
|
|
8110
8288
|
/**
|
|
8111
8289
|
* Creates an instance of ExternalModule.
|
|
@@ -8115,17 +8293,15 @@ declare class ExternalModule extends Module {
|
|
|
8115
8293
|
type: ExternalsType,
|
|
8116
8294
|
userRequest: string,
|
|
8117
8295
|
dependencyMeta?:
|
|
8118
|
-
|
|
|
8119
|
-
|
|
8120
|
-
| AssetDependencyMeta
|
|
8296
|
+
ImportDependencyMeta | CssImportDependencyMeta | AssetDependencyMeta,
|
|
8297
|
+
interop?: "default" | "esModule"
|
|
8121
8298
|
);
|
|
8122
8299
|
request: ExternalModuleRequest;
|
|
8123
8300
|
externalType: ExternalsType;
|
|
8124
8301
|
userRequest: string;
|
|
8125
8302
|
dependencyMeta?:
|
|
8126
|
-
|
|
|
8127
|
-
|
|
8128
|
-
| AssetDependencyMeta;
|
|
8303
|
+
ImportDependencyMeta | CssImportDependencyMeta | AssetDependencyMeta;
|
|
8304
|
+
interop?: "default" | "esModule";
|
|
8129
8305
|
|
|
8130
8306
|
/**
|
|
8131
8307
|
* restore unsafe cache data
|
|
@@ -8224,19 +8400,13 @@ declare interface ExternalModuleInfo {
|
|
|
8224
8400
|
* memoized getExportsType(strict=true)
|
|
8225
8401
|
*/
|
|
8226
8402
|
exportsTypeStrict?:
|
|
8227
|
-
| "
|
|
8228
|
-
| "dynamic"
|
|
8229
|
-
| "default-only"
|
|
8230
|
-
| "default-with-named";
|
|
8403
|
+
"namespace" | "dynamic" | "default-only" | "default-with-named";
|
|
8231
8404
|
|
|
8232
8405
|
/**
|
|
8233
8406
|
* memoized getExportsType(strict=false)
|
|
8234
8407
|
*/
|
|
8235
8408
|
exportsTypeNonStrict?:
|
|
8236
|
-
| "
|
|
8237
|
-
| "dynamic"
|
|
8238
|
-
| "default-only"
|
|
8239
|
-
| "default-with-named";
|
|
8409
|
+
"namespace" | "dynamic" | "default-only" | "default-with-named";
|
|
8240
8410
|
}
|
|
8241
8411
|
type ExternalModuleRequest = string | string[] | RequestRecord;
|
|
8242
8412
|
type Externals =
|
|
@@ -8247,7 +8417,11 @@ type Externals =
|
|
|
8247
8417
|
data: ExternalItemFunctionData,
|
|
8248
8418
|
callback: (
|
|
8249
8419
|
err?: null | Error,
|
|
8250
|
-
result?:
|
|
8420
|
+
result?:
|
|
8421
|
+
| string
|
|
8422
|
+
| boolean
|
|
8423
|
+
| string[]
|
|
8424
|
+
| (ExternalItemValueObjectKnown & ExternalItemValueObjectUnknown)
|
|
8251
8425
|
) => void
|
|
8252
8426
|
) => void)
|
|
8253
8427
|
| ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>)
|
|
@@ -8276,6 +8450,7 @@ declare class ExternalsPlugin {
|
|
|
8276
8450
|
| "umd2"
|
|
8277
8451
|
| "jsonp"
|
|
8278
8452
|
| "system"
|
|
8453
|
+
| "amd-async"
|
|
8279
8454
|
| "promise"
|
|
8280
8455
|
| "module-import"
|
|
8281
8456
|
| "script"
|
|
@@ -8306,6 +8481,7 @@ declare class ExternalsPlugin {
|
|
|
8306
8481
|
| "umd2"
|
|
8307
8482
|
| "jsonp"
|
|
8308
8483
|
| "system"
|
|
8484
|
+
| "amd-async"
|
|
8309
8485
|
| "promise"
|
|
8310
8486
|
| "module-import"
|
|
8311
8487
|
| "script"
|
|
@@ -8405,6 +8581,7 @@ type ExternalsType =
|
|
|
8405
8581
|
| "umd2"
|
|
8406
8582
|
| "jsonp"
|
|
8407
8583
|
| "system"
|
|
8584
|
+
| "amd-async"
|
|
8408
8585
|
| "promise"
|
|
8409
8586
|
| "module-import"
|
|
8410
8587
|
| "script"
|
|
@@ -8520,7 +8697,7 @@ declare interface FileCacheOptions {
|
|
|
8520
8697
|
/**
|
|
8521
8698
|
* Compression type used for the cache files.
|
|
8522
8699
|
*/
|
|
8523
|
-
compression?: false | "gzip" | "brotli";
|
|
8700
|
+
compression?: false | "gzip" | "brotli" | "zstd";
|
|
8524
8701
|
|
|
8525
8702
|
/**
|
|
8526
8703
|
* Algorithm used for generation the hash (see node.js crypto package).
|
|
@@ -8699,9 +8876,7 @@ declare abstract class FileSystemInfo {
|
|
|
8699
8876
|
callback: (
|
|
8700
8877
|
err?: null | WebpackError,
|
|
8701
8878
|
resolvedContextTimestamp?:
|
|
8702
|
-
|
|
|
8703
|
-
| "ignore"
|
|
8704
|
-
| ResolvedContextFileSystemInfoEntry
|
|
8879
|
+
null | "ignore" | ResolvedContextFileSystemInfoEntry
|
|
8705
8880
|
) => void
|
|
8706
8881
|
): void;
|
|
8707
8882
|
|
|
@@ -8784,10 +8959,7 @@ declare interface FileSystemInfoEntry {
|
|
|
8784
8959
|
timestamp?: number;
|
|
8785
8960
|
}
|
|
8786
8961
|
type FileTimestamp =
|
|
8787
|
-
|
|
|
8788
|
-
| "ignore"
|
|
8789
|
-
| FileSystemInfoEntry
|
|
8790
|
-
| ExistenceOnlyTimeEntryFileSystemInfo;
|
|
8962
|
+
null | "ignore" | FileSystemInfoEntry | ExistenceOnlyTimeEntryFileSystemInfo;
|
|
8791
8963
|
type FilterItemTypes = string | RegExp | ((value: string) => boolean);
|
|
8792
8964
|
declare interface Flags {
|
|
8793
8965
|
[index: string]: Argument;
|
|
@@ -9446,29 +9618,96 @@ declare interface HotModuleReplacementPluginLoaderContext {
|
|
|
9446
9618
|
declare class HotUpdateChunk extends Chunk {
|
|
9447
9619
|
constructor();
|
|
9448
9620
|
}
|
|
9449
|
-
declare
|
|
9450
|
-
|
|
9621
|
+
declare interface HtmlCompilationHooks {
|
|
9622
|
+
/**
|
|
9623
|
+
* called with the list of extra tags to inject into each page (initially empty) plus the current HTML; push `HtmlTagDescriptor`s and return the list — webpack serializes and places them by `injectTo`. A structured alternative to the string-level `transformHtml` for adding tags; runs before CSP so injected inline tags are hashed
|
|
9624
|
+
*/
|
|
9625
|
+
injectTags: AsyncSeriesWaterfallHook<
|
|
9626
|
+
[HtmlTagDescriptor[], HtmlInjectTagsContext],
|
|
9627
|
+
HtmlTagDescriptor[]
|
|
9628
|
+
>;
|
|
9451
9629
|
|
|
9452
9630
|
/**
|
|
9453
|
-
*
|
|
9631
|
+
* called with the page's `<script>`/`<link>`/`<style>`/`<meta>` tags (webpack's own and any injected) as mutable descriptors; mutate `attrs` (add a `nonce`/`data-*`, switch `defer`↔`async`, …), set `remove: true`, or change `injectTo` to move a tag between `<head>` and `<body>`, and webpack rewrites the changed tags. Add new tags with `injectTags` instead
|
|
9454
9632
|
*/
|
|
9455
|
-
|
|
9456
|
-
module: NormalModule,
|
|
9457
|
-
dependency: Dependency,
|
|
9458
|
-
initFragments: InitFragment<GenerateContext>[],
|
|
9459
|
-
source: ReplaceSource,
|
|
9460
|
-
generateContext: GenerateContext
|
|
9461
|
-
): void;
|
|
9633
|
+
transformTags: AsyncSeriesHook<[HtmlMutableTag[], HtmlTransformTagsContext]>;
|
|
9462
9634
|
|
|
9463
9635
|
/**
|
|
9464
|
-
*
|
|
9636
|
+
* called with each emitted page's final HTML (all sentinels resolved) just before it is written; return the (possibly transformed) HTML — e.g. to minify, inject a CSP meta, or rewrite tags
|
|
9465
9637
|
*/
|
|
9466
|
-
|
|
9467
|
-
|
|
9468
|
-
|
|
9469
|
-
|
|
9638
|
+
transformHtml: AsyncSeriesWaterfallHook<
|
|
9639
|
+
[string, HtmlTransformHtmlContext],
|
|
9640
|
+
string
|
|
9641
|
+
>;
|
|
9642
|
+
|
|
9643
|
+
/**
|
|
9644
|
+
* called once each page's HTML asset has been finalized — a post-emit notification (nothing to return)
|
|
9645
|
+
*/
|
|
9646
|
+
htmlEmitted: AsyncSeriesHook<[HtmlEmittedContext]>;
|
|
9647
|
+
}
|
|
9648
|
+
declare interface HtmlEmittedContext {
|
|
9649
|
+
outputName: string;
|
|
9650
|
+
}
|
|
9651
|
+
declare interface HtmlEntryInfo {
|
|
9652
|
+
request: string;
|
|
9653
|
+
entryName: string;
|
|
9654
|
+
type:
|
|
9655
|
+
| "html"
|
|
9656
|
+
| "script"
|
|
9657
|
+
| "stylesheet"
|
|
9658
|
+
| "prefetch"
|
|
9659
|
+
| "preload"
|
|
9660
|
+
| "modulepreload"
|
|
9661
|
+
| "script-module";
|
|
9662
|
+
css?: boolean;
|
|
9663
|
+
}
|
|
9664
|
+
type HtmlFaviconIcon =
|
|
9665
|
+
| string
|
|
9666
|
+
| {
|
|
9667
|
+
/**
|
|
9668
|
+
* Value for the `color` attribute (used by `rel="mask-icon"`).
|
|
9669
|
+
*/
|
|
9670
|
+
color?: string;
|
|
9671
|
+
/**
|
|
9672
|
+
* Value for the `crossorigin` attribute.
|
|
9673
|
+
*/
|
|
9674
|
+
crossorigin?: "anonymous" | "use-credentials";
|
|
9675
|
+
/**
|
|
9676
|
+
* Path to the icon file, emitted as a hashed asset.
|
|
9677
|
+
*/
|
|
9678
|
+
href: string;
|
|
9679
|
+
/**
|
|
9680
|
+
* Value for the `media` attribute (e.g. `"(prefers-color-scheme: dark)"`).
|
|
9681
|
+
*/
|
|
9682
|
+
media?: string;
|
|
9683
|
+
/**
|
|
9684
|
+
* Value for the `sizes` attribute (e.g. `"180x180"` or `"any"`).
|
|
9685
|
+
*/
|
|
9686
|
+
sizes?: string;
|
|
9687
|
+
/**
|
|
9688
|
+
* Value for the `type` attribute; inferred from the file extension when omitted.
|
|
9689
|
+
*/
|
|
9690
|
+
type?: string;
|
|
9691
|
+
};
|
|
9692
|
+
declare abstract class HtmlGenerator extends Generator {
|
|
9693
|
+
options: HtmlGeneratorOptions;
|
|
9694
|
+
|
|
9695
|
+
/**
|
|
9696
|
+
* Processes the provided module.
|
|
9697
|
+
*/
|
|
9698
|
+
sourceDependency(
|
|
9699
|
+
dependency: Dependency,
|
|
9470
9700
|
source: ReplaceSource,
|
|
9471
|
-
|
|
9701
|
+
templateContext: DependencyTemplateContext
|
|
9702
|
+
): void;
|
|
9703
|
+
|
|
9704
|
+
/**
|
|
9705
|
+
* Processes the provided dependencies block.
|
|
9706
|
+
*/
|
|
9707
|
+
sourceBlock(
|
|
9708
|
+
block: DependenciesBlock,
|
|
9709
|
+
source: ReplaceSource,
|
|
9710
|
+
templateContext: DependencyTemplateContext
|
|
9472
9711
|
): void;
|
|
9473
9712
|
|
|
9474
9713
|
/**
|
|
@@ -9500,14 +9739,75 @@ declare interface HtmlGeneratorOptions {
|
|
|
9500
9739
|
*/
|
|
9501
9740
|
extract?: boolean | "inline";
|
|
9502
9741
|
}
|
|
9742
|
+
declare interface HtmlInjectTagsContext {
|
|
9743
|
+
outputName: string;
|
|
9744
|
+
html: string;
|
|
9745
|
+
}
|
|
9503
9746
|
type HtmlModuleBuildInfo = KnownBuildInfo &
|
|
9504
9747
|
Record<string, any> &
|
|
9505
9748
|
KnownNormalModuleBuildInfo &
|
|
9506
9749
|
KnownHtmlModuleBuildInfo;
|
|
9750
|
+
declare class HtmlModulesPlugin {
|
|
9751
|
+
constructor();
|
|
9752
|
+
|
|
9753
|
+
/**
|
|
9754
|
+
* Applies the plugin by registering its hooks on the compiler.
|
|
9755
|
+
*/
|
|
9756
|
+
apply(compiler: Compiler): void;
|
|
9757
|
+
|
|
9758
|
+
/**
|
|
9759
|
+
* `output.hashFunction`/`hashSalt`/`hashDigest`/`hashDigestLength`
|
|
9760
|
+
* digest of `content`, with `nonNumericOnlyHash` applied — webpack's
|
|
9761
|
+
* standard `[contenthash]` recipe.
|
|
9762
|
+
*/
|
|
9763
|
+
static computeContentHash(
|
|
9764
|
+
content: string | Buffer,
|
|
9765
|
+
outputOptions: Output
|
|
9766
|
+
): string;
|
|
9767
|
+
|
|
9768
|
+
/**
|
|
9769
|
+
* Filename template for an extracted HTML page: `output.htmlFilename` for
|
|
9770
|
+
* initial chunks, `output.htmlChunkFilename` otherwise — the HTML counterpart
|
|
9771
|
+
* of `CssModulesPlugin.getChunkFilenameTemplate`.
|
|
9772
|
+
*/
|
|
9773
|
+
static getChunkFilenameTemplate(
|
|
9774
|
+
chunk: Chunk,
|
|
9775
|
+
outputOptions: Output
|
|
9776
|
+
): ChunkFilenameTemplate;
|
|
9777
|
+
|
|
9778
|
+
/**
|
|
9779
|
+
* Per-compilation hooks for the experimental HTML support.
|
|
9780
|
+
*/
|
|
9781
|
+
static getCompilationHooks: (
|
|
9782
|
+
compilation: Compilation
|
|
9783
|
+
) => HtmlCompilationHooks;
|
|
9784
|
+
}
|
|
9785
|
+
declare interface HtmlMutableTag {
|
|
9786
|
+
/**
|
|
9787
|
+
* the (lowercased) tag name
|
|
9788
|
+
*/
|
|
9789
|
+
tag: string;
|
|
9790
|
+
|
|
9791
|
+
/**
|
|
9792
|
+
* mutable attributes; a string value renders `name="value"`, `true` a bare attribute, `false`/`undefined`/deleting the key drops it
|
|
9793
|
+
*/
|
|
9794
|
+
attrs: Record<string, undefined | string | boolean>;
|
|
9795
|
+
|
|
9796
|
+
/**
|
|
9797
|
+
* the tag's current region (`"head"`/`"body"`); set a different value to move it there (`*-prepend` to the region's start)
|
|
9798
|
+
*/
|
|
9799
|
+
injectTo?: "body" | "head" | "head-prepend" | "body-prepend";
|
|
9800
|
+
|
|
9801
|
+
/**
|
|
9802
|
+
* set true to delete the whole element
|
|
9803
|
+
*/
|
|
9804
|
+
remove?: boolean;
|
|
9805
|
+
}
|
|
9507
9806
|
declare abstract class HtmlParser extends ParserClass {
|
|
9508
9807
|
magicCommentContext: ContextImport;
|
|
9509
9808
|
template?: (source: string, context: HtmlTemplateContext) => string;
|
|
9510
|
-
|
|
9809
|
+
fragmentContext?: string;
|
|
9810
|
+
sourcesByTag: SourceTable;
|
|
9511
9811
|
|
|
9512
9812
|
/**
|
|
9513
9813
|
* Runs the `template` option over the source and returns the transformed
|
|
@@ -9523,6 +9823,11 @@ declare abstract class HtmlParser extends ParserClass {
|
|
|
9523
9823
|
* Parser options for html modules.
|
|
9524
9824
|
*/
|
|
9525
9825
|
declare interface HtmlParserOptions {
|
|
9826
|
+
/**
|
|
9827
|
+
* Configure how the HTML source is parsed: `"document"` (the default) parses a full page; any other value is the tag name of the context element to parse the source as that element's inner HTML (a fragment) — e.g. `"template"` for a neutral fragment, or `"tbody"` so context-sensitive tags like a bare `<tr>`/`<td>` are kept instead of dropped.
|
|
9828
|
+
*/
|
|
9829
|
+
as?: string;
|
|
9830
|
+
|
|
9526
9831
|
/**
|
|
9527
9832
|
* Configure extraction of URL-like attribute values (e.g. `<img src>`, `<link href>`, `<script src>`) as webpack dependencies. `true` (default) uses the built-in source list; `false` disables extraction entirely so attributes are left untouched and `<script src>` / `<link rel="modulepreload">` / `<link rel="stylesheet">` no longer become compilation entries; an array lets you customize which `tag`/`attribute` pairs are treated as URLs and how they are bundled. Use the string `"..."` inside the array to inline the defaults. Inline `<script>` and `<style>` bodies are always processed. Use `webpackIgnore` comments or `IgnorePlugin` to skip individual URLs.
|
|
9528
9833
|
*/
|
|
@@ -9547,9 +9852,11 @@ declare interface HtmlParserOptions {
|
|
|
9547
9852
|
*/
|
|
9548
9853
|
tag?: string;
|
|
9549
9854
|
/**
|
|
9550
|
-
* How the attribute value should be parsed and bundled. `src` extracts a single URL as a plain asset; `srcset` parses a `srcset`-style list of candidate URLs as plain assets; `css-url` extracts `url(...)` references from a CSS value (like an SVG presentation attribute such as `fill`) as plain assets; `script` and `script-module` emit a classic / ES-module chunk entry like `<script src>` and `<script type="module" src>`; `stylesheet` emits a CSS chunk entry like `<link rel="stylesheet">`; `stylesheet-style` treats the attribute value as a full stylesheet (like a `<style>` body) and `stylesheet-style-attribute` as a CSS block's contents (a declaration list, like a `style` attribute) — both bundle it through the CSS pipeline and replace the attribute's content with the processed CSS at render time; `srcdoc` treats the attribute value as an entity-encoded HTML document (like `<iframe srcdoc>`), bundling it through the HTML pipeline and replacing the attribute's content with the processed HTML at render time.
|
|
9855
|
+
* How the attribute value should be parsed and bundled, or `false` to disable a built-in source for this `tag`/`attribute` (use together with `"..."` to drop a default, e.g. stop treating `<img src>` as a URL). `src` extracts a single URL as a plain asset; `srcset` parses a `srcset`-style list of candidate URLs as plain assets; `css-url` extracts `url(...)` references from a CSS value (like an SVG presentation attribute such as `fill`) as plain assets; `script` and `script-module` emit a classic / ES-module chunk entry like `<script src>` and `<script type="module" src>`; `stylesheet` emits a CSS chunk entry like `<link rel="stylesheet">`; `html` treats the URL as a link to another HTML file that is bundled as its own emitted page (its assets extracted) and rewrites the attribute to the page's output filename (like Parcel's `<a href="page.html">`); `stylesheet-style` treats the attribute value as a full stylesheet (like a `<style>` body) and `stylesheet-style-attribute` as a CSS block's contents (a declaration list, like a `style` attribute) — both bundle it through the CSS pipeline and replace the attribute's content with the processed CSS at render time; `srcdoc` treats the attribute value as an entity-encoded HTML document (like `<iframe srcdoc>`), bundling it through the HTML pipeline and replacing the attribute's content with the processed HTML at render time.
|
|
9551
9856
|
*/
|
|
9552
9857
|
type:
|
|
9858
|
+
| false
|
|
9859
|
+
| "html"
|
|
9553
9860
|
| "script"
|
|
9554
9861
|
| "css-url"
|
|
9555
9862
|
| "stylesheet"
|
|
@@ -9566,6 +9873,145 @@ declare interface HtmlParserOptions {
|
|
|
9566
9873
|
* Transform the raw source before the html parser extracts dependencies. Receives the source string and a context (`{ module, resource }`) and must return the html string to parse. Useful for compiling a templating language (Handlebars, EJS, Eta, …) to html so that URLs the template emits are still picked up as webpack dependencies. Runs synchronously.
|
|
9567
9874
|
*/
|
|
9568
9875
|
template?: (source: string, context: HtmlTemplateContext) => string;
|
|
9876
|
+
|
|
9877
|
+
/**
|
|
9878
|
+
* URL-referenced-asset default hint rules for this parser (JavaScript `new URL(...)`, CSS `url(...)`, HTML `<img src>` / `<link href>` / `<script src>`).
|
|
9879
|
+
*/
|
|
9880
|
+
urlHints?: UrlHintRule[];
|
|
9881
|
+
}
|
|
9882
|
+
declare interface HtmlResourceHintHtmlEntryDependency {
|
|
9883
|
+
/**
|
|
9884
|
+
* hint relationship
|
|
9885
|
+
*/
|
|
9886
|
+
rel: HtmlResourceHintRel;
|
|
9887
|
+
|
|
9888
|
+
/**
|
|
9889
|
+
* literal URL (external, `preconnect`, or an already-hashed asset)
|
|
9890
|
+
*/
|
|
9891
|
+
href?: string;
|
|
9892
|
+
|
|
9893
|
+
/**
|
|
9894
|
+
* chunk name to hint
|
|
9895
|
+
*/
|
|
9896
|
+
chunk?: string;
|
|
9897
|
+
|
|
9898
|
+
/**
|
|
9899
|
+
* entrypoint name to hint (expands to one hint per initial chunk)
|
|
9900
|
+
*/
|
|
9901
|
+
entry?: string;
|
|
9902
|
+
|
|
9903
|
+
/**
|
|
9904
|
+
* the `as` attribute; defaults to `script` for chunk/entry refs
|
|
9905
|
+
*/
|
|
9906
|
+
as?: string;
|
|
9907
|
+
|
|
9908
|
+
/**
|
|
9909
|
+
* the `type` attribute (MIME)
|
|
9910
|
+
*/
|
|
9911
|
+
type?: string;
|
|
9912
|
+
|
|
9913
|
+
/**
|
|
9914
|
+
* CORS mode (`true` → `anonymous`)
|
|
9915
|
+
*/
|
|
9916
|
+
crossorigin?: boolean | "anonymous" | "use-credentials";
|
|
9917
|
+
|
|
9918
|
+
/**
|
|
9919
|
+
* the `media` attribute
|
|
9920
|
+
*/
|
|
9921
|
+
media?: string;
|
|
9922
|
+
|
|
9923
|
+
/**
|
|
9924
|
+
* SRI for a chunk/entry ref; follows `output.html.integrity` by default, `false` opts out
|
|
9925
|
+
*/
|
|
9926
|
+
integrity?: boolean;
|
|
9927
|
+
|
|
9928
|
+
/**
|
|
9929
|
+
* the `fetchpriority` attribute (allowed on `preload`/`modulepreload`/`prefetch`)
|
|
9930
|
+
*/
|
|
9931
|
+
fetchPriority?: "auto" | "low" | "high";
|
|
9932
|
+
}
|
|
9933
|
+
type HtmlResourceHintRel =
|
|
9934
|
+
"prefetch" | "preload" | "modulepreload" | "preconnect" | "dns-prefetch";
|
|
9935
|
+
|
|
9936
|
+
/**
|
|
9937
|
+
* A custom resource-hint `<link>` for `output.html.resourceHints`. Exactly one of `href` / `chunk` / `entry` names the target.
|
|
9938
|
+
*/
|
|
9939
|
+
declare interface HtmlResourceHintWebpackOptions {
|
|
9940
|
+
/**
|
|
9941
|
+
* The `as` attribute (`script`, `style`, `font`, …); defaults to `script` for chunk/entry references.
|
|
9942
|
+
*/
|
|
9943
|
+
as?: string;
|
|
9944
|
+
|
|
9945
|
+
/**
|
|
9946
|
+
* Name of a chunk to hint; its emitted URL is resolved automatically.
|
|
9947
|
+
*/
|
|
9948
|
+
chunk?: string;
|
|
9949
|
+
|
|
9950
|
+
/**
|
|
9951
|
+
* The CORS mode; `true` maps to `anonymous`.
|
|
9952
|
+
*/
|
|
9953
|
+
crossorigin?: boolean | "anonymous" | "use-credentials";
|
|
9954
|
+
|
|
9955
|
+
/**
|
|
9956
|
+
* Name of an entrypoint to hint; expands to one hint per initial chunk.
|
|
9957
|
+
*/
|
|
9958
|
+
entry?: string;
|
|
9959
|
+
|
|
9960
|
+
/**
|
|
9961
|
+
* The `fetchpriority` attribute. Emitted on `preload` / `modulepreload` and on `prefetch` (the spec now permits it there).
|
|
9962
|
+
*/
|
|
9963
|
+
fetchPriority?: "auto" | "low" | "high";
|
|
9964
|
+
|
|
9965
|
+
/**
|
|
9966
|
+
* A literal URL used verbatim (external resource, `preconnect` origin, or an already-hashed asset).
|
|
9967
|
+
*/
|
|
9968
|
+
href?: string;
|
|
9969
|
+
|
|
9970
|
+
/**
|
|
9971
|
+
* Subresource Integrity for a chunk/entry reference. Follows `output.html.integrity` by default; set `false` to opt this hint out.
|
|
9972
|
+
*/
|
|
9973
|
+
integrity?: boolean;
|
|
9974
|
+
|
|
9975
|
+
/**
|
|
9976
|
+
* The `media` attribute.
|
|
9977
|
+
*/
|
|
9978
|
+
media?: string;
|
|
9979
|
+
|
|
9980
|
+
/**
|
|
9981
|
+
* The `rel` of the resource hint.
|
|
9982
|
+
*/
|
|
9983
|
+
rel: "prefetch" | "preload" | "modulepreload" | "preconnect" | "dns-prefetch";
|
|
9984
|
+
|
|
9985
|
+
/**
|
|
9986
|
+
* The `type` attribute (MIME type).
|
|
9987
|
+
*/
|
|
9988
|
+
type?: string;
|
|
9989
|
+
}
|
|
9990
|
+
declare interface HtmlTagDescriptor {
|
|
9991
|
+
/**
|
|
9992
|
+
* tag name, e.g. `"script"` / `"link"` / `"meta"`
|
|
9993
|
+
*/
|
|
9994
|
+
tag: string;
|
|
9995
|
+
|
|
9996
|
+
/**
|
|
9997
|
+
* attributes; `true` renders a bare boolean attribute, `false`/`undefined` is omitted
|
|
9998
|
+
*/
|
|
9999
|
+
attrs?: Record<string, undefined | string | boolean>;
|
|
10000
|
+
|
|
10001
|
+
/**
|
|
10002
|
+
* inner content (ignored for void elements like `<link>`/`<meta>`)
|
|
10003
|
+
*/
|
|
10004
|
+
children?: string;
|
|
10005
|
+
|
|
10006
|
+
/**
|
|
10007
|
+
* placement; defaults to `"head"`
|
|
10008
|
+
*/
|
|
10009
|
+
injectTo?: "body" | "head" | "head-prepend" | "body-prepend";
|
|
10010
|
+
|
|
10011
|
+
/**
|
|
10012
|
+
* force a void element (no closing tag); inferred from the tag name when omitted
|
|
10013
|
+
*/
|
|
10014
|
+
voidTag?: boolean;
|
|
9569
10015
|
}
|
|
9570
10016
|
declare interface HtmlTemplateContext {
|
|
9571
10017
|
/**
|
|
@@ -9608,6 +10054,13 @@ declare interface HtmlTemplateContext {
|
|
|
9608
10054
|
*/
|
|
9609
10055
|
emitError: (error: string | Error) => void;
|
|
9610
10056
|
}
|
|
10057
|
+
declare interface HtmlTransformHtmlContext {
|
|
10058
|
+
outputName: string;
|
|
10059
|
+
}
|
|
10060
|
+
declare interface HtmlTransformTagsContext {
|
|
10061
|
+
outputName: string;
|
|
10062
|
+
html: string;
|
|
10063
|
+
}
|
|
9611
10064
|
|
|
9612
10065
|
/**
|
|
9613
10066
|
* Options for building http resources.
|
|
@@ -10030,6 +10483,65 @@ declare interface ImportDependencyMeta {
|
|
|
10030
10483
|
type ImportExpressionJavascriptParser = ImportExpressionImport & {
|
|
10031
10484
|
phase?: "defer" | "source";
|
|
10032
10485
|
};
|
|
10486
|
+
type ImportMetaParserOptions = ImportMetaParserOptionsKnown &
|
|
10487
|
+
ImportMetaParserOptionsUnknown;
|
|
10488
|
+
|
|
10489
|
+
/**
|
|
10490
|
+
* Enable/disable evaluating import.meta fields. Omitted fields are enabled and unknown fields are preserved. Custom fields are allowed.
|
|
10491
|
+
*/
|
|
10492
|
+
declare interface ImportMetaParserOptionsKnown {
|
|
10493
|
+
/**
|
|
10494
|
+
* Enable/disable evaluating import.meta.dirname.
|
|
10495
|
+
*/
|
|
10496
|
+
dirname?: boolean;
|
|
10497
|
+
|
|
10498
|
+
/**
|
|
10499
|
+
* Enable/disable evaluating import.meta.env.
|
|
10500
|
+
*/
|
|
10501
|
+
env?: boolean;
|
|
10502
|
+
|
|
10503
|
+
/**
|
|
10504
|
+
* Enable/disable evaluating import.meta.filename.
|
|
10505
|
+
*/
|
|
10506
|
+
filename?: boolean;
|
|
10507
|
+
|
|
10508
|
+
/**
|
|
10509
|
+
* Enable/disable evaluating import.meta.main.
|
|
10510
|
+
*/
|
|
10511
|
+
main?: boolean;
|
|
10512
|
+
|
|
10513
|
+
/**
|
|
10514
|
+
* Enable/disable evaluating import.meta.resolve.
|
|
10515
|
+
*/
|
|
10516
|
+
resolve?: boolean;
|
|
10517
|
+
|
|
10518
|
+
/**
|
|
10519
|
+
* Enable/disable evaluating import.meta.url.
|
|
10520
|
+
*/
|
|
10521
|
+
url?: boolean;
|
|
10522
|
+
|
|
10523
|
+
/**
|
|
10524
|
+
* Enable/disable evaluating import.meta.webpack.
|
|
10525
|
+
*/
|
|
10526
|
+
webpack?: boolean;
|
|
10527
|
+
|
|
10528
|
+
/**
|
|
10529
|
+
* Enable/disable evaluating import.meta.webpackContext.
|
|
10530
|
+
*/
|
|
10531
|
+
webpackContext?: boolean;
|
|
10532
|
+
|
|
10533
|
+
/**
|
|
10534
|
+
* Enable/disable evaluating import.meta.webpackHot.
|
|
10535
|
+
*/
|
|
10536
|
+
webpackHot?: boolean;
|
|
10537
|
+
}
|
|
10538
|
+
|
|
10539
|
+
/**
|
|
10540
|
+
* Enable/disable evaluating import.meta fields. Omitted fields are enabled and unknown fields are preserved. Custom fields are allowed.
|
|
10541
|
+
*/
|
|
10542
|
+
declare interface ImportMetaParserOptionsUnknown {
|
|
10543
|
+
[index: string]: boolean;
|
|
10544
|
+
}
|
|
10033
10545
|
declare interface ImportModuleOptions {
|
|
10034
10546
|
/**
|
|
10035
10547
|
* the target layer
|
|
@@ -10052,12 +10564,7 @@ declare interface ImportSettings {
|
|
|
10052
10564
|
expression: ImportExpressionJavascriptParser;
|
|
10053
10565
|
}
|
|
10054
10566
|
type ImportSource =
|
|
10055
|
-
|
|
|
10056
|
-
| null
|
|
10057
|
-
| string
|
|
10058
|
-
| SimpleLiteral
|
|
10059
|
-
| RegExpLiteral
|
|
10060
|
-
| BigIntLiteral;
|
|
10567
|
+
undefined | null | string | SimpleLiteral | RegExpLiteral | BigIntLiteral;
|
|
10061
10568
|
type Imported = true | [string, string][];
|
|
10062
10569
|
|
|
10063
10570
|
/**
|
|
@@ -10094,6 +10601,11 @@ declare interface InfrastructureLogging {
|
|
|
10094
10601
|
*/
|
|
10095
10602
|
level?: "none" | "verbose" | "error" | "warn" | "info" | "log";
|
|
10096
10603
|
|
|
10604
|
+
/**
|
|
10605
|
+
* Show build progress. `"auto"` shows it only for interactive terminals. This option is only used when no custom console is provided.
|
|
10606
|
+
*/
|
|
10607
|
+
progress?: boolean | "auto";
|
|
10608
|
+
|
|
10097
10609
|
/**
|
|
10098
10610
|
* Stream used for logging output. Defaults to process.stderr. This option is only used when no custom console is provided.
|
|
10099
10611
|
*/
|
|
@@ -10356,10 +10868,9 @@ declare abstract class JavascriptGenerator extends Generator {
|
|
|
10356
10868
|
* Processes the provided module.
|
|
10357
10869
|
*/
|
|
10358
10870
|
sourceDependency(
|
|
10359
|
-
module: Module,
|
|
10360
10871
|
dependency: Dependency,
|
|
10361
|
-
initFragments: InitFragment<GenerateContext>[],
|
|
10362
10872
|
source: ReplaceSource,
|
|
10873
|
+
templateContext: DependencyTemplateContext,
|
|
10363
10874
|
generateContext: GenerateContext
|
|
10364
10875
|
): void;
|
|
10365
10876
|
|
|
@@ -10369,7 +10880,7 @@ declare abstract class JavascriptGenerator extends Generator {
|
|
|
10369
10880
|
sourceBlock(
|
|
10370
10881
|
module: Module,
|
|
10371
10882
|
block: DependenciesBlock,
|
|
10372
|
-
|
|
10883
|
+
templateContext: DependencyTemplateContext,
|
|
10373
10884
|
source: ReplaceSource,
|
|
10374
10885
|
generateContext: GenerateContext
|
|
10375
10886
|
): void;
|
|
@@ -10481,6 +10992,8 @@ declare class JavascriptParser extends ParserClass {
|
|
|
10481
10992
|
options?: {
|
|
10482
10993
|
parse?: (code: string, options: ParseOptions) => ParseResult;
|
|
10483
10994
|
typescript?: boolean;
|
|
10995
|
+
importPhases?: boolean;
|
|
10996
|
+
strictModeViolations?: false | "error" | "warn";
|
|
10484
10997
|
}
|
|
10485
10998
|
);
|
|
10486
10999
|
hooks: Readonly<{
|
|
@@ -10630,6 +11143,41 @@ declare class JavascriptParser extends ParserClass {
|
|
|
10630
11143
|
],
|
|
10631
11144
|
boolean | void
|
|
10632
11145
|
>;
|
|
11146
|
+
preStatementByType: HookMap<
|
|
11147
|
+
SyncBailHook<
|
|
11148
|
+
[
|
|
11149
|
+
| ImportDeclaration
|
|
11150
|
+
| ExportNamedDeclaration
|
|
11151
|
+
| ExportAllDeclaration
|
|
11152
|
+
| FunctionDeclaration
|
|
11153
|
+
| MaybeNamedFunctionDeclaration
|
|
11154
|
+
| VariableDeclaration
|
|
11155
|
+
| ClassDeclaration
|
|
11156
|
+
| MaybeNamedClassDeclaration
|
|
11157
|
+
| ExpressionStatement
|
|
11158
|
+
| BlockStatement
|
|
11159
|
+
| StaticBlock
|
|
11160
|
+
| EmptyStatement
|
|
11161
|
+
| DebuggerStatement
|
|
11162
|
+
| WithStatement
|
|
11163
|
+
| ReturnStatement
|
|
11164
|
+
| LabeledStatement
|
|
11165
|
+
| BreakStatement
|
|
11166
|
+
| ContinueStatement
|
|
11167
|
+
| IfStatement
|
|
11168
|
+
| SwitchStatement
|
|
11169
|
+
| ThrowStatement
|
|
11170
|
+
| TryStatement
|
|
11171
|
+
| WhileStatement
|
|
11172
|
+
| DoWhileStatement
|
|
11173
|
+
| ForStatement
|
|
11174
|
+
| ForInStatement
|
|
11175
|
+
| ForOfStatement
|
|
11176
|
+
| ExportDefaultDeclaration
|
|
11177
|
+
],
|
|
11178
|
+
boolean | void
|
|
11179
|
+
>
|
|
11180
|
+
>;
|
|
10633
11181
|
blockPreStatement: SyncBailHook<
|
|
10634
11182
|
[
|
|
10635
11183
|
| ImportDeclaration
|
|
@@ -10663,6 +11211,41 @@ declare class JavascriptParser extends ParserClass {
|
|
|
10663
11211
|
],
|
|
10664
11212
|
boolean | void
|
|
10665
11213
|
>;
|
|
11214
|
+
blockPreStatementByType: HookMap<
|
|
11215
|
+
SyncBailHook<
|
|
11216
|
+
[
|
|
11217
|
+
| ImportDeclaration
|
|
11218
|
+
| ExportNamedDeclaration
|
|
11219
|
+
| ExportAllDeclaration
|
|
11220
|
+
| FunctionDeclaration
|
|
11221
|
+
| MaybeNamedFunctionDeclaration
|
|
11222
|
+
| VariableDeclaration
|
|
11223
|
+
| ClassDeclaration
|
|
11224
|
+
| MaybeNamedClassDeclaration
|
|
11225
|
+
| ExpressionStatement
|
|
11226
|
+
| BlockStatement
|
|
11227
|
+
| StaticBlock
|
|
11228
|
+
| EmptyStatement
|
|
11229
|
+
| DebuggerStatement
|
|
11230
|
+
| WithStatement
|
|
11231
|
+
| ReturnStatement
|
|
11232
|
+
| LabeledStatement
|
|
11233
|
+
| BreakStatement
|
|
11234
|
+
| ContinueStatement
|
|
11235
|
+
| IfStatement
|
|
11236
|
+
| SwitchStatement
|
|
11237
|
+
| ThrowStatement
|
|
11238
|
+
| TryStatement
|
|
11239
|
+
| WhileStatement
|
|
11240
|
+
| DoWhileStatement
|
|
11241
|
+
| ForStatement
|
|
11242
|
+
| ForInStatement
|
|
11243
|
+
| ForOfStatement
|
|
11244
|
+
| ExportDefaultDeclaration
|
|
11245
|
+
],
|
|
11246
|
+
boolean | void
|
|
11247
|
+
>
|
|
11248
|
+
>;
|
|
10666
11249
|
statement: SyncBailHook<
|
|
10667
11250
|
[
|
|
10668
11251
|
| ImportDeclaration
|
|
@@ -10922,11 +11505,13 @@ declare class JavascriptParser extends ParserClass {
|
|
|
10922
11505
|
options: {
|
|
10923
11506
|
parse?: (code: string, options: ParseOptions) => ParseResult;
|
|
10924
11507
|
typescript?: boolean;
|
|
11508
|
+
importPhases?: boolean;
|
|
11509
|
+
strictModeViolations?: false | "error" | "warn";
|
|
10925
11510
|
};
|
|
10926
11511
|
scope: ScopeInfo;
|
|
10927
11512
|
state: JavascriptParserState;
|
|
10928
11513
|
comments?: CommentJavascriptParser[];
|
|
10929
|
-
semicolons?:
|
|
11514
|
+
semicolons?: Map<number, boolean>;
|
|
10930
11515
|
statementPath?: StatementPathItem[];
|
|
10931
11516
|
prevStatement?:
|
|
10932
11517
|
| ImportDeclaration
|
|
@@ -12205,6 +12790,20 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12205
12790
|
commentsStartPos: number
|
|
12206
12791
|
): boolean;
|
|
12207
12792
|
|
|
12793
|
+
/**
|
|
12794
|
+
* Returns the location of a node or comment, computed from its offsets so
|
|
12795
|
+
* ASTs from parsers without location support work too. Falls back to the
|
|
12796
|
+
* node's own `loc` only when no source text is available (preparsed ASTs).
|
|
12797
|
+
* Offsets can only be mapped while parsing — callbacks deferred past the
|
|
12798
|
+
* `parse()` call must take the location upfront.
|
|
12799
|
+
*/
|
|
12800
|
+
getLocation(node: {
|
|
12801
|
+
start?: number;
|
|
12802
|
+
end?: number;
|
|
12803
|
+
range?: [number, number];
|
|
12804
|
+
loc?: null | SourceLocation;
|
|
12805
|
+
}): DependencyLocation;
|
|
12806
|
+
|
|
12208
12807
|
/**
|
|
12209
12808
|
* Returns comments in the range.
|
|
12210
12809
|
*/
|
|
@@ -12560,6 +13159,11 @@ declare interface JavascriptParserOptions {
|
|
|
12560
13159
|
*/
|
|
12561
13160
|
deferImport?: boolean;
|
|
12562
13161
|
|
|
13162
|
+
/**
|
|
13163
|
+
* Auto-emit `<link rel="preload" as="style">` for the CSS of every dynamically imported (`import()`) chunk, so the stylesheet fetches in parallel with the chunk's JavaScript instead of after it parses. Unlike `dynamicImportPreload`, the JavaScript itself is not preloaded. `true` uses the default order; a number sets the preload order.
|
|
13164
|
+
*/
|
|
13165
|
+
dynamicImportCssPreload?: number | boolean;
|
|
13166
|
+
|
|
12563
13167
|
/**
|
|
12564
13168
|
* Specifies global fetchPriority for dynamic import.
|
|
12565
13169
|
*/
|
|
@@ -12626,12 +13230,13 @@ declare interface JavascriptParserOptions {
|
|
|
12626
13230
|
importExportsPresence?: false | "auto" | "error" | "warn";
|
|
12627
13231
|
|
|
12628
13232
|
/**
|
|
12629
|
-
* Enable/disable evaluating import.meta. Set to 'preserve-unknown' to preserve unknown properties for runtime evaluation.
|
|
13233
|
+
* Enable/disable evaluating import.meta. Set to 'preserve-unknown' or an object to preserve unknown properties for runtime evaluation.
|
|
12630
13234
|
*/
|
|
12631
|
-
importMeta?: boolean | "preserve-unknown";
|
|
13235
|
+
importMeta?: boolean | "preserve-unknown" | ImportMetaParserOptions;
|
|
12632
13236
|
|
|
12633
13237
|
/**
|
|
12634
|
-
* Enable/disable evaluating import.meta.webpackContext.
|
|
13238
|
+
* Deprecated in favor of "importMeta" object option with a "webpackContext" field. Enable/disable evaluating import.meta.webpackContext.
|
|
13239
|
+
* @deprecated
|
|
12635
13240
|
*/
|
|
12636
13241
|
importMetaContext?: boolean;
|
|
12637
13242
|
|
|
@@ -12691,6 +13296,11 @@ declare interface JavascriptParserOptions {
|
|
|
12691
13296
|
*/
|
|
12692
13297
|
strictExportPresence?: boolean;
|
|
12693
13298
|
|
|
13299
|
+
/**
|
|
13300
|
+
* Specifies the behavior of constructs that break at runtime in strict mode (e.g. 'with', 'arguments.callee', assigning to read-only globals) when modules are emitted as ES module output.
|
|
13301
|
+
*/
|
|
13302
|
+
strictModeViolations?: false | "error" | "warn";
|
|
13303
|
+
|
|
12694
13304
|
/**
|
|
12695
13305
|
* Handle the this context correctly according to the spec for namespace objects.
|
|
12696
13306
|
*/
|
|
@@ -12732,11 +13342,21 @@ declare interface JavascriptParserOptions {
|
|
|
12732
13342
|
*/
|
|
12733
13343
|
url?: boolean | "relative";
|
|
12734
13344
|
|
|
13345
|
+
/**
|
|
13346
|
+
* URL-referenced-asset default hint rules for this parser (JavaScript `new URL(...)`, CSS `url(...)`, HTML `<img src>` / `<link href>` / `<script src>`).
|
|
13347
|
+
*/
|
|
13348
|
+
urlHints?: UrlHintRule[];
|
|
13349
|
+
|
|
12735
13350
|
/**
|
|
12736
13351
|
* Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register().
|
|
12737
13352
|
*/
|
|
12738
13353
|
worker?: boolean | string[];
|
|
12739
13354
|
|
|
13355
|
+
/**
|
|
13356
|
+
* Disable or configure parsing of Worklet syntax like context.audioWorklet.addModule() or CSS.paintWorklet.addModule().
|
|
13357
|
+
*/
|
|
13358
|
+
worklet?: boolean | string[];
|
|
13359
|
+
|
|
12740
13360
|
/**
|
|
12741
13361
|
* Enable warnings for partial dynamic dependencies.
|
|
12742
13362
|
*/
|
|
@@ -12771,13 +13391,7 @@ declare abstract class JsonData {
|
|
|
12771
13391
|
* Returns raw JSON data.
|
|
12772
13392
|
*/
|
|
12773
13393
|
get():
|
|
12774
|
-
|
|
|
12775
|
-
| null
|
|
12776
|
-
| string
|
|
12777
|
-
| number
|
|
12778
|
-
| boolean
|
|
12779
|
-
| JsonObjectFs
|
|
12780
|
-
| JsonValueFs[];
|
|
13394
|
+
undefined | null | string | number | boolean | JsonObjectFs | JsonValueFs[];
|
|
12781
13395
|
|
|
12782
13396
|
/**
|
|
12783
13397
|
* Updates the hash with the data contributed by this instance.
|
|
@@ -12812,13 +13426,7 @@ type JsonModuleBuildInfo = KnownBuildInfo &
|
|
|
12812
13426
|
KnownJsonModuleBuildInfo;
|
|
12813
13427
|
declare interface JsonObjectFs {
|
|
12814
13428
|
[index: string]:
|
|
12815
|
-
|
|
|
12816
|
-
| null
|
|
12817
|
-
| string
|
|
12818
|
-
| number
|
|
12819
|
-
| boolean
|
|
12820
|
-
| JsonObjectFs
|
|
12821
|
-
| JsonValueFs[];
|
|
13429
|
+
undefined | null | string | number | boolean | JsonObjectFs | JsonValueFs[];
|
|
12822
13430
|
}
|
|
12823
13431
|
declare interface JsonObjectTypes {
|
|
12824
13432
|
[index: string]:
|
|
@@ -12856,19 +13464,9 @@ declare interface JsonParserOptions {
|
|
|
12856
13464
|
) => null | string | number | boolean | Buffer | JsonObjectFs | JsonValueFs[];
|
|
12857
13465
|
}
|
|
12858
13466
|
type JsonValueFs =
|
|
12859
|
-
|
|
|
12860
|
-
| string
|
|
12861
|
-
| number
|
|
12862
|
-
| boolean
|
|
12863
|
-
| JsonObjectFs
|
|
12864
|
-
| JsonValueFs[];
|
|
13467
|
+
null | string | number | boolean | JsonObjectFs | JsonValueFs[];
|
|
12865
13468
|
type JsonValueTypes =
|
|
12866
|
-
|
|
|
12867
|
-
| string
|
|
12868
|
-
| number
|
|
12869
|
-
| boolean
|
|
12870
|
-
| JsonObjectTypes
|
|
12871
|
-
| JsonValueTypes[];
|
|
13469
|
+
null | string | number | boolean | JsonObjectTypes | JsonValueTypes[];
|
|
12872
13470
|
declare class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
|
|
12873
13471
|
constructor(runtimeRequirements: ReadonlySet<string>);
|
|
12874
13472
|
static getCompilationHooks: (
|
|
@@ -13003,6 +13601,11 @@ declare interface KnownAssetModuleBuildInfo {
|
|
|
13003
13601
|
}
|
|
13004
13602
|
declare interface KnownBuildInfo {
|
|
13005
13603
|
cacheable?: boolean;
|
|
13604
|
+
|
|
13605
|
+
/**
|
|
13606
|
+
* reasons why the module is not cacheable (e.g. paths of loaders that marked it)
|
|
13607
|
+
*/
|
|
13608
|
+
notCacheableReasons?: string[];
|
|
13006
13609
|
strict?: boolean;
|
|
13007
13610
|
moduleArgument?: string;
|
|
13008
13611
|
exportsArgument?: string;
|
|
@@ -13022,6 +13625,11 @@ declare interface KnownBuildInfo {
|
|
|
13022
13625
|
* true when the module is part of a circular dependency chain
|
|
13023
13626
|
*/
|
|
13024
13627
|
isCircular?: boolean;
|
|
13628
|
+
|
|
13629
|
+
/**
|
|
13630
|
+
* module uses top-level `for await…of`, which can't be lowered to a generator
|
|
13631
|
+
*/
|
|
13632
|
+
usesTopLevelAwaitForOf?: boolean;
|
|
13025
13633
|
}
|
|
13026
13634
|
declare interface KnownBuildMeta {
|
|
13027
13635
|
exportsType?: "default" | "namespace" | "flagged" | "dynamic";
|
|
@@ -13120,7 +13728,12 @@ declare interface KnownHtmlModuleBuildInfo {
|
|
|
13120
13728
|
/**
|
|
13121
13729
|
* entries collected from the document, grouped by kind
|
|
13122
13730
|
*/
|
|
13123
|
-
|
|
13731
|
+
htmlEntries?: Record<string, HtmlEntryInfo[]>;
|
|
13732
|
+
|
|
13733
|
+
/**
|
|
13734
|
+
* `../` per `<base href>` path segment, prepended to the auto-public-path undo path so a relative base doesn't misdirect bundled URLs
|
|
13735
|
+
*/
|
|
13736
|
+
baseUrlPrefix?: string;
|
|
13124
13737
|
}
|
|
13125
13738
|
declare interface KnownJavascriptModuleBuildInfo {
|
|
13126
13739
|
/**
|
|
@@ -13415,6 +14028,7 @@ declare interface KnownStatsModule {
|
|
|
13415
14028
|
size?: number;
|
|
13416
14029
|
sizes?: Record<string, number>;
|
|
13417
14030
|
cacheable?: boolean;
|
|
14031
|
+
notCacheableReasons?: string[];
|
|
13418
14032
|
built?: boolean;
|
|
13419
14033
|
codeGenerated?: boolean;
|
|
13420
14034
|
buildTimeExecuted?: boolean;
|
|
@@ -13655,9 +14269,7 @@ declare interface LazyCompilationDefaultBackendOptions {
|
|
|
13655
14269
|
* Specifies where to listen to from the server.
|
|
13656
14270
|
*/
|
|
13657
14271
|
listen?:
|
|
13658
|
-
|
|
|
13659
|
-
| ListenOptions
|
|
13660
|
-
| ((server: ServerLazyCompilationBackend) => void);
|
|
14272
|
+
number | ListenOptions | ((server: ServerLazyCompilationBackend) => void);
|
|
13661
14273
|
|
|
13662
14274
|
/**
|
|
13663
14275
|
* Specifies the protocol the client should use to connect to the server.
|
|
@@ -14412,8 +15024,7 @@ declare abstract class MainTemplate {
|
|
|
14412
15024
|
renderManifest: {
|
|
14413
15025
|
tap: <AdditionalOptions>(
|
|
14414
15026
|
options:
|
|
14415
|
-
| string
|
|
14416
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
15027
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
14417
15028
|
fn: (
|
|
14418
15029
|
renderManifestEntries: RenderManifestEntry[],
|
|
14419
15030
|
renderManifestOptions: RenderManifestOptions
|
|
@@ -14425,8 +15036,7 @@ declare abstract class MainTemplate {
|
|
|
14425
15036
|
require: {
|
|
14426
15037
|
tap: <AdditionalOptions>(
|
|
14427
15038
|
options:
|
|
14428
|
-
| string
|
|
14429
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
15039
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
14430
15040
|
fn: (
|
|
14431
15041
|
value: string,
|
|
14432
15042
|
renderBootstrapContext: RenderBootstrapContext
|
|
@@ -14439,8 +15049,7 @@ declare abstract class MainTemplate {
|
|
|
14439
15049
|
render: {
|
|
14440
15050
|
tap: <AdditionalOptions>(
|
|
14441
15051
|
options:
|
|
14442
|
-
| string
|
|
14443
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
15052
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
14444
15053
|
fn: (
|
|
14445
15054
|
source: Source,
|
|
14446
15055
|
chunk: Chunk,
|
|
@@ -14453,16 +15062,14 @@ declare abstract class MainTemplate {
|
|
|
14453
15062
|
renderWithEntry: {
|
|
14454
15063
|
tap: <AdditionalOptions>(
|
|
14455
15064
|
options:
|
|
14456
|
-
| string
|
|
14457
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
15065
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
14458
15066
|
fn: (source: Source, chunk: Chunk, hash?: string) => Source
|
|
14459
15067
|
) => void;
|
|
14460
15068
|
};
|
|
14461
15069
|
assetPath: {
|
|
14462
15070
|
tap: <AdditionalOptions>(
|
|
14463
15071
|
options:
|
|
14464
|
-
| string
|
|
14465
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
15072
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
14466
15073
|
fn: (value: string, path: PathData, assetInfo?: AssetInfo) => string
|
|
14467
15074
|
) => void;
|
|
14468
15075
|
call: (filename: TemplatePath, options: PathData) => string;
|
|
@@ -14470,16 +15077,14 @@ declare abstract class MainTemplate {
|
|
|
14470
15077
|
hash: {
|
|
14471
15078
|
tap: <AdditionalOptions>(
|
|
14472
15079
|
options:
|
|
14473
|
-
| string
|
|
14474
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
15080
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
14475
15081
|
fn: (hash: Hash) => void
|
|
14476
15082
|
) => void;
|
|
14477
15083
|
};
|
|
14478
15084
|
hashForChunk: {
|
|
14479
15085
|
tap: <AdditionalOptions>(
|
|
14480
15086
|
options:
|
|
14481
|
-
| string
|
|
14482
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
15087
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
14483
15088
|
fn: (hash: Hash, chunk: Chunk) => void
|
|
14484
15089
|
) => void;
|
|
14485
15090
|
};
|
|
@@ -14699,6 +15304,41 @@ declare interface MergeDuplicateChunksPluginOptions {
|
|
|
14699
15304
|
*/
|
|
14700
15305
|
stage?: number;
|
|
14701
15306
|
}
|
|
15307
|
+
type MergedDefinitionNode =
|
|
15308
|
+
| undefined
|
|
15309
|
+
| null
|
|
15310
|
+
| string
|
|
15311
|
+
| number
|
|
15312
|
+
| bigint
|
|
15313
|
+
| boolean
|
|
15314
|
+
| Function
|
|
15315
|
+
| RegExp
|
|
15316
|
+
| RuntimeValue
|
|
15317
|
+
| {
|
|
15318
|
+
[index: string]: RecursiveArrayOrRecord<
|
|
15319
|
+
| undefined
|
|
15320
|
+
| null
|
|
15321
|
+
| string
|
|
15322
|
+
| number
|
|
15323
|
+
| bigint
|
|
15324
|
+
| boolean
|
|
15325
|
+
| Function
|
|
15326
|
+
| RegExp
|
|
15327
|
+
| RuntimeValue
|
|
15328
|
+
>;
|
|
15329
|
+
}
|
|
15330
|
+
| RecursiveArrayOrRecord<
|
|
15331
|
+
| undefined
|
|
15332
|
+
| null
|
|
15333
|
+
| string
|
|
15334
|
+
| number
|
|
15335
|
+
| bigint
|
|
15336
|
+
| boolean
|
|
15337
|
+
| Function
|
|
15338
|
+
| RegExp
|
|
15339
|
+
| RuntimeValue
|
|
15340
|
+
>[]
|
|
15341
|
+
| Map<string, MergedDefinitionNode>;
|
|
14702
15342
|
type Meta = KnownMeta & Record<symbol, string[]> & Record<string, any>;
|
|
14703
15343
|
declare class MinChunkSizePlugin {
|
|
14704
15344
|
/**
|
|
@@ -14762,10 +15402,7 @@ declare interface MkdirSync {
|
|
|
14762
15402
|
(
|
|
14763
15403
|
path: PathLikeFs,
|
|
14764
15404
|
options?:
|
|
14765
|
-
|
|
|
14766
|
-
| string
|
|
14767
|
-
| number
|
|
14768
|
-
| (MakeDirectoryOptions & { recursive?: false })
|
|
15405
|
+
null | string | number | (MakeDirectoryOptions & { recursive?: false })
|
|
14769
15406
|
): void;
|
|
14770
15407
|
(
|
|
14771
15408
|
path: PathLikeFs,
|
|
@@ -14859,8 +15496,7 @@ declare class Module extends DependenciesBlock {
|
|
|
14859
15496
|
* @deprecated
|
|
14860
15497
|
*/
|
|
14861
15498
|
get optimizationBailout(): (
|
|
14862
|
-
| string
|
|
14863
|
-
| ((requestShortener: RequestShortener) => string)
|
|
15499
|
+
string | ((requestShortener: RequestShortener) => string)
|
|
14864
15500
|
)[];
|
|
14865
15501
|
|
|
14866
15502
|
/**
|
|
@@ -15415,6 +16051,7 @@ declare interface ModuleFederationPluginOptions {
|
|
|
15415
16051
|
| "umd2"
|
|
15416
16052
|
| "jsonp"
|
|
15417
16053
|
| "system"
|
|
16054
|
+
| "amd-async"
|
|
15418
16055
|
| "promise"
|
|
15419
16056
|
| "module-import"
|
|
15420
16057
|
| "script"
|
|
@@ -16299,8 +16936,7 @@ declare abstract class ModuleTemplate {
|
|
|
16299
16936
|
content: {
|
|
16300
16937
|
tap: <AdditionalOptions>(
|
|
16301
16938
|
options:
|
|
16302
|
-
| string
|
|
16303
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
16939
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
16304
16940
|
fn: (
|
|
16305
16941
|
source: Source,
|
|
16306
16942
|
module: Module,
|
|
@@ -16312,8 +16948,7 @@ declare abstract class ModuleTemplate {
|
|
|
16312
16948
|
module: {
|
|
16313
16949
|
tap: <AdditionalOptions>(
|
|
16314
16950
|
options:
|
|
16315
|
-
| string
|
|
16316
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
16951
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
16317
16952
|
fn: (
|
|
16318
16953
|
source: Source,
|
|
16319
16954
|
module: Module,
|
|
@@ -16325,8 +16960,7 @@ declare abstract class ModuleTemplate {
|
|
|
16325
16960
|
render: {
|
|
16326
16961
|
tap: <AdditionalOptions>(
|
|
16327
16962
|
options:
|
|
16328
|
-
| string
|
|
16329
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
16963
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
16330
16964
|
fn: (
|
|
16331
16965
|
source: Source,
|
|
16332
16966
|
module: Module,
|
|
@@ -16338,8 +16972,7 @@ declare abstract class ModuleTemplate {
|
|
|
16338
16972
|
package: {
|
|
16339
16973
|
tap: <AdditionalOptions>(
|
|
16340
16974
|
options:
|
|
16341
|
-
| string
|
|
16342
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
16975
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
16343
16976
|
fn: (
|
|
16344
16977
|
source: Source,
|
|
16345
16978
|
module: Module,
|
|
@@ -16351,8 +16984,7 @@ declare abstract class ModuleTemplate {
|
|
|
16351
16984
|
hash: {
|
|
16352
16985
|
tap: <AdditionalOptions>(
|
|
16353
16986
|
options:
|
|
16354
|
-
| string
|
|
16355
|
-
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
16987
|
+
string | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
|
16356
16988
|
fn: (hash: Hash) => void
|
|
16357
16989
|
) => void;
|
|
16358
16990
|
};
|
|
@@ -16387,6 +17019,7 @@ declare class MultiCompiler {
|
|
|
16387
17019
|
compilers: Compiler[];
|
|
16388
17020
|
dependencies: WeakMap<Compiler, string[]>;
|
|
16389
17021
|
running: boolean;
|
|
17022
|
+
watching?: MultiWatching;
|
|
16390
17023
|
get options(): WebpackOptionsNormalized[] & MultiCompilerOptions;
|
|
16391
17024
|
get outputPath(): string;
|
|
16392
17025
|
|
|
@@ -17863,17 +18496,12 @@ declare interface Optimization {
|
|
|
17863
18496
|
* Define the algorithm to choose chunk ids (named: readable ids for better debugging, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin).
|
|
17864
18497
|
*/
|
|
17865
18498
|
chunkIds?:
|
|
17866
|
-
|
|
|
17867
|
-
| "natural"
|
|
17868
|
-
| "named"
|
|
17869
|
-
| "deterministic"
|
|
17870
|
-
| "size"
|
|
17871
|
-
| "total-size";
|
|
18499
|
+
false | "natural" | "named" | "deterministic" | "size" | "total-size";
|
|
17872
18500
|
|
|
17873
18501
|
/**
|
|
17874
|
-
* Concatenate modules when possible to generate less modules, more efficient code and enable more optimizations by the minimizer.
|
|
18502
|
+
* Concatenate modules when possible to generate less modules, more efficient code and enable more optimizations by the minimizer. An options object implies 'true'.
|
|
17875
18503
|
*/
|
|
17876
|
-
concatenateModules?: boolean;
|
|
18504
|
+
concatenateModules?: boolean | ConcatenateModulesOptions;
|
|
17877
18505
|
|
|
17878
18506
|
/**
|
|
17879
18507
|
* Emit assets even when errors occur. Critical errors are emitted into the generated code and will cause errors at runtime.
|
|
@@ -18018,17 +18646,12 @@ declare interface OptimizationNormalized {
|
|
|
18018
18646
|
* Define the algorithm to choose chunk ids (named: readable ids for better debugging, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin).
|
|
18019
18647
|
*/
|
|
18020
18648
|
chunkIds?:
|
|
18021
|
-
|
|
|
18022
|
-
| "natural"
|
|
18023
|
-
| "named"
|
|
18024
|
-
| "deterministic"
|
|
18025
|
-
| "size"
|
|
18026
|
-
| "total-size";
|
|
18649
|
+
false | "natural" | "named" | "deterministic" | "size" | "total-size";
|
|
18027
18650
|
|
|
18028
18651
|
/**
|
|
18029
|
-
* Concatenate modules when possible to generate less modules, more efficient code and enable more optimizations by the minimizer.
|
|
18652
|
+
* Concatenate modules when possible to generate less modules, more efficient code and enable more optimizations by the minimizer. An options object implies 'true'.
|
|
18030
18653
|
*/
|
|
18031
|
-
concatenateModules?: boolean;
|
|
18654
|
+
concatenateModules?: boolean | ConcatenateModulesOptions;
|
|
18032
18655
|
|
|
18033
18656
|
/**
|
|
18034
18657
|
* Emit assets even when errors occur. Critical errors are emitted into the generated code and will cause errors at runtime.
|
|
@@ -18187,7 +18810,9 @@ type OptimizationNormalizedWithDefaults = OptimizationNormalized & {
|
|
|
18187
18810
|
mangleExports: NonNullable<undefined | boolean | "deterministic" | "size">;
|
|
18188
18811
|
innerGraph: NonNullable<undefined | boolean>;
|
|
18189
18812
|
inlineExports: NonNullable<undefined | boolean>;
|
|
18190
|
-
concatenateModules: NonNullable<
|
|
18813
|
+
concatenateModules: NonNullable<
|
|
18814
|
+
undefined | boolean | ConcatenateModulesOptions
|
|
18815
|
+
>;
|
|
18191
18816
|
avoidEntryIife: NonNullable<undefined | boolean>;
|
|
18192
18817
|
emitOnErrors: NonNullable<undefined | boolean>;
|
|
18193
18818
|
checkWasmTypes: NonNullable<undefined | boolean>;
|
|
@@ -18639,15 +19264,13 @@ declare interface Output {
|
|
|
18639
19264
|
* Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
|
|
18640
19265
|
*/
|
|
18641
19266
|
devtoolFallbackModuleFilenameTemplate?:
|
|
18642
|
-
| string
|
|
18643
|
-
| ((context: ModuleFilenameTemplateContext) => string);
|
|
19267
|
+
string | ((context: ModuleFilenameTemplateContext) => string);
|
|
18644
19268
|
|
|
18645
19269
|
/**
|
|
18646
19270
|
* Filename template string of function for the sources array in a generated SourceMap.
|
|
18647
19271
|
*/
|
|
18648
19272
|
devtoolModuleFilenameTemplate?:
|
|
18649
|
-
| string
|
|
18650
|
-
| ((context: ModuleFilenameTemplateContext) => string);
|
|
19273
|
+
string | ((context: ModuleFilenameTemplateContext) => string);
|
|
18651
19274
|
|
|
18652
19275
|
/**
|
|
18653
19276
|
* Module namespace to use when interpolating filename template string for the sources array in a generated SourceMap. Defaults to `output.library` if not set. It's useful for avoiding runtime collisions in sourcemaps from multiple webpack projects built as libraries.
|
|
@@ -18789,6 +19412,26 @@ declare interface Output {
|
|
|
18789
19412
|
*/
|
|
18790
19413
|
publicPath?: string | TemplatePathFn<PathData>;
|
|
18791
19414
|
|
|
19415
|
+
/**
|
|
19416
|
+
* Resource-hint (`<link rel="prefetch">` / `<link rel="preload">` / `<link rel="modulepreload">` / `<link rel="preconnect">`) emission for extracted HTML entries and URL-referenced assets. Accepts the initial-graph shorthand (boolean / `"prefetch"` / `"preload"` / `"none"` / `HtmlResourceHint[]` / function — equivalent to `{ initial: <value> }`) or the full object form `{ initial, urlHints, preconnect, modulePreloadPolyfill, manifest }`. `initial` defaults on for ESM output (`output.module`), where native `import()` would otherwise waterfall; classic output stays opt-in.
|
|
19417
|
+
*/
|
|
19418
|
+
resourceHints?:
|
|
19419
|
+
| boolean
|
|
19420
|
+
| "none"
|
|
19421
|
+
| ResourceHintsOptions
|
|
19422
|
+
| HtmlResourceHintWebpackOptions[]
|
|
19423
|
+
| "prefetch"
|
|
19424
|
+
| "preload"
|
|
19425
|
+
| ((context: {
|
|
19426
|
+
entryName: string;
|
|
19427
|
+
entrypoint: Entrypoint;
|
|
19428
|
+
hostType: "html" | "js";
|
|
19429
|
+
compilation: Compilation;
|
|
19430
|
+
defaultHints: (HtmlResourceHintHtmlEntryDependency & {
|
|
19431
|
+
hostChunks: string[];
|
|
19432
|
+
})[];
|
|
19433
|
+
}) => HtmlResourceHintHtmlEntryDependency[]);
|
|
19434
|
+
|
|
18792
19435
|
/**
|
|
18793
19436
|
* This option enables loading async chunks via a custom script type, such as script type="module".
|
|
18794
19437
|
*/
|
|
@@ -18840,6 +19483,11 @@ declare interface Output {
|
|
|
18840
19483
|
*/
|
|
18841
19484
|
wasmLoading?: string | false;
|
|
18842
19485
|
|
|
19486
|
+
/**
|
|
19487
|
+
* Fall back to non-streaming WebAssembly instantiation when streaming compilation fails because the server does not serve `.wasm` files with the `application/wasm` MIME type.
|
|
19488
|
+
*/
|
|
19489
|
+
wasmStreamingFallback?: boolean;
|
|
19490
|
+
|
|
18843
19491
|
/**
|
|
18844
19492
|
* The filename of WebAssembly modules as relative path inside the 'output.path' directory.
|
|
18845
19493
|
*/
|
|
@@ -18910,10 +19558,155 @@ declare interface OutputFileSystem {
|
|
|
18910
19558
|
* Options for the generated HTML files.
|
|
18911
19559
|
*/
|
|
18912
19560
|
declare interface OutputHtmlOptions {
|
|
19561
|
+
/**
|
|
19562
|
+
* Inject a `<base>` element into the page `<head>`. A string sets `href`; an object sets both `href` and optionally `target`. Skipped if the HTML already contains a `<base>` element.
|
|
19563
|
+
*/
|
|
19564
|
+
base?:
|
|
19565
|
+
| string
|
|
19566
|
+
| {
|
|
19567
|
+
/**
|
|
19568
|
+
* Value for the `href` attribute of the `<base>` element.
|
|
19569
|
+
*/
|
|
19570
|
+
href: string;
|
|
19571
|
+
/**
|
|
19572
|
+
* Value for the `target` attribute of the `<base>` element (e.g. `"_blank"`).
|
|
19573
|
+
*/
|
|
19574
|
+
target?: string;
|
|
19575
|
+
};
|
|
19576
|
+
|
|
19577
|
+
/**
|
|
19578
|
+
* Inject a `<meta http-equiv="Content-Security-Policy">` into every webpack-emitted HTML page. `false` (default) does nothing; `true` uses a strict baseline (`script-src 'self'`, `style-src 'self'`, `object-src 'none'`, `base-uri 'self'`) and appends a `sha256` hash of every inline `<script>`/`<style>` to `script-src`/`style-src`. An object customizes it. Skipped when the page already declares a CSP.
|
|
19579
|
+
*/
|
|
19580
|
+
csp?:
|
|
19581
|
+
| boolean
|
|
19582
|
+
| {
|
|
19583
|
+
/**
|
|
19584
|
+
* Hash algorithm used for inline `<script>`/`<style>` sources.
|
|
19585
|
+
*/
|
|
19586
|
+
hashFunction?: "sha256" | "sha384" | "sha512";
|
|
19587
|
+
/**
|
|
19588
|
+
* Placeholder nonce added to injected `<script>`/`<style>` tags and as a `'nonce-…'` source; rewrite it per request server-side.
|
|
19589
|
+
*/
|
|
19590
|
+
nonce?: string;
|
|
19591
|
+
/**
|
|
19592
|
+
* CSP directives merged over the baseline. Each key is a directive (e.g. `"script-src"`); the value is a source string or list. Inline hashes and any `nonce` are still appended to `script-src`/`style-src`.
|
|
19593
|
+
*/
|
|
19594
|
+
policy?: { [index: string]: string | string[] };
|
|
19595
|
+
};
|
|
19596
|
+
|
|
19597
|
+
/**
|
|
19598
|
+
* Favicon(s) for webpack-generated HTML (authored pages are left untouched). `false` (default) injects nothing; `true` injects the webpack logo; a string is a path to an icon; an object maps each `<link rel>` to an icon — a path string, an object with the icon `href` plus extra link attributes (`sizes`, `media`, `color`, `type`, `crossorigin`), or an array of these for multiple icons under the same `rel` (e.g. several `sizes`, or light/dark `media` variants); a function receives the page name and returns one of these. Every icon is emitted as a hashed asset.
|
|
19599
|
+
*/
|
|
19600
|
+
favicon?:
|
|
19601
|
+
| string
|
|
19602
|
+
| boolean
|
|
19603
|
+
| {
|
|
19604
|
+
[index: string]:
|
|
19605
|
+
| string
|
|
19606
|
+
| {
|
|
19607
|
+
/**
|
|
19608
|
+
* Value for the `color` attribute (used by `rel="mask-icon"`).
|
|
19609
|
+
*/
|
|
19610
|
+
color?: string;
|
|
19611
|
+
/**
|
|
19612
|
+
* Value for the `crossorigin` attribute.
|
|
19613
|
+
*/
|
|
19614
|
+
crossorigin?: "anonymous" | "use-credentials";
|
|
19615
|
+
/**
|
|
19616
|
+
* Path to the icon file, emitted as a hashed asset.
|
|
19617
|
+
*/
|
|
19618
|
+
href: string;
|
|
19619
|
+
/**
|
|
19620
|
+
* Value for the `media` attribute (e.g. `"(prefers-color-scheme: dark)"`).
|
|
19621
|
+
*/
|
|
19622
|
+
media?: string;
|
|
19623
|
+
/**
|
|
19624
|
+
* Value for the `sizes` attribute (e.g. `"180x180"` or `"any"`).
|
|
19625
|
+
*/
|
|
19626
|
+
sizes?: string;
|
|
19627
|
+
/**
|
|
19628
|
+
* Value for the `type` attribute; inferred from the file extension when omitted.
|
|
19629
|
+
*/
|
|
19630
|
+
type?: string;
|
|
19631
|
+
}
|
|
19632
|
+
| HtmlFaviconIcon[];
|
|
19633
|
+
}
|
|
19634
|
+
| ((name: string) =>
|
|
19635
|
+
| string
|
|
19636
|
+
| boolean
|
|
19637
|
+
| {
|
|
19638
|
+
[index: string]:
|
|
19639
|
+
| string
|
|
19640
|
+
| {
|
|
19641
|
+
/**
|
|
19642
|
+
* Value for the `color` attribute (used by `rel="mask-icon"`).
|
|
19643
|
+
*/
|
|
19644
|
+
color?: string;
|
|
19645
|
+
/**
|
|
19646
|
+
* Value for the `crossorigin` attribute.
|
|
19647
|
+
*/
|
|
19648
|
+
crossorigin?: "anonymous" | "use-credentials";
|
|
19649
|
+
/**
|
|
19650
|
+
* Path to the icon file, emitted as a hashed asset.
|
|
19651
|
+
*/
|
|
19652
|
+
href: string;
|
|
19653
|
+
/**
|
|
19654
|
+
* Value for the `media` attribute (e.g. `"(prefers-color-scheme: dark)"`).
|
|
19655
|
+
*/
|
|
19656
|
+
media?: string;
|
|
19657
|
+
/**
|
|
19658
|
+
* Value for the `sizes` attribute (e.g. `"180x180"` or `"any"`).
|
|
19659
|
+
*/
|
|
19660
|
+
sizes?: string;
|
|
19661
|
+
/**
|
|
19662
|
+
* Value for the `type` attribute; inferred from the file extension when omitted.
|
|
19663
|
+
*/
|
|
19664
|
+
type?: string;
|
|
19665
|
+
}
|
|
19666
|
+
| HtmlFaviconIcon[];
|
|
19667
|
+
});
|
|
19668
|
+
|
|
19669
|
+
/**
|
|
19670
|
+
* Where to place injected chunk `<script>`/`<link>` tags. `"body"` (default; `"head"` with `output.module`) keeps them next to the entry tag — end of `<body>` on generated pages; `"head"` moves them into `<head>`; `false` suppresses sibling-chunk injection (entry tags and resource hints remain).
|
|
19671
|
+
*/
|
|
19672
|
+
inject?: false | "body" | "head";
|
|
19673
|
+
|
|
19674
|
+
/**
|
|
19675
|
+
* Inline the content of matching chunks directly into the HTML instead of emitting a separate `<script>`/`<link>` tag. `true` inlines every chunk; `"script"` inlines only JavaScript, `"style"` only CSS; an array of `RegExp` patterns matches against the chunk name.
|
|
19676
|
+
*/
|
|
19677
|
+
inline?: boolean | "script" | "style" | RegExp[];
|
|
19678
|
+
|
|
19679
|
+
/**
|
|
19680
|
+
* Add Subresource Integrity (SRI) `integrity` attributes to injected `<script>`/`<link>` tags. `true` uses `['sha384']`; an array sets the hash algorithms; a function receives each referenced asset and returns the algorithms to use or `false` to skip it.
|
|
19681
|
+
*/
|
|
19682
|
+
integrity?:
|
|
19683
|
+
| boolean
|
|
19684
|
+
| string[]
|
|
19685
|
+
| ((asset: { chunk: Chunk; filename: string }) => false | string[]);
|
|
19686
|
+
|
|
19687
|
+
/**
|
|
19688
|
+
* Web app manifest for webpack-generated HTML (authored pages are left untouched). `false` (default) injects nothing. A string is a path to an existing `.webmanifest` file to link. An object is the manifest contents — serialized, emitted as a hashed `.webmanifest` and linked with `<link rel="manifest">`; its `icons`/`screenshots` `src` paths resolve like any request and are emitted as hashed assets. A function receives the page name and returns one of these.
|
|
19689
|
+
*/
|
|
19690
|
+
manifest?:
|
|
19691
|
+
| string
|
|
19692
|
+
| false
|
|
19693
|
+
| { [index: string]: any }
|
|
19694
|
+
| ((name: string) => string | false | { [index: string]: any });
|
|
19695
|
+
|
|
19696
|
+
/**
|
|
19697
|
+
* Inject `<meta>` tags into the page `<head>`. Each key is the `name` attribute (or `"charset"` for a charset declaration); the value is the `content` string. Keys beginning with `og:` use the `property` attribute instead of `name`. A tag is skipped if the HTML already contains a meta with the same name.
|
|
19698
|
+
*/
|
|
19699
|
+
meta?: { [index: string]: string };
|
|
19700
|
+
|
|
18913
19701
|
/**
|
|
18914
19702
|
* How injected `<script>` tags load. `auto` (default) emits a module script for ES module output and `defer` otherwise; `defer` forces a deferred script; `blocking` emits a plain blocking script.
|
|
18915
19703
|
*/
|
|
18916
19704
|
scriptLoading?: "auto" | "defer" | "blocking";
|
|
19705
|
+
|
|
19706
|
+
/**
|
|
19707
|
+
* Sets the `<title>` of the generated HTML page. Skipped if the HTML already contains a `<title>` element.
|
|
19708
|
+
*/
|
|
19709
|
+
title?: string;
|
|
18917
19710
|
}
|
|
18918
19711
|
|
|
18919
19712
|
/**
|
|
@@ -18989,15 +19782,13 @@ declare interface OutputNormalized {
|
|
|
18989
19782
|
* Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
|
|
18990
19783
|
*/
|
|
18991
19784
|
devtoolFallbackModuleFilenameTemplate?:
|
|
18992
|
-
| string
|
|
18993
|
-
| ((context: ModuleFilenameTemplateContext) => string);
|
|
19785
|
+
string | ((context: ModuleFilenameTemplateContext) => string);
|
|
18994
19786
|
|
|
18995
19787
|
/**
|
|
18996
19788
|
* Filename template string of function for the sources array in a generated SourceMap.
|
|
18997
19789
|
*/
|
|
18998
19790
|
devtoolModuleFilenameTemplate?:
|
|
18999
|
-
| string
|
|
19000
|
-
| ((context: ModuleFilenameTemplateContext) => string);
|
|
19791
|
+
string | ((context: ModuleFilenameTemplateContext) => string);
|
|
19001
19792
|
|
|
19002
19793
|
/**
|
|
19003
19794
|
* Module namespace to use when interpolating filename template string for the sources array in a generated SourceMap. Defaults to `output.library` if not set. It's useful for avoiding runtime collisions in sourcemaps from multiple webpack projects built as libraries.
|
|
@@ -19129,6 +19920,11 @@ declare interface OutputNormalized {
|
|
|
19129
19920
|
*/
|
|
19130
19921
|
publicPath?: string | TemplatePathFn<PathData>;
|
|
19131
19922
|
|
|
19923
|
+
/**
|
|
19924
|
+
* Full resource-hint configuration.
|
|
19925
|
+
*/
|
|
19926
|
+
resourceHints?: ResourceHintsOptions;
|
|
19927
|
+
|
|
19132
19928
|
/**
|
|
19133
19929
|
* This option enables loading async chunks via a custom script type, such as script type="module".
|
|
19134
19930
|
*/
|
|
@@ -19175,6 +19971,11 @@ declare interface OutputNormalized {
|
|
|
19175
19971
|
*/
|
|
19176
19972
|
wasmLoading?: string | false;
|
|
19177
19973
|
|
|
19974
|
+
/**
|
|
19975
|
+
* Fall back to non-streaming WebAssembly instantiation when streaming compilation fails because the server does not serve `.wasm` files with the `application/wasm` MIME type.
|
|
19976
|
+
*/
|
|
19977
|
+
wasmStreamingFallback?: boolean;
|
|
19978
|
+
|
|
19178
19979
|
/**
|
|
19179
19980
|
* The filename of WebAssembly modules as relative path inside the 'output.path' directory.
|
|
19180
19981
|
*/
|
|
@@ -19262,14 +20063,32 @@ declare interface ParseOptions {
|
|
|
19262
20063
|
locations?: boolean;
|
|
19263
20064
|
comments?: boolean;
|
|
19264
20065
|
ranges?: boolean;
|
|
19265
|
-
semicolons?: boolean;
|
|
19266
20066
|
allowHashBang?: boolean;
|
|
19267
20067
|
allowReturnOutsideFunction?: boolean;
|
|
20068
|
+
|
|
20069
|
+
/**
|
|
20070
|
+
* internal: serve `range` lazily and skip acorn's location/range tracking
|
|
20071
|
+
*/
|
|
20072
|
+
lazyNodes?: boolean;
|
|
20073
|
+
|
|
20074
|
+
/**
|
|
20075
|
+
* internal: collect comments here without slicing their text eagerly
|
|
20076
|
+
*/
|
|
20077
|
+
lazyComments?: CommentJavascriptParser[];
|
|
20078
|
+
|
|
20079
|
+
/**
|
|
20080
|
+
* enable parsing of the import phase proposals (import defer / import source)
|
|
20081
|
+
*/
|
|
20082
|
+
importPhases?: boolean;
|
|
20083
|
+
|
|
20084
|
+
/**
|
|
20085
|
+
* internal: for `auto`, let the parser downgrade module->script in place instead of re-parsing
|
|
20086
|
+
*/
|
|
20087
|
+
moduleFallback?: boolean;
|
|
19268
20088
|
}
|
|
19269
20089
|
declare interface ParseResult {
|
|
19270
20090
|
ast: Program;
|
|
19271
20091
|
comments: CommentJavascriptParser[];
|
|
19272
|
-
semicolons: Set<number>;
|
|
19273
20092
|
}
|
|
19274
20093
|
declare interface ParsedIdentifier {
|
|
19275
20094
|
/**
|
|
@@ -19751,6 +20570,7 @@ declare class ProgressPlugin {
|
|
|
19751
20570
|
percentBy: null | "entries" | "modules" | "dependencies";
|
|
19752
20571
|
progressBar:
|
|
19753
20572
|
| false
|
|
20573
|
+
| "auto"
|
|
19754
20574
|
| Required<{
|
|
19755
20575
|
/**
|
|
19756
20576
|
* Color used for the filled portion of the bar.
|
|
@@ -19760,7 +20580,13 @@ declare class ProgressPlugin {
|
|
|
19760
20580
|
* Name shown before the progress bar.
|
|
19761
20581
|
*/
|
|
19762
20582
|
name?: string;
|
|
20583
|
+
/**
|
|
20584
|
+
* Width of the progress bar in characters. Default: 25.
|
|
20585
|
+
*/
|
|
20586
|
+
width?: number;
|
|
19763
20587
|
}>;
|
|
20588
|
+
estimatedTime: boolean;
|
|
20589
|
+
phaseTimings: boolean;
|
|
19764
20590
|
|
|
19765
20591
|
/**
|
|
19766
20592
|
* Applies the plugin by registering its hooks on the compiler.
|
|
@@ -19777,18 +20603,7 @@ declare class ProgressPlugin {
|
|
|
19777
20603
|
static createDefaultHandler: (
|
|
19778
20604
|
profile: undefined | null | boolean,
|
|
19779
20605
|
logger: WebpackLogger,
|
|
19780
|
-
|
|
19781
|
-
| false
|
|
19782
|
-
| Required<{
|
|
19783
|
-
/**
|
|
19784
|
-
* Color used for the filled portion of the bar.
|
|
19785
|
-
*/
|
|
19786
|
-
color?: string;
|
|
19787
|
-
/**
|
|
19788
|
-
* Name shown before the progress bar.
|
|
19789
|
-
*/
|
|
19790
|
-
name?: string;
|
|
19791
|
-
}>
|
|
20606
|
+
options?: DefaultHandlerOptions
|
|
19792
20607
|
) => (percentage: number, msg: string, ...args: string[]) => void;
|
|
19793
20608
|
}
|
|
19794
20609
|
type ProgressPluginArgument =
|
|
@@ -19819,6 +20634,11 @@ declare interface ProgressPluginOptions {
|
|
|
19819
20634
|
*/
|
|
19820
20635
|
entries?: boolean;
|
|
19821
20636
|
|
|
20637
|
+
/**
|
|
20638
|
+
* Show estimated time remaining based on build progress. Default: false.
|
|
20639
|
+
*/
|
|
20640
|
+
estimatedTime?: boolean;
|
|
20641
|
+
|
|
19822
20642
|
/**
|
|
19823
20643
|
* Function that executes for every progress step.
|
|
19824
20644
|
*/
|
|
@@ -19839,16 +20659,22 @@ declare interface ProgressPluginOptions {
|
|
|
19839
20659
|
*/
|
|
19840
20660
|
percentBy?: null | "entries" | "modules" | "dependencies";
|
|
19841
20661
|
|
|
20662
|
+
/**
|
|
20663
|
+
* Show a timing breakdown for each build phase when the build completes. Default: false.
|
|
20664
|
+
*/
|
|
20665
|
+
phaseTimings?: boolean;
|
|
20666
|
+
|
|
19842
20667
|
/**
|
|
19843
20668
|
* Collect profile data for progress steps. Default: false.
|
|
19844
20669
|
*/
|
|
19845
20670
|
profile?: null | boolean;
|
|
19846
20671
|
|
|
19847
20672
|
/**
|
|
19848
|
-
* Generate progress bar. Default: false.
|
|
20673
|
+
* Generate progress bar. `"auto"` enables it only for interactive terminals. Default: false.
|
|
19849
20674
|
*/
|
|
19850
20675
|
progressBar?:
|
|
19851
20676
|
| boolean
|
|
20677
|
+
| "auto"
|
|
19852
20678
|
| {
|
|
19853
20679
|
/**
|
|
19854
20680
|
* Color used for the filled portion of the bar.
|
|
@@ -19858,6 +20684,10 @@ declare interface ProgressPluginOptions {
|
|
|
19858
20684
|
* Name shown before the progress bar.
|
|
19859
20685
|
*/
|
|
19860
20686
|
name?: string;
|
|
20687
|
+
/**
|
|
20688
|
+
* Width of the progress bar in characters. Default: 25.
|
|
20689
|
+
*/
|
|
20690
|
+
width?: number;
|
|
19861
20691
|
};
|
|
19862
20692
|
}
|
|
19863
20693
|
declare class ProvidePlugin {
|
|
@@ -19929,11 +20759,15 @@ declare interface ProvidesObject {
|
|
|
19929
20759
|
[index: string]: string | ProvidesConfig;
|
|
19930
20760
|
}
|
|
19931
20761
|
type PureCondition =
|
|
19932
|
-
| boolean
|
|
19933
|
-
| ((compilation: Compilation, module: Module) => boolean);
|
|
20762
|
+
boolean | ((compilation: Compilation, module: Module) => boolean);
|
|
19934
20763
|
declare interface RawChunkGroupOptions {
|
|
19935
20764
|
preloadOrder?: number;
|
|
19936
20765
|
prefetchOrder?: number;
|
|
20766
|
+
|
|
20767
|
+
/**
|
|
20768
|
+
* preload only the chunk's CSS (`as="style"`), not its JS
|
|
20769
|
+
*/
|
|
20770
|
+
cssPreloadOrder?: number;
|
|
19937
20771
|
fetchPriority?: "auto" | "low" | "high";
|
|
19938
20772
|
}
|
|
19939
20773
|
type RawDevTool = string | false;
|
|
@@ -20114,9 +20948,7 @@ declare interface ReadFileFs {
|
|
|
20114
20948
|
(
|
|
20115
20949
|
path: PathOrFileDescriptorFs,
|
|
20116
20950
|
options:
|
|
20117
|
-
|
|
|
20118
|
-
| null
|
|
20119
|
-
| ({ encoding?: null; flag?: string } & Abortable),
|
|
20951
|
+
undefined | null | ({ encoding?: null; flag?: string } & Abortable),
|
|
20120
20952
|
callback: (err: null | NodeJS.ErrnoException, result?: Buffer) => void
|
|
20121
20953
|
): void;
|
|
20122
20954
|
(
|
|
@@ -20210,9 +21042,7 @@ declare interface ReadFileTypes {
|
|
|
20210
21042
|
(
|
|
20211
21043
|
path: PathOrFileDescriptorTypes,
|
|
20212
21044
|
options:
|
|
20213
|
-
|
|
|
20214
|
-
| null
|
|
20215
|
-
| ({ encoding?: null; flag?: string } & Abortable),
|
|
21045
|
+
undefined | null | ({ encoding?: null; flag?: string } & Abortable),
|
|
20216
21046
|
callback: (err: null | NodeJS.ErrnoException, result?: Buffer) => void
|
|
20217
21047
|
): void;
|
|
20218
21048
|
(
|
|
@@ -20933,8 +21763,7 @@ declare interface RenderContextJavascriptModulesPlugin {
|
|
|
20933
21763
|
strictMode?: boolean;
|
|
20934
21764
|
}
|
|
20935
21765
|
type RenderManifestEntry =
|
|
20936
|
-
|
|
|
20937
|
-
| RenderManifestEntryStatic;
|
|
21766
|
+
RenderManifestEntryTemplated | RenderManifestEntryStatic;
|
|
20938
21767
|
declare interface RenderManifestEntryStatic {
|
|
20939
21768
|
render: () => Source;
|
|
20940
21769
|
filename: string;
|
|
@@ -21560,9 +22389,7 @@ declare interface ResolveOptionsResolverFactoryObject2 {
|
|
|
21560
22389
|
* A list of main fields in description files
|
|
21561
22390
|
*/
|
|
21562
22391
|
mainFields?: (
|
|
21563
|
-
| string
|
|
21564
|
-
| string[]
|
|
21565
|
-
| { name: string | string[]; forceRelative: boolean }
|
|
22392
|
+
string | string[] | { name: string | string[]; forceRelative: boolean }
|
|
21566
22393
|
)[];
|
|
21567
22394
|
|
|
21568
22395
|
/**
|
|
@@ -21799,6 +22626,50 @@ declare interface ResourceDataWithData {
|
|
|
21799
22626
|
context?: string;
|
|
21800
22627
|
data: ResourceSchemeData & Partial<ResolveRequest>;
|
|
21801
22628
|
}
|
|
22629
|
+
|
|
22630
|
+
/**
|
|
22631
|
+
* Full resource-hint configuration.
|
|
22632
|
+
*/
|
|
22633
|
+
declare interface ResourceHintsOptions {
|
|
22634
|
+
/**
|
|
22635
|
+
* Initial dependency-graph chunk hints. `true` auto-emits `<link rel="modulepreload">` (ESM output) or `<link rel="preload" as="script">` (classic) for each of the entry's initial dependency chunks; `"prefetch"` uses `<link rel="prefetch">`; `"preload"` is an alias of `true`; `false` disables chunk hints (URL-asset hints from magic comments / `urlHints` still fire); `"none"` is a hard off switch (no `<link>` anywhere, empty stats / manifest); an array of `HtmlResourceHint` descriptors replaces the auto set; a function receives the auto `defaultHints` plus context (`entryName`, `entrypoint`, `hostType: "html" | "js"`, `compilation`) and returns the final list (replaces the removed `resolveDependencies` hook).
|
|
22636
|
+
*/
|
|
22637
|
+
initial?:
|
|
22638
|
+
| boolean
|
|
22639
|
+
| "none"
|
|
22640
|
+
| HtmlResourceHintWebpackOptions[]
|
|
22641
|
+
| "prefetch"
|
|
22642
|
+
| "preload"
|
|
22643
|
+
| ((context: {
|
|
22644
|
+
entryName: string;
|
|
22645
|
+
entrypoint: Entrypoint;
|
|
22646
|
+
hostType: "html" | "js";
|
|
22647
|
+
compilation: Compilation;
|
|
22648
|
+
defaultHints: (HtmlResourceHintHtmlEntryDependency & {
|
|
22649
|
+
hostChunks: string[];
|
|
22650
|
+
})[];
|
|
22651
|
+
}) => HtmlResourceHintHtmlEntryDependency[]);
|
|
22652
|
+
|
|
22653
|
+
/**
|
|
22654
|
+
* Emit a JSON manifest of the resolved resource hints for each entrypoint (the same descriptors as `stats.entrypoints[].resourceHints`) as an output asset at this path. Lets an SSR server inject the `<link>` tags itself without walking the chunk graph — webpack's analogue of Vite's `build.ssrManifest`. Empty when `initial` is `"none"`.
|
|
22655
|
+
*/
|
|
22656
|
+
manifest?: string;
|
|
22657
|
+
|
|
22658
|
+
/**
|
|
22659
|
+
* Inject a tiny inline `<script>` polyfill for `<link rel="modulepreload">` into extracted HTML pages. Defaults from the target's modulepreload support (`output.environment.modulePreload`) — `true` when the environment lacks native support, `false` when it has it. Set `false` to never inject (the `<link>` tags are still emitted but do nothing on browsers without support — useful under a strict CSP that forbids inline scripts).
|
|
22660
|
+
*/
|
|
22661
|
+
modulePreloadPolyfill?: boolean;
|
|
22662
|
+
|
|
22663
|
+
/**
|
|
22664
|
+
* Auto-emit `<link rel="preconnect">` for the origin of a cross-origin `output.publicPath` (the origin bundles and assets are served from) into extracted HTML entries and the resource-hint stats / manifest. Mirrors `output.crossOriginLoading`. No-op when `publicPath` is relative or `"auto"`.
|
|
22665
|
+
*/
|
|
22666
|
+
preconnect?: boolean;
|
|
22667
|
+
|
|
22668
|
+
/**
|
|
22669
|
+
* Project-wide URL-referenced-asset hint rules, applied as the base `urlHints` of every parser (JavaScript `new URL(...)`, CSS `url(...)`, HTML `<img src>` / `<link href>`). Parser-scoped `module.parser.<type>.urlHints` rules and per-URL magic comments still override these.
|
|
22670
|
+
*/
|
|
22671
|
+
urlHints?: UrlHintRule[];
|
|
22672
|
+
}
|
|
21802
22673
|
declare interface ResourceSchemeData {
|
|
21803
22674
|
/**
|
|
21804
22675
|
* mime type of the resource
|
|
@@ -22472,6 +23343,7 @@ declare abstract class RuntimeTemplate {
|
|
|
22472
23343
|
supportsLogicalAssignment(): boolean;
|
|
22473
23344
|
supportsArrowFunction(): boolean;
|
|
22474
23345
|
supportsAsyncFunction(): boolean;
|
|
23346
|
+
supportsGenerator(): boolean;
|
|
22475
23347
|
supportsOptionalChaining(): boolean;
|
|
22476
23348
|
supportsSpread(): boolean;
|
|
22477
23349
|
supportsObjectHasOwn(): boolean;
|
|
@@ -22481,6 +23353,8 @@ declare abstract class RuntimeTemplate {
|
|
|
22481
23353
|
supportsBigIntLiteral(): boolean;
|
|
22482
23354
|
supportsDynamicImport(): boolean;
|
|
22483
23355
|
supportsEcmaScriptModuleSyntax(): boolean;
|
|
23356
|
+
supportsModulePreload(): boolean;
|
|
23357
|
+
supportsAnalyzableEsm(): boolean;
|
|
22484
23358
|
supportTemplateLiteral(): boolean;
|
|
22485
23359
|
supportNodePrefixForCoreModules(): boolean;
|
|
22486
23360
|
|
|
@@ -22824,6 +23698,10 @@ declare abstract class RuntimeTemplate {
|
|
|
22824
23698
|
* if set, will be filled with runtime requirements
|
|
22825
23699
|
*/
|
|
22826
23700
|
runtimeRequirements: Set<string>;
|
|
23701
|
+
/**
|
|
23702
|
+
* the module the `import()` is emitted into
|
|
23703
|
+
*/
|
|
23704
|
+
originModule?: Module;
|
|
22827
23705
|
}): string;
|
|
22828
23706
|
|
|
22829
23707
|
/**
|
|
@@ -22984,6 +23862,10 @@ declare abstract class RuntimeTemplate {
|
|
|
22984
23862
|
* if set, will be filled with runtime requirements
|
|
22985
23863
|
*/
|
|
22986
23864
|
runtimeRequirements: Set<string>;
|
|
23865
|
+
/**
|
|
23866
|
+
* the module the `import()` is emitted into
|
|
23867
|
+
*/
|
|
23868
|
+
originModule?: Module;
|
|
22987
23869
|
}): string;
|
|
22988
23870
|
|
|
22989
23871
|
/**
|
|
@@ -23623,6 +24505,9 @@ declare interface SourceAndMap {
|
|
|
23623
24505
|
*/
|
|
23624
24506
|
map: null | RawSourceMap;
|
|
23625
24507
|
}
|
|
24508
|
+
declare interface SourceBucket {
|
|
24509
|
+
[index: string]: undefined | SourceItem;
|
|
24510
|
+
}
|
|
23626
24511
|
declare interface SourceItem {
|
|
23627
24512
|
type: SourceTypeOrResolver;
|
|
23628
24513
|
filter?: (attributes: Map<string, string>, value: string) => boolean;
|
|
@@ -23711,8 +24596,7 @@ declare interface SourceMapDevToolPluginOptions {
|
|
|
23711
24596
|
* Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap used only if 'moduleFilenameTemplate' would result in a conflict.
|
|
23712
24597
|
*/
|
|
23713
24598
|
fallbackModuleFilenameTemplate?:
|
|
23714
|
-
| string
|
|
23715
|
-
| ((context: ModuleFilenameTemplateContext) => string);
|
|
24599
|
+
string | ((context: ModuleFilenameTemplateContext) => string);
|
|
23716
24600
|
|
|
23717
24601
|
/**
|
|
23718
24602
|
* Path prefix to which the [file] placeholder is relative to.
|
|
@@ -23743,8 +24627,7 @@ declare interface SourceMapDevToolPluginOptions {
|
|
|
23743
24627
|
* Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap.
|
|
23744
24628
|
*/
|
|
23745
24629
|
moduleFilenameTemplate?:
|
|
23746
|
-
| string
|
|
23747
|
-
| ((context: ModuleFilenameTemplateContext) => string);
|
|
24630
|
+
string | ((context: ModuleFilenameTemplateContext) => string);
|
|
23748
24631
|
|
|
23749
24632
|
/**
|
|
23750
24633
|
* Namespace prefix to allow multiple webpack roots in the devtools.
|
|
@@ -23811,12 +24694,18 @@ declare interface SourcePosition {
|
|
|
23811
24694
|
line: number;
|
|
23812
24695
|
column?: number;
|
|
23813
24696
|
}
|
|
24697
|
+
declare interface SourceTable {
|
|
24698
|
+
[index: string]: SourceBucket;
|
|
24699
|
+
}
|
|
23814
24700
|
type SourceType =
|
|
24701
|
+
| "html"
|
|
23815
24702
|
| "script"
|
|
23816
24703
|
| "css-url"
|
|
23817
24704
|
| "stylesheet"
|
|
23818
|
-
| "
|
|
24705
|
+
| "prefetch"
|
|
24706
|
+
| "preload"
|
|
23819
24707
|
| "modulepreload"
|
|
24708
|
+
| "script-module"
|
|
23820
24709
|
| "src"
|
|
23821
24710
|
| "srcset"
|
|
23822
24711
|
| "stylesheet-style"
|
|
@@ -23824,11 +24713,14 @@ type SourceType =
|
|
|
23824
24713
|
| "srcdoc"
|
|
23825
24714
|
| "msapplication-task";
|
|
23826
24715
|
type SourceTypeOrResolver =
|
|
24716
|
+
| "html"
|
|
23827
24717
|
| "script"
|
|
23828
24718
|
| "css-url"
|
|
23829
24719
|
| "stylesheet"
|
|
23830
|
-
| "
|
|
24720
|
+
| "prefetch"
|
|
24721
|
+
| "preload"
|
|
23831
24722
|
| "modulepreload"
|
|
24723
|
+
| "script-module"
|
|
23832
24724
|
| "src"
|
|
23833
24725
|
| "srcset"
|
|
23834
24726
|
| "stylesheet-style"
|
|
@@ -23851,8 +24743,7 @@ declare interface SplitChunksOptions {
|
|
|
23851
24743
|
maxInitialRequests: number;
|
|
23852
24744
|
hidePathInfo: boolean;
|
|
23853
24745
|
filename?:
|
|
23854
|
-
| string
|
|
23855
|
-
| ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
24746
|
+
string | ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
23856
24747
|
automaticNameDelimiter: string;
|
|
23857
24748
|
getCacheGroups: (
|
|
23858
24749
|
module: Module,
|
|
@@ -23956,11 +24847,15 @@ declare abstract class StackEntry {
|
|
|
23956
24847
|
|
|
23957
24848
|
/**
|
|
23958
24849
|
* Layered map that supports child scopes while memoizing lookups from parent
|
|
23959
|
-
* scopes
|
|
24850
|
+
* scopes. Layers form a linked parent chain, so `createChild` is O(1) instead
|
|
24851
|
+
* of copying a layer array per scope. A layer's `Map` is only allocated on its
|
|
24852
|
+
* first own write, and lookup results are memoized into the nearest
|
|
24853
|
+
* `Map`-bearing layer of the walk — read-only layers (most block scopes) stay
|
|
24854
|
+
* allocation-free and share their parent's memoized entries.
|
|
23960
24855
|
*/
|
|
23961
24856
|
declare abstract class StackedMap<K, V> {
|
|
23962
|
-
map
|
|
23963
|
-
|
|
24857
|
+
map?: Map<K, InternalCell<V>>;
|
|
24858
|
+
parent?: StackedMap<K, V>;
|
|
23964
24859
|
|
|
23965
24860
|
/**
|
|
23966
24861
|
* Stores a value in the current layer, preserving explicit `undefined`
|
|
@@ -23976,13 +24871,14 @@ declare abstract class StackedMap<K, V> {
|
|
|
23976
24871
|
|
|
23977
24872
|
/**
|
|
23978
24873
|
* Checks whether a key exists in the current scope chain, caching any parent
|
|
23979
|
-
* lookup result in the
|
|
24874
|
+
* lookup result in the nearest `Map`-bearing layer.
|
|
23980
24875
|
*/
|
|
23981
24876
|
has(item: K): boolean;
|
|
23982
24877
|
|
|
23983
24878
|
/**
|
|
23984
24879
|
* Returns the visible value for a key, caching parent hits and misses in the
|
|
23985
|
-
*
|
|
24880
|
+
* nearest `Map`-bearing layer so repeated lookups (from this layer or any
|
|
24881
|
+
* sibling below that layer) answer with a single probe.
|
|
23986
24882
|
*/
|
|
23987
24883
|
get(item: K): Cell<V>;
|
|
23988
24884
|
|
|
@@ -24496,6 +25392,11 @@ declare interface StatsOptions {
|
|
|
24496
25392
|
*/
|
|
24497
25393
|
chunkGroupMaxAssets?: number;
|
|
24498
25394
|
|
|
25395
|
+
/**
|
|
25396
|
+
* Include the resolved `<link>` resource-hint descriptors for each entrypoint (`entrypoints[name].resourceHints`). Combines `output.resourceHints.chunks` (initial-graph modulepreload/preload/prefetch) with `output.resourceHints.assets` (URL-referenced fonts / images / …). Lets SSR frameworks inject the hints server-side without walking the chunk graph themselves; the analogue of Vite's `build.ssrManifest`.
|
|
25397
|
+
*/
|
|
25398
|
+
chunkGroupResourceHints?: boolean;
|
|
25399
|
+
|
|
24499
25400
|
/**
|
|
24500
25401
|
* Display all chunk groups with the corresponding bundles.
|
|
24501
25402
|
*/
|
|
@@ -25244,6 +26145,71 @@ declare interface UpdateHashContextGenerator {
|
|
|
25244
26145
|
runtime: RuntimeSpec;
|
|
25245
26146
|
runtimeTemplate?: RuntimeTemplate;
|
|
25246
26147
|
}
|
|
26148
|
+
|
|
26149
|
+
/**
|
|
26150
|
+
* One default-hint rule for URL-referenced assets emitted by this parser (JS `new URL(...)`, CSS `url(...)`, HTML `<img src>` / `<link href>` / `<script src>`). `test` / `include` / `exclude` match against the asset's request; omit all three to apply to every asset. Matching rules set the same fields a `webpackPrefetch` / `webpackPreload` / `webpackAs` / `webpackType` / `webpackMedia` / `webpackFetchPriority` magic comment would; explicit magic comments on the same URL still win.
|
|
26151
|
+
*/
|
|
26152
|
+
declare interface UrlHintRule {
|
|
26153
|
+
/**
|
|
26154
|
+
* Default `as` attribute (script / style / font / image / …).
|
|
26155
|
+
*/
|
|
26156
|
+
as?: string;
|
|
26157
|
+
|
|
26158
|
+
/**
|
|
26159
|
+
* A condition matcher.
|
|
26160
|
+
*/
|
|
26161
|
+
exclude?:
|
|
26162
|
+
| string
|
|
26163
|
+
| RegExp
|
|
26164
|
+
| ((value: string) => boolean)
|
|
26165
|
+
| RuleSetLogicalConditions
|
|
26166
|
+
| RuleSetCondition[];
|
|
26167
|
+
|
|
26168
|
+
/**
|
|
26169
|
+
* Default fetchpriority for prefetch / preload links.
|
|
26170
|
+
*/
|
|
26171
|
+
fetchPriority?: false | "auto" | "low" | "high";
|
|
26172
|
+
|
|
26173
|
+
/**
|
|
26174
|
+
* A condition matcher.
|
|
26175
|
+
*/
|
|
26176
|
+
include?:
|
|
26177
|
+
| string
|
|
26178
|
+
| RegExp
|
|
26179
|
+
| ((value: string) => boolean)
|
|
26180
|
+
| RuleSetLogicalConditions
|
|
26181
|
+
| RuleSetCondition[];
|
|
26182
|
+
|
|
26183
|
+
/**
|
|
26184
|
+
* Default `media` attribute (e.g. `"(min-width: 800px)"`).
|
|
26185
|
+
*/
|
|
26186
|
+
media?: string;
|
|
26187
|
+
|
|
26188
|
+
/**
|
|
26189
|
+
* When true, emit `<link rel="prefetch">` for matching assets without an explicit hint comment.
|
|
26190
|
+
*/
|
|
26191
|
+
prefetch?: boolean;
|
|
26192
|
+
|
|
26193
|
+
/**
|
|
26194
|
+
* When true, emit `<link rel="preload">` for matching assets without an explicit hint comment.
|
|
26195
|
+
*/
|
|
26196
|
+
preload?: boolean;
|
|
26197
|
+
|
|
26198
|
+
/**
|
|
26199
|
+
* A condition matcher.
|
|
26200
|
+
*/
|
|
26201
|
+
test?:
|
|
26202
|
+
| string
|
|
26203
|
+
| RegExp
|
|
26204
|
+
| ((value: string) => boolean)
|
|
26205
|
+
| RuleSetLogicalConditions
|
|
26206
|
+
| RuleSetCondition[];
|
|
26207
|
+
|
|
26208
|
+
/**
|
|
26209
|
+
* Default `type` attribute (MIME).
|
|
26210
|
+
*/
|
|
26211
|
+
type?: string;
|
|
26212
|
+
}
|
|
25247
26213
|
type Usage = string | true | TopLevelSymbol;
|
|
25248
26214
|
type UsageStateType = 0 | 1 | 2 | 3 | 4;
|
|
25249
26215
|
type UsedName = string | false | string[] | InlinedUsedName;
|
|
@@ -25253,10 +26219,7 @@ declare interface UserAliasOptionEntry {
|
|
|
25253
26219
|
onlyModule?: boolean;
|
|
25254
26220
|
}
|
|
25255
26221
|
type UserAliasOptionNewRequest =
|
|
25256
|
-
| string
|
|
25257
|
-
| false
|
|
25258
|
-
| URL_url
|
|
25259
|
-
| (string | URL_url)[];
|
|
26222
|
+
string | false | URL_url | (string | URL_url)[];
|
|
25260
26223
|
declare interface UserAliasOptions {
|
|
25261
26224
|
[index: string]: UserAliasOptionNewRequest;
|
|
25262
26225
|
}
|
|
@@ -25400,9 +26363,7 @@ declare class VirtualUrlPlugin {
|
|
|
25400
26363
|
static DEFAULT_SCHEME: string;
|
|
25401
26364
|
}
|
|
25402
26365
|
type WarningFilterItemTypes =
|
|
25403
|
-
| string
|
|
25404
|
-
| RegExp
|
|
25405
|
-
| ((warning: StatsError, warningString: string) => boolean);
|
|
26366
|
+
string | RegExp | ((warning: StatsError, warningString: string) => boolean);
|
|
25406
26367
|
|
|
25407
26368
|
/**
|
|
25408
26369
|
* Returns location of targetPath relative to rootPath.
|
|
@@ -25992,6 +26953,7 @@ declare interface WebpackOptionsNormalized {
|
|
|
25992
26953
|
| "umd2"
|
|
25993
26954
|
| "jsonp"
|
|
25994
26955
|
| "system"
|
|
26956
|
+
| "amd-async"
|
|
25995
26957
|
| "promise"
|
|
25996
26958
|
| "module-import"
|
|
25997
26959
|
| "script"
|
|
@@ -26060,8 +27022,7 @@ declare interface WebpackOptionsNormalized {
|
|
|
26060
27022
|
* Add additional plugins to the compiler.
|
|
26061
27023
|
*/
|
|
26062
27024
|
plugins: (
|
|
26063
|
-
|
|
26064
|
-
| WebpackPluginInstance
|
|
27025
|
+
((this: Compiler, compiler: Compiler) => void) | WebpackPluginInstance
|
|
26065
27026
|
)[];
|
|
26066
27027
|
|
|
26067
27028
|
/**
|
|
@@ -26166,6 +27127,7 @@ type WebpackOptionsNormalizedWithDefaults = WebpackOptionsNormalized & {
|
|
|
26166
27127
|
| "umd2"
|
|
26167
27128
|
| "jsonp"
|
|
26168
27129
|
| "system"
|
|
27130
|
+
| "amd-async"
|
|
26169
27131
|
| "promise"
|
|
26170
27132
|
| "module-import"
|
|
26171
27133
|
| "script"
|
|
@@ -26403,8 +27365,7 @@ declare namespace exports {
|
|
|
26403
27365
|
options: {
|
|
26404
27366
|
namespace?: string;
|
|
26405
27367
|
moduleFilenameTemplate?:
|
|
26406
|
-
| string
|
|
26407
|
-
| ((context: ModuleFilenameTemplateContext) => string);
|
|
27368
|
+
string | ((context: ModuleFilenameTemplateContext) => string);
|
|
26408
27369
|
},
|
|
26409
27370
|
__2: {
|
|
26410
27371
|
requestShortener: RequestShortener;
|
|
@@ -26432,12 +27393,15 @@ declare namespace exports {
|
|
|
26432
27393
|
export namespace RuntimeGlobals {
|
|
26433
27394
|
export let amdDefine: "__webpack_require__.amdD";
|
|
26434
27395
|
export let amdOptions: "__webpack_require__.amdO";
|
|
27396
|
+
export let analyzableChunkImport: "__webpack_require__.ei";
|
|
26435
27397
|
export let asyncModule: "__webpack_require__.a";
|
|
26436
27398
|
export let asyncModuleDoneSymbol: "__webpack_require__.aD";
|
|
26437
27399
|
export let asyncModuleExportSymbol: "__webpack_require__.aE";
|
|
27400
|
+
export let asyncModuleGenerator: "__webpack_require__.aG";
|
|
26438
27401
|
export let baseURI: "__webpack_require__.b";
|
|
26439
27402
|
export let chunkCallback: "webpackChunk";
|
|
26440
27403
|
export let chunkName: "__webpack_require__.cn";
|
|
27404
|
+
export let commonJsWrap: "__webpack_require__.cjs";
|
|
26441
27405
|
export let compatGetDefaultExport: "__webpack_require__.n";
|
|
26442
27406
|
export let compileWasm: "__webpack_require__.vs";
|
|
26443
27407
|
export let createFakeNamespaceObject: "__webpack_require__.t";
|
|
@@ -26465,6 +27429,7 @@ declare namespace exports {
|
|
|
26465
27429
|
export let getFullHash: "__webpack_require__.h";
|
|
26466
27430
|
export let getTrustedTypesPolicy: "__webpack_require__.tt";
|
|
26467
27431
|
export let getUpdateManifestFilename: "__webpack_require__.hmrF";
|
|
27432
|
+
export let getWorkletBootstrap: "__webpack_require__.wb";
|
|
26468
27433
|
export let global: "__webpack_require__.g";
|
|
26469
27434
|
export let harmonyModuleDecorator: "__webpack_require__.hmd";
|
|
26470
27435
|
export let hasCssModules: "has css modules";
|
|
@@ -26490,8 +27455,10 @@ declare namespace exports {
|
|
|
26490
27455
|
export let moduleLoaded: "module.loaded";
|
|
26491
27456
|
export let nodeModuleDecorator: "__webpack_require__.nmd";
|
|
26492
27457
|
export let onChunksLoaded: "__webpack_require__.O";
|
|
27458
|
+
export let prefetchAsset: "__webpack_require__.PA";
|
|
26493
27459
|
export let prefetchChunk: "__webpack_require__.E";
|
|
26494
27460
|
export let prefetchChunkHandlers: "__webpack_require__.F";
|
|
27461
|
+
export let preloadAsset: "__webpack_require__.LA";
|
|
26495
27462
|
export let preloadChunk: "__webpack_require__.G";
|
|
26496
27463
|
export let preloadChunkHandlers: "__webpack_require__.H";
|
|
26497
27464
|
export let publicPath: "__webpack_require__.p";
|
|
@@ -26504,6 +27471,7 @@ declare namespace exports {
|
|
|
26504
27471
|
export let setAnonymousDefaultName: "__webpack_require__.dn";
|
|
26505
27472
|
export let shareScopeMap: "__webpack_require__.S";
|
|
26506
27473
|
export let startup: "__webpack_require__.x";
|
|
27474
|
+
export let startupAssetHints: "__webpack_require__.SAH";
|
|
26507
27475
|
export let startupEntrypoint: "__webpack_require__.X";
|
|
26508
27476
|
export let startupNoDefault: "__webpack_require__.x (no default handler)";
|
|
26509
27477
|
export let startupOnlyAfter: "__webpack_require__.x (only after)";
|
|
@@ -26633,6 +27601,9 @@ declare namespace exports {
|
|
|
26633
27601
|
export namespace css {
|
|
26634
27602
|
export { CssModulesPlugin };
|
|
26635
27603
|
}
|
|
27604
|
+
export namespace html {
|
|
27605
|
+
export { HtmlModulesPlugin };
|
|
27606
|
+
}
|
|
26636
27607
|
export namespace library {
|
|
26637
27608
|
export { AbstractLibraryPlugin, EnableLibraryPlugin };
|
|
26638
27609
|
}
|
|
@@ -26889,7 +27860,11 @@ declare namespace exports {
|
|
|
26889
27860
|
data: ExternalItemFunctionData,
|
|
26890
27861
|
callback: (
|
|
26891
27862
|
err?: null | Error,
|
|
26892
|
-
result?:
|
|
27863
|
+
result?:
|
|
27864
|
+
| string
|
|
27865
|
+
| boolean
|
|
27866
|
+
| string[]
|
|
27867
|
+
| (ExternalItemValueObjectKnown & ExternalItemValueObjectUnknown)
|
|
26893
27868
|
) => void
|
|
26894
27869
|
) => void;
|
|
26895
27870
|
export type ExternalItemFunctionDataGetResolve = (
|