webpack 5.108.4 → 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 +49 -4
- 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/HotModuleReplacementPlugin.js +18 -15
- 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 -401
- 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 +219 -29
- package/lib/config/normalization.js +26 -0
- package/lib/config/target.js +9 -1
- package/lib/css/CssGenerator.js +40 -31
- package/lib/css/CssLoadingRuntimeModule.js +5 -1
- package/lib/css/CssModulesPlugin.js +13 -0
- package/lib/css/CssParser.js +594 -263
- package/lib/css/syntax.js +875 -462
- 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 +162 -71
- 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 +11 -11
- 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 +80 -17
- 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 +887 -15
- package/lib/html/HtmlModule.js +2 -2
- package/lib/html/HtmlModulesPlugin.js +610 -166
- package/lib/html/HtmlParser.js +603 -247
- package/lib/html/favicon.svg +1 -0
- package/lib/html/syntax.js +1264 -661
- 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 +701 -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 +66 -13
- package/lib/util/AsyncQueue.js +122 -72
- package/lib/util/SetHelpers.js +1 -1
- 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 +13 -12
- 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 +1213 -96
package/types.d.ts
CHANGED
|
@@ -851,31 +851,14 @@ declare interface BasenameCacheEntry {
|
|
|
851
851
|
*/
|
|
852
852
|
cache: Map<string, Map<undefined | string, undefined | string>>;
|
|
853
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
|
+
*/
|
|
854
861
|
declare abstract class BasicEvaluatedExpression {
|
|
855
|
-
type: number;
|
|
856
|
-
range?: [number, number];
|
|
857
|
-
falsy: boolean;
|
|
858
|
-
truthy: boolean;
|
|
859
|
-
nullish?: boolean;
|
|
860
|
-
sideEffects: boolean;
|
|
861
|
-
bool?: boolean;
|
|
862
|
-
number?: number;
|
|
863
|
-
bigint?: bigint;
|
|
864
|
-
regExp?: RegExp;
|
|
865
|
-
string?: string;
|
|
866
|
-
quasis?: BasicEvaluatedExpression[];
|
|
867
|
-
parts?: BasicEvaluatedExpression[];
|
|
868
|
-
array?: any[];
|
|
869
|
-
items?: BasicEvaluatedExpression[];
|
|
870
|
-
options?: BasicEvaluatedExpression[];
|
|
871
|
-
prefix?: null | BasicEvaluatedExpression;
|
|
872
|
-
postfix?: null | BasicEvaluatedExpression;
|
|
873
|
-
wrappedInnerExpressions?: BasicEvaluatedExpression[];
|
|
874
|
-
identifier?: string | VariableInfo;
|
|
875
|
-
rootInfo?: string | VariableInfo;
|
|
876
|
-
getMembers?: () => string[];
|
|
877
|
-
getMembersOptionals?: () => boolean[];
|
|
878
|
-
getMemberRanges?: () => [number, number][];
|
|
879
862
|
expression?:
|
|
880
863
|
| Program
|
|
881
864
|
| ImportDeclaration
|
|
@@ -951,6 +934,38 @@ declare abstract class BasicEvaluatedExpression {
|
|
|
951
934
|
| AssignmentPattern
|
|
952
935
|
| SwitchCase
|
|
953
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][];
|
|
954
969
|
isUnknown(): boolean;
|
|
955
970
|
isNull(): boolean;
|
|
956
971
|
isUndefined(): boolean;
|
|
@@ -1081,7 +1096,6 @@ declare abstract class BasicEvaluatedExpression {
|
|
|
1081
1096
|
parts: BasicEvaluatedExpression[],
|
|
1082
1097
|
kind: "cooked" | "raw"
|
|
1083
1098
|
): BasicEvaluatedExpression;
|
|
1084
|
-
templateStringKind?: "cooked" | "raw";
|
|
1085
1099
|
setTruthy(): BasicEvaluatedExpression;
|
|
1086
1100
|
setFalsy(): BasicEvaluatedExpression;
|
|
1087
1101
|
|
|
@@ -1325,6 +1339,11 @@ declare class CacheClass {
|
|
|
1325
1339
|
static STAGE_NETWORK: number;
|
|
1326
1340
|
}
|
|
1327
1341
|
declare abstract class CacheFacade {
|
|
1342
|
+
/**
|
|
1343
|
+
* Returns whether a cache backend is active.
|
|
1344
|
+
*/
|
|
1345
|
+
isEnabled(): boolean;
|
|
1346
|
+
|
|
1328
1347
|
/**
|
|
1329
1348
|
* Returns child cache.
|
|
1330
1349
|
*/
|
|
@@ -2787,6 +2806,16 @@ declare interface ChunkRenderContextJavascriptModulesPlugin {
|
|
|
2787
2806
|
* rendering in strict context
|
|
2788
2807
|
*/
|
|
2789
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;
|
|
2790
2819
|
}
|
|
2791
2820
|
declare interface ChunkRuntime {
|
|
2792
2821
|
[index: number]: string;
|
|
@@ -3161,7 +3190,7 @@ declare interface ColorsOptions {
|
|
|
3161
3190
|
type CommentJavascriptParser = CommentImport & {
|
|
3162
3191
|
start: number;
|
|
3163
3192
|
end: number;
|
|
3164
|
-
loc
|
|
3193
|
+
loc?: null | SourceLocation;
|
|
3165
3194
|
};
|
|
3166
3195
|
declare interface CommonJsImportSettings {
|
|
3167
3196
|
name?: string;
|
|
@@ -4320,6 +4349,16 @@ declare class ConcatSource extends Source {
|
|
|
4320
4349
|
): GeneratedSourceInfo;
|
|
4321
4350
|
}
|
|
4322
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
|
+
}
|
|
4323
4362
|
type ConcatenatedModuleBuildInfo = KnownBuildInfo &
|
|
4324
4363
|
Record<string, any> &
|
|
4325
4364
|
KnownConcatenatedModuleBuildInfo;
|
|
@@ -4327,6 +4366,11 @@ declare interface ConcatenatedModuleInfo {
|
|
|
4327
4366
|
type: "concatenated";
|
|
4328
4367
|
module: Module;
|
|
4329
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;
|
|
4330
4374
|
ast?: Program;
|
|
4331
4375
|
internalSource?: Source;
|
|
4332
4376
|
source?: ReplaceSource;
|
|
@@ -4398,6 +4442,11 @@ declare interface ConcatenationBailoutReasonContext {
|
|
|
4398
4442
|
* the chunk graph
|
|
4399
4443
|
*/
|
|
4400
4444
|
chunkGraph: ChunkGraph;
|
|
4445
|
+
|
|
4446
|
+
/**
|
|
4447
|
+
* whether eligible CommonJS modules may be concatenated
|
|
4448
|
+
*/
|
|
4449
|
+
concatenateCommonJsModules?: boolean;
|
|
4401
4450
|
}
|
|
4402
4451
|
|
|
4403
4452
|
/**
|
|
@@ -4556,7 +4605,11 @@ declare interface Configuration {
|
|
|
4556
4605
|
data: ExternalItemFunctionData,
|
|
4557
4606
|
callback: (
|
|
4558
4607
|
err?: null | Error,
|
|
4559
|
-
result?:
|
|
4608
|
+
result?:
|
|
4609
|
+
| string
|
|
4610
|
+
| boolean
|
|
4611
|
+
| string[]
|
|
4612
|
+
| (ExternalItemValueObjectKnown & ExternalItemValueObjectUnknown)
|
|
4560
4613
|
) => void
|
|
4561
4614
|
) => void)
|
|
4562
4615
|
| ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>)
|
|
@@ -4589,6 +4642,7 @@ declare interface Configuration {
|
|
|
4589
4642
|
| "umd2"
|
|
4590
4643
|
| "jsonp"
|
|
4591
4644
|
| "system"
|
|
4645
|
+
| "amd-async"
|
|
4592
4646
|
| "promise"
|
|
4593
4647
|
| "module-import"
|
|
4594
4648
|
| "script"
|
|
@@ -5070,6 +5124,31 @@ declare interface ContextOptions {
|
|
|
5070
5124
|
layer?: null | string;
|
|
5071
5125
|
attributes?: ImportAttributes;
|
|
5072
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;
|
|
5073
5152
|
}
|
|
5074
5153
|
declare class ContextReplacementPlugin {
|
|
5075
5154
|
/**
|
|
@@ -5253,6 +5332,16 @@ declare interface CssAutoOrModuleParserOptions {
|
|
|
5253
5332
|
*/
|
|
5254
5333
|
customIdents?: boolean;
|
|
5255
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
|
+
|
|
5256
5345
|
/**
|
|
5257
5346
|
* Enable/disable renaming of dashed identifiers, e. g. custom properties.
|
|
5258
5347
|
*/
|
|
@@ -5263,6 +5352,11 @@ declare interface CssAutoOrModuleParserOptions {
|
|
|
5263
5352
|
*/
|
|
5264
5353
|
exportType?: "link" | "text" | "css-style-sheet" | "style";
|
|
5265
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
|
+
|
|
5266
5360
|
/**
|
|
5267
5361
|
* Enable/disable renaming of `@function` names.
|
|
5268
5362
|
*/
|
|
@@ -5292,6 +5386,11 @@ declare interface CssAutoOrModuleParserOptions {
|
|
|
5292
5386
|
* Enable/disable `url()`/`image-set()`/`src()`/`image()` functions handling.
|
|
5293
5387
|
*/
|
|
5294
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[];
|
|
5295
5394
|
}
|
|
5296
5395
|
declare interface CssData {
|
|
5297
5396
|
/**
|
|
@@ -5497,6 +5596,16 @@ declare interface CssModuleParserOptions {
|
|
|
5497
5596
|
*/
|
|
5498
5597
|
customIdents?: boolean;
|
|
5499
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
|
+
|
|
5500
5609
|
/**
|
|
5501
5610
|
* Enable/disable renaming of dashed identifiers, e. g. custom properties.
|
|
5502
5611
|
*/
|
|
@@ -5507,6 +5616,11 @@ declare interface CssModuleParserOptions {
|
|
|
5507
5616
|
*/
|
|
5508
5617
|
exportType?: "link" | "text" | "css-style-sheet" | "style";
|
|
5509
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
|
+
|
|
5510
5624
|
/**
|
|
5511
5625
|
* Enable/disable renaming of `@function` names.
|
|
5512
5626
|
*/
|
|
@@ -5531,6 +5645,11 @@ declare interface CssModuleParserOptions {
|
|
|
5531
5645
|
* Enable/disable `url()`/`image-set()`/`src()`/`image()` functions handling.
|
|
5532
5646
|
*/
|
|
5533
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[];
|
|
5534
5653
|
}
|
|
5535
5654
|
declare class CssModulesPlugin {
|
|
5536
5655
|
constructor();
|
|
@@ -5610,6 +5729,14 @@ declare abstract class CssParser extends ParserClass {
|
|
|
5610
5729
|
* Enable/disable renaming of custom identifiers.
|
|
5611
5730
|
*/
|
|
5612
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;
|
|
5613
5740
|
/**
|
|
5614
5741
|
* Enable/disable renaming of dashed identifiers, e. g. custom properties.
|
|
5615
5742
|
*/
|
|
@@ -5618,6 +5745,10 @@ declare abstract class CssParser extends ParserClass {
|
|
|
5618
5745
|
* Configure how CSS content is exported as default.
|
|
5619
5746
|
*/
|
|
5620
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;
|
|
5621
5752
|
/**
|
|
5622
5753
|
* Enable/disable renaming of `@function` names.
|
|
5623
5754
|
*/
|
|
@@ -5642,6 +5773,10 @@ declare abstract class CssParser extends ParserClass {
|
|
|
5642
5773
|
* Enable/disable `url()`/`image-set()`/`src()`/`image()` functions handling.
|
|
5643
5774
|
*/
|
|
5644
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[];
|
|
5645
5780
|
/**
|
|
5646
5781
|
* default mode
|
|
5647
5782
|
*/
|
|
@@ -5659,11 +5794,26 @@ declare interface CssParserOptions {
|
|
|
5659
5794
|
*/
|
|
5660
5795
|
as?: "stylesheet" | "block-contents";
|
|
5661
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
|
+
|
|
5662
5807
|
/**
|
|
5663
5808
|
* Configure how CSS content is exported as default.
|
|
5664
5809
|
*/
|
|
5665
5810
|
exportType?: "link" | "text" | "css-style-sheet" | "style";
|
|
5666
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
|
+
|
|
5667
5817
|
/**
|
|
5668
5818
|
* Enable/disable `@import` at-rules handling.
|
|
5669
5819
|
*/
|
|
@@ -5678,8 +5828,33 @@ declare interface CssParserOptions {
|
|
|
5678
5828
|
* Enable/disable `url()`/`image-set()`/`src()`/`image()` functions handling.
|
|
5679
5829
|
*/
|
|
5680
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[];
|
|
5681
5836
|
}
|
|
5682
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
|
+
}
|
|
5683
5858
|
type DefineConfigInput =
|
|
5684
5859
|
| Configuration
|
|
5685
5860
|
| MultiConfiguration
|
|
@@ -5727,6 +5902,21 @@ declare class DefinePlugin {
|
|
|
5727
5902
|
options?: true | string[] | RuntimeValueOptions
|
|
5728
5903
|
): RuntimeValue;
|
|
5729
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;
|
|
5730
5920
|
}
|
|
5731
5921
|
declare interface DefinePluginHooks {
|
|
5732
5922
|
definitions: SyncWaterfallHook<
|
|
@@ -6108,7 +6298,6 @@ declare abstract class DependencyTemplates {
|
|
|
6108
6298
|
declare interface DestructuringAssignmentProperty {
|
|
6109
6299
|
id: string;
|
|
6110
6300
|
range: [number, number];
|
|
6111
|
-
loc: SourceLocation;
|
|
6112
6301
|
pattern?: Set<DestructuringAssignmentProperty>;
|
|
6113
6302
|
shorthand: string | boolean;
|
|
6114
6303
|
}
|
|
@@ -6579,7 +6768,7 @@ declare class ElectronTargetPlugin {
|
|
|
6579
6768
|
* Creates an instance of ElectronTargetPlugin.
|
|
6580
6769
|
*/
|
|
6581
6770
|
constructor(
|
|
6582
|
-
context?: "
|
|
6771
|
+
context?: "preload" | "main" | "renderer",
|
|
6583
6772
|
type?:
|
|
6584
6773
|
| "import"
|
|
6585
6774
|
| "var"
|
|
@@ -6599,6 +6788,7 @@ declare class ElectronTargetPlugin {
|
|
|
6599
6788
|
| "umd2"
|
|
6600
6789
|
| "jsonp"
|
|
6601
6790
|
| "system"
|
|
6791
|
+
| "amd-async"
|
|
6602
6792
|
| "promise"
|
|
6603
6793
|
| "module-import"
|
|
6604
6794
|
| "script"
|
|
@@ -6952,7 +7142,7 @@ declare interface EntryOptionPluginHooks {
|
|
|
6952
7142
|
undefined | string
|
|
6953
7143
|
>;
|
|
6954
7144
|
}
|
|
6955
|
-
type EntryOptions = { name?: string } & Omit<
|
|
7145
|
+
type EntryOptions = { name?: string; worklet?: boolean } & Omit<
|
|
6956
7146
|
EntryDescriptionNormalized,
|
|
6957
7147
|
"import"
|
|
6958
7148
|
>;
|
|
@@ -6978,11 +7168,6 @@ declare class EntryPlugin {
|
|
|
6978
7168
|
options: string | EntryOptions
|
|
6979
7169
|
): EntryDependency;
|
|
6980
7170
|
}
|
|
6981
|
-
declare interface EntryScriptInfo {
|
|
6982
|
-
request: string;
|
|
6983
|
-
entryName: string;
|
|
6984
|
-
type: "script" | "stylesheet" | "script-module" | "modulepreload";
|
|
6985
|
-
}
|
|
6986
7171
|
type EntryStatic = string | EntryObject | string[];
|
|
6987
7172
|
|
|
6988
7173
|
/**
|
|
@@ -7082,6 +7267,11 @@ declare interface Environment {
|
|
|
7082
7267
|
*/
|
|
7083
7268
|
forOf?: boolean;
|
|
7084
7269
|
|
|
7270
|
+
/**
|
|
7271
|
+
* The environment supports generator functions and yield ('function* () { yield ... }').
|
|
7272
|
+
*/
|
|
7273
|
+
generator?: boolean;
|
|
7274
|
+
|
|
7085
7275
|
/**
|
|
7086
7276
|
* The environment supports 'globalThis'.
|
|
7087
7277
|
*/
|
|
@@ -7117,6 +7307,11 @@ declare interface Environment {
|
|
|
7117
7307
|
*/
|
|
7118
7308
|
module?: boolean;
|
|
7119
7309
|
|
|
7310
|
+
/**
|
|
7311
|
+
* The environment supports `<link rel="modulepreload">` to preload EcmaScript modules.
|
|
7312
|
+
*/
|
|
7313
|
+
modulePreload?: boolean;
|
|
7314
|
+
|
|
7120
7315
|
/**
|
|
7121
7316
|
* The environment supports `process.getBuiltinModule()` to synchronously load Node.js core modules.
|
|
7122
7317
|
*/
|
|
@@ -7254,6 +7449,11 @@ declare interface ExecuteModuleOptions {
|
|
|
7254
7449
|
declare interface ExecuteModuleResult {
|
|
7255
7450
|
exports: any;
|
|
7256
7451
|
cacheable: boolean;
|
|
7452
|
+
|
|
7453
|
+
/**
|
|
7454
|
+
* reasons why the executed modules are not cacheable
|
|
7455
|
+
*/
|
|
7456
|
+
notCacheableReasons: string[];
|
|
7257
7457
|
assets: Map<string, { source: Source; info?: AssetInfo }>;
|
|
7258
7458
|
fileDependencies: LazySet<string>;
|
|
7259
7459
|
contextDependencies: LazySet<string>;
|
|
@@ -7286,10 +7486,10 @@ declare interface Experiments {
|
|
|
7286
7486
|
[index: string]: any;
|
|
7287
7487
|
|
|
7288
7488
|
/**
|
|
7289
|
-
* 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.
|
|
7290
7490
|
* @experimental
|
|
7291
7491
|
*/
|
|
7292
|
-
asyncWebAssembly?: boolean;
|
|
7492
|
+
asyncWebAssembly?: boolean | "auto";
|
|
7293
7493
|
|
|
7294
7494
|
/**
|
|
7295
7495
|
* Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.
|
|
@@ -7310,10 +7510,10 @@ declare interface Experiments {
|
|
|
7310
7510
|
cacheUnaffected?: boolean;
|
|
7311
7511
|
|
|
7312
7512
|
/**
|
|
7313
|
-
* Enable css support.
|
|
7513
|
+
* Enable css support. `"auto"` (the default) enables the built-in CSS support unless a loader is registered for CSS files.
|
|
7314
7514
|
* @experimental
|
|
7315
7515
|
*/
|
|
7316
|
-
css?: boolean;
|
|
7516
|
+
css?: boolean | "auto";
|
|
7317
7517
|
|
|
7318
7518
|
/**
|
|
7319
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.
|
|
@@ -7328,10 +7528,10 @@ declare interface Experiments {
|
|
|
7328
7528
|
futureDefaults?: boolean;
|
|
7329
7529
|
|
|
7330
7530
|
/**
|
|
7331
|
-
* 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.
|
|
7332
7532
|
* @experimental
|
|
7333
7533
|
*/
|
|
7334
|
-
html?: boolean;
|
|
7534
|
+
html?: boolean | "auto";
|
|
7335
7535
|
|
|
7336
7536
|
/**
|
|
7337
7537
|
* Compile entrypoints and import()s only when they are accessed.
|
|
@@ -7358,10 +7558,10 @@ declare interface Experiments {
|
|
|
7358
7558
|
syncWebAssembly?: boolean;
|
|
7359
7559
|
|
|
7360
7560
|
/**
|
|
7361
|
-
* 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.
|
|
7362
7562
|
* @experimental
|
|
7363
7563
|
*/
|
|
7364
|
-
typescript?: boolean;
|
|
7564
|
+
typescript?: boolean | "auto";
|
|
7365
7565
|
}
|
|
7366
7566
|
|
|
7367
7567
|
/**
|
|
@@ -7369,10 +7569,10 @@ declare interface Experiments {
|
|
|
7369
7569
|
*/
|
|
7370
7570
|
declare interface ExperimentsNormalized {
|
|
7371
7571
|
/**
|
|
7372
|
-
* 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.
|
|
7373
7573
|
* @experimental
|
|
7374
7574
|
*/
|
|
7375
|
-
asyncWebAssembly?: boolean;
|
|
7575
|
+
asyncWebAssembly?: boolean | "auto";
|
|
7376
7576
|
|
|
7377
7577
|
/**
|
|
7378
7578
|
* Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.
|
|
@@ -7393,10 +7593,10 @@ declare interface ExperimentsNormalized {
|
|
|
7393
7593
|
cacheUnaffected?: boolean;
|
|
7394
7594
|
|
|
7395
7595
|
/**
|
|
7396
|
-
* Enable css support.
|
|
7596
|
+
* Enable css support. `"auto"` (the default) enables the built-in CSS support unless a loader is registered for CSS files.
|
|
7397
7597
|
* @experimental
|
|
7398
7598
|
*/
|
|
7399
|
-
css?: boolean;
|
|
7599
|
+
css?: boolean | "auto";
|
|
7400
7600
|
|
|
7401
7601
|
/**
|
|
7402
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.
|
|
@@ -7411,10 +7611,10 @@ declare interface ExperimentsNormalized {
|
|
|
7411
7611
|
futureDefaults?: boolean;
|
|
7412
7612
|
|
|
7413
7613
|
/**
|
|
7414
|
-
* 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.
|
|
7415
7615
|
* @experimental
|
|
7416
7616
|
*/
|
|
7417
|
-
html?: boolean;
|
|
7617
|
+
html?: boolean | "auto";
|
|
7418
7618
|
|
|
7419
7619
|
/**
|
|
7420
7620
|
* Compile entrypoints and import()s only when they are accessed.
|
|
@@ -7441,10 +7641,10 @@ declare interface ExperimentsNormalized {
|
|
|
7441
7641
|
syncWebAssembly?: boolean;
|
|
7442
7642
|
|
|
7443
7643
|
/**
|
|
7444
|
-
* 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.
|
|
7445
7645
|
* @experimental
|
|
7446
7646
|
*/
|
|
7447
|
-
typescript?: boolean;
|
|
7647
|
+
typescript?: boolean | "auto";
|
|
7448
7648
|
}
|
|
7449
7649
|
declare abstract class ExportInfo {
|
|
7450
7650
|
name: string;
|
|
@@ -7984,7 +8184,11 @@ type ExternalItem =
|
|
|
7984
8184
|
data: ExternalItemFunctionData,
|
|
7985
8185
|
callback: (
|
|
7986
8186
|
err?: null | Error,
|
|
7987
|
-
result?:
|
|
8187
|
+
result?:
|
|
8188
|
+
| string
|
|
8189
|
+
| boolean
|
|
8190
|
+
| string[]
|
|
8191
|
+
| (ExternalItemValueObjectKnown & ExternalItemValueObjectUnknown)
|
|
7988
8192
|
) => void
|
|
7989
8193
|
) => void)
|
|
7990
8194
|
| ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>);
|
|
@@ -7993,7 +8197,11 @@ type ExternalItemFunction =
|
|
|
7993
8197
|
data: ExternalItemFunctionData,
|
|
7994
8198
|
callback: (
|
|
7995
8199
|
err?: null | Error,
|
|
7996
|
-
result?:
|
|
8200
|
+
result?:
|
|
8201
|
+
| string
|
|
8202
|
+
| boolean
|
|
8203
|
+
| string[]
|
|
8204
|
+
| (ExternalItemValueObjectKnown & ExternalItemValueObjectUnknown)
|
|
7997
8205
|
) => void
|
|
7998
8206
|
) => void)
|
|
7999
8207
|
| ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>);
|
|
@@ -8054,7 +8262,28 @@ declare interface ExternalItemObjectKnown {
|
|
|
8054
8262
|
declare interface ExternalItemObjectUnknown {
|
|
8055
8263
|
[index: string]: ExternalItemValue;
|
|
8056
8264
|
}
|
|
8057
|
-
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
|
+
}
|
|
8058
8287
|
declare class ExternalModule extends Module {
|
|
8059
8288
|
/**
|
|
8060
8289
|
* Creates an instance of ExternalModule.
|
|
@@ -8064,13 +8293,15 @@ declare class ExternalModule extends Module {
|
|
|
8064
8293
|
type: ExternalsType,
|
|
8065
8294
|
userRequest: string,
|
|
8066
8295
|
dependencyMeta?:
|
|
8067
|
-
ImportDependencyMeta | CssImportDependencyMeta | AssetDependencyMeta
|
|
8296
|
+
ImportDependencyMeta | CssImportDependencyMeta | AssetDependencyMeta,
|
|
8297
|
+
interop?: "default" | "esModule"
|
|
8068
8298
|
);
|
|
8069
8299
|
request: ExternalModuleRequest;
|
|
8070
8300
|
externalType: ExternalsType;
|
|
8071
8301
|
userRequest: string;
|
|
8072
8302
|
dependencyMeta?:
|
|
8073
8303
|
ImportDependencyMeta | CssImportDependencyMeta | AssetDependencyMeta;
|
|
8304
|
+
interop?: "default" | "esModule";
|
|
8074
8305
|
|
|
8075
8306
|
/**
|
|
8076
8307
|
* restore unsafe cache data
|
|
@@ -8186,7 +8417,11 @@ type Externals =
|
|
|
8186
8417
|
data: ExternalItemFunctionData,
|
|
8187
8418
|
callback: (
|
|
8188
8419
|
err?: null | Error,
|
|
8189
|
-
result?:
|
|
8420
|
+
result?:
|
|
8421
|
+
| string
|
|
8422
|
+
| boolean
|
|
8423
|
+
| string[]
|
|
8424
|
+
| (ExternalItemValueObjectKnown & ExternalItemValueObjectUnknown)
|
|
8190
8425
|
) => void
|
|
8191
8426
|
) => void)
|
|
8192
8427
|
| ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>)
|
|
@@ -8215,6 +8450,7 @@ declare class ExternalsPlugin {
|
|
|
8215
8450
|
| "umd2"
|
|
8216
8451
|
| "jsonp"
|
|
8217
8452
|
| "system"
|
|
8453
|
+
| "amd-async"
|
|
8218
8454
|
| "promise"
|
|
8219
8455
|
| "module-import"
|
|
8220
8456
|
| "script"
|
|
@@ -8245,6 +8481,7 @@ declare class ExternalsPlugin {
|
|
|
8245
8481
|
| "umd2"
|
|
8246
8482
|
| "jsonp"
|
|
8247
8483
|
| "system"
|
|
8484
|
+
| "amd-async"
|
|
8248
8485
|
| "promise"
|
|
8249
8486
|
| "module-import"
|
|
8250
8487
|
| "script"
|
|
@@ -8344,6 +8581,7 @@ type ExternalsType =
|
|
|
8344
8581
|
| "umd2"
|
|
8345
8582
|
| "jsonp"
|
|
8346
8583
|
| "system"
|
|
8584
|
+
| "amd-async"
|
|
8347
8585
|
| "promise"
|
|
8348
8586
|
| "module-import"
|
|
8349
8587
|
| "script"
|
|
@@ -8459,7 +8697,7 @@ declare interface FileCacheOptions {
|
|
|
8459
8697
|
/**
|
|
8460
8698
|
* Compression type used for the cache files.
|
|
8461
8699
|
*/
|
|
8462
|
-
compression?: false | "gzip" | "brotli";
|
|
8700
|
+
compression?: false | "gzip" | "brotli" | "zstd";
|
|
8463
8701
|
|
|
8464
8702
|
/**
|
|
8465
8703
|
* Algorithm used for generation the hash (see node.js crypto package).
|
|
@@ -9380,6 +9618,77 @@ declare interface HotModuleReplacementPluginLoaderContext {
|
|
|
9380
9618
|
declare class HotUpdateChunk extends Chunk {
|
|
9381
9619
|
constructor();
|
|
9382
9620
|
}
|
|
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
|
+
>;
|
|
9629
|
+
|
|
9630
|
+
/**
|
|
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
|
|
9632
|
+
*/
|
|
9633
|
+
transformTags: AsyncSeriesHook<[HtmlMutableTag[], HtmlTransformTagsContext]>;
|
|
9634
|
+
|
|
9635
|
+
/**
|
|
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
|
|
9637
|
+
*/
|
|
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
|
+
};
|
|
9383
9692
|
declare abstract class HtmlGenerator extends Generator {
|
|
9384
9693
|
options: HtmlGeneratorOptions;
|
|
9385
9694
|
|
|
@@ -9430,14 +9739,75 @@ declare interface HtmlGeneratorOptions {
|
|
|
9430
9739
|
*/
|
|
9431
9740
|
extract?: boolean | "inline";
|
|
9432
9741
|
}
|
|
9742
|
+
declare interface HtmlInjectTagsContext {
|
|
9743
|
+
outputName: string;
|
|
9744
|
+
html: string;
|
|
9745
|
+
}
|
|
9433
9746
|
type HtmlModuleBuildInfo = KnownBuildInfo &
|
|
9434
9747
|
Record<string, any> &
|
|
9435
9748
|
KnownNormalModuleBuildInfo &
|
|
9436
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
|
+
}
|
|
9437
9806
|
declare abstract class HtmlParser extends ParserClass {
|
|
9438
9807
|
magicCommentContext: ContextImport;
|
|
9439
9808
|
template?: (source: string, context: HtmlTemplateContext) => string;
|
|
9440
|
-
|
|
9809
|
+
fragmentContext?: string;
|
|
9810
|
+
sourcesByTag: SourceTable;
|
|
9441
9811
|
|
|
9442
9812
|
/**
|
|
9443
9813
|
* Runs the `template` option over the source and returns the transformed
|
|
@@ -9453,6 +9823,11 @@ declare abstract class HtmlParser extends ParserClass {
|
|
|
9453
9823
|
* Parser options for html modules.
|
|
9454
9824
|
*/
|
|
9455
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
|
+
|
|
9456
9831
|
/**
|
|
9457
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.
|
|
9458
9833
|
*/
|
|
@@ -9477,9 +9852,11 @@ declare interface HtmlParserOptions {
|
|
|
9477
9852
|
*/
|
|
9478
9853
|
tag?: string;
|
|
9479
9854
|
/**
|
|
9480
|
-
* 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.
|
|
9481
9856
|
*/
|
|
9482
9857
|
type:
|
|
9858
|
+
| false
|
|
9859
|
+
| "html"
|
|
9483
9860
|
| "script"
|
|
9484
9861
|
| "css-url"
|
|
9485
9862
|
| "stylesheet"
|
|
@@ -9496,6 +9873,145 @@ declare interface HtmlParserOptions {
|
|
|
9496
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.
|
|
9497
9874
|
*/
|
|
9498
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;
|
|
9499
10015
|
}
|
|
9500
10016
|
declare interface HtmlTemplateContext {
|
|
9501
10017
|
/**
|
|
@@ -9538,6 +10054,13 @@ declare interface HtmlTemplateContext {
|
|
|
9538
10054
|
*/
|
|
9539
10055
|
emitError: (error: string | Error) => void;
|
|
9540
10056
|
}
|
|
10057
|
+
declare interface HtmlTransformHtmlContext {
|
|
10058
|
+
outputName: string;
|
|
10059
|
+
}
|
|
10060
|
+
declare interface HtmlTransformTagsContext {
|
|
10061
|
+
outputName: string;
|
|
10062
|
+
html: string;
|
|
10063
|
+
}
|
|
9541
10064
|
|
|
9542
10065
|
/**
|
|
9543
10066
|
* Options for building http resources.
|
|
@@ -9960,6 +10483,65 @@ declare interface ImportDependencyMeta {
|
|
|
9960
10483
|
type ImportExpressionJavascriptParser = ImportExpressionImport & {
|
|
9961
10484
|
phase?: "defer" | "source";
|
|
9962
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
|
+
}
|
|
9963
10545
|
declare interface ImportModuleOptions {
|
|
9964
10546
|
/**
|
|
9965
10547
|
* the target layer
|
|
@@ -10017,7 +10599,12 @@ declare interface InfrastructureLogging {
|
|
|
10017
10599
|
/**
|
|
10018
10600
|
* Log level.
|
|
10019
10601
|
*/
|
|
10020
|
-
level?: "none" | "verbose" | "error" | "warn" | "info" | "log";
|
|
10602
|
+
level?: "none" | "verbose" | "error" | "warn" | "info" | "log";
|
|
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";
|
|
10021
10608
|
|
|
10022
10609
|
/**
|
|
10023
10610
|
* Stream used for logging output. Defaults to process.stderr. This option is only used when no custom console is provided.
|
|
@@ -10281,10 +10868,9 @@ declare abstract class JavascriptGenerator extends Generator {
|
|
|
10281
10868
|
* Processes the provided module.
|
|
10282
10869
|
*/
|
|
10283
10870
|
sourceDependency(
|
|
10284
|
-
module: Module,
|
|
10285
10871
|
dependency: Dependency,
|
|
10286
|
-
initFragments: InitFragment<GenerateContext>[],
|
|
10287
10872
|
source: ReplaceSource,
|
|
10873
|
+
templateContext: DependencyTemplateContext,
|
|
10288
10874
|
generateContext: GenerateContext
|
|
10289
10875
|
): void;
|
|
10290
10876
|
|
|
@@ -10294,7 +10880,7 @@ declare abstract class JavascriptGenerator extends Generator {
|
|
|
10294
10880
|
sourceBlock(
|
|
10295
10881
|
module: Module,
|
|
10296
10882
|
block: DependenciesBlock,
|
|
10297
|
-
|
|
10883
|
+
templateContext: DependencyTemplateContext,
|
|
10298
10884
|
source: ReplaceSource,
|
|
10299
10885
|
generateContext: GenerateContext
|
|
10300
10886
|
): void;
|
|
@@ -10406,6 +10992,8 @@ declare class JavascriptParser extends ParserClass {
|
|
|
10406
10992
|
options?: {
|
|
10407
10993
|
parse?: (code: string, options: ParseOptions) => ParseResult;
|
|
10408
10994
|
typescript?: boolean;
|
|
10995
|
+
importPhases?: boolean;
|
|
10996
|
+
strictModeViolations?: false | "error" | "warn";
|
|
10409
10997
|
}
|
|
10410
10998
|
);
|
|
10411
10999
|
hooks: Readonly<{
|
|
@@ -10555,6 +11143,41 @@ declare class JavascriptParser extends ParserClass {
|
|
|
10555
11143
|
],
|
|
10556
11144
|
boolean | void
|
|
10557
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
|
+
>;
|
|
10558
11181
|
blockPreStatement: SyncBailHook<
|
|
10559
11182
|
[
|
|
10560
11183
|
| ImportDeclaration
|
|
@@ -10588,6 +11211,41 @@ declare class JavascriptParser extends ParserClass {
|
|
|
10588
11211
|
],
|
|
10589
11212
|
boolean | void
|
|
10590
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
|
+
>;
|
|
10591
11249
|
statement: SyncBailHook<
|
|
10592
11250
|
[
|
|
10593
11251
|
| ImportDeclaration
|
|
@@ -10847,11 +11505,13 @@ declare class JavascriptParser extends ParserClass {
|
|
|
10847
11505
|
options: {
|
|
10848
11506
|
parse?: (code: string, options: ParseOptions) => ParseResult;
|
|
10849
11507
|
typescript?: boolean;
|
|
11508
|
+
importPhases?: boolean;
|
|
11509
|
+
strictModeViolations?: false | "error" | "warn";
|
|
10850
11510
|
};
|
|
10851
11511
|
scope: ScopeInfo;
|
|
10852
11512
|
state: JavascriptParserState;
|
|
10853
11513
|
comments?: CommentJavascriptParser[];
|
|
10854
|
-
semicolons?:
|
|
11514
|
+
semicolons?: Map<number, boolean>;
|
|
10855
11515
|
statementPath?: StatementPathItem[];
|
|
10856
11516
|
prevStatement?:
|
|
10857
11517
|
| ImportDeclaration
|
|
@@ -12130,6 +12790,20 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12130
12790
|
commentsStartPos: number
|
|
12131
12791
|
): boolean;
|
|
12132
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
|
+
|
|
12133
12807
|
/**
|
|
12134
12808
|
* Returns comments in the range.
|
|
12135
12809
|
*/
|
|
@@ -12485,6 +13159,11 @@ declare interface JavascriptParserOptions {
|
|
|
12485
13159
|
*/
|
|
12486
13160
|
deferImport?: boolean;
|
|
12487
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
|
+
|
|
12488
13167
|
/**
|
|
12489
13168
|
* Specifies global fetchPriority for dynamic import.
|
|
12490
13169
|
*/
|
|
@@ -12551,12 +13230,13 @@ declare interface JavascriptParserOptions {
|
|
|
12551
13230
|
importExportsPresence?: false | "auto" | "error" | "warn";
|
|
12552
13231
|
|
|
12553
13232
|
/**
|
|
12554
|
-
* 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.
|
|
12555
13234
|
*/
|
|
12556
|
-
importMeta?: boolean | "preserve-unknown";
|
|
13235
|
+
importMeta?: boolean | "preserve-unknown" | ImportMetaParserOptions;
|
|
12557
13236
|
|
|
12558
13237
|
/**
|
|
12559
|
-
* 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
|
|
12560
13240
|
*/
|
|
12561
13241
|
importMetaContext?: boolean;
|
|
12562
13242
|
|
|
@@ -12616,6 +13296,11 @@ declare interface JavascriptParserOptions {
|
|
|
12616
13296
|
*/
|
|
12617
13297
|
strictExportPresence?: boolean;
|
|
12618
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
|
+
|
|
12619
13304
|
/**
|
|
12620
13305
|
* Handle the this context correctly according to the spec for namespace objects.
|
|
12621
13306
|
*/
|
|
@@ -12657,11 +13342,21 @@ declare interface JavascriptParserOptions {
|
|
|
12657
13342
|
*/
|
|
12658
13343
|
url?: boolean | "relative";
|
|
12659
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
|
+
|
|
12660
13350
|
/**
|
|
12661
13351
|
* Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register().
|
|
12662
13352
|
*/
|
|
12663
13353
|
worker?: boolean | string[];
|
|
12664
13354
|
|
|
13355
|
+
/**
|
|
13356
|
+
* Disable or configure parsing of Worklet syntax like context.audioWorklet.addModule() or CSS.paintWorklet.addModule().
|
|
13357
|
+
*/
|
|
13358
|
+
worklet?: boolean | string[];
|
|
13359
|
+
|
|
12665
13360
|
/**
|
|
12666
13361
|
* Enable warnings for partial dynamic dependencies.
|
|
12667
13362
|
*/
|
|
@@ -12906,6 +13601,11 @@ declare interface KnownAssetModuleBuildInfo {
|
|
|
12906
13601
|
}
|
|
12907
13602
|
declare interface KnownBuildInfo {
|
|
12908
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[];
|
|
12909
13609
|
strict?: boolean;
|
|
12910
13610
|
moduleArgument?: string;
|
|
12911
13611
|
exportsArgument?: string;
|
|
@@ -12925,6 +13625,11 @@ declare interface KnownBuildInfo {
|
|
|
12925
13625
|
* true when the module is part of a circular dependency chain
|
|
12926
13626
|
*/
|
|
12927
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;
|
|
12928
13633
|
}
|
|
12929
13634
|
declare interface KnownBuildMeta {
|
|
12930
13635
|
exportsType?: "default" | "namespace" | "flagged" | "dynamic";
|
|
@@ -13023,7 +13728,7 @@ declare interface KnownHtmlModuleBuildInfo {
|
|
|
13023
13728
|
/**
|
|
13024
13729
|
* entries collected from the document, grouped by kind
|
|
13025
13730
|
*/
|
|
13026
|
-
|
|
13731
|
+
htmlEntries?: Record<string, HtmlEntryInfo[]>;
|
|
13027
13732
|
|
|
13028
13733
|
/**
|
|
13029
13734
|
* `../` per `<base href>` path segment, prepended to the auto-public-path undo path so a relative base doesn't misdirect bundled URLs
|
|
@@ -13323,6 +14028,7 @@ declare interface KnownStatsModule {
|
|
|
13323
14028
|
size?: number;
|
|
13324
14029
|
sizes?: Record<string, number>;
|
|
13325
14030
|
cacheable?: boolean;
|
|
14031
|
+
notCacheableReasons?: string[];
|
|
13326
14032
|
built?: boolean;
|
|
13327
14033
|
codeGenerated?: boolean;
|
|
13328
14034
|
buildTimeExecuted?: boolean;
|
|
@@ -14598,6 +15304,41 @@ declare interface MergeDuplicateChunksPluginOptions {
|
|
|
14598
15304
|
*/
|
|
14599
15305
|
stage?: number;
|
|
14600
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>;
|
|
14601
15342
|
type Meta = KnownMeta & Record<symbol, string[]> & Record<string, any>;
|
|
14602
15343
|
declare class MinChunkSizePlugin {
|
|
14603
15344
|
/**
|
|
@@ -15310,6 +16051,7 @@ declare interface ModuleFederationPluginOptions {
|
|
|
15310
16051
|
| "umd2"
|
|
15311
16052
|
| "jsonp"
|
|
15312
16053
|
| "system"
|
|
16054
|
+
| "amd-async"
|
|
15313
16055
|
| "promise"
|
|
15314
16056
|
| "module-import"
|
|
15315
16057
|
| "script"
|
|
@@ -16277,6 +17019,7 @@ declare class MultiCompiler {
|
|
|
16277
17019
|
compilers: Compiler[];
|
|
16278
17020
|
dependencies: WeakMap<Compiler, string[]>;
|
|
16279
17021
|
running: boolean;
|
|
17022
|
+
watching?: MultiWatching;
|
|
16280
17023
|
get options(): WebpackOptionsNormalized[] & MultiCompilerOptions;
|
|
16281
17024
|
get outputPath(): string;
|
|
16282
17025
|
|
|
@@ -17756,9 +18499,9 @@ declare interface Optimization {
|
|
|
17756
18499
|
false | "natural" | "named" | "deterministic" | "size" | "total-size";
|
|
17757
18500
|
|
|
17758
18501
|
/**
|
|
17759
|
-
* 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'.
|
|
17760
18503
|
*/
|
|
17761
|
-
concatenateModules?: boolean;
|
|
18504
|
+
concatenateModules?: boolean | ConcatenateModulesOptions;
|
|
17762
18505
|
|
|
17763
18506
|
/**
|
|
17764
18507
|
* Emit assets even when errors occur. Critical errors are emitted into the generated code and will cause errors at runtime.
|
|
@@ -17906,9 +18649,9 @@ declare interface OptimizationNormalized {
|
|
|
17906
18649
|
false | "natural" | "named" | "deterministic" | "size" | "total-size";
|
|
17907
18650
|
|
|
17908
18651
|
/**
|
|
17909
|
-
* 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'.
|
|
17910
18653
|
*/
|
|
17911
|
-
concatenateModules?: boolean;
|
|
18654
|
+
concatenateModules?: boolean | ConcatenateModulesOptions;
|
|
17912
18655
|
|
|
17913
18656
|
/**
|
|
17914
18657
|
* Emit assets even when errors occur. Critical errors are emitted into the generated code and will cause errors at runtime.
|
|
@@ -18067,7 +18810,9 @@ type OptimizationNormalizedWithDefaults = OptimizationNormalized & {
|
|
|
18067
18810
|
mangleExports: NonNullable<undefined | boolean | "deterministic" | "size">;
|
|
18068
18811
|
innerGraph: NonNullable<undefined | boolean>;
|
|
18069
18812
|
inlineExports: NonNullable<undefined | boolean>;
|
|
18070
|
-
concatenateModules: NonNullable<
|
|
18813
|
+
concatenateModules: NonNullable<
|
|
18814
|
+
undefined | boolean | ConcatenateModulesOptions
|
|
18815
|
+
>;
|
|
18071
18816
|
avoidEntryIife: NonNullable<undefined | boolean>;
|
|
18072
18817
|
emitOnErrors: NonNullable<undefined | boolean>;
|
|
18073
18818
|
checkWasmTypes: NonNullable<undefined | boolean>;
|
|
@@ -18667,6 +19412,26 @@ declare interface Output {
|
|
|
18667
19412
|
*/
|
|
18668
19413
|
publicPath?: string | TemplatePathFn<PathData>;
|
|
18669
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
|
+
|
|
18670
19435
|
/**
|
|
18671
19436
|
* This option enables loading async chunks via a custom script type, such as script type="module".
|
|
18672
19437
|
*/
|
|
@@ -18718,6 +19483,11 @@ declare interface Output {
|
|
|
18718
19483
|
*/
|
|
18719
19484
|
wasmLoading?: string | false;
|
|
18720
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
|
+
|
|
18721
19491
|
/**
|
|
18722
19492
|
* The filename of WebAssembly modules as relative path inside the 'output.path' directory.
|
|
18723
19493
|
*/
|
|
@@ -18788,10 +19558,155 @@ declare interface OutputFileSystem {
|
|
|
18788
19558
|
* Options for the generated HTML files.
|
|
18789
19559
|
*/
|
|
18790
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
|
+
|
|
18791
19701
|
/**
|
|
18792
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.
|
|
18793
19703
|
*/
|
|
18794
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;
|
|
18795
19710
|
}
|
|
18796
19711
|
|
|
18797
19712
|
/**
|
|
@@ -19005,6 +19920,11 @@ declare interface OutputNormalized {
|
|
|
19005
19920
|
*/
|
|
19006
19921
|
publicPath?: string | TemplatePathFn<PathData>;
|
|
19007
19922
|
|
|
19923
|
+
/**
|
|
19924
|
+
* Full resource-hint configuration.
|
|
19925
|
+
*/
|
|
19926
|
+
resourceHints?: ResourceHintsOptions;
|
|
19927
|
+
|
|
19008
19928
|
/**
|
|
19009
19929
|
* This option enables loading async chunks via a custom script type, such as script type="module".
|
|
19010
19930
|
*/
|
|
@@ -19051,6 +19971,11 @@ declare interface OutputNormalized {
|
|
|
19051
19971
|
*/
|
|
19052
19972
|
wasmLoading?: string | false;
|
|
19053
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
|
+
|
|
19054
19979
|
/**
|
|
19055
19980
|
* The filename of WebAssembly modules as relative path inside the 'output.path' directory.
|
|
19056
19981
|
*/
|
|
@@ -19138,14 +20063,32 @@ declare interface ParseOptions {
|
|
|
19138
20063
|
locations?: boolean;
|
|
19139
20064
|
comments?: boolean;
|
|
19140
20065
|
ranges?: boolean;
|
|
19141
|
-
semicolons?: boolean;
|
|
19142
20066
|
allowHashBang?: boolean;
|
|
19143
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;
|
|
19144
20088
|
}
|
|
19145
20089
|
declare interface ParseResult {
|
|
19146
20090
|
ast: Program;
|
|
19147
20091
|
comments: CommentJavascriptParser[];
|
|
19148
|
-
semicolons: Set<number>;
|
|
19149
20092
|
}
|
|
19150
20093
|
declare interface ParsedIdentifier {
|
|
19151
20094
|
/**
|
|
@@ -19627,6 +20570,7 @@ declare class ProgressPlugin {
|
|
|
19627
20570
|
percentBy: null | "entries" | "modules" | "dependencies";
|
|
19628
20571
|
progressBar:
|
|
19629
20572
|
| false
|
|
20573
|
+
| "auto"
|
|
19630
20574
|
| Required<{
|
|
19631
20575
|
/**
|
|
19632
20576
|
* Color used for the filled portion of the bar.
|
|
@@ -19636,7 +20580,13 @@ declare class ProgressPlugin {
|
|
|
19636
20580
|
* Name shown before the progress bar.
|
|
19637
20581
|
*/
|
|
19638
20582
|
name?: string;
|
|
20583
|
+
/**
|
|
20584
|
+
* Width of the progress bar in characters. Default: 25.
|
|
20585
|
+
*/
|
|
20586
|
+
width?: number;
|
|
19639
20587
|
}>;
|
|
20588
|
+
estimatedTime: boolean;
|
|
20589
|
+
phaseTimings: boolean;
|
|
19640
20590
|
|
|
19641
20591
|
/**
|
|
19642
20592
|
* Applies the plugin by registering its hooks on the compiler.
|
|
@@ -19653,18 +20603,7 @@ declare class ProgressPlugin {
|
|
|
19653
20603
|
static createDefaultHandler: (
|
|
19654
20604
|
profile: undefined | null | boolean,
|
|
19655
20605
|
logger: WebpackLogger,
|
|
19656
|
-
|
|
19657
|
-
| false
|
|
19658
|
-
| Required<{
|
|
19659
|
-
/**
|
|
19660
|
-
* Color used for the filled portion of the bar.
|
|
19661
|
-
*/
|
|
19662
|
-
color?: string;
|
|
19663
|
-
/**
|
|
19664
|
-
* Name shown before the progress bar.
|
|
19665
|
-
*/
|
|
19666
|
-
name?: string;
|
|
19667
|
-
}>
|
|
20606
|
+
options?: DefaultHandlerOptions
|
|
19668
20607
|
) => (percentage: number, msg: string, ...args: string[]) => void;
|
|
19669
20608
|
}
|
|
19670
20609
|
type ProgressPluginArgument =
|
|
@@ -19695,6 +20634,11 @@ declare interface ProgressPluginOptions {
|
|
|
19695
20634
|
*/
|
|
19696
20635
|
entries?: boolean;
|
|
19697
20636
|
|
|
20637
|
+
/**
|
|
20638
|
+
* Show estimated time remaining based on build progress. Default: false.
|
|
20639
|
+
*/
|
|
20640
|
+
estimatedTime?: boolean;
|
|
20641
|
+
|
|
19698
20642
|
/**
|
|
19699
20643
|
* Function that executes for every progress step.
|
|
19700
20644
|
*/
|
|
@@ -19715,16 +20659,22 @@ declare interface ProgressPluginOptions {
|
|
|
19715
20659
|
*/
|
|
19716
20660
|
percentBy?: null | "entries" | "modules" | "dependencies";
|
|
19717
20661
|
|
|
20662
|
+
/**
|
|
20663
|
+
* Show a timing breakdown for each build phase when the build completes. Default: false.
|
|
20664
|
+
*/
|
|
20665
|
+
phaseTimings?: boolean;
|
|
20666
|
+
|
|
19718
20667
|
/**
|
|
19719
20668
|
* Collect profile data for progress steps. Default: false.
|
|
19720
20669
|
*/
|
|
19721
20670
|
profile?: null | boolean;
|
|
19722
20671
|
|
|
19723
20672
|
/**
|
|
19724
|
-
* Generate progress bar. Default: false.
|
|
20673
|
+
* Generate progress bar. `"auto"` enables it only for interactive terminals. Default: false.
|
|
19725
20674
|
*/
|
|
19726
20675
|
progressBar?:
|
|
19727
20676
|
| boolean
|
|
20677
|
+
| "auto"
|
|
19728
20678
|
| {
|
|
19729
20679
|
/**
|
|
19730
20680
|
* Color used for the filled portion of the bar.
|
|
@@ -19734,6 +20684,10 @@ declare interface ProgressPluginOptions {
|
|
|
19734
20684
|
* Name shown before the progress bar.
|
|
19735
20685
|
*/
|
|
19736
20686
|
name?: string;
|
|
20687
|
+
/**
|
|
20688
|
+
* Width of the progress bar in characters. Default: 25.
|
|
20689
|
+
*/
|
|
20690
|
+
width?: number;
|
|
19737
20691
|
};
|
|
19738
20692
|
}
|
|
19739
20693
|
declare class ProvidePlugin {
|
|
@@ -19809,6 +20763,11 @@ type PureCondition =
|
|
|
19809
20763
|
declare interface RawChunkGroupOptions {
|
|
19810
20764
|
preloadOrder?: number;
|
|
19811
20765
|
prefetchOrder?: number;
|
|
20766
|
+
|
|
20767
|
+
/**
|
|
20768
|
+
* preload only the chunk's CSS (`as="style"`), not its JS
|
|
20769
|
+
*/
|
|
20770
|
+
cssPreloadOrder?: number;
|
|
19812
20771
|
fetchPriority?: "auto" | "low" | "high";
|
|
19813
20772
|
}
|
|
19814
20773
|
type RawDevTool = string | false;
|
|
@@ -21667,6 +22626,50 @@ declare interface ResourceDataWithData {
|
|
|
21667
22626
|
context?: string;
|
|
21668
22627
|
data: ResourceSchemeData & Partial<ResolveRequest>;
|
|
21669
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
|
+
}
|
|
21670
22673
|
declare interface ResourceSchemeData {
|
|
21671
22674
|
/**
|
|
21672
22675
|
* mime type of the resource
|
|
@@ -22340,6 +23343,7 @@ declare abstract class RuntimeTemplate {
|
|
|
22340
23343
|
supportsLogicalAssignment(): boolean;
|
|
22341
23344
|
supportsArrowFunction(): boolean;
|
|
22342
23345
|
supportsAsyncFunction(): boolean;
|
|
23346
|
+
supportsGenerator(): boolean;
|
|
22343
23347
|
supportsOptionalChaining(): boolean;
|
|
22344
23348
|
supportsSpread(): boolean;
|
|
22345
23349
|
supportsObjectHasOwn(): boolean;
|
|
@@ -22349,6 +23353,8 @@ declare abstract class RuntimeTemplate {
|
|
|
22349
23353
|
supportsBigIntLiteral(): boolean;
|
|
22350
23354
|
supportsDynamicImport(): boolean;
|
|
22351
23355
|
supportsEcmaScriptModuleSyntax(): boolean;
|
|
23356
|
+
supportsModulePreload(): boolean;
|
|
23357
|
+
supportsAnalyzableEsm(): boolean;
|
|
22352
23358
|
supportTemplateLiteral(): boolean;
|
|
22353
23359
|
supportNodePrefixForCoreModules(): boolean;
|
|
22354
23360
|
|
|
@@ -22692,6 +23698,10 @@ declare abstract class RuntimeTemplate {
|
|
|
22692
23698
|
* if set, will be filled with runtime requirements
|
|
22693
23699
|
*/
|
|
22694
23700
|
runtimeRequirements: Set<string>;
|
|
23701
|
+
/**
|
|
23702
|
+
* the module the `import()` is emitted into
|
|
23703
|
+
*/
|
|
23704
|
+
originModule?: Module;
|
|
22695
23705
|
}): string;
|
|
22696
23706
|
|
|
22697
23707
|
/**
|
|
@@ -22852,6 +23862,10 @@ declare abstract class RuntimeTemplate {
|
|
|
22852
23862
|
* if set, will be filled with runtime requirements
|
|
22853
23863
|
*/
|
|
22854
23864
|
runtimeRequirements: Set<string>;
|
|
23865
|
+
/**
|
|
23866
|
+
* the module the `import()` is emitted into
|
|
23867
|
+
*/
|
|
23868
|
+
originModule?: Module;
|
|
22855
23869
|
}): string;
|
|
22856
23870
|
|
|
22857
23871
|
/**
|
|
@@ -23491,6 +24505,9 @@ declare interface SourceAndMap {
|
|
|
23491
24505
|
*/
|
|
23492
24506
|
map: null | RawSourceMap;
|
|
23493
24507
|
}
|
|
24508
|
+
declare interface SourceBucket {
|
|
24509
|
+
[index: string]: undefined | SourceItem;
|
|
24510
|
+
}
|
|
23494
24511
|
declare interface SourceItem {
|
|
23495
24512
|
type: SourceTypeOrResolver;
|
|
23496
24513
|
filter?: (attributes: Map<string, string>, value: string) => boolean;
|
|
@@ -23677,12 +24694,18 @@ declare interface SourcePosition {
|
|
|
23677
24694
|
line: number;
|
|
23678
24695
|
column?: number;
|
|
23679
24696
|
}
|
|
24697
|
+
declare interface SourceTable {
|
|
24698
|
+
[index: string]: SourceBucket;
|
|
24699
|
+
}
|
|
23680
24700
|
type SourceType =
|
|
24701
|
+
| "html"
|
|
23681
24702
|
| "script"
|
|
23682
24703
|
| "css-url"
|
|
23683
24704
|
| "stylesheet"
|
|
23684
|
-
| "
|
|
24705
|
+
| "prefetch"
|
|
24706
|
+
| "preload"
|
|
23685
24707
|
| "modulepreload"
|
|
24708
|
+
| "script-module"
|
|
23686
24709
|
| "src"
|
|
23687
24710
|
| "srcset"
|
|
23688
24711
|
| "stylesheet-style"
|
|
@@ -23690,11 +24713,14 @@ type SourceType =
|
|
|
23690
24713
|
| "srcdoc"
|
|
23691
24714
|
| "msapplication-task";
|
|
23692
24715
|
type SourceTypeOrResolver =
|
|
24716
|
+
| "html"
|
|
23693
24717
|
| "script"
|
|
23694
24718
|
| "css-url"
|
|
23695
24719
|
| "stylesheet"
|
|
23696
|
-
| "
|
|
24720
|
+
| "prefetch"
|
|
24721
|
+
| "preload"
|
|
23697
24722
|
| "modulepreload"
|
|
24723
|
+
| "script-module"
|
|
23698
24724
|
| "src"
|
|
23699
24725
|
| "srcset"
|
|
23700
24726
|
| "stylesheet-style"
|
|
@@ -23821,11 +24847,15 @@ declare abstract class StackEntry {
|
|
|
23821
24847
|
|
|
23822
24848
|
/**
|
|
23823
24849
|
* Layered map that supports child scopes while memoizing lookups from parent
|
|
23824
|
-
* 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.
|
|
23825
24855
|
*/
|
|
23826
24856
|
declare abstract class StackedMap<K, V> {
|
|
23827
|
-
map
|
|
23828
|
-
|
|
24857
|
+
map?: Map<K, InternalCell<V>>;
|
|
24858
|
+
parent?: StackedMap<K, V>;
|
|
23829
24859
|
|
|
23830
24860
|
/**
|
|
23831
24861
|
* Stores a value in the current layer, preserving explicit `undefined`
|
|
@@ -23841,13 +24871,14 @@ declare abstract class StackedMap<K, V> {
|
|
|
23841
24871
|
|
|
23842
24872
|
/**
|
|
23843
24873
|
* Checks whether a key exists in the current scope chain, caching any parent
|
|
23844
|
-
* lookup result in the
|
|
24874
|
+
* lookup result in the nearest `Map`-bearing layer.
|
|
23845
24875
|
*/
|
|
23846
24876
|
has(item: K): boolean;
|
|
23847
24877
|
|
|
23848
24878
|
/**
|
|
23849
24879
|
* Returns the visible value for a key, caching parent hits and misses in the
|
|
23850
|
-
*
|
|
24880
|
+
* nearest `Map`-bearing layer so repeated lookups (from this layer or any
|
|
24881
|
+
* sibling below that layer) answer with a single probe.
|
|
23851
24882
|
*/
|
|
23852
24883
|
get(item: K): Cell<V>;
|
|
23853
24884
|
|
|
@@ -24361,6 +25392,11 @@ declare interface StatsOptions {
|
|
|
24361
25392
|
*/
|
|
24362
25393
|
chunkGroupMaxAssets?: number;
|
|
24363
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
|
+
|
|
24364
25400
|
/**
|
|
24365
25401
|
* Display all chunk groups with the corresponding bundles.
|
|
24366
25402
|
*/
|
|
@@ -25109,6 +26145,71 @@ declare interface UpdateHashContextGenerator {
|
|
|
25109
26145
|
runtime: RuntimeSpec;
|
|
25110
26146
|
runtimeTemplate?: RuntimeTemplate;
|
|
25111
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
|
+
}
|
|
25112
26213
|
type Usage = string | true | TopLevelSymbol;
|
|
25113
26214
|
type UsageStateType = 0 | 1 | 2 | 3 | 4;
|
|
25114
26215
|
type UsedName = string | false | string[] | InlinedUsedName;
|
|
@@ -25852,6 +26953,7 @@ declare interface WebpackOptionsNormalized {
|
|
|
25852
26953
|
| "umd2"
|
|
25853
26954
|
| "jsonp"
|
|
25854
26955
|
| "system"
|
|
26956
|
+
| "amd-async"
|
|
25855
26957
|
| "promise"
|
|
25856
26958
|
| "module-import"
|
|
25857
26959
|
| "script"
|
|
@@ -26025,6 +27127,7 @@ type WebpackOptionsNormalizedWithDefaults = WebpackOptionsNormalized & {
|
|
|
26025
27127
|
| "umd2"
|
|
26026
27128
|
| "jsonp"
|
|
26027
27129
|
| "system"
|
|
27130
|
+
| "amd-async"
|
|
26028
27131
|
| "promise"
|
|
26029
27132
|
| "module-import"
|
|
26030
27133
|
| "script"
|
|
@@ -26290,12 +27393,15 @@ declare namespace exports {
|
|
|
26290
27393
|
export namespace RuntimeGlobals {
|
|
26291
27394
|
export let amdDefine: "__webpack_require__.amdD";
|
|
26292
27395
|
export let amdOptions: "__webpack_require__.amdO";
|
|
27396
|
+
export let analyzableChunkImport: "__webpack_require__.ei";
|
|
26293
27397
|
export let asyncModule: "__webpack_require__.a";
|
|
26294
27398
|
export let asyncModuleDoneSymbol: "__webpack_require__.aD";
|
|
26295
27399
|
export let asyncModuleExportSymbol: "__webpack_require__.aE";
|
|
27400
|
+
export let asyncModuleGenerator: "__webpack_require__.aG";
|
|
26296
27401
|
export let baseURI: "__webpack_require__.b";
|
|
26297
27402
|
export let chunkCallback: "webpackChunk";
|
|
26298
27403
|
export let chunkName: "__webpack_require__.cn";
|
|
27404
|
+
export let commonJsWrap: "__webpack_require__.cjs";
|
|
26299
27405
|
export let compatGetDefaultExport: "__webpack_require__.n";
|
|
26300
27406
|
export let compileWasm: "__webpack_require__.vs";
|
|
26301
27407
|
export let createFakeNamespaceObject: "__webpack_require__.t";
|
|
@@ -26323,6 +27429,7 @@ declare namespace exports {
|
|
|
26323
27429
|
export let getFullHash: "__webpack_require__.h";
|
|
26324
27430
|
export let getTrustedTypesPolicy: "__webpack_require__.tt";
|
|
26325
27431
|
export let getUpdateManifestFilename: "__webpack_require__.hmrF";
|
|
27432
|
+
export let getWorkletBootstrap: "__webpack_require__.wb";
|
|
26326
27433
|
export let global: "__webpack_require__.g";
|
|
26327
27434
|
export let harmonyModuleDecorator: "__webpack_require__.hmd";
|
|
26328
27435
|
export let hasCssModules: "has css modules";
|
|
@@ -26348,8 +27455,10 @@ declare namespace exports {
|
|
|
26348
27455
|
export let moduleLoaded: "module.loaded";
|
|
26349
27456
|
export let nodeModuleDecorator: "__webpack_require__.nmd";
|
|
26350
27457
|
export let onChunksLoaded: "__webpack_require__.O";
|
|
27458
|
+
export let prefetchAsset: "__webpack_require__.PA";
|
|
26351
27459
|
export let prefetchChunk: "__webpack_require__.E";
|
|
26352
27460
|
export let prefetchChunkHandlers: "__webpack_require__.F";
|
|
27461
|
+
export let preloadAsset: "__webpack_require__.LA";
|
|
26353
27462
|
export let preloadChunk: "__webpack_require__.G";
|
|
26354
27463
|
export let preloadChunkHandlers: "__webpack_require__.H";
|
|
26355
27464
|
export let publicPath: "__webpack_require__.p";
|
|
@@ -26362,6 +27471,7 @@ declare namespace exports {
|
|
|
26362
27471
|
export let setAnonymousDefaultName: "__webpack_require__.dn";
|
|
26363
27472
|
export let shareScopeMap: "__webpack_require__.S";
|
|
26364
27473
|
export let startup: "__webpack_require__.x";
|
|
27474
|
+
export let startupAssetHints: "__webpack_require__.SAH";
|
|
26365
27475
|
export let startupEntrypoint: "__webpack_require__.X";
|
|
26366
27476
|
export let startupNoDefault: "__webpack_require__.x (no default handler)";
|
|
26367
27477
|
export let startupOnlyAfter: "__webpack_require__.x (only after)";
|
|
@@ -26491,6 +27601,9 @@ declare namespace exports {
|
|
|
26491
27601
|
export namespace css {
|
|
26492
27602
|
export { CssModulesPlugin };
|
|
26493
27603
|
}
|
|
27604
|
+
export namespace html {
|
|
27605
|
+
export { HtmlModulesPlugin };
|
|
27606
|
+
}
|
|
26494
27607
|
export namespace library {
|
|
26495
27608
|
export { AbstractLibraryPlugin, EnableLibraryPlugin };
|
|
26496
27609
|
}
|
|
@@ -26747,7 +27860,11 @@ declare namespace exports {
|
|
|
26747
27860
|
data: ExternalItemFunctionData,
|
|
26748
27861
|
callback: (
|
|
26749
27862
|
err?: null | Error,
|
|
26750
|
-
result?:
|
|
27863
|
+
result?:
|
|
27864
|
+
| string
|
|
27865
|
+
| boolean
|
|
27866
|
+
| string[]
|
|
27867
|
+
| (ExternalItemValueObjectKnown & ExternalItemValueObjectUnknown)
|
|
26751
27868
|
) => void
|
|
26752
27869
|
) => void;
|
|
26753
27870
|
export type ExternalItemFunctionDataGetResolve = (
|