webpack 5.110.2 → 5.111.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/lib/APIPlugin.js +23 -7
- package/lib/AutomaticPrefetchPlugin.js +1 -1
- package/lib/Cache.js +8 -3
- package/lib/CacheFacade.js +1 -1
- package/lib/ChunkGraph.js +20 -18
- package/lib/CircularModulesPlugin.js +157 -55
- package/lib/CleanPlugin.js +2 -2
- package/lib/Compilation.js +321 -303
- package/lib/Compiler.js +209 -46
- package/lib/ConcatenationScope.js +25 -35
- package/lib/ContextModule.js +17 -81
- package/lib/ContextModuleFactory.js +1 -1
- package/lib/CopyPlugin.js +1054 -0
- package/lib/DefinePlugin.js +24 -8
- package/lib/DotenvPlugin.js +41 -13
- package/lib/ExternalModule.js +41 -14
- package/lib/FileSystemInfo.js +17 -14
- package/lib/FlagDependencyExportsPlugin.js +45 -21
- package/lib/FlagDependencyUsagePlugin.js +8 -2
- package/lib/HotModuleReplacementPlugin.js +53 -7
- package/lib/JavascriptMetaInfoPlugin.js +5 -3
- package/lib/MainTemplate.js +5 -1
- package/lib/Module.js +16 -7
- package/lib/MultiCompiler.js +1 -1
- package/lib/MultiWatching.js +1 -1
- package/lib/NormalModule.js +58 -32
- package/lib/NormalModuleFactory.js +1 -1
- package/lib/RuntimeGlobals.js +21 -7
- package/lib/RuntimeModule.js +28 -12
- package/lib/RuntimePlugin.js +33 -3
- package/lib/RuntimeTemplate.js +794 -477
- package/lib/SourceMapDevToolPlugin.js +1 -1
- package/lib/Watching.js +9 -0
- package/lib/WebpackOptionsApply.js +84 -91
- package/lib/asset/AssetGenerator.js +25 -8
- package/lib/asset/AssetModule.js +3 -0
- package/lib/asset/WebManifestParser.js +7 -5
- package/lib/async-modules/AsyncModuleHelpers.js +10 -4
- package/lib/cache/AddBuildDependenciesPlugin.js +33 -4
- package/lib/cache/IdleFileCachePlugin.js +2 -2
- package/lib/cache/PackFileCacheStrategy.js +14 -1
- package/lib/config/browserslistTargetHandler.js +19 -0
- package/lib/config/defaults.js +110 -64
- package/lib/config/normalization.js +100 -20
- package/lib/config/target.js +10 -0
- package/lib/container/ContainerReferencePlugin.js +6 -0
- package/lib/container/RemoteRuntimeModule.js +9 -0
- package/lib/container/declaredRemotes.js +39 -0
- package/lib/css/CssGenerator.js +8 -0
- package/lib/css/CssInjectStyleRuntimeModule.js +9 -0
- package/lib/css/CssLoadingRuntimeModule.js +94 -36
- package/lib/css/CssModule.js +1 -1
- package/lib/css/CssModulesPlugin.js +7 -6
- package/lib/css/CssParser.js +144 -11
- package/lib/css/CssServerStylesRuntimeModule.js +9 -0
- package/lib/css/cssMinify.js +11 -3
- package/lib/css/data.js +2814 -678
- package/lib/css/syntax.js +4082 -248
- package/lib/debug/ProfilingPlugin.js +4 -0
- package/lib/dependencies/AMDDefineDependencyParserPlugin.js +6 -3
- package/lib/dependencies/AMDRuntimeModules.js +18 -0
- package/lib/dependencies/CommonJsExportRequireDependency.js +3 -1
- package/lib/dependencies/CommonJsExportsParserPlugin.js +12 -13
- package/lib/dependencies/CommonJsImportsParserPlugin.js +1 -0
- package/lib/dependencies/CommonJsPlugin.js +19 -3
- package/lib/dependencies/CommonJsRequireDependency.js +32 -9
- package/lib/dependencies/ContextDependencyTemplateAsRequireCall.js +20 -7
- package/lib/dependencies/CssIcssExportDependency.js +7 -1
- package/lib/dependencies/HarmonyCompatibilityDependency.js +58 -4
- package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +8 -3
- package/lib/dependencies/HarmonyExportExpressionDependency.js +44 -29
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +171 -32
- package/lib/dependencies/HarmonyExportInitFragment.js +99 -19
- package/lib/dependencies/HarmonyExportSpecifierDependency.js +18 -30
- package/lib/dependencies/HarmonyImportBareSideEffectDependency.js +59 -0
- package/lib/dependencies/HarmonyImportDependency.js +99 -41
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +20 -3
- package/lib/dependencies/HarmonyImportSpecifierDependency.js +24 -1
- package/lib/dependencies/HarmonyModulesPlugin.js +20 -0
- package/lib/dependencies/HtmlEntryDependency.js +62 -2
- package/lib/dependencies/ImportContextDependency.js +43 -3
- package/lib/dependencies/ImportDependency.js +8 -29
- package/lib/dependencies/ImportMetaMainDependency.js +104 -0
- package/lib/dependencies/ImportMetaPlugin.js +59 -15
- package/lib/dependencies/ImportParserPlugin.js +24 -14
- package/lib/dependencies/RequireHeaderDependency.js +20 -21
- package/lib/dependencies/SystemRuntimeModule.js +9 -0
- package/lib/dependencies/WorkerDependency.js +1 -2
- package/lib/dependencies/WorkletDependency.js +1 -2
- package/lib/dependencies/importOptionsCheck.js +47 -0
- package/lib/dll/DelegatedModule.js +18 -1
- package/lib/dll/DllReferencePlugin.js +11 -8
- package/lib/dll/LibManifestPlugin.js +1 -1
- package/lib/errors/AnalyzableBailoutsWarning.js +41 -0
- package/lib/errors/DotenvFileError.js +29 -0
- package/lib/errors/DuplicateModulesWarning.js +12 -7
- package/lib/errors/EmptyCopyPatternWarning.js +26 -0
- package/lib/errors/ExternalStarReexportError.js +44 -0
- package/lib/errors/ImportedBindingAssignmentError.js +30 -0
- package/lib/errors/MissingSourceMapsWarning.js +36 -0
- package/lib/errors/ModuleParseError.js +2 -1
- package/lib/errors/UnusedAssetsWarning.js +36 -0
- package/lib/errors/UnusedFederationWarning.js +35 -0
- package/lib/errors/UnusedModulesWarning.js +38 -0
- package/lib/esm/ExportWebpackRequireRuntimeModule.js +9 -0
- package/lib/esm/ModuleChunkFormatPlugin.js +28 -3
- package/lib/esm/ModuleChunkLoadingPlugin.js +30 -11
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +92 -60
- package/lib/hmr/HotModuleReplacement.runtime.js +8 -2
- package/lib/hmr/HotModuleReplacementRuntimeModule.js +9 -0
- package/lib/html/HtmlGenerator.js +11 -5
- package/lib/html/HtmlModulesPlugin.js +360 -84
- package/lib/html/HtmlParser.js +13 -6
- package/lib/html/builtinEmbeddedRenderer.js +107 -0
- package/lib/html/data.js +121 -7
- package/lib/html/htmlMinify.js +84 -113
- package/lib/html/syntax.js +1067 -569
- package/lib/ids/HashedModuleIdsPlugin.js +2 -1
- package/lib/index.js +3 -0
- package/lib/javascript/JavascriptModule.js +1 -0
- package/lib/javascript/JavascriptModulesPlugin.js +52 -22
- package/lib/javascript/JavascriptParser.js +1255 -728
- package/lib/javascript/StartupHelpers.js +27 -3
- package/lib/javascript/data.js +172 -0
- package/lib/javascript/grammar.js +5546 -0
- package/lib/javascript/parser.js +1494 -0
- package/lib/javascript/regexp.js +1762 -0
- package/lib/javascript/regexpData.js +51 -0
- package/lib/javascript/syntax.js +8696 -5225
- package/lib/library/ModuleLibraryPlugin.js +116 -5
- package/lib/node/ReadFileChunkLoadingRuntimeModule.js +22 -0
- package/lib/node/RequireChunkLoadingRuntimeModule.js +22 -0
- package/lib/optimize/ConcatenatedModule.js +133 -25
- package/lib/optimize/ConstExportsPlugin.js +50 -39
- package/lib/optimize/InlineExports.js +20 -123
- package/lib/optimize/MangleExportsPlugin.js +10 -0
- package/lib/optimize/ModuleConcatenationPlugin.js +24 -1
- package/lib/optimize/RealContentHashPlugin.js +68 -9
- package/lib/optimize/SideEffectsFlagPlugin.js +17 -9
- package/lib/performance/AnalyzableBailoutsPlugin.js +115 -0
- package/lib/performance/CacheEffectivenessPlugin.js +4 -3
- package/lib/performance/DuplicateModulesPlugin.js +57 -13
- package/lib/performance/EvalUsagePlugin.js +5 -2
- package/lib/performance/MissingSourceMapsPlugin.js +115 -0
- package/lib/performance/PureAnnotationsPlugin.js +6 -3
- package/lib/performance/TopLevelThisPlugin.js +5 -4
- package/lib/performance/UnusedAssetsPlugin.js +109 -0
- package/lib/performance/UnusedFederationPlugin.js +147 -0
- package/lib/performance/UnusedModulesPlugin.js +141 -0
- package/lib/performance/UnusedReexportsPlugin.js +1 -55
- package/lib/performance/isOnlyReexported.js +65 -0
- package/lib/prefetch/ChunkPrefetchFunctionRuntimeModule.js +25 -5
- package/lib/prefetch/ChunkPrefetchPreloadPlugin.js +2 -0
- package/lib/prefetch/ChunkPrefetchStartupRuntimeModule.js +9 -0
- package/lib/prefetch/ChunkPrefetchTriggerRuntimeModule.js +9 -0
- package/lib/prefetch/ChunkPreloadTriggerRuntimeModule.js +9 -0
- package/lib/prefetch/ResourceHintPlugin.js +7 -3
- package/lib/prefetch/ResourceHintRuntimeModule.js +9 -0
- package/lib/prefetch/StartupAssetHintRuntimeModule.js +9 -0
- package/lib/rules/RuleSetCompiler.js +211 -4
- package/lib/runtime/AsyncModuleRuntimeModule.js +105 -67
- package/lib/runtime/AutoPublicPathRuntimeModule.js +9 -0
- package/lib/runtime/BaseUriRuntimeModule.js +9 -0
- package/lib/runtime/ChunkNameRuntimeModule.js +9 -0
- package/lib/runtime/EnsureChunkRuntimeModule.js +35 -16
- package/lib/runtime/GetChunkFilenameRuntimeModule.js +9 -0
- package/lib/runtime/GetFullHashRuntimeModule.js +9 -0
- package/lib/runtime/GetMainFilenameRuntimeModule.js +9 -0
- package/lib/runtime/GetWorkletBootstrapRuntimeModule.js +9 -0
- package/lib/runtime/GlobalRuntimeModule.js +9 -0
- package/lib/runtime/HasOwnPropertyRuntimeModule.js +9 -0
- package/lib/runtime/HelperRuntimeModule.js +10 -0
- package/lib/runtime/MakeDeferredNamespaceObjectRuntime.js +338 -217
- package/lib/runtime/NonceRuntimeModule.js +9 -0
- package/lib/runtime/OnChunksLoadedRuntimeModule.js +67 -20
- package/lib/runtime/PublicPathRuntimeModule.js +9 -0
- package/lib/runtime/RuntimeIdRuntimeModule.js +9 -0
- package/lib/runtime/SpecNamespaceObjectRuntimeModule.js +90 -0
- package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +9 -0
- package/lib/runtime/StartupEntrypointRuntimeModule.js +9 -0
- package/lib/runtime/SystemContextRuntimeModule.js +9 -0
- package/lib/runtime/ToBinaryRuntimeModule.js +9 -0
- package/lib/schemes/HttpUriPlugin.js +22 -5
- package/lib/serialization/FileMiddleware.js +15 -2
- package/lib/serialization/ObjectMiddleware.js +138 -106
- package/lib/sharing/ConsumeSharedPlugin.js +12 -0
- package/lib/sharing/ConsumeSharedRuntimeModule.js +11 -0
- package/lib/sharing/ShareRuntimeModule.js +9 -0
- package/lib/sharing/declaredShared.js +47 -0
- package/lib/stats/DefaultStatsFactoryPlugin.js +3 -1
- package/lib/stats/DefaultStatsPrinterPlugin.js +3 -0
- package/lib/util/ArrayQueue.js +3 -3
- package/lib/util/SourceProcessor.js +76 -69
- package/lib/util/URLAbsoluteSpecifier.js +3 -1
- package/lib/util/async.js +292 -0
- package/lib/util/buildDiagnostics.js +69 -0
- package/lib/util/conventions.js +5 -1
- package/lib/util/fs.js +27 -1
- package/lib/util/handlerKeys.js +40 -0
- package/lib/util/identifier.js +20 -0
- package/lib/util/internalSerializables.js +6 -0
- package/lib/util/registerExternalSerializer.js +6 -45
- package/lib/wasm-async/AsyncWasmCompileRuntimeModule.js +9 -0
- package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +9 -0
- package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +9 -0
- package/lib/web/JsonpChunkLoadingRuntimeModule.js +36 -0
- package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +19 -0
- package/package.json +22 -16
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +388 -76
- package/schemas/plugins/LoaderOptionsPlugin.check.js +1 -1
- package/schemas/plugins/ManifestPlugin.check.js +1 -1
- package/schemas/plugins/SourceMapDevToolPlugin.check.js +1 -1
- package/schemas/plugins/asset/AssetGeneratorOptions.check.js +1 -1
- package/schemas/plugins/asset/AssetResourceGeneratorOptions.check.js +1 -1
- package/schemas/plugins/container/ContainerPlugin.check.js +1 -1
- package/schemas/plugins/container/ModuleFederationPlugin.check.js +1 -1
- package/schemas/plugins/debug/ProfilingPlugin.check.js +1 -1
- package/schemas/plugins/dll/DllReferencePlugin.check.js +1 -1
- package/schemas/plugins/ids/HashedModuleIdsPlugin.check.js +1 -1
- package/schemas/plugins/schemes/HttpUriPlugin.check.js +1 -1
- package/types.d.ts +1440 -331
- package/lib/dependencies/ExportBindingInitFragment.js +0 -191
- package/lib/errors/EntrypointOverlapWarning.js +0 -45
- package/lib/performance/EntrypointOverlapPlugin.js +0 -122
package/types.d.ts
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* Run `yarn fix:special` to update
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { Parser as ParserImport } from "acorn";
|
|
8
7
|
import { Buffer } from "buffer";
|
|
9
8
|
import {
|
|
10
9
|
ArrayExpression,
|
|
@@ -58,7 +57,7 @@ import {
|
|
|
58
57
|
ObjectExpression,
|
|
59
58
|
ObjectPattern,
|
|
60
59
|
PrivateIdentifier,
|
|
61
|
-
Program,
|
|
60
|
+
Program as ProgramImport,
|
|
62
61
|
Property,
|
|
63
62
|
PropertyDefinition,
|
|
64
63
|
RegExpLiteral,
|
|
@@ -67,7 +66,7 @@ import {
|
|
|
67
66
|
SequenceExpression,
|
|
68
67
|
SimpleCallExpression,
|
|
69
68
|
SimpleLiteral,
|
|
70
|
-
SourceLocation,
|
|
69
|
+
SourceLocation as SourceLocationImport,
|
|
71
70
|
SpreadElement,
|
|
72
71
|
StaticBlock,
|
|
73
72
|
Super,
|
|
@@ -330,6 +329,11 @@ declare interface AllCodeGenerationSchemas {
|
|
|
330
329
|
*/
|
|
331
330
|
chunkInitFragments: InitFragment<any>[];
|
|
332
331
|
|
|
332
|
+
/**
|
|
333
|
+
* native external reexport source and attributes
|
|
334
|
+
*/
|
|
335
|
+
externalReexport: string;
|
|
336
|
+
|
|
333
337
|
/**
|
|
334
338
|
* url for asset modules
|
|
335
339
|
*/
|
|
@@ -355,18 +359,6 @@ declare interface AllCodeGenerationSchemas {
|
|
|
355
359
|
*/
|
|
356
360
|
"share-init": [{ shareScope: string; initStage: number; init: string }];
|
|
357
361
|
}
|
|
358
|
-
declare interface AnalyzableChunkUrls {
|
|
359
|
-
/**
|
|
360
|
-
* the urls that could be written, by chunk id
|
|
361
|
-
*/
|
|
362
|
-
urls: Map<ChunkId, string>;
|
|
363
|
-
|
|
364
|
-
/**
|
|
365
|
-
* false when some chunk kept the runtime form, whose
|
|
366
|
-
* ids the consumer then still resolves through the runtime name lookup
|
|
367
|
-
*/
|
|
368
|
-
complete: boolean;
|
|
369
|
-
}
|
|
370
362
|
type AnalyzableForm =
|
|
371
363
|
"import" | "url" | "url-runtime" | "url-inline" | "wasm" | "wasm-relative";
|
|
372
364
|
type AnyLoaderContext = NormalModuleLoaderContext<any> &
|
|
@@ -586,6 +578,28 @@ declare abstract class AssetSourceGenerator extends Generator {
|
|
|
586
578
|
): null | Source;
|
|
587
579
|
}
|
|
588
580
|
declare abstract class AssetSourceParser extends ParserClass {}
|
|
581
|
+
declare interface AssetSymlink {
|
|
582
|
+
/**
|
|
583
|
+
* what the link points at, left as it is written
|
|
584
|
+
*/
|
|
585
|
+
target: string;
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* whether it points at a directory, which is what Windows needs in order to create one
|
|
589
|
+
*/
|
|
590
|
+
isDirectory: boolean;
|
|
591
|
+
}
|
|
592
|
+
declare interface AssetTimestamps {
|
|
593
|
+
/**
|
|
594
|
+
* last access time, in milliseconds
|
|
595
|
+
*/
|
|
596
|
+
atime: number;
|
|
597
|
+
|
|
598
|
+
/**
|
|
599
|
+
* last modification time, in milliseconds
|
|
600
|
+
*/
|
|
601
|
+
mtime: number;
|
|
602
|
+
}
|
|
589
603
|
declare class AsyncDependenciesBlock extends DependenciesBlock {
|
|
590
604
|
constructor(
|
|
591
605
|
groupOptions: null | string | GroupOptionsAsyncDependenciesBlock,
|
|
@@ -880,7 +894,7 @@ declare interface BasenameCacheEntry {
|
|
|
880
894
|
*/
|
|
881
895
|
declare abstract class BasicEvaluatedExpression {
|
|
882
896
|
expression?:
|
|
883
|
-
|
|
|
897
|
+
| ProgramImport
|
|
884
898
|
| ImportDeclaration
|
|
885
899
|
| ExportNamedDeclaration
|
|
886
900
|
| ExportAllDeclaration
|
|
@@ -1139,7 +1153,7 @@ declare abstract class BasicEvaluatedExpression {
|
|
|
1139
1153
|
*/
|
|
1140
1154
|
setExpression(
|
|
1141
1155
|
expression?:
|
|
1142
|
-
|
|
|
1156
|
+
| ProgramImport
|
|
1143
1157
|
| ImportDeclaration
|
|
1144
1158
|
| ExportNamedDeclaration
|
|
1145
1159
|
| ExportAllDeclaration
|
|
@@ -1229,6 +1243,17 @@ declare interface Bootstrap {
|
|
|
1229
1243
|
afterStartup: string[];
|
|
1230
1244
|
allowInlineStartup: boolean;
|
|
1231
1245
|
}
|
|
1246
|
+
|
|
1247
|
+
/**
|
|
1248
|
+
* Which disjunction branch a named group sits in, so that the same name in two
|
|
1249
|
+
* alternatives of one disjunction is allowed and a repeat in one is not.
|
|
1250
|
+
*/
|
|
1251
|
+
declare abstract class BranchID {
|
|
1252
|
+
parent: null | BranchID;
|
|
1253
|
+
base: BranchID;
|
|
1254
|
+
separatedFrom(alt: BranchID): boolean;
|
|
1255
|
+
sibling(): BranchID;
|
|
1256
|
+
}
|
|
1232
1257
|
type BufferEncoding =
|
|
1233
1258
|
| "ascii"
|
|
1234
1259
|
| "utf8"
|
|
@@ -1283,8 +1308,82 @@ declare interface BufferedMap {
|
|
|
1283
1308
|
*/
|
|
1284
1309
|
file: string;
|
|
1285
1310
|
}
|
|
1311
|
+
type BuildDependencyItem =
|
|
1312
|
+
| string
|
|
1313
|
+
| {
|
|
1314
|
+
/**
|
|
1315
|
+
* Request to a dependency (resolved as directory relative to the context directory).
|
|
1316
|
+
*/
|
|
1317
|
+
dependency: string;
|
|
1318
|
+
/**
|
|
1319
|
+
* When true, the dependency may be missing. Existence changes invalidate the cache.
|
|
1320
|
+
*/
|
|
1321
|
+
optional?: boolean;
|
|
1322
|
+
};
|
|
1323
|
+
declare interface BuildDiagnostics {
|
|
1324
|
+
/**
|
|
1325
|
+
* what parser plugins reported as optimization bailouts, replayed into the module graph of every compilation that reuses the module
|
|
1326
|
+
*/
|
|
1327
|
+
optimizationBailouts?: string[];
|
|
1328
|
+
|
|
1329
|
+
/**
|
|
1330
|
+
* the statement whose side effect keeps the module in the bundle, as `type at location`
|
|
1331
|
+
*/
|
|
1332
|
+
sideEffectStatement?: string;
|
|
1333
|
+
|
|
1334
|
+
/**
|
|
1335
|
+
* how many `#__PURE__` annotations sit where the parser does not read them
|
|
1336
|
+
*/
|
|
1337
|
+
ineffectivePureAnnotations?: number;
|
|
1338
|
+
|
|
1339
|
+
/**
|
|
1340
|
+
* how many times the module reads `this` at its top level
|
|
1341
|
+
*/
|
|
1342
|
+
topLevelThis?: number;
|
|
1343
|
+
|
|
1344
|
+
/**
|
|
1345
|
+
* true when the module calls `eval` directly
|
|
1346
|
+
*/
|
|
1347
|
+
usesEval?: boolean;
|
|
1348
|
+
|
|
1349
|
+
/**
|
|
1350
|
+
* reasons why the module is not cacheable (e.g. paths of loaders that marked it)
|
|
1351
|
+
*/
|
|
1352
|
+
notCacheableReasons?: string[];
|
|
1353
|
+
}
|
|
1286
1354
|
type BuildInfo = KnownBuildInfo & Record<string, any>;
|
|
1287
1355
|
type BuildMeta = KnownBuildMeta & Record<string, any>;
|
|
1356
|
+
declare interface BuiltinEmbeddedRendererOptions {
|
|
1357
|
+
/**
|
|
1358
|
+
* what the target can read (the CSS entries of `output.environment`), so a spelling it would not understand is never reached for; only read while printing, and an absent entry means the modern spelling is available
|
|
1359
|
+
*/
|
|
1360
|
+
environment?: CssEnvironment;
|
|
1361
|
+
|
|
1362
|
+
/**
|
|
1363
|
+
* rewrite a length into a shorter unit it is exactly equal in (`16px` -> `1pc`); off by default because it earns nothing once the asset is compressed, and only read while printing. A time is always rewritten
|
|
1364
|
+
*/
|
|
1365
|
+
convertLengthUnits?: boolean;
|
|
1366
|
+
|
|
1367
|
+
/**
|
|
1368
|
+
* shorten a custom property's value the way any other value is shortened (`--x:#ffffff` -> `#fff`); off by default because `getPropertyValue()` hands that text back, and only read while printing. What it may rewrite is what any other value's tokens may be, a color in a substitution's fallback included — that being the property's value rather than the function's own argument
|
|
1369
|
+
*/
|
|
1370
|
+
rewriteCustomProperties?: boolean;
|
|
1371
|
+
|
|
1372
|
+
/**
|
|
1373
|
+
* which of the meaning-preserving rewrites the minifying print makes; each is on unless it is `false`
|
|
1374
|
+
*/
|
|
1375
|
+
transforms?: CssTransformOptions;
|
|
1376
|
+
|
|
1377
|
+
/**
|
|
1378
|
+
* names a whole-project analysis found unused, which the print takes out: a bare name is a class, an id and an `@keyframes` name, and a `--`-prefixed one is a custom property. Only read while printing
|
|
1379
|
+
*/
|
|
1380
|
+
unusedSymbols?: string[];
|
|
1381
|
+
|
|
1382
|
+
/**
|
|
1383
|
+
* each pseudo-class to write as a class instead (`{ "focus-visible": "focus-visible" }`), so a script can apply it where the engine does not. Only read while printing
|
|
1384
|
+
*/
|
|
1385
|
+
pseudoClasses?: { [index: string]: string };
|
|
1386
|
+
}
|
|
1288
1387
|
declare abstract class ByTypeGenerator extends Generator {
|
|
1289
1388
|
map: { [index: string]: undefined | Generator };
|
|
1290
1389
|
generateError?: (
|
|
@@ -1307,7 +1406,9 @@ declare class CacheClass {
|
|
|
1307
1406
|
hooks: {
|
|
1308
1407
|
get: AsyncSeriesBailHook<[string, null | Etag, GotHandler<any>[]], any>;
|
|
1309
1408
|
store: AsyncParallelHook<[string, null | Etag, any]>;
|
|
1310
|
-
storeBuildDependencies: AsyncParallelHook<
|
|
1409
|
+
storeBuildDependencies: AsyncParallelHook<
|
|
1410
|
+
[Iterable<string>, Iterable<string>]
|
|
1411
|
+
>;
|
|
1311
1412
|
beginIdle: SyncHook<[]>;
|
|
1312
1413
|
endIdle: AsyncParallelHook<[]>;
|
|
1313
1414
|
shutdown: AsyncParallelHook<[]>;
|
|
@@ -1340,6 +1441,7 @@ declare class CacheClass {
|
|
|
1340
1441
|
*/
|
|
1341
1442
|
storeBuildDependencies(
|
|
1342
1443
|
dependencies: Iterable<string>,
|
|
1444
|
+
optionalDependencies: Iterable<string>,
|
|
1343
1445
|
callback: CallbackCacheCache<void>
|
|
1344
1446
|
): void;
|
|
1345
1447
|
|
|
@@ -3003,6 +3105,7 @@ type CodeGenValue<K extends string> = K extends
|
|
|
3003
3105
|
| "topLevelDeclarations"
|
|
3004
3106
|
| "freeNames"
|
|
3005
3107
|
| "chunkInitFragments"
|
|
3108
|
+
| "externalReexport"
|
|
3006
3109
|
| "url"
|
|
3007
3110
|
| "fullContentHash"
|
|
3008
3111
|
? AllCodeGenerationSchemas[K]
|
|
@@ -3234,7 +3337,7 @@ declare interface ColorsOptions {
|
|
|
3234
3337
|
type CommentJavascriptParser = CommentImport & {
|
|
3235
3338
|
start: number;
|
|
3236
3339
|
end: number;
|
|
3237
|
-
loc?: null |
|
|
3340
|
+
loc?: null | SourceLocationImport;
|
|
3238
3341
|
};
|
|
3239
3342
|
declare interface CommonJsImportSettings {
|
|
3240
3343
|
name?: string;
|
|
@@ -3540,6 +3643,7 @@ declare class Compilation {
|
|
|
3540
3643
|
contextDependencies: LazySet<string>;
|
|
3541
3644
|
missingDependencies: LazySet<string>;
|
|
3542
3645
|
buildDependencies: LazySet<string>;
|
|
3646
|
+
optionalBuildDependencies: LazySet<string>;
|
|
3543
3647
|
|
|
3544
3648
|
/**
|
|
3545
3649
|
* @deprecated
|
|
@@ -4353,7 +4457,7 @@ declare class Compiler {
|
|
|
4353
4457
|
check?: (value: T) => boolean
|
|
4354
4458
|
): void;
|
|
4355
4459
|
}
|
|
4356
|
-
type ComponentValue =
|
|
4460
|
+
type ComponentValue = TokenSyntax | FunctionNode | SimpleBlock;
|
|
4357
4461
|
declare class ConcatSource extends Source {
|
|
4358
4462
|
constructor(...args: ConcatSourceChild[]);
|
|
4359
4463
|
getChildren(): Source[];
|
|
@@ -4407,18 +4511,18 @@ declare interface ConcatenatedModuleInfo {
|
|
|
4407
4511
|
eager: boolean;
|
|
4408
4512
|
module: Module;
|
|
4409
4513
|
index: number;
|
|
4410
|
-
ast?:
|
|
4514
|
+
ast?: ProgramImport;
|
|
4411
4515
|
internalSource?: Source;
|
|
4412
4516
|
source?: ReplaceSource;
|
|
4413
4517
|
chunkInitFragments?: InitFragment<ChunkRenderContextJavascriptModulesPlugin>[];
|
|
4414
4518
|
runtimeRequirements?: ReadonlySet<string>;
|
|
4415
|
-
globalScope?:
|
|
4519
|
+
globalScope?: ScopeScopeAnalyzer;
|
|
4416
4520
|
|
|
4417
4521
|
/**
|
|
4418
4522
|
* the module's free references
|
|
4419
4523
|
*/
|
|
4420
4524
|
unresolvedReferences?: Reference[];
|
|
4421
|
-
moduleScope?:
|
|
4525
|
+
moduleScope?: ScopeScopeAnalyzer;
|
|
4422
4526
|
internalNames: Map<string, string>;
|
|
4423
4527
|
exportMap?: Map<string, string>;
|
|
4424
4528
|
rawExportMap?: Map<string, string>;
|
|
@@ -4534,18 +4638,6 @@ declare class ConcatenationScope {
|
|
|
4534
4638
|
*/
|
|
4535
4639
|
isWrapped(): boolean;
|
|
4536
4640
|
|
|
4537
|
-
/**
|
|
4538
|
-
* Records a `require(...)` call that was replaced as a whole by a
|
|
4539
|
-
* concatenation reference, so nothing else rewrites a range inside it.
|
|
4540
|
-
*/
|
|
4541
|
-
registerReplacedRequire(range: [number, number]): void;
|
|
4542
|
-
|
|
4543
|
-
/**
|
|
4544
|
-
* Checks whether an offset sits inside an already-replaced `require(...)` call.
|
|
4545
|
-
* Containment, not exact match: `new require(...)` is replaced from `new`.
|
|
4546
|
-
*/
|
|
4547
|
-
isInsideReplacedRequire(start: number): boolean;
|
|
4548
|
-
|
|
4549
4641
|
/**
|
|
4550
4642
|
* Records the symbol that should be used when the current module exports a
|
|
4551
4643
|
* named binding.
|
|
@@ -4590,7 +4682,15 @@ declare class ConcatenationScope {
|
|
|
4590
4682
|
static isModuleReference(name: string): boolean;
|
|
4591
4683
|
|
|
4592
4684
|
/**
|
|
4593
|
-
*
|
|
4685
|
+
* Checks whether an identifier buries a reference token without being one,
|
|
4686
|
+
* which nothing can resolve: it would reach the output as an undeclared global.
|
|
4687
|
+
*/
|
|
4688
|
+
static isLeakedModuleReference(name: string): boolean;
|
|
4689
|
+
|
|
4690
|
+
/**
|
|
4691
|
+
* Finds all encoded module references in a generated source. A match that
|
|
4692
|
+
* continues an identifier is reported as `leaked`: it is a token a wider
|
|
4693
|
+
* replacement swallowed, so substituting it would rewrite the middle of a name.
|
|
4594
4694
|
*/
|
|
4595
4695
|
static findModuleReferences(source: Source): ModuleReferenceMatch[];
|
|
4596
4696
|
|
|
@@ -5305,6 +5405,167 @@ declare interface ContextTimestampAndHash {
|
|
|
5305
5405
|
symlinks?: Set<string>;
|
|
5306
5406
|
}
|
|
5307
5407
|
type ContextTypes = KnownContext & Record<any, any>;
|
|
5408
|
+
declare interface CopiedFileData {
|
|
5409
|
+
/**
|
|
5410
|
+
* absolute path of the source file
|
|
5411
|
+
*/
|
|
5412
|
+
absoluteFilename: string;
|
|
5413
|
+
|
|
5414
|
+
/**
|
|
5415
|
+
* path of the source file, relative to the compiler context
|
|
5416
|
+
*/
|
|
5417
|
+
sourceFilename: string;
|
|
5418
|
+
|
|
5419
|
+
/**
|
|
5420
|
+
* path of the copied file, relative to `to`
|
|
5421
|
+
*/
|
|
5422
|
+
filename: string;
|
|
5423
|
+
}
|
|
5424
|
+
|
|
5425
|
+
/**
|
|
5426
|
+
* Options of the glob in 'from'.
|
|
5427
|
+
*/
|
|
5428
|
+
declare interface CopyGlobOptions {
|
|
5429
|
+
/**
|
|
5430
|
+
* Whether the glob matches the case of a file name. Defaults to 'true'.
|
|
5431
|
+
*/
|
|
5432
|
+
caseSensitive?: boolean;
|
|
5433
|
+
|
|
5434
|
+
/**
|
|
5435
|
+
* How many directory levels below the base of the glob are read, where '1' reads only the base itself. Defaults to no limit.
|
|
5436
|
+
*/
|
|
5437
|
+
deep?: number;
|
|
5438
|
+
|
|
5439
|
+
/**
|
|
5440
|
+
* Whether the glob reaches a file or a directory whose name starts with a dot without naming it. Defaults to 'true'.
|
|
5441
|
+
*/
|
|
5442
|
+
dot?: boolean;
|
|
5443
|
+
|
|
5444
|
+
/**
|
|
5445
|
+
* Whether a symbolic link is resolved and copied as what it points at. Defaults to 'true'; 'false' copies the link itself, pointing where it already points.
|
|
5446
|
+
*/
|
|
5447
|
+
followSymlinks?: boolean;
|
|
5448
|
+
|
|
5449
|
+
/**
|
|
5450
|
+
* Globs of the files which are not copied, resolved like 'from'. A directory one of them matches is skipped whole.
|
|
5451
|
+
*/
|
|
5452
|
+
ignore?: string[];
|
|
5453
|
+
}
|
|
5454
|
+
|
|
5455
|
+
/**
|
|
5456
|
+
* A pattern of files which are copied to the output directory.
|
|
5457
|
+
*/
|
|
5458
|
+
declare interface CopyObjectPattern {
|
|
5459
|
+
/**
|
|
5460
|
+
* Directory 'from' is resolved from and the copied paths are relative to. Defaults to the compiler context, and to what 'from' names when it is not a glob.
|
|
5461
|
+
*/
|
|
5462
|
+
context?: string;
|
|
5463
|
+
|
|
5464
|
+
/**
|
|
5465
|
+
* Filename template of a copied file inside 'to'. Defaults to '[path][base]', which keeps the name and the directory structure below 'from'.
|
|
5466
|
+
*/
|
|
5467
|
+
filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
|
5468
|
+
|
|
5469
|
+
/**
|
|
5470
|
+
* Glob or path from where the files are copied.
|
|
5471
|
+
*/
|
|
5472
|
+
from: string | string[];
|
|
5473
|
+
|
|
5474
|
+
/**
|
|
5475
|
+
* Options of the glob in 'from'.
|
|
5476
|
+
*/
|
|
5477
|
+
globOptions?: CopyGlobOptions;
|
|
5478
|
+
|
|
5479
|
+
/**
|
|
5480
|
+
* Asset info of a copied file.
|
|
5481
|
+
*/
|
|
5482
|
+
info?: AssetInfo | ((file: CopiedFileData) => AssetInfo);
|
|
5483
|
+
|
|
5484
|
+
/**
|
|
5485
|
+
* Whether a copied file keeps the permissions of the file it was copied from. Defaults to 'false', which gives it the ones a new file gets. Has no effect on Windows.
|
|
5486
|
+
*/
|
|
5487
|
+
preservePermissions?: boolean;
|
|
5488
|
+
|
|
5489
|
+
/**
|
|
5490
|
+
* Whether a copied file keeps the access and modification times of the file it was copied from. Defaults to 'false', which stamps it with the time it was written.
|
|
5491
|
+
*/
|
|
5492
|
+
preserveTimestamps?: boolean;
|
|
5493
|
+
|
|
5494
|
+
/**
|
|
5495
|
+
* Directory the files are copied to, relative to 'output.path', which is where they land by default.
|
|
5496
|
+
*/
|
|
5497
|
+
to?: string | ((file: CopiedFileData) => string);
|
|
5498
|
+
|
|
5499
|
+
/**
|
|
5500
|
+
* Modifies the content of a copied file.
|
|
5501
|
+
*/
|
|
5502
|
+
transform?:
|
|
5503
|
+
| {
|
|
5504
|
+
/**
|
|
5505
|
+
* Whether the result of the transform is cached, and what it is cached under. Defaults to 'true'.
|
|
5506
|
+
*/
|
|
5507
|
+
cache?:
|
|
5508
|
+
| boolean
|
|
5509
|
+
| {
|
|
5510
|
+
/**
|
|
5511
|
+
* Everything beside the content of the file the transform depends on, serialized into the cache key as JSON.
|
|
5512
|
+
*/
|
|
5513
|
+
keys?:
|
|
5514
|
+
| CopyTransformCacheKeys
|
|
5515
|
+
| ((
|
|
5516
|
+
defaultKeys: CopyTransformCacheKeys,
|
|
5517
|
+
absoluteFilename: string
|
|
5518
|
+
) =>
|
|
5519
|
+
CopyTransformCacheKeys | Promise<CopyTransformCacheKeys>);
|
|
5520
|
+
};
|
|
5521
|
+
/**
|
|
5522
|
+
* Modifies the content of a copied file.
|
|
5523
|
+
*/
|
|
5524
|
+
transformer: (
|
|
5525
|
+
content: Buffer,
|
|
5526
|
+
absoluteFilename: string
|
|
5527
|
+
) => string | Buffer | Promise<string | Buffer>;
|
|
5528
|
+
}
|
|
5529
|
+
| ((
|
|
5530
|
+
content: Buffer,
|
|
5531
|
+
absoluteFilename: string
|
|
5532
|
+
) => string | Buffer | Promise<string | Buffer>);
|
|
5533
|
+
}
|
|
5534
|
+
|
|
5535
|
+
/**
|
|
5536
|
+
* Patterns of files which are copied to the output directory, and the options of the copying itself.
|
|
5537
|
+
*/
|
|
5538
|
+
declare interface CopyOptions {
|
|
5539
|
+
/**
|
|
5540
|
+
* Maximum number of files which are read at the same time. Defaults to '100'.
|
|
5541
|
+
*/
|
|
5542
|
+
concurrency?: number;
|
|
5543
|
+
|
|
5544
|
+
/**
|
|
5545
|
+
* Patterns of files which are copied to the output directory.
|
|
5546
|
+
*/
|
|
5547
|
+
patterns: CopyPattern[];
|
|
5548
|
+
|
|
5549
|
+
/**
|
|
5550
|
+
* Stage of 'processAssets' the files are copied at. Defaults to 'Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL', where a copied file is still minimized and compressed like every other asset; a later stage leaves it as it is on disk.
|
|
5551
|
+
*/
|
|
5552
|
+
stage?: number;
|
|
5553
|
+
}
|
|
5554
|
+
type CopyPattern = string | CopyObjectPattern;
|
|
5555
|
+
declare class CopyPlugin {
|
|
5556
|
+
constructor(options: CopyOptions);
|
|
5557
|
+
patterns: CopyPattern[];
|
|
5558
|
+
concurrency: number;
|
|
5559
|
+
stage: number;
|
|
5560
|
+
|
|
5561
|
+
/**
|
|
5562
|
+
* Apply the plugin
|
|
5563
|
+
*/
|
|
5564
|
+
apply(compiler: Compiler): void;
|
|
5565
|
+
}
|
|
5566
|
+
declare interface CopyTransformCacheKeys {
|
|
5567
|
+
[index: string]: any;
|
|
5568
|
+
}
|
|
5308
5569
|
type CreateData = NormalModuleCreateData & { settings: ModuleSettings };
|
|
5309
5570
|
type CreateReadStreamFSImplementation = FSImplementation & {
|
|
5310
5571
|
read: (...args: any[]) => any;
|
|
@@ -5508,6 +5769,11 @@ declare class CssLoadingRuntimeModule extends RuntimeModule {
|
|
|
5508
5769
|
linkInsert: SyncWaterfallHook<[string, Chunk], string>;
|
|
5509
5770
|
};
|
|
5510
5771
|
|
|
5772
|
+
/**
|
|
5773
|
+
* The answer a runtime module gives when it installs no chunk handler at all
|
|
5774
|
+
*/
|
|
5775
|
+
static NO_CHUNK_HANDLERS: [string, string][];
|
|
5776
|
+
|
|
5511
5777
|
/**
|
|
5512
5778
|
* Runtime modules without any dependencies to other runtime modules
|
|
5513
5779
|
*/
|
|
@@ -5947,6 +6213,11 @@ declare interface CssPrintOptions {
|
|
|
5947
6213
|
*/
|
|
5948
6214
|
convertLengthUnits?: boolean;
|
|
5949
6215
|
|
|
6216
|
+
/**
|
|
6217
|
+
* give a rule the selectors of a later one printing the same block, past the rules between them; off by default, since it reorders the cascade and is sound only where nothing between declares what the block does
|
|
6218
|
+
*/
|
|
6219
|
+
mergeDistantRules?: boolean;
|
|
6220
|
+
|
|
5950
6221
|
/**
|
|
5951
6222
|
* shorten a custom property's value the way any other value is shortened (`--x:#ffffff` -> `#fff`); off by default because `getPropertyValue()` hands that text back, and only read while printing. What it may rewrite is what any other value's tokens may be, a color in a substitution's fallback included — that being the property's value rather than the function's own argument
|
|
5952
6223
|
*/
|
|
@@ -5961,6 +6232,16 @@ declare interface CssPrintOptions {
|
|
|
5961
6232
|
* which of the meaning-preserving rewrites the minifying print makes; each is on unless it is `false`
|
|
5962
6233
|
*/
|
|
5963
6234
|
transforms?: CssTransformOptions;
|
|
6235
|
+
|
|
6236
|
+
/**
|
|
6237
|
+
* names a whole-project analysis found unused, which the print takes out: a bare name is a class, an id and an `@keyframes` name, and a `--`-prefixed one is a custom property. Only read while printing
|
|
6238
|
+
*/
|
|
6239
|
+
unusedSymbols?: string[];
|
|
6240
|
+
|
|
6241
|
+
/**
|
|
6242
|
+
* each pseudo-class to write as a class instead (`{ "focus-visible": "focus-visible" }`), so a script can apply it where the engine does not. Only read while printing
|
|
6243
|
+
*/
|
|
6244
|
+
pseudoClasses?: { [index: string]: string };
|
|
5964
6245
|
}
|
|
5965
6246
|
declare interface CssProcessOptions {
|
|
5966
6247
|
/**
|
|
@@ -6008,6 +6289,11 @@ declare interface CssProcessOptions {
|
|
|
6008
6289
|
*/
|
|
6009
6290
|
convertLengthUnits?: boolean;
|
|
6010
6291
|
|
|
6292
|
+
/**
|
|
6293
|
+
* give a rule the selectors of a later one printing the same block, past the rules between them; off by default, since it reorders the cascade and is sound only where nothing between declares what the block does
|
|
6294
|
+
*/
|
|
6295
|
+
mergeDistantRules?: boolean;
|
|
6296
|
+
|
|
6011
6297
|
/**
|
|
6012
6298
|
* shorten a custom property's value the way any other value is shortened (`--x:#ffffff` -> `#fff`); off by default because `getPropertyValue()` hands that text back, and only read while printing. What it may rewrite is what any other value's tokens may be, a color in a substitution's fallback included — that being the property's value rather than the function's own argument
|
|
6013
6299
|
*/
|
|
@@ -6021,6 +6307,16 @@ declare interface CssProcessOptions {
|
|
|
6021
6307
|
info: { type: string; hostType: string }
|
|
6022
6308
|
) => undefined | string;
|
|
6023
6309
|
|
|
6310
|
+
/**
|
|
6311
|
+
* each pseudo-class to write as a class instead (`{ "focus-visible": "focus-visible" }`), so a script can apply it where the engine does not. Only read while printing
|
|
6312
|
+
*/
|
|
6313
|
+
pseudoClasses?: { [index: string]: string };
|
|
6314
|
+
|
|
6315
|
+
/**
|
|
6316
|
+
* names a whole-project analysis found unused, which the print takes out: a bare name is a class, an id and an `@keyframes` name, and a `--`-prefixed one is a custom property. Only read while printing
|
|
6317
|
+
*/
|
|
6318
|
+
unusedSymbols?: string[];
|
|
6319
|
+
|
|
6024
6320
|
/**
|
|
6025
6321
|
* which of the meaning-preserving rewrites the minifying print makes; each is on unless it is `false`
|
|
6026
6322
|
*/
|
|
@@ -6032,11 +6328,36 @@ declare interface CssProcessOptions {
|
|
|
6032
6328
|
deferEmbeddedSource?: DeferredEmbeddedSource[];
|
|
6033
6329
|
}
|
|
6034
6330
|
declare interface CssTransformOptions {
|
|
6331
|
+
/**
|
|
6332
|
+
* write a color the target cannot read as an extra declaration before it, in a spelling it does read
|
|
6333
|
+
*/
|
|
6334
|
+
colorFallbacks?: boolean;
|
|
6335
|
+
|
|
6336
|
+
/**
|
|
6337
|
+
* write a spelling the target cannot read as one it can — the same value, said another way
|
|
6338
|
+
*/
|
|
6339
|
+
lowerUnsupported?: boolean;
|
|
6340
|
+
|
|
6341
|
+
/**
|
|
6342
|
+
* write a name that matches ASCII case-insensitively — an at-rule, property, pseudo, function, unit or keyword — in lowercase
|
|
6343
|
+
*/
|
|
6344
|
+
foldCase?: boolean;
|
|
6345
|
+
|
|
6346
|
+
/**
|
|
6347
|
+
* write an escaped identifier the shortest way that names it, in a value or an id
|
|
6348
|
+
*/
|
|
6349
|
+
rewriteEscapes?: boolean;
|
|
6350
|
+
|
|
6035
6351
|
/**
|
|
6036
6352
|
* which comments survive: `"some"` (the default) the ones that carry something, `true` / `"all"` every one, `false` none, or the ones a pattern matches / a predicate accepts, over the comment's own text
|
|
6037
6353
|
*/
|
|
6038
6354
|
comments?: string | boolean | RegExp | ((comment: string) => boolean);
|
|
6039
6355
|
|
|
6356
|
+
/**
|
|
6357
|
+
* write the query or selector list a `@custom-media` / `@custom-selector` names wherever one asks for it, and drop the rule that named it
|
|
6358
|
+
*/
|
|
6359
|
+
resolveCustomAtRules?: boolean;
|
|
6360
|
+
|
|
6040
6361
|
/**
|
|
6041
6362
|
* write a family of longhands as the one shorthand that sets them
|
|
6042
6363
|
*/
|
|
@@ -6062,6 +6383,11 @@ declare interface CssTransformOptions {
|
|
|
6062
6383
|
*/
|
|
6063
6384
|
removeDeadRules?: boolean;
|
|
6064
6385
|
|
|
6386
|
+
/**
|
|
6387
|
+
* write a `:dir()` the target cannot read as the `[dir]` attribute selector, which reads the attribute rather than the directionality an element may inherit
|
|
6388
|
+
*/
|
|
6389
|
+
rewriteDirSelector?: boolean;
|
|
6390
|
+
|
|
6065
6391
|
/**
|
|
6066
6392
|
* write each color in the shortest spelling of the same value
|
|
6067
6393
|
*/
|
|
@@ -6209,8 +6535,8 @@ declare class DelegatedPlugin {
|
|
|
6209
6535
|
/**
|
|
6210
6536
|
* Creates an instance of DelegatedPlugin.
|
|
6211
6537
|
*/
|
|
6212
|
-
constructor(options:
|
|
6213
|
-
options:
|
|
6538
|
+
constructor(options: OptionsDelegatedModuleFactoryPlugin);
|
|
6539
|
+
options: OptionsDelegatedModuleFactoryPlugin;
|
|
6214
6540
|
|
|
6215
6541
|
/**
|
|
6216
6542
|
* Applies the plugin by registering its hooks on the compiler.
|
|
@@ -7022,6 +7348,34 @@ declare class DynamicEntryPlugin {
|
|
|
7022
7348
|
*/
|
|
7023
7349
|
apply(compiler: Compiler): void;
|
|
7024
7350
|
}
|
|
7351
|
+
type EcmaVersion =
|
|
7352
|
+
| 3
|
|
7353
|
+
| 5
|
|
7354
|
+
| 6
|
|
7355
|
+
| 7
|
|
7356
|
+
| 8
|
|
7357
|
+
| 9
|
|
7358
|
+
| 10
|
|
7359
|
+
| 11
|
|
7360
|
+
| 12
|
|
7361
|
+
| 13
|
|
7362
|
+
| 14
|
|
7363
|
+
| 15
|
|
7364
|
+
| 16
|
|
7365
|
+
| 17
|
|
7366
|
+
| 2015
|
|
7367
|
+
| 2016
|
|
7368
|
+
| 2017
|
|
7369
|
+
| 2018
|
|
7370
|
+
| 2019
|
|
7371
|
+
| 2020
|
|
7372
|
+
| 2021
|
|
7373
|
+
| 2022
|
|
7374
|
+
| 2023
|
|
7375
|
+
| 2024
|
|
7376
|
+
| 2025
|
|
7377
|
+
| 2026
|
|
7378
|
+
| "latest";
|
|
7025
7379
|
type Effect = EffectUse | EffectBasic;
|
|
7026
7380
|
declare interface EffectBasic {
|
|
7027
7381
|
type: string;
|
|
@@ -7669,6 +8023,12 @@ declare interface Environment {
|
|
|
7669
8023
|
* The environment supports template literals.
|
|
7670
8024
|
*/
|
|
7671
8025
|
templateLiteral?: boolean;
|
|
8026
|
+
|
|
8027
|
+
/**
|
|
8028
|
+
* The environment supports top-level await ('await x' at the top level of a module).
|
|
8029
|
+
* @since 5.111.0
|
|
8030
|
+
*/
|
|
8031
|
+
topLevelAwait?: boolean;
|
|
7672
8032
|
}
|
|
7673
8033
|
declare class EnvironmentPlugin {
|
|
7674
8034
|
/**
|
|
@@ -7876,13 +8236,6 @@ declare interface Experiments {
|
|
|
7876
8236
|
*/
|
|
7877
8237
|
lazyCompilation?: boolean | LazyCompilationOptions;
|
|
7878
8238
|
|
|
7879
|
-
/**
|
|
7880
|
-
* Allow output javascript files as module source type.
|
|
7881
|
-
* @since 5.0.0
|
|
7882
|
-
* @experimental
|
|
7883
|
-
*/
|
|
7884
|
-
outputModule?: boolean;
|
|
7885
|
-
|
|
7886
8239
|
/**
|
|
7887
8240
|
* Enable experimental tc39 proposal https://github.com/tc39/proposal-source-phase-imports. This allows importing modules at source phase.
|
|
7888
8241
|
* @since 5.106.0
|
|
@@ -7972,13 +8325,6 @@ declare interface ExperimentsNormalized {
|
|
|
7972
8325
|
*/
|
|
7973
8326
|
lazyCompilation?: false | LazyCompilationOptions;
|
|
7974
8327
|
|
|
7975
|
-
/**
|
|
7976
|
-
* Allow output javascript files as module source type.
|
|
7977
|
-
* @since 5.0.0
|
|
7978
|
-
* @experimental
|
|
7979
|
-
*/
|
|
7980
|
-
outputModule?: boolean;
|
|
7981
|
-
|
|
7982
8328
|
/**
|
|
7983
8329
|
* Enable experimental tc39 proposal https://github.com/tc39/proposal-source-phase-imports. This allows importing modules at source phase.
|
|
7984
8330
|
* @since 5.106.0
|
|
@@ -8494,7 +8840,7 @@ declare interface ExposesConfig {
|
|
|
8494
8840
|
declare interface ExposesObject {
|
|
8495
8841
|
[index: string]: string | ExposesConfig | string[];
|
|
8496
8842
|
}
|
|
8497
|
-
type
|
|
8843
|
+
type ExpressionEstreeIndex =
|
|
8498
8844
|
| ImportExpressionImport
|
|
8499
8845
|
| UnaryExpression
|
|
8500
8846
|
| ArrayExpression
|
|
@@ -8530,6 +8876,38 @@ declare interface ExpressionExpressionInfo {
|
|
|
8530
8876
|
getMembersOptionals: () => boolean[];
|
|
8531
8877
|
getMemberRanges: () => [number, number][];
|
|
8532
8878
|
}
|
|
8879
|
+
type ExpressionParser =
|
|
8880
|
+
| (ImportExpressionImport & NodeLike)
|
|
8881
|
+
| (UnaryExpression & NodeLike)
|
|
8882
|
+
| (ArrayExpression & NodeLike)
|
|
8883
|
+
| (ArrowFunctionExpression & NodeLike)
|
|
8884
|
+
| (AssignmentExpression & NodeLike)
|
|
8885
|
+
| (AwaitExpression & NodeLike)
|
|
8886
|
+
| (BinaryExpression & NodeLike)
|
|
8887
|
+
| (SimpleCallExpression & NodeLike)
|
|
8888
|
+
| (NewExpression & NodeLike)
|
|
8889
|
+
| (ChainExpression & NodeLike)
|
|
8890
|
+
| (ClassExpression & NodeLike)
|
|
8891
|
+
| (ConditionalExpression & NodeLike)
|
|
8892
|
+
| (FunctionExpression & NodeLike)
|
|
8893
|
+
| (Identifier & NodeLike)
|
|
8894
|
+
| (SimpleLiteral & NodeLike)
|
|
8895
|
+
| (RegExpLiteral & NodeLike)
|
|
8896
|
+
| (BigIntLiteral & NodeLike)
|
|
8897
|
+
| (LogicalExpression & NodeLike)
|
|
8898
|
+
| (MemberExpression & NodeLike)
|
|
8899
|
+
| (MetaProperty & NodeLike)
|
|
8900
|
+
| (ObjectExpression & NodeLike)
|
|
8901
|
+
| (SequenceExpression & NodeLike)
|
|
8902
|
+
| (TaggedTemplateExpression & NodeLike)
|
|
8903
|
+
| (TemplateLiteral & NodeLike)
|
|
8904
|
+
| (ThisExpression & NodeLike)
|
|
8905
|
+
| (UpdateExpression & NodeLike)
|
|
8906
|
+
| (YieldExpression & NodeLike)
|
|
8907
|
+
| (NodeLike & {
|
|
8908
|
+
type: "ParenthesizedExpression";
|
|
8909
|
+
expression: ExpressionParser;
|
|
8910
|
+
});
|
|
8533
8911
|
declare interface ExtensionAliasOption {
|
|
8534
8912
|
alias: string | string[];
|
|
8535
8913
|
extension: string;
|
|
@@ -8704,6 +9082,12 @@ declare class ExternalModule extends Module {
|
|
|
8704
9082
|
normalModuleFactory: NormalModuleFactory
|
|
8705
9083
|
): void;
|
|
8706
9084
|
canBeWrappedInConcatenation(): boolean;
|
|
9085
|
+
|
|
9086
|
+
/**
|
|
9087
|
+
* The request this external resolves to for its own type, with the record form
|
|
9088
|
+
* narrowed to its entry. An array is a module specifier plus a property path.
|
|
9089
|
+
*/
|
|
9090
|
+
getResolvedRequest(): undefined | string | string[];
|
|
8707
9091
|
static getCompilationHooks: (compilation: Compilation) => {
|
|
8708
9092
|
/**
|
|
8709
9093
|
* @since 5.106.0
|
|
@@ -8777,6 +9161,11 @@ declare interface ExternalModuleInfo {
|
|
|
8777
9161
|
*/
|
|
8778
9162
|
deferredNamespaceObjectName?: string;
|
|
8779
9163
|
|
|
9164
|
+
/**
|
|
9165
|
+
* an import reads the spec namespace object the module hands out
|
|
9166
|
+
*/
|
|
9167
|
+
specNamespaceObjectUsed: boolean;
|
|
9168
|
+
|
|
8780
9169
|
/**
|
|
8781
9170
|
* "default-with-named" namespace
|
|
8782
9171
|
*/
|
|
@@ -9106,7 +9495,7 @@ declare interface FileCacheOptions {
|
|
|
9106
9495
|
/**
|
|
9107
9496
|
* Dependencies the build depends on (in multiple categories, default categories: 'defaultWebpack').
|
|
9108
9497
|
*/
|
|
9109
|
-
buildDependencies?: { [index: string]:
|
|
9498
|
+
buildDependencies?: { [index: string]: BuildDependencyItem[] };
|
|
9110
9499
|
|
|
9111
9500
|
/**
|
|
9112
9501
|
* Base directory for the cache (defaults to node_modules/.cache/webpack).
|
|
@@ -9337,6 +9726,7 @@ declare abstract class FileSystemInfo {
|
|
|
9337
9726
|
resolveBuildDependencies(
|
|
9338
9727
|
context: string,
|
|
9339
9728
|
deps: Iterable<string>,
|
|
9729
|
+
optionalDeps: undefined | Iterable<string>,
|
|
9340
9730
|
callback: (
|
|
9341
9731
|
err?: null | Error,
|
|
9342
9732
|
resolveBuildDependenciesResult?: ResolveBuildDependenciesResult
|
|
@@ -9627,6 +10017,11 @@ declare class GetChunkFilenameRuntimeModule extends RuntimeModule {
|
|
|
9627
10017
|
| ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
9628
10018
|
allChunks: boolean;
|
|
9629
10019
|
|
|
10020
|
+
/**
|
|
10021
|
+
* The answer a runtime module gives when it installs no chunk handler at all
|
|
10022
|
+
*/
|
|
10023
|
+
static NO_CHUNK_HANDLERS: [string, string][];
|
|
10024
|
+
|
|
9630
10025
|
/**
|
|
9631
10026
|
* Runtime modules without any dependencies to other runtime modules
|
|
9632
10027
|
*/
|
|
@@ -10118,6 +10513,7 @@ declare interface HtmlEmittedContext {
|
|
|
10118
10513
|
declare interface HtmlEntryInfo {
|
|
10119
10514
|
request: string;
|
|
10120
10515
|
entryName: string;
|
|
10516
|
+
index: number;
|
|
10121
10517
|
type:
|
|
10122
10518
|
| "html"
|
|
10123
10519
|
| "script"
|
|
@@ -10229,7 +10625,7 @@ declare class HtmlModulesPlugin {
|
|
|
10229
10625
|
*/
|
|
10230
10626
|
static computeContentHash(
|
|
10231
10627
|
content: string | Buffer,
|
|
10232
|
-
outputOptions:
|
|
10628
|
+
outputOptions: OutputNormalizedWithDefaults
|
|
10233
10629
|
): string;
|
|
10234
10630
|
|
|
10235
10631
|
/**
|
|
@@ -10239,9 +10635,14 @@ declare class HtmlModulesPlugin {
|
|
|
10239
10635
|
*/
|
|
10240
10636
|
static getChunkFilenameTemplate(
|
|
10241
10637
|
chunk: Chunk,
|
|
10242
|
-
outputOptions:
|
|
10638
|
+
outputOptions: OutputNormalizedWithDefaults
|
|
10243
10639
|
): ChunkFilenameTemplate;
|
|
10244
10640
|
|
|
10641
|
+
/**
|
|
10642
|
+
* Returns true, when the chunk has html.
|
|
10643
|
+
*/
|
|
10644
|
+
static chunkHasHtml(chunk: Chunk, chunkGraph: ChunkGraph): boolean;
|
|
10645
|
+
|
|
10245
10646
|
/**
|
|
10246
10647
|
* Per-compilation hooks for the experimental HTML support.
|
|
10247
10648
|
*/
|
|
@@ -10385,14 +10786,11 @@ declare interface HtmlParserOptions {
|
|
|
10385
10786
|
*/
|
|
10386
10787
|
urlHints?: UrlHintRule[];
|
|
10387
10788
|
}
|
|
10388
|
-
|
|
10389
|
-
CssProcessOptions,
|
|
10390
|
-
"environment" | "convertLengthUnits" | "rewriteCustomProperties"
|
|
10391
|
-
> & {
|
|
10392
|
-
cssTransforms?: CssTransformOptions;
|
|
10789
|
+
declare interface HtmlPrintOptions {
|
|
10393
10790
|
transforms?: HtmlTransformOptions;
|
|
10394
10791
|
collapseWhitespace?: boolean | "all" | "conservative" | "smart";
|
|
10395
10792
|
mergeStyles?: boolean;
|
|
10793
|
+
mergeScripts?: boolean;
|
|
10396
10794
|
removeEmptyAttributes?: boolean;
|
|
10397
10795
|
removeEmptyElements?: boolean;
|
|
10398
10796
|
removeRedundantAttributes?: boolean | "all" | "smart";
|
|
@@ -10405,7 +10803,7 @@ type HtmlPrintOptions = Pick<
|
|
|
10405
10803
|
) => undefined | string;
|
|
10406
10804
|
deferEmbeddedSource?: DeferredEmbeddedSource[];
|
|
10407
10805
|
deferSrcdoc?: boolean;
|
|
10408
|
-
}
|
|
10806
|
+
}
|
|
10409
10807
|
declare interface HtmlProcessOptions {
|
|
10410
10808
|
/**
|
|
10411
10809
|
* context element tag name for fragment parsing (see `parseHtml`); the HTML analog of the CSS parser's `as` parse-mode option
|
|
@@ -10422,26 +10820,6 @@ declare interface HtmlProcessOptions {
|
|
|
10422
10820
|
*/
|
|
10423
10821
|
minimize?: boolean;
|
|
10424
10822
|
|
|
10425
|
-
/**
|
|
10426
|
-
* CSS's, not HTML's: handed to the CSS minifier that runs over an inline `<style>` and every `style=""`, so the inline copy of a declaration agrees with the `.css` asset
|
|
10427
|
-
*/
|
|
10428
|
-
environment?: CssEnvironment;
|
|
10429
|
-
|
|
10430
|
-
/**
|
|
10431
|
-
* CSS's too, handed over with `environment` (see `HtmlPrintOptions`)
|
|
10432
|
-
*/
|
|
10433
|
-
convertLengthUnits?: boolean;
|
|
10434
|
-
|
|
10435
|
-
/**
|
|
10436
|
-
* CSS's too, handed over with `environment` (see `HtmlPrintOptions`)
|
|
10437
|
-
*/
|
|
10438
|
-
rewriteCustomProperties?: boolean;
|
|
10439
|
-
|
|
10440
|
-
/**
|
|
10441
|
-
* CSS's per-transform switches too, handed over with `environment` (see `HtmlPrintOptions`)
|
|
10442
|
-
*/
|
|
10443
|
-
cssTransforms?: CssTransformOptions;
|
|
10444
|
-
|
|
10445
10823
|
/**
|
|
10446
10824
|
* which of the meaning-preserving rewrites the minifying print makes; each is on unless it is `false`
|
|
10447
10825
|
*/
|
|
@@ -10467,6 +10845,11 @@ declare interface HtmlProcessOptions {
|
|
|
10467
10845
|
*/
|
|
10468
10846
|
mergeStyles?: boolean;
|
|
10469
10847
|
|
|
10848
|
+
/**
|
|
10849
|
+
* print a run of adjacent bare `<script>` elements whose bodies this print writes itself as one, which removes elements, hoists a later body's declarations into the ones before it, and lets a failing body end the whole run (default false)
|
|
10850
|
+
*/
|
|
10851
|
+
mergeScripts?: boolean;
|
|
10852
|
+
|
|
10470
10853
|
/**
|
|
10471
10854
|
* print an element's attributes commonest name first, ties by name, which nothing in HTML reads (default false)
|
|
10472
10855
|
*/
|
|
@@ -10493,12 +10876,12 @@ declare interface HtmlProcessOptions {
|
|
|
10493
10876
|
deferSrcdoc?: boolean;
|
|
10494
10877
|
|
|
10495
10878
|
/**
|
|
10496
|
-
* collects what `renderEmbeddedSource` would be offered instead of offering it, for a caller whose renderer is asynchronous: the print leaves a marker for each and `finish` puts the answers in their place, so one parse serves both.
|
|
10879
|
+
* collects what `renderEmbeddedSource` would be offered instead of offering it, for a caller whose renderer is asynchronous: the print leaves a marker for each and `finish` puts the answers in their place, so one parse serves both. Takes precedence over `renderEmbeddedSource`
|
|
10497
10880
|
*/
|
|
10498
10881
|
deferEmbeddedSource?: DeferredEmbeddedSource[];
|
|
10499
10882
|
|
|
10500
10883
|
/**
|
|
10501
|
-
* renders each nested body this document embeds — an inline `<style>`, every `style=""` (
|
|
10884
|
+
* renders each nested body this document embeds — an inline `<style>`, every `style=""` (as the block's contents it is, SVG's and MathML's included), a `<script>` holding JSON or JavaScript (with `as` naming which production of it the body is — `"module"` for a `<script type=module>`, `"script"` for a classic one), every event handler attribute, with `as: "event-handler"` saying it is a function body rather than a script — the production a `return` at its top level is in, which a renderer whose engine takes only whole scripts wraps before it reads — an `<svg>` subtree, and the document an `<iframe srcdoc>` holds (decoded, and written back escaped). The only way any of them is minified: webpack minifies nothing here itself, and `builtinEmbeddedRenderer` is its own CSS and JSON minifiers for a caller to pass; returning anything but text leaves a body as written
|
|
10502
10885
|
*/
|
|
10503
10886
|
renderEmbeddedSource?: (
|
|
10504
10887
|
source: string,
|
|
@@ -10753,25 +11136,15 @@ declare interface HtmlTransformHtmlContext {
|
|
|
10753
11136
|
}
|
|
10754
11137
|
declare interface HtmlTransformOptions {
|
|
10755
11138
|
/**
|
|
10756
|
-
* write a boolean attribute
|
|
11139
|
+
* write a boolean attribute as the bare name its presence already means; `true` only the spellings the spec canonicalizes, `"all"` any value
|
|
10757
11140
|
*/
|
|
10758
|
-
collapseBooleanAttributes?: boolean;
|
|
11141
|
+
collapseBooleanAttributes?: boolean | "all";
|
|
10759
11142
|
|
|
10760
11143
|
/**
|
|
10761
11144
|
* which comments survive: `"some"` (the default) the ones that carry something, `true` / `"all"` every one, `false` none, or the ones a pattern matches / a predicate accepts, over the comment's own text. A comment a parser or a server reads is kept whatever this says
|
|
10762
11145
|
*/
|
|
10763
11146
|
comments?: string | boolean | RegExp | ((comment: string) => boolean);
|
|
10764
11147
|
|
|
10765
|
-
/**
|
|
10766
|
-
* strip the whitespace between a JSON `<script>`'s tokens
|
|
10767
|
-
*/
|
|
10768
|
-
minifyJson?: boolean;
|
|
10769
|
-
|
|
10770
|
-
/**
|
|
10771
|
-
* run the CSS minifier over an inline `<style>` and every `style=""`
|
|
10772
|
-
*/
|
|
10773
|
-
minifyStyles?: boolean;
|
|
10774
|
-
|
|
10775
11148
|
/**
|
|
10776
11149
|
* drop or re-pick an attribute value's quotes
|
|
10777
11150
|
*/
|
|
@@ -10792,6 +11165,11 @@ declare interface HtmlTransformOptions {
|
|
|
10792
11165
|
*/
|
|
10793
11166
|
normalizeNumericAttributes?: boolean;
|
|
10794
11167
|
|
|
11168
|
+
/**
|
|
11169
|
+
* drop the whitespace around a URL value (`href`, `src`, `action`, …), which resolving the URL skips over
|
|
11170
|
+
*/
|
|
11171
|
+
normalizeUrlAttributes?: boolean;
|
|
11172
|
+
|
|
10795
11173
|
/**
|
|
10796
11174
|
* leave out an optional tag other than the `<html>` / `<head>` / `<body>` shell, which is `removeImpliedTags`
|
|
10797
11175
|
*/
|
|
@@ -11438,13 +11816,19 @@ declare class InitFragment<GenerateContext> {
|
|
|
11438
11816
|
declare abstract class InlinedUsedName {
|
|
11439
11817
|
value: InlinedValue;
|
|
11440
11818
|
suffix: string[];
|
|
11441
|
-
render(comment
|
|
11819
|
+
render(comment?: string): string;
|
|
11820
|
+
|
|
11821
|
+
/**
|
|
11822
|
+
* Updates the hash with the data contributed by this instance.
|
|
11823
|
+
*/
|
|
11824
|
+
updateHash(hash: Hash): void;
|
|
11442
11825
|
}
|
|
11443
11826
|
declare abstract class InlinedValue {
|
|
11444
11827
|
kind: InlinedValueKind;
|
|
11445
11828
|
value?: null | string | number | boolean;
|
|
11446
11829
|
renderLiteral(): string;
|
|
11447
11830
|
render(comment: string): string;
|
|
11831
|
+
equals(other: InlinedValue): boolean;
|
|
11448
11832
|
serialize(__0: ObjectSerializerContextObjectMiddlewareObject_3): void;
|
|
11449
11833
|
deserialize(__0: ObjectDeserializerContextObjectMiddlewareObject_2): void;
|
|
11450
11834
|
}
|
|
@@ -12603,10 +12987,13 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12603
12987
|
/**
|
|
12604
12988
|
* @since 5.105.0
|
|
12605
12989
|
*/
|
|
12606
|
-
collectGuards: SyncBailHook<
|
|
12990
|
+
collectGuards: SyncBailHook<
|
|
12991
|
+
[ExpressionEstreeIndex],
|
|
12992
|
+
void | GuardCollection
|
|
12993
|
+
>;
|
|
12607
12994
|
classExtendsExpression: SyncBailHook<
|
|
12608
12995
|
[
|
|
12609
|
-
|
|
12996
|
+
ExpressionEstreeIndex,
|
|
12610
12997
|
ClassExpression | ClassDeclaration | MaybeNamedClassDeclaration
|
|
12611
12998
|
],
|
|
12612
12999
|
boolean | void
|
|
@@ -12623,7 +13010,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12623
13010
|
*/
|
|
12624
13011
|
classBodyValue: SyncBailHook<
|
|
12625
13012
|
[
|
|
12626
|
-
|
|
13013
|
+
ExpressionEstreeIndex,
|
|
12627
13014
|
MethodDefinition | PropertyDefinition,
|
|
12628
13015
|
ClassExpression | ClassDeclaration | MaybeNamedClassDeclaration
|
|
12629
13016
|
],
|
|
@@ -12732,16 +13119,16 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12732
13119
|
* @since 5.101.3
|
|
12733
13120
|
*/
|
|
12734
13121
|
collectDestructuringAssignmentProperties: SyncBailHook<
|
|
12735
|
-
[
|
|
13122
|
+
[ExpressionEstreeIndex],
|
|
12736
13123
|
boolean | void
|
|
12737
13124
|
>;
|
|
12738
|
-
canRename: HookMap<SyncBailHook<[
|
|
12739
|
-
rename: HookMap<SyncBailHook<[
|
|
13125
|
+
canRename: HookMap<SyncBailHook<[ExpressionEstreeIndex], boolean | void>>;
|
|
13126
|
+
rename: HookMap<SyncBailHook<[ExpressionEstreeIndex], boolean | void>>;
|
|
12740
13127
|
assign: HookMap<SyncBailHook<[AssignmentExpression], boolean | void>>;
|
|
12741
13128
|
assignMemberChain: HookMap<
|
|
12742
13129
|
SyncBailHook<[AssignmentExpression, string[]], boolean | void>
|
|
12743
13130
|
>;
|
|
12744
|
-
typeof: HookMap<SyncBailHook<[
|
|
13131
|
+
typeof: HookMap<SyncBailHook<[ExpressionEstreeIndex], boolean | void>>;
|
|
12745
13132
|
importCall: SyncBailHook<
|
|
12746
13133
|
[
|
|
12747
13134
|
ImportExpressionJavascriptParser,
|
|
@@ -12792,7 +13179,13 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12792
13179
|
>;
|
|
12793
13180
|
memberChainOfCallMemberChain: HookMap<
|
|
12794
13181
|
SyncBailHook<
|
|
12795
|
-
[
|
|
13182
|
+
[
|
|
13183
|
+
ExpressionEstreeIndex,
|
|
13184
|
+
string[],
|
|
13185
|
+
CallExpression,
|
|
13186
|
+
string[],
|
|
13187
|
+
[number, number][]
|
|
13188
|
+
],
|
|
12796
13189
|
boolean | void
|
|
12797
13190
|
>
|
|
12798
13191
|
>;
|
|
@@ -12814,7 +13207,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12814
13207
|
* @since 5.71.0
|
|
12815
13208
|
*/
|
|
12816
13209
|
binaryExpression: SyncBailHook<[BinaryExpression], boolean | void>;
|
|
12817
|
-
expression: HookMap<SyncBailHook<[
|
|
13210
|
+
expression: HookMap<SyncBailHook<[ExpressionEstreeIndex], boolean | void>>;
|
|
12818
13211
|
expressionMemberChain: HookMap<
|
|
12819
13212
|
SyncBailHook<
|
|
12820
13213
|
[MemberExpression, string[], boolean[], [number, number][]],
|
|
@@ -12832,12 +13225,18 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12832
13225
|
[LogicalExpression],
|
|
12833
13226
|
boolean | void
|
|
12834
13227
|
>;
|
|
12835
|
-
program: SyncBailHook<
|
|
13228
|
+
program: SyncBailHook<
|
|
13229
|
+
[ProgramImport, CommentJavascriptParser[]],
|
|
13230
|
+
boolean | void
|
|
13231
|
+
>;
|
|
12836
13232
|
/**
|
|
12837
13233
|
* @since 5.99.0
|
|
12838
13234
|
*/
|
|
12839
13235
|
terminate: SyncBailHook<[ReturnStatement | ThrowStatement], boolean | void>;
|
|
12840
|
-
finish: SyncBailHook<
|
|
13236
|
+
finish: SyncBailHook<
|
|
13237
|
+
[ProgramImport, CommentJavascriptParser[]],
|
|
13238
|
+
boolean | void
|
|
13239
|
+
>;
|
|
12841
13240
|
/**
|
|
12842
13241
|
* @since 5.99.9
|
|
12843
13242
|
*/
|
|
@@ -12915,7 +13314,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12915
13314
|
| ForOfStatement
|
|
12916
13315
|
| ExportDefaultDeclaration;
|
|
12917
13316
|
destructuringAssignmentProperties?: WeakMap<
|
|
12918
|
-
|
|
13317
|
+
ExpressionEstreeIndex,
|
|
12919
13318
|
Set<DestructuringAssignmentProperty>
|
|
12920
13319
|
>;
|
|
12921
13320
|
currentTagData?:
|
|
@@ -12931,7 +13330,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12931
13330
|
* Destructuring assignment properties for.
|
|
12932
13331
|
*/
|
|
12933
13332
|
destructuringAssignmentPropertiesFor(
|
|
12934
|
-
node:
|
|
13333
|
+
node: ExpressionEstreeIndex
|
|
12935
13334
|
): undefined | Set<DestructuringAssignmentProperty>;
|
|
12936
13335
|
|
|
12937
13336
|
/**
|
|
@@ -13389,7 +13788,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
13389
13788
|
*/
|
|
13390
13789
|
enterDestructuringAssignment(
|
|
13391
13790
|
pattern: Pattern,
|
|
13392
|
-
expression:
|
|
13791
|
+
expression: ExpressionEstreeIndex
|
|
13393
13792
|
):
|
|
13394
13793
|
| undefined
|
|
13395
13794
|
| ImportExpressionImport
|
|
@@ -14080,12 +14479,14 @@ declare class JavascriptParser extends ParserClass {
|
|
|
14080
14479
|
/**
|
|
14081
14480
|
* Returns parsed string.
|
|
14082
14481
|
*/
|
|
14083
|
-
parseString(expression:
|
|
14482
|
+
parseString(expression: ExpressionEstreeIndex): string;
|
|
14084
14483
|
|
|
14085
14484
|
/**
|
|
14086
14485
|
* Parses calculated string.
|
|
14087
14486
|
*/
|
|
14088
|
-
parseCalculatedString(
|
|
14487
|
+
parseCalculatedString(
|
|
14488
|
+
expression: ExpressionEstreeIndex
|
|
14489
|
+
): CalculatedStringResult;
|
|
14089
14490
|
|
|
14090
14491
|
/**
|
|
14091
14492
|
* Returns evaluation result.
|
|
@@ -14146,7 +14547,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
14146
14547
|
start?: number;
|
|
14147
14548
|
end?: number;
|
|
14148
14549
|
range?: [number, number];
|
|
14149
|
-
loc?: null |
|
|
14550
|
+
loc?: null | SourceLocationImport;
|
|
14150
14551
|
}): DependencyLocation;
|
|
14151
14552
|
|
|
14152
14553
|
/**
|
|
@@ -14184,7 +14585,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
14184
14585
|
/**
|
|
14185
14586
|
* Checks whether this javascript parser is statement level expression.
|
|
14186
14587
|
*/
|
|
14187
|
-
isStatementLevelExpression(expr:
|
|
14588
|
+
isStatementLevelExpression(expr: ExpressionEstreeIndex): boolean;
|
|
14188
14589
|
|
|
14189
14590
|
/**
|
|
14190
14591
|
* Returns tag data.
|
|
@@ -14443,7 +14844,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
14443
14844
|
* Gets name for expression.
|
|
14444
14845
|
*/
|
|
14445
14846
|
getNameForExpression(
|
|
14446
|
-
expression:
|
|
14847
|
+
expression: ExpressionEstreeIndex
|
|
14447
14848
|
):
|
|
14448
14849
|
| undefined
|
|
14449
14850
|
| {
|
|
@@ -14456,7 +14857,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
14456
14857
|
* Returns parser.
|
|
14457
14858
|
*/
|
|
14458
14859
|
static extend(
|
|
14459
|
-
...plugins: ((BaseParser: typeof
|
|
14860
|
+
...plugins: ((BaseParser: typeof ParserParser) => typeof ParserParser)[]
|
|
14460
14861
|
): typeof JavascriptParser;
|
|
14461
14862
|
static ALLOWED_MEMBER_TYPES_ALL: number;
|
|
14462
14863
|
static ALLOWED_MEMBER_TYPES_CALL_EXPRESSION: number;
|
|
@@ -14649,6 +15050,12 @@ declare interface JavascriptParserOptions {
|
|
|
14649
15050
|
*/
|
|
14650
15051
|
sourceImport?: boolean;
|
|
14651
15052
|
|
|
15053
|
+
/**
|
|
15054
|
+
* Hand out a spec-compliant Module Namespace Exotic Object for 'import * as ns' and 'import()' of this module instead of the plain exports object. Requires 'Proxy' in the target environment, keeps every exported name, and costs runtime code, so enable it per module. Set it on the imported module, not on the importer.
|
|
15055
|
+
* @since 5.111.0
|
|
15056
|
+
*/
|
|
15057
|
+
specNamespaceObject?: boolean;
|
|
15058
|
+
|
|
14652
15059
|
/**
|
|
14653
15060
|
* Deprecated in favor of "exportsPresence". Emit errors instead of warnings when imported names don't exist in imported module.
|
|
14654
15061
|
* @deprecated
|
|
@@ -14834,6 +15241,11 @@ declare class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
|
|
|
14834
15241
|
compilation: Compilation
|
|
14835
15242
|
) => JsonpCompilationPluginHooks;
|
|
14836
15243
|
|
|
15244
|
+
/**
|
|
15245
|
+
* The answer a runtime module gives when it installs no chunk handler at all
|
|
15246
|
+
*/
|
|
15247
|
+
static NO_CHUNK_HANDLERS: [string, string][];
|
|
15248
|
+
|
|
14837
15249
|
/**
|
|
14838
15250
|
* Runtime modules without any dependencies to other runtime modules
|
|
14839
15251
|
*/
|
|
@@ -14921,6 +15333,26 @@ declare interface KnownAssetInfo {
|
|
|
14921
15333
|
*/
|
|
14922
15334
|
sourceFilename?: string;
|
|
14923
15335
|
|
|
15336
|
+
/**
|
|
15337
|
+
* true, when the asset was copied from a file by `output.copy`
|
|
15338
|
+
*/
|
|
15339
|
+
copied?: boolean;
|
|
15340
|
+
|
|
15341
|
+
/**
|
|
15342
|
+
* when set, the asset is emitted as a symbolic link rather than as its content
|
|
15343
|
+
*/
|
|
15344
|
+
symlink?: AssetSymlink;
|
|
15345
|
+
|
|
15346
|
+
/**
|
|
15347
|
+
* when set, the file the asset is written to is given these permissions
|
|
15348
|
+
*/
|
|
15349
|
+
mode?: number;
|
|
15350
|
+
|
|
15351
|
+
/**
|
|
15352
|
+
* when set, the file the asset is written to is stamped with these times
|
|
15353
|
+
*/
|
|
15354
|
+
timestamps?: AssetTimestamps;
|
|
15355
|
+
|
|
14924
15356
|
/**
|
|
14925
15357
|
* size in bytes, only set after asset has been emitted
|
|
14926
15358
|
*/
|
|
@@ -14959,14 +15391,20 @@ declare interface KnownAssetModuleBuildInfo {
|
|
|
14959
15391
|
filename?: string;
|
|
14960
15392
|
assetInfo?: AssetInfo;
|
|
14961
15393
|
fullContentHash?: string;
|
|
15394
|
+
|
|
15395
|
+
/**
|
|
15396
|
+
* the resource this asset is named after, when
|
|
15397
|
+
* something re-encoded it. Unlike `matchResource` this is serialized, so a
|
|
15398
|
+
* rename set while building survives the persistent cache
|
|
15399
|
+
*/
|
|
15400
|
+
assetResource?: string;
|
|
14962
15401
|
}
|
|
14963
15402
|
declare interface KnownBuildInfo {
|
|
14964
|
-
cacheable?: boolean;
|
|
14965
|
-
|
|
14966
15403
|
/**
|
|
14967
|
-
*
|
|
15404
|
+
* the module hands out a spec Module Namespace Exotic Object
|
|
14968
15405
|
*/
|
|
14969
|
-
|
|
15406
|
+
specNamespaceObject?: boolean;
|
|
15407
|
+
cacheable?: boolean;
|
|
14970
15408
|
strict?: boolean;
|
|
14971
15409
|
moduleArgument?: string;
|
|
14972
15410
|
exportsArgument?: string;
|
|
@@ -14983,29 +15421,24 @@ declare interface KnownBuildInfo {
|
|
|
14983
15421
|
topLevelDeclarations?: Set<string>;
|
|
14984
15422
|
|
|
14985
15423
|
/**
|
|
14986
|
-
* true when the module is
|
|
15424
|
+
* true when the module is in a synchronous circular dependency chain
|
|
14987
15425
|
*/
|
|
14988
15426
|
isCircular?: boolean;
|
|
14989
15427
|
|
|
14990
15428
|
/**
|
|
14991
|
-
*
|
|
14992
|
-
*/
|
|
14993
|
-
usesEval?: boolean;
|
|
14994
|
-
|
|
14995
|
-
/**
|
|
14996
|
-
* how many `#__PURE__` annotations sit where the parser does not read them
|
|
15429
|
+
* CircularKind bit flags from CircularModulesPlugin; unset when the plugin did not run
|
|
14997
15430
|
*/
|
|
14998
|
-
|
|
15431
|
+
circularKind?: number;
|
|
14999
15432
|
|
|
15000
15433
|
/**
|
|
15001
|
-
*
|
|
15434
|
+
* module uses top-level `for await…of` or `await using`, which can't be lowered to a generator
|
|
15002
15435
|
*/
|
|
15003
|
-
|
|
15436
|
+
usesTopLevelAwaitForOf?: boolean;
|
|
15004
15437
|
|
|
15005
15438
|
/**
|
|
15006
|
-
*
|
|
15439
|
+
* what the build recorded for stats and the performance hints to report
|
|
15007
15440
|
*/
|
|
15008
|
-
|
|
15441
|
+
diagnostics?: BuildDiagnostics;
|
|
15009
15442
|
}
|
|
15010
15443
|
declare interface KnownBuildMeta {
|
|
15011
15444
|
exportsType?: "default" | "namespace" | "flagged" | "dynamic";
|
|
@@ -15122,6 +15555,11 @@ declare interface KnownJavascriptModuleBuildInfo {
|
|
|
15122
15555
|
*/
|
|
15123
15556
|
moduleConcatenationBailout?: string;
|
|
15124
15557
|
|
|
15558
|
+
/**
|
|
15559
|
+
* what rules the module out as a concatenation root, while it may still be an inner module
|
|
15560
|
+
*/
|
|
15561
|
+
moduleConcatenationRootBailout?: string;
|
|
15562
|
+
|
|
15125
15563
|
/**
|
|
15126
15564
|
* using in APIPlugin
|
|
15127
15565
|
*/
|
|
@@ -15648,6 +16086,11 @@ declare interface LStatTypes {
|
|
|
15648
16086
|
) => void
|
|
15649
16087
|
): void;
|
|
15650
16088
|
}
|
|
16089
|
+
declare interface LabelLike {
|
|
16090
|
+
kind?: null | string;
|
|
16091
|
+
name?: string;
|
|
16092
|
+
statementStart?: number;
|
|
16093
|
+
}
|
|
15651
16094
|
|
|
15652
16095
|
/**
|
|
15653
16096
|
* Options for the default backend.
|
|
@@ -16019,6 +16462,11 @@ declare class LoadScriptRuntimeModule extends HelperRuntimeModule {
|
|
|
16019
16462
|
compilation: Compilation
|
|
16020
16463
|
) => LoadScriptCompilationHooks;
|
|
16021
16464
|
|
|
16465
|
+
/**
|
|
16466
|
+
* The answer a runtime module gives when it installs no chunk handler at all
|
|
16467
|
+
*/
|
|
16468
|
+
static NO_CHUNK_HANDLERS: [string, string][];
|
|
16469
|
+
|
|
16022
16470
|
/**
|
|
16023
16471
|
* Runtime modules without any dependencies to other runtime modules
|
|
16024
16472
|
*/
|
|
@@ -16511,7 +16959,7 @@ declare abstract class MainTemplate {
|
|
|
16511
16959
|
options: PathData
|
|
16512
16960
|
) => InterpolatedPathAndAssetInfo;
|
|
16513
16961
|
get requireFn(): "__webpack_require__";
|
|
16514
|
-
get outputOptions():
|
|
16962
|
+
get outputOptions(): OutputNormalizedWithDefaults;
|
|
16515
16963
|
}
|
|
16516
16964
|
declare interface MakeCacheableResult<T> {
|
|
16517
16965
|
(value: string, cache?: object): T;
|
|
@@ -17215,6 +17663,11 @@ declare class ModuleChunkLoadingRuntimeModule extends RuntimeModule {
|
|
|
17215
17663
|
linkPrefetch: SyncWaterfallHook<[string, Chunk], string>;
|
|
17216
17664
|
};
|
|
17217
17665
|
|
|
17666
|
+
/**
|
|
17667
|
+
* The answer a runtime module gives when it installs no chunk handler at all
|
|
17668
|
+
*/
|
|
17669
|
+
static NO_CHUNK_HANDLERS: [string, string][];
|
|
17670
|
+
|
|
17218
17671
|
/**
|
|
17219
17672
|
* Runtime modules without any dependencies to other runtime modules
|
|
17220
17673
|
*/
|
|
@@ -18018,7 +18471,7 @@ declare interface ModuleOptions {
|
|
|
18018
18471
|
defaultRules?: (undefined | null | false | "" | 0 | RuleSetRule | "...")[];
|
|
18019
18472
|
|
|
18020
18473
|
/**
|
|
18021
|
-
* Enable warnings for full dynamic dependencies.
|
|
18474
|
+
* Enable warnings for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextCritical'.
|
|
18022
18475
|
* @deprecated
|
|
18023
18476
|
*/
|
|
18024
18477
|
exprContextCritical?: boolean;
|
|
@@ -18218,6 +18671,7 @@ declare interface ModuleReferenceMatch {
|
|
|
18218
18671
|
start: number;
|
|
18219
18672
|
end: number;
|
|
18220
18673
|
name: string;
|
|
18674
|
+
leaked: boolean;
|
|
18221
18675
|
}
|
|
18222
18676
|
declare interface ModuleReferenceOptions {
|
|
18223
18677
|
/**
|
|
@@ -18706,7 +19160,7 @@ declare interface NodeEnvironmentPluginOptions {
|
|
|
18706
19160
|
infrastructureLogging: InfrastructureLogging;
|
|
18707
19161
|
}
|
|
18708
19162
|
type NodeEstreeIndex =
|
|
18709
|
-
|
|
|
19163
|
+
| ProgramImport
|
|
18710
19164
|
| ImportDeclaration
|
|
18711
19165
|
| ExportNamedDeclaration
|
|
18712
19166
|
| ExportAllDeclaration
|
|
@@ -18780,6 +19234,14 @@ type NodeEstreeIndex =
|
|
|
18780
19234
|
| AssignmentPattern
|
|
18781
19235
|
| SwitchCase
|
|
18782
19236
|
| TemplateElement;
|
|
19237
|
+
declare interface NodeLike {
|
|
19238
|
+
type: string;
|
|
19239
|
+
start: number;
|
|
19240
|
+
end: number;
|
|
19241
|
+
loc?: any;
|
|
19242
|
+
sourceFile?: string;
|
|
19243
|
+
range?: [number, number];
|
|
19244
|
+
}
|
|
18783
19245
|
|
|
18784
19246
|
/**
|
|
18785
19247
|
* Options object for node compatibility features.
|
|
@@ -18966,9 +19428,11 @@ declare class NormalModule extends Module {
|
|
|
18966
19428
|
*/
|
|
18967
19429
|
beforeSnapshot: SyncHook<[NormalModule]>;
|
|
18968
19430
|
/**
|
|
19431
|
+
* Async since 5.111.0, so a tap can await work of its own — minifying an
|
|
19432
|
+
* asset, say, which before only a loader could do. `tap` keeps working.
|
|
18969
19433
|
* @since 5.99.0
|
|
18970
19434
|
*/
|
|
18971
|
-
processResult:
|
|
19435
|
+
processResult: AsyncSeriesWaterfallHook<
|
|
18972
19436
|
[
|
|
18973
19437
|
[
|
|
18974
19438
|
string | Buffer,
|
|
@@ -19777,7 +20241,7 @@ declare namespace ObjectDeserializerContextObjectMiddlewareObject_1 {
|
|
|
19777
20241
|
}
|
|
19778
20242
|
|
|
19779
20243
|
/**
|
|
19780
|
-
* Updates
|
|
20244
|
+
* Updates map size using the provided map.
|
|
19781
20245
|
*/
|
|
19782
20246
|
declare interface ObjectDeserializerContextObjectMiddlewareObject_2<
|
|
19783
20247
|
T extends ReadonlyArray<any> = ReadonlyArray<any>
|
|
@@ -19788,7 +20252,7 @@ declare interface ObjectDeserializerContextObjectMiddlewareObject_2<
|
|
|
19788
20252
|
}
|
|
19789
20253
|
|
|
19790
20254
|
/**
|
|
19791
|
-
* Updates
|
|
20255
|
+
* Updates map size using the provided map.
|
|
19792
20256
|
*/
|
|
19793
20257
|
declare interface ObjectDeserializerContextObjectMiddlewareObject_3 {
|
|
19794
20258
|
read: () => string;
|
|
@@ -19836,7 +20300,7 @@ declare interface ObjectEncodingOptionsTypes {
|
|
|
19836
20300
|
}
|
|
19837
20301
|
|
|
19838
20302
|
/**
|
|
19839
|
-
* Updates
|
|
20303
|
+
* Updates map size using the provided map.
|
|
19840
20304
|
*/
|
|
19841
20305
|
declare interface ObjectSerializer {
|
|
19842
20306
|
serialize: (
|
|
@@ -19849,7 +20313,7 @@ declare interface ObjectSerializer {
|
|
|
19849
20313
|
}
|
|
19850
20314
|
|
|
19851
20315
|
/**
|
|
19852
|
-
* Updates
|
|
20316
|
+
* Updates map size using the provided map.
|
|
19853
20317
|
*/
|
|
19854
20318
|
declare interface ObjectSerializerContextObjectMiddlewareObject_1 {
|
|
19855
20319
|
write: (
|
|
@@ -19881,7 +20345,7 @@ declare namespace ObjectSerializerContextObjectMiddlewareObject_2 {
|
|
|
19881
20345
|
}
|
|
19882
20346
|
|
|
19883
20347
|
/**
|
|
19884
|
-
* Updates
|
|
20348
|
+
* Updates map size using the provided map.
|
|
19885
20349
|
*/
|
|
19886
20350
|
declare interface ObjectSerializerContextObjectMiddlewareObject_3<
|
|
19887
20351
|
T extends ReadonlyArray<any> = ReadonlyArray<any>
|
|
@@ -19900,7 +20364,7 @@ declare interface ObjectSerializerContextObjectMiddlewareObject_3<
|
|
|
19900
20364
|
}
|
|
19901
20365
|
|
|
19902
20366
|
/**
|
|
19903
|
-
* Updates
|
|
20367
|
+
* Updates map size using the provided map.
|
|
19904
20368
|
*/
|
|
19905
20369
|
declare interface ObjectSerializerContextObjectMiddlewareObject_4 {
|
|
19906
20370
|
write: (
|
|
@@ -19919,7 +20383,7 @@ declare interface ObjectSerializerContextObjectMiddlewareObject_4 {
|
|
|
19919
20383
|
}
|
|
19920
20384
|
|
|
19921
20385
|
/**
|
|
19922
|
-
* Updates
|
|
20386
|
+
* Updates map size using the provided map.
|
|
19923
20387
|
*/
|
|
19924
20388
|
declare interface ObjectSerializerSnapshot {
|
|
19925
20389
|
length: number;
|
|
@@ -20047,10 +20511,15 @@ declare interface Optimization {
|
|
|
20047
20511
|
mergeDuplicateChunks?: boolean;
|
|
20048
20512
|
|
|
20049
20513
|
/**
|
|
20050
|
-
* Enable minimizing the output. Uses optimization.minimizer. An object
|
|
20514
|
+
* Enable minimizing the output. Uses optimization.minimizer. An options object implies 'true' and sets optimization.minimizeOptions.
|
|
20051
20515
|
*/
|
|
20052
20516
|
minimize?: boolean | OptimizationMinimizeOptions;
|
|
20053
20517
|
|
|
20518
|
+
/**
|
|
20519
|
+
* Enable minimizing the output, configured per asset type. An absent type is minimized with the defaults; `false` disables minimizing it.
|
|
20520
|
+
*/
|
|
20521
|
+
minimizeOptions?: OptimizationMinimizeOptions;
|
|
20522
|
+
|
|
20054
20523
|
/**
|
|
20055
20524
|
* Minimizer(s) to use for minimizing the output.
|
|
20056
20525
|
*/
|
|
@@ -20141,6 +20610,12 @@ declare interface Optimization {
|
|
|
20141
20610
|
* @since 5.110.0
|
|
20142
20611
|
*/
|
|
20143
20612
|
declare interface OptimizationMinimizeCss {
|
|
20613
|
+
/**
|
|
20614
|
+
* Write a color the `browserslist` target cannot read as an extra declaration before the one naming it, in a spelling it does read: `color: oklch(59.686% 0.15619 49.7694)` is written as `color: #c65d06` and then the `oklch()` itself, so an engine reading neither the Lab family nor `hwb()` is left with a color rather than with nothing. The fallback is that color clipped into the sRGB gamut and rounded, which the declaration standing after it corrects wherever it is read. Nothing is written where the author already set the property earlier in the same block, where the color holds a substitution or a relative reference this cannot fold, or where the fallback would still name a function the target cannot read. On by default, and only in effect for a `browserslist` target — any other target names no browsers to answer for.
|
|
20615
|
+
* @since 5.111.0
|
|
20616
|
+
*/
|
|
20617
|
+
colorFallbacks?: boolean;
|
|
20618
|
+
|
|
20144
20619
|
/**
|
|
20145
20620
|
* Which comments survive. `"some"`, the default, keeps a `/*!` banner and a comment annotated `@license` or `@preserve`; `true` (or `"all"`) keeps every comment and `false` keeps none; a string is read as a regular expression source, and it, a `RegExp` or a `(comment) => boolean` predicate is asked about each comment's own text and keeps the ones it accepts — standing in for the default rule rather than beside it, as terser's `format.comments` does, so a pattern that names nothing else drops the ones `"some"` would have kept. A `/*#` source-map pragma is a link rather than a comment, so `"some"` and `"all"` keep it; `false`, a pattern or a predicate decides it like any other. A predicate is handed to the minimizer's worker pool as source, so it must not close over anything.
|
|
20146
20621
|
* @since 5.110.0
|
|
@@ -20153,6 +20628,24 @@ declare interface OptimizationMinimizeCss {
|
|
|
20153
20628
|
*/
|
|
20154
20629
|
convertLengthUnits?: boolean;
|
|
20155
20630
|
|
|
20631
|
+
/**
|
|
20632
|
+
* Write a name that matches ASCII case-insensitively in lowercase: an at-rule name, a property name, a pseudo-class or pseudo-element name, a function name, a unit, and a keyword standing in a value whose grammar takes keywords alone. `@MEDIA`, `COLOR`, `:NTH-CHILD`, `URL(`, `1PX` and `currentColor` become `@media`, `color`, `:nth-child`, `url(`, `1px` and `currentcolor`. On by default, and exact: CSS matches every one of these ASCII case-insensitively, so the fold names the same thing. What it never touches is a name the author chose — a custom property, a custom ident such as an animation or grid-area name, an id, a class, a type selector, an attribute's value, or anything inside a substituted value. `@charset` is left as written, being read as bytes rather than matched, and `!important` is always written in lowercase because the printer writes the keyword rather than copying it.
|
|
20633
|
+
* @since 5.111.0
|
|
20634
|
+
*/
|
|
20635
|
+
foldCase?: boolean;
|
|
20636
|
+
|
|
20637
|
+
/**
|
|
20638
|
+
* Write a spelling the `browserslist` target cannot read as one it can — the same value said another way, rather than left for an engine that will drop it: a 4-/8-digit hex as `rgba()`, a double-position gradient stop as the two stops it names, `inset` / `overflow` / `place-*` as the longhands they set, `text-decoration` as its own longhands where a slot is newer than the shorthand, `system-ui` as the stack of platform font names it stands for, a `:lang()` or `:not()` holding a list as the `:is()` that means it, a media feature range as the `min-`/`max-` pair, and `light-dark()` as the custom-property pair a color scheme switches. On by default, and only in effect for a `browserslist` target — any other target names no browsers to answer for. Off leaves every such spelling as written, which is how a stylesheet one of these rewrites gets wrong is minified; it never makes the minifier write a spelling the target cannot read.
|
|
20639
|
+
* @since 5.111.0
|
|
20640
|
+
*/
|
|
20641
|
+
lowerUnsupported?: boolean;
|
|
20642
|
+
|
|
20643
|
+
/**
|
|
20644
|
+
* Give a rule the selectors of a later one printing the same block, past the rules standing between them. Off by default because it reorders the cascade, so it holds only where nothing between the two declares a property the shared block does. A block repeated at a distance already compresses on its own, so the join is taken only where the copy of the block it drops is worth more than twice the selector it writes instead. `mergeRules` is the safe half of this, joining only what nothing stands between.
|
|
20645
|
+
* @since 5.111.0
|
|
20646
|
+
*/
|
|
20647
|
+
mergeDistantRules?: boolean;
|
|
20648
|
+
|
|
20156
20649
|
/**
|
|
20157
20650
|
* Write a family of longhands as the one shorthand that sets them — four sides or corners, the two a pair shorthand sets, or the slots of an order-free one — even where unrelated declarations stand between them. On by default.
|
|
20158
20651
|
* @since 5.110.0
|
|
@@ -20171,6 +20664,12 @@ declare interface OptimizationMinimizeCss {
|
|
|
20171
20664
|
*/
|
|
20172
20665
|
normalizeQuotes?: boolean;
|
|
20173
20666
|
|
|
20667
|
+
/**
|
|
20668
|
+
* Each pseudo-class to write as an ordinary class instead, as `{ "focus-visible": "focus-visible" }` — so a script can apply the class where the engine reads no such pseudo. Only a plain pseudo-class is rewritten, wherever it stands in a selector: a pseudo-element (`::hover`) and a functional pseudo of the same name (`:hover(…)`) are not what a class stands in for, and a `:name` inside a quoted attribute value is nobody's pseudo. Nothing applies the class — that is the script's part.
|
|
20669
|
+
* @since 5.111.0
|
|
20670
|
+
*/
|
|
20671
|
+
pseudoClasses?: { [index: string]: string };
|
|
20672
|
+
|
|
20174
20673
|
/**
|
|
20175
20674
|
* Compute a call into the shorter call naming the same value: `calc()` and every math function over constants, a transform naming one axis or an identity, a gradient's default direction and its implied stops, an easing function that has a keyword, and a filter function given the amount an omitted argument already means. On by default.
|
|
20176
20675
|
* @since 5.110.0
|
|
@@ -20178,17 +20677,35 @@ declare interface OptimizationMinimizeCss {
|
|
|
20178
20677
|
reduceFunctions?: boolean;
|
|
20179
20678
|
|
|
20180
20679
|
/**
|
|
20181
|
-
* Drop a rule or declaration nothing can read: a rule whose block ends up empty, a declaration
|
|
20680
|
+
* Drop a rule or declaration nothing can read: a rule whose block ends up empty, a declaration a later one in the same block overrides, a rule an identical later sibling makes dead, and the `@charset` naming an encoding the output is not written in. On by default. Joining rules that are not dead is `mergeRules`.
|
|
20182
20681
|
* @since 5.110.0
|
|
20183
20682
|
*/
|
|
20184
20683
|
removeDeadRules?: boolean;
|
|
20185
20684
|
|
|
20685
|
+
/**
|
|
20686
|
+
* Resolve the `@custom-media` and `@custom-selector` at-rules: write the query or the selector list a name stands for wherever one asks for it, and drop the rule that named it. `@custom-media --wide (width>400px)` with `@media (--wide)` becomes `@media (width>400px)`, and `@custom-selector :--heading h1, h2` with `:--heading` becomes `:is(h1, h2)`. Off until asked for: `module.parser.css.customMedia` and `module.parser.css.customSelectors` already resolve both in every stylesheet webpack parses, so this is for a `.css` asset that reached the minimizer without being parsed — one emitted by `asset/resource` or copied in. Only a name stated before the rule asking for it is written out — the rules are read in the order they are written — and a rule naming one this has not come to is left as the author had it. A selector list is written as `:is(…)`, so a name is substituted only where the target reads `:is()`.
|
|
20687
|
+
* @since 5.111.0
|
|
20688
|
+
*/
|
|
20689
|
+
resolveCustomAtRules?: boolean;
|
|
20690
|
+
|
|
20186
20691
|
/**
|
|
20187
20692
|
* Shorten the values of custom properties (`--x: #ffffff` -> `#fff`, `--y: 0.5rem` -> `.5rem`), which are otherwise written back exactly as authored. Off by default: `getComputedStyle().getPropertyValue()` hands this text back, so a rewritten value is a different CSSOM — the one place a declaration's authored text survives. What it may rewrite is exactly what any other value's tokens may be, a color in a substitution's fallback included — that fallback being the property's value rather than the function's own argument.
|
|
20188
20693
|
* @since 5.110.0
|
|
20189
20694
|
*/
|
|
20190
20695
|
rewriteCustomProperties?: boolean;
|
|
20191
20696
|
|
|
20697
|
+
/**
|
|
20698
|
+
* Write a `:dir()` the `browserslist` target cannot read as the `[dir]` attribute selector it approximates: `a:dir(rtl)` becomes `a[dir=rtl]`. Off until asked for, because the two are not the same question — `:dir()` reads the directionality an element resolves to, which it may inherit from an ancestor, while `[dir=rtl]` reads the attribute on the element itself, so an element inside a `dir="rtl"` ancestor matches the first and not the second. Only in effect for a `browserslist` target that reads no `:dir()`; any other target names no browsers to answer for.
|
|
20699
|
+
* @since 5.111.0
|
|
20700
|
+
*/
|
|
20701
|
+
rewriteDirSelector?: boolean;
|
|
20702
|
+
|
|
20703
|
+
/**
|
|
20704
|
+
* Write an escaped identifier the shortest way that names the same thing, in a value or an id: `grid-area:\66oot` becomes `grid-area:foot` and `#\41 x` becomes `#Ax`. On by default, and exact: the escape and what replaces it are the same identifier. Off leaves every escape as the author wrote it, which is what a consumer comparing the text rather than reading the identifier needs.
|
|
20705
|
+
* @since 5.111.0
|
|
20706
|
+
*/
|
|
20707
|
+
rewriteEscapes?: boolean;
|
|
20708
|
+
|
|
20192
20709
|
/**
|
|
20193
20710
|
* Write each color in the shortest spelling of the same value: `#ffffff` -> `#fff`, `rgb(1 2 3)` -> `#010203`, a named color where the property takes no identifier of the author's own, and every polar and Lab function the target agrees with hex on. On by default.
|
|
20194
20711
|
* @since 5.110.0
|
|
@@ -20196,7 +20713,7 @@ declare interface OptimizationMinimizeCss {
|
|
|
20196
20713
|
shortenColors?: boolean;
|
|
20197
20714
|
|
|
20198
20715
|
/**
|
|
20199
|
-
*
|
|
20716
|
+
* Shorten a rule's condition prelude: a media feature in its range spelling where the target reads one (`(min-width:100px)` -> `(width>=100px)`), an `and` of two one-sided ranges collapsed into the interval it describes, the `all` a query states before an `and` (which matches what the condition alone matches), and an operand a condition already states — in `@supports` and `@container` as well as `@media`. On by default.
|
|
20200
20717
|
* @since 5.110.0
|
|
20201
20718
|
*/
|
|
20202
20719
|
shortenMediaQueries?: boolean;
|
|
@@ -20219,6 +20736,12 @@ declare interface OptimizationMinimizeCss {
|
|
|
20219
20736
|
*/
|
|
20220
20737
|
shortenValues?: boolean;
|
|
20221
20738
|
|
|
20739
|
+
/**
|
|
20740
|
+
* Names a whole-project analysis found nothing uses, which the minimizer then takes out: a bare name is matched against every class and id a selector names and against every `@keyframes` name, and a `--`-prefixed one against every custom property a declaration sets. A selector list keeps the selectors that do not name one, and a rule left with none goes; a name inside a functional pseudo (`:not(.gone)`, `:is(.gone, .kept)`) is not one the rule needs, so it is left alone. Nothing is derived here — the list is the caller's, and a name on it that something does use takes working CSS out.
|
|
20741
|
+
* @since 5.111.0
|
|
20742
|
+
*/
|
|
20743
|
+
unusedSymbols?: string[];
|
|
20744
|
+
|
|
20222
20745
|
/**
|
|
20223
20746
|
* Maintain vendor prefixes for the `browserslist` target: add the `-webkit-` / `-moz-` / `-ms-` spelling of a property, at-rule or pseudo-selector that a selected browser still needs, and drop one none of them does. On by default, and only in effect for a `browserslist` target — any other target names no browsers to prefix for. A browserslist name no compat dataset covers (`op_mini`, `and_uc`, `and_qq`, `baidu`, `kaios`, `bb`) is skipped, and a selection of nothing but those prefixes for no one.
|
|
20224
20747
|
* @since 5.110.0
|
|
@@ -20232,10 +20755,10 @@ declare interface OptimizationMinimizeCss {
|
|
|
20232
20755
|
*/
|
|
20233
20756
|
declare interface OptimizationMinimizeHtml {
|
|
20234
20757
|
/**
|
|
20235
|
-
* Write a boolean attribute
|
|
20758
|
+
* Write a boolean attribute as the bare name its presence already means. The DOM reads `checked` from the attribute being there and never from its value, so `checked="checked"` and `checked=""` are the same element — but `getAttribute` hands back what was written. `true`, the default, rewrites only the spelling the spec itself canonicalizes, the attribute's own name; `"all"` rewrites any value, including the `checked="false"` that already means checked.
|
|
20236
20759
|
* @since 5.110.0
|
|
20237
20760
|
*/
|
|
20238
|
-
collapseBooleanAttributes?: boolean;
|
|
20761
|
+
collapseBooleanAttributes?: boolean | "all";
|
|
20239
20762
|
|
|
20240
20763
|
/**
|
|
20241
20764
|
* Collapse each run of whitespace in text to a single space. Left alone inside `pre`, `textarea` and `listing`, where whitespace renders verbatim. `true` (or `"conservative"`) never removes whitespace entirely — dropping it would join two inline elements that render apart. `"smart"` also drops the whitespace that sits against a block element's edge, where no line box reaches it. `"all"` drops the whitespace at every text node's edges, which does change how adjacent inline elements render.
|
|
@@ -20249,6 +20772,12 @@ declare interface OptimizationMinimizeHtml {
|
|
|
20249
20772
|
*/
|
|
20250
20773
|
comments?: string | boolean | RegExp | ((comment: string) => boolean);
|
|
20251
20774
|
|
|
20775
|
+
/**
|
|
20776
|
+
* Print a run of adjacent `<script>` elements as one, joined by a newline and a `;`. Only bare ones fold — any attribute at all, a `src`, `type`, `nonce`, `async` or `id` among them, says the two are not interchangeable with one — and only where the print writes the bodies itself, so a `<script>` that `output.html.inline` fills in after the print is left alone. A body is left alone too wherever appending it would change what it means: one still inside a string, template or block comment would swallow the next, and a directive prologue, a hashbang or a leading `-->` mean what they do only at a start the appended body no longer has. Off by default: it removes elements, so `document.scripts`, a `script:nth-child()` selector and `querySelectorAll("script").length` all read a different document; a later body's `var` and `function` declarations become visible to the bodies before it; and a body that throws takes the rest of its run with it rather than only itself, while one that does not parse takes the whole run, its own code included.
|
|
20777
|
+
* @since 5.111.0
|
|
20778
|
+
*/
|
|
20779
|
+
mergeScripts?: boolean;
|
|
20780
|
+
|
|
20252
20781
|
/**
|
|
20253
20782
|
* Print a run of adjacent `<style>` elements as one sheet. Off by default: it removes elements, so `document.styleSheets`, a `style:nth-child()` selector and `querySelectorAll("style").length` all read a different document. A sheet the CSS minifier does not accept is never folded — appending to one that may be unterminated would make the next sheet part of its last rule — and neither is one led by `@import` / `@charset` / `@namespace`, which apply only at the top of a sheet.
|
|
20254
20783
|
* @since 5.110.0
|
|
@@ -20261,24 +20790,6 @@ declare interface OptimizationMinimizeHtml {
|
|
|
20261
20790
|
*/
|
|
20262
20791
|
minifyConditionalComments?: boolean;
|
|
20263
20792
|
|
|
20264
|
-
/**
|
|
20265
|
-
* Strip the whitespace between the tokens of a `<script>` whose type is a JSON MIME type. Every literal is copied byte for byte, so no number is rounded and no escape rewritten. On by default.
|
|
20266
|
-
* @since 5.110.0
|
|
20267
|
-
*/
|
|
20268
|
-
minifyJson?: boolean;
|
|
20269
|
-
|
|
20270
|
-
/**
|
|
20271
|
-
* Minify the document held in an `<iframe srcdoc>` attribute. Off by default: the body is a whole document of its own (its base URL is `about:srcdoc`), so minifying it is safe, but the attribute is readable from script and a consumer comparing `iframe.srcdoc` byte for byte would see it change.
|
|
20272
|
-
* @since 5.110.0
|
|
20273
|
-
*/
|
|
20274
|
-
minifySrcdoc?: boolean;
|
|
20275
|
-
|
|
20276
|
-
/**
|
|
20277
|
-
* Run the CSS minimizer over an inline `<style>` element and every `style=""` attribute, with the options `optimization.minimize.css` names. On by default.
|
|
20278
|
-
* @since 5.110.0
|
|
20279
|
-
*/
|
|
20280
|
-
minifyStyles?: boolean;
|
|
20281
|
-
|
|
20282
20793
|
/**
|
|
20283
20794
|
* Write an attribute value with whichever delimiters cost least — bare where the grammar allows it, else under the quote that needs fewer character references. On by default: the DOM reads the same value either way.
|
|
20284
20795
|
* @since 5.110.0
|
|
@@ -20292,7 +20803,7 @@ declare interface OptimizationMinimizeHtml {
|
|
|
20292
20803
|
normalizeEnumeratedAttributes?: boolean;
|
|
20293
20804
|
|
|
20294
20805
|
/**
|
|
20295
|
-
* Normalize a list-shaped attribute value: a space-separated token list (`class`, `rel`, `part`, …), a comma-separated one (`accept`, `sizes`, …), a `srcset` and the viewport `<meta content>`. On by default. Reordering a token list is `sortTokenLists`, which is separate and off by default.
|
|
20806
|
+
* Normalize a list-shaped attribute value: a space-separated token list (`class`, `rel`, `part`, …), a comma-separated one (`accept`, `sizes`, …), a `srcset` and the viewport `<meta content>`. On by default. A list is read as the set the DOM reflects, so a repeat folds away, only where every token of it is a word: one holding a delimiter another language wrote a statement in is text, and keeps every token it names. Reordering a token list is `sortTokenLists`, which is separate and off by default.
|
|
20296
20807
|
* @since 5.110.0
|
|
20297
20808
|
*/
|
|
20298
20809
|
normalizeListAttributes?: boolean;
|
|
@@ -20303,6 +20814,12 @@ declare interface OptimizationMinimizeHtml {
|
|
|
20303
20814
|
*/
|
|
20304
20815
|
normalizeNumericAttributes?: boolean;
|
|
20305
20816
|
|
|
20817
|
+
/**
|
|
20818
|
+
* Drop the ASCII whitespace around a URL value (`href`, `src`, `action`, `poster`, …), which resolving the URL skips over, so the request goes to the same place either way. On by default: `getAttribute` hands back the attribute as written, so a script comparing those bytes is the one this is turned off for.
|
|
20819
|
+
* @since 5.111.0
|
|
20820
|
+
*/
|
|
20821
|
+
normalizeUrlAttributes?: boolean;
|
|
20822
|
+
|
|
20306
20823
|
/**
|
|
20307
20824
|
* Drop an attribute whose empty or all-whitespace value leaves it in the state its absence gives: the globals `class`, `id`, `style`, `dir`, `accesskey`, `itemprop`, `itemref`, `itemtype` and `part`, and every attribute reflecting a token list on the elements the spec defines it for — `rel` on `<a>`, `<area>`, `<form>` and `<link>`, `ping` on `<a>` and `<area>`, `headers` on `<td>` and `<th>`, `blocking` on `<link>`, `<script>` and `<style>`, `sizes` on `<link>`, `for` on `<output>` — where an empty list is no tokens. Anywhere else that spelling is an author attribute whose meaning is a script's, so `<x-foo rel="">` and `<label for="">` keep it. Off by default: an attribute selector matches on presence, so `[class]` stops matching. Never dropped: `title` and `lang`, whose empty value means what absence does not; `sandbox`, whose empty list is the most restrictive state an `<iframe>` has; and an event handler, whose empty body still compiles to a function where absence reads null.
|
|
20308
20825
|
* @since 5.110.0
|
|
@@ -20340,7 +20857,7 @@ declare interface OptimizationMinimizeHtml {
|
|
|
20340
20857
|
sortAttributes?: boolean;
|
|
20341
20858
|
|
|
20342
20859
|
/**
|
|
20343
|
-
* Print every space-separated token list the DOM reads as a set — `class`, `rel`, `part`, `sandbox`, `blocking`, `itemprop` / `itemref` / `itemtype`, `<output for>` and `<link sizes>` — in token order. Nothing matching those reads order, so this only makes the same markup compress better across pages. Off by default: a script reading `className` or `rel` back sees the new order. The lists the DOM does not read as a set are left alone whatever this says — `ping` is the order its requests go out in and `accesskey` the order its keys are tried.
|
|
20860
|
+
* Print every space-separated token list the DOM reads as a set — `class`, `rel`, `part`, `sandbox`, `blocking`, `itemprop` / `itemref` / `itemtype`, `<output for>` and `<link sizes>` — in token order. Nothing matching those reads order, so this only makes the same markup compress better across pages. Off by default: a script reading `className` or `rel` back sees the new order. Asked for on its own: a list this reorders is rewritten whether or not `normalizeListAttributes` is on, since another order is another spelling. The lists the DOM does not read as a set are left alone whatever this says — `ping` is the order its requests go out in and `accesskey` the order its keys are tried.
|
|
20344
20861
|
* @since 5.110.0
|
|
20345
20862
|
*/
|
|
20346
20863
|
sortTokenLists?: boolean;
|
|
@@ -20436,9 +20953,15 @@ declare interface OptimizationNormalized {
|
|
|
20436
20953
|
mergeDuplicateChunks?: boolean;
|
|
20437
20954
|
|
|
20438
20955
|
/**
|
|
20439
|
-
* Enable minimizing the output. Uses optimization.minimizer.
|
|
20956
|
+
* Enable minimizing the output. Uses optimization.minimizer.
|
|
20957
|
+
*/
|
|
20958
|
+
minimize?: boolean;
|
|
20959
|
+
|
|
20960
|
+
/**
|
|
20961
|
+
* Enable minimizing the output, configured per asset type. An absent type is minimized with the defaults; `false` disables minimizing it.
|
|
20962
|
+
* @since 5.110.0
|
|
20440
20963
|
*/
|
|
20441
|
-
|
|
20964
|
+
minimizeOptions?: OptimizationMinimizeOptions;
|
|
20442
20965
|
|
|
20443
20966
|
/**
|
|
20444
20967
|
* Minimizer(s) to use for minimizing the output.
|
|
@@ -20566,7 +21089,8 @@ type OptimizationNormalizedWithDefaults = OptimizationNormalized & {
|
|
|
20566
21089
|
mangleWasmImports: NonNullable<undefined | boolean>;
|
|
20567
21090
|
portableRecords: NonNullable<undefined | boolean>;
|
|
20568
21091
|
realContentHash: NonNullable<undefined | boolean>;
|
|
20569
|
-
minimize: NonNullable<undefined |
|
|
21092
|
+
minimize: NonNullable<undefined | boolean>;
|
|
21093
|
+
minimizeOptions: OptimizationMinimizeOptions;
|
|
20570
21094
|
minimizer: (
|
|
20571
21095
|
| ((this: Compiler, compiler: Compiler) => void)
|
|
20572
21096
|
| WebpackPluginInstance
|
|
@@ -20854,7 +21378,17 @@ declare interface OptimizationSplitChunksOptions {
|
|
|
20854
21378
|
*/
|
|
20855
21379
|
usedExports?: boolean;
|
|
20856
21380
|
}
|
|
20857
|
-
declare
|
|
21381
|
+
declare abstract class OptionsApply {
|
|
21382
|
+
/**
|
|
21383
|
+
* Returns options object.
|
|
21384
|
+
*/
|
|
21385
|
+
process(
|
|
21386
|
+
options: WebpackOptionsNormalizedWithDefaults,
|
|
21387
|
+
compiler: Compiler,
|
|
21388
|
+
interception?: WebpackOptionsInterception
|
|
21389
|
+
): WebpackOptionsNormalizedWithDefaults;
|
|
21390
|
+
}
|
|
21391
|
+
declare interface OptionsDelegatedModuleFactoryPlugin {
|
|
20858
21392
|
/**
|
|
20859
21393
|
* source
|
|
20860
21394
|
*/
|
|
@@ -20890,15 +21424,126 @@ declare interface Options {
|
|
|
20890
21424
|
*/
|
|
20891
21425
|
associatedObjectForCache?: object;
|
|
20892
21426
|
}
|
|
20893
|
-
declare
|
|
21427
|
+
declare interface OptionsParser {
|
|
20894
21428
|
/**
|
|
20895
|
-
*
|
|
21429
|
+
* which edition to parse
|
|
20896
21430
|
*/
|
|
20897
|
-
|
|
20898
|
-
|
|
20899
|
-
|
|
20900
|
-
|
|
20901
|
-
|
|
21431
|
+
ecmaVersion: EcmaVersion;
|
|
21432
|
+
|
|
21433
|
+
/**
|
|
21434
|
+
* the goal symbol
|
|
21435
|
+
*/
|
|
21436
|
+
sourceType?: "module" | "commonjs" | "script";
|
|
21437
|
+
|
|
21438
|
+
/**
|
|
21439
|
+
* whether the code is strict whatever it says
|
|
21440
|
+
*/
|
|
21441
|
+
strict?: boolean;
|
|
21442
|
+
|
|
21443
|
+
/**
|
|
21444
|
+
* called where a semicolon was inserted
|
|
21445
|
+
*/
|
|
21446
|
+
onInsertedSemicolon?: (
|
|
21447
|
+
lastTokEnd: number,
|
|
21448
|
+
lastTokEndLoc?: null | Position
|
|
21449
|
+
) => void;
|
|
21450
|
+
|
|
21451
|
+
/**
|
|
21452
|
+
* called at a trailing comma
|
|
21453
|
+
*/
|
|
21454
|
+
onTrailingComma?: (
|
|
21455
|
+
lastTokEnd: number,
|
|
21456
|
+
lastTokEndLoc?: null | Position
|
|
21457
|
+
) => void;
|
|
21458
|
+
|
|
21459
|
+
/**
|
|
21460
|
+
* whether reserved words may name things
|
|
21461
|
+
*/
|
|
21462
|
+
allowReserved?: boolean | "never";
|
|
21463
|
+
|
|
21464
|
+
/**
|
|
21465
|
+
* whether `return` may sit at the top level
|
|
21466
|
+
*/
|
|
21467
|
+
allowReturnOutsideFunction?: boolean;
|
|
21468
|
+
|
|
21469
|
+
/**
|
|
21470
|
+
* whether module syntax may sit anywhere
|
|
21471
|
+
*/
|
|
21472
|
+
allowImportExportEverywhere?: boolean;
|
|
21473
|
+
|
|
21474
|
+
/**
|
|
21475
|
+
* whether `await` may sit outside a function
|
|
21476
|
+
*/
|
|
21477
|
+
allowAwaitOutsideFunction?: boolean;
|
|
21478
|
+
|
|
21479
|
+
/**
|
|
21480
|
+
* whether `super` may sit outside a method
|
|
21481
|
+
*/
|
|
21482
|
+
allowSuperOutsideMethod?: boolean;
|
|
21483
|
+
|
|
21484
|
+
/**
|
|
21485
|
+
* whether a leading `#!` line is skipped
|
|
21486
|
+
*/
|
|
21487
|
+
allowHashBang?: boolean;
|
|
21488
|
+
|
|
21489
|
+
/**
|
|
21490
|
+
* whether private names must be declared
|
|
21491
|
+
*/
|
|
21492
|
+
checkPrivateFields?: boolean;
|
|
21493
|
+
|
|
21494
|
+
/**
|
|
21495
|
+
* whether nodes carry `loc`
|
|
21496
|
+
*/
|
|
21497
|
+
locations?: boolean;
|
|
21498
|
+
|
|
21499
|
+
/**
|
|
21500
|
+
* where the first offset falls
|
|
21501
|
+
*/
|
|
21502
|
+
startLocation?: { line: number; column: number };
|
|
21503
|
+
|
|
21504
|
+
/**
|
|
21505
|
+
* where tokens are reported
|
|
21506
|
+
*/
|
|
21507
|
+
onToken?: any[] | ((token?: any) => void);
|
|
21508
|
+
|
|
21509
|
+
/**
|
|
21510
|
+
* where comments are reported
|
|
21511
|
+
*/
|
|
21512
|
+
onComment?:
|
|
21513
|
+
| any[]
|
|
21514
|
+
| ((
|
|
21515
|
+
isBlock: boolean,
|
|
21516
|
+
text: string,
|
|
21517
|
+
start: number,
|
|
21518
|
+
end: number,
|
|
21519
|
+
startLoc?: null | Position,
|
|
21520
|
+
endLoc?: null | Position
|
|
21521
|
+
) => void);
|
|
21522
|
+
|
|
21523
|
+
/**
|
|
21524
|
+
* whether nodes carry `range`
|
|
21525
|
+
*/
|
|
21526
|
+
ranges?: boolean;
|
|
21527
|
+
|
|
21528
|
+
/**
|
|
21529
|
+
* a program node to append to
|
|
21530
|
+
*/
|
|
21531
|
+
program?: NodeLike;
|
|
21532
|
+
|
|
21533
|
+
/**
|
|
21534
|
+
* the name errors and locations carry
|
|
21535
|
+
*/
|
|
21536
|
+
sourceFile?: string;
|
|
21537
|
+
|
|
21538
|
+
/**
|
|
21539
|
+
* the name every node carries
|
|
21540
|
+
*/
|
|
21541
|
+
directSourceFile?: string;
|
|
21542
|
+
|
|
21543
|
+
/**
|
|
21544
|
+
* whether parentheses become nodes
|
|
21545
|
+
*/
|
|
21546
|
+
preserveParens?: boolean;
|
|
20902
21547
|
}
|
|
20903
21548
|
declare interface OriginRecord {
|
|
20904
21549
|
module: null | Module;
|
|
@@ -20992,6 +21637,12 @@ declare interface Output {
|
|
|
20992
21637
|
*/
|
|
20993
21638
|
compareBeforeEmit?: boolean;
|
|
20994
21639
|
|
|
21640
|
+
/**
|
|
21641
|
+
* Copy files and directories to the output directory.
|
|
21642
|
+
* @since 5.111.0
|
|
21643
|
+
*/
|
|
21644
|
+
copy?: string | CopyPattern[];
|
|
21645
|
+
|
|
20995
21646
|
/**
|
|
20996
21647
|
* This option enables cross-origin loading of chunks.
|
|
20997
21648
|
*/
|
|
@@ -21276,6 +21927,24 @@ declare interface OutputFileSystem {
|
|
|
21276
21927
|
pathLike: PathLikeFs,
|
|
21277
21928
|
callback: (err: null | NodeJS.ErrnoException) => void
|
|
21278
21929
|
) => void;
|
|
21930
|
+
symlink?: (
|
|
21931
|
+
target: PathLikeFs,
|
|
21932
|
+
path: PathLikeFs,
|
|
21933
|
+
type: undefined | null | "file" | "dir" | "junction",
|
|
21934
|
+
callback: (err: null | NodeJS.ErrnoException) => void
|
|
21935
|
+
) => void;
|
|
21936
|
+
readlink?: ReadlinkFs;
|
|
21937
|
+
chmod?: (
|
|
21938
|
+
path: PathLikeFs,
|
|
21939
|
+
mode: string | number,
|
|
21940
|
+
callback: (err: null | NodeJS.ErrnoException) => void
|
|
21941
|
+
) => void;
|
|
21942
|
+
utimes?: (
|
|
21943
|
+
path: PathLikeFs,
|
|
21944
|
+
atime: string | number | Date,
|
|
21945
|
+
mtime: string | number | Date,
|
|
21946
|
+
callback: (err: null | NodeJS.ErrnoException) => void
|
|
21947
|
+
) => void;
|
|
21279
21948
|
stat: StatFs;
|
|
21280
21949
|
lstat?: LStatFs;
|
|
21281
21950
|
readFile: ReadFileFs;
|
|
@@ -21517,6 +22186,11 @@ declare interface OutputNormalized {
|
|
|
21517
22186
|
*/
|
|
21518
22187
|
compareBeforeEmit?: boolean;
|
|
21519
22188
|
|
|
22189
|
+
/**
|
|
22190
|
+
* Patterns of files which are copied to the output directory, and the options of the copying itself.
|
|
22191
|
+
*/
|
|
22192
|
+
copy?: CopyOptions;
|
|
22193
|
+
|
|
21520
22194
|
/**
|
|
21521
22195
|
* This option enables cross-origin loading of chunks.
|
|
21522
22196
|
*/
|
|
@@ -21814,7 +22488,7 @@ declare interface ParameterizedComparator<TArg extends object, T> {
|
|
|
21814
22488
|
type ParseErrorSeverity = "error" | "warning";
|
|
21815
22489
|
declare interface ParseOptionsJavascriptParser {
|
|
21816
22490
|
sourceType: "module" | "script";
|
|
21817
|
-
ecmaVersion:
|
|
22491
|
+
ecmaVersion: EcmaVersion;
|
|
21818
22492
|
locations?: boolean;
|
|
21819
22493
|
comments?: boolean;
|
|
21820
22494
|
ranges?: boolean;
|
|
@@ -21822,7 +22496,7 @@ declare interface ParseOptionsJavascriptParser {
|
|
|
21822
22496
|
allowReturnOutsideFunction?: boolean;
|
|
21823
22497
|
|
|
21824
22498
|
/**
|
|
21825
|
-
* internal: serve `range` lazily and skip
|
|
22499
|
+
* internal: serve `range` lazily and skip the parser's location/range tracking
|
|
21826
22500
|
*/
|
|
21827
22501
|
lazyNodes?: boolean;
|
|
21828
22502
|
|
|
@@ -21848,7 +22522,7 @@ declare interface ParseOptionsSyntax {
|
|
|
21848
22522
|
comment?: (input: string, start: number, end: number) => number;
|
|
21849
22523
|
}
|
|
21850
22524
|
declare interface ParseResult {
|
|
21851
|
-
ast:
|
|
22525
|
+
ast: ProgramImport;
|
|
21852
22526
|
comments: CommentJavascriptParser[];
|
|
21853
22527
|
}
|
|
21854
22528
|
declare interface ParsedIdentifier {
|
|
@@ -21990,6 +22664,111 @@ declare interface ParserOptionsByModuleTypeKnown {
|
|
|
21990
22664
|
declare interface ParserOptionsByModuleTypeUnknown {
|
|
21991
22665
|
[index: string]: { [index: string]: any };
|
|
21992
22666
|
}
|
|
22667
|
+
|
|
22668
|
+
/**
|
|
22669
|
+
* The ECMAScript parser webpack owns, ported from acorn 8.18.0 so the bundler
|
|
22670
|
+
* ships no parser dependency. `lib/javascript/syntax.js` subclasses it and
|
|
22671
|
+
* overrides the hot paths.
|
|
22672
|
+
* acorn source: https://github.com/acornjs/acorn/blob/8.18.0/acorn/src/state.js
|
|
22673
|
+
*/
|
|
22674
|
+
declare class ParserParser {
|
|
22675
|
+
constructor(
|
|
22676
|
+
options: undefined | null | Partial<OptionsParser>,
|
|
22677
|
+
input: string,
|
|
22678
|
+
startPos?: number
|
|
22679
|
+
);
|
|
22680
|
+
options: ResolvedOptionsParser;
|
|
22681
|
+
sourceFile: null | string;
|
|
22682
|
+
keywords: RegExp;
|
|
22683
|
+
reservedWords: RegExp;
|
|
22684
|
+
reservedWordsStrict: RegExp;
|
|
22685
|
+
reservedWordsStrictBind: RegExp;
|
|
22686
|
+
input: string;
|
|
22687
|
+
containsEsc: boolean;
|
|
22688
|
+
pos: number;
|
|
22689
|
+
curLine: number;
|
|
22690
|
+
lineStart: number;
|
|
22691
|
+
type: TokenType;
|
|
22692
|
+
value: any;
|
|
22693
|
+
end: number;
|
|
22694
|
+
start: number;
|
|
22695
|
+
endLoc?: Position;
|
|
22696
|
+
startLoc?: Position;
|
|
22697
|
+
lastTokStartLoc?: null | Position;
|
|
22698
|
+
lastTokEndLoc?: null | Position;
|
|
22699
|
+
lastTokEnd: number;
|
|
22700
|
+
lastTokStart: number;
|
|
22701
|
+
context: TokContextLike[];
|
|
22702
|
+
exprAllowed: boolean;
|
|
22703
|
+
inModule: boolean;
|
|
22704
|
+
strict: boolean;
|
|
22705
|
+
potentialArrowAt: number;
|
|
22706
|
+
potentialArrowInForAwait: boolean;
|
|
22707
|
+
awaitIdentPos: number;
|
|
22708
|
+
awaitPos: number;
|
|
22709
|
+
yieldPos: number;
|
|
22710
|
+
labels: LabelLike[];
|
|
22711
|
+
undefinedExports: Record<string, NodeLike>;
|
|
22712
|
+
scopeStack: ScopeParser[];
|
|
22713
|
+
regexpState: null | RegExpValidationState;
|
|
22714
|
+
privateNameStack: any[];
|
|
22715
|
+
get inFunction(): boolean;
|
|
22716
|
+
get inGenerator(): boolean;
|
|
22717
|
+
get inAsync(): boolean;
|
|
22718
|
+
get canAwait(): boolean;
|
|
22719
|
+
get allowReturn(): boolean;
|
|
22720
|
+
get allowSuper(): boolean;
|
|
22721
|
+
get allowDirectSuper(): boolean;
|
|
22722
|
+
get treatFunctionsAsVar(): number | boolean;
|
|
22723
|
+
get allowNewDotTarget(): boolean;
|
|
22724
|
+
get allowUsing(): boolean;
|
|
22725
|
+
get inClassStaticBlock(): boolean;
|
|
22726
|
+
|
|
22727
|
+
/**
|
|
22728
|
+
* Whether a directive prologue starting at `start` opens with `"use strict"`.
|
|
22729
|
+
* acorn source: https://github.com/acornjs/acorn/blob/8.18.0/acorn/src/parseutil.js
|
|
22730
|
+
*/
|
|
22731
|
+
strictDirective(start: number): boolean;
|
|
22732
|
+
unexpected(pos?: number): never;
|
|
22733
|
+
parse(): any;
|
|
22734
|
+
|
|
22735
|
+
/**
|
|
22736
|
+
* Read a full expression, including the comma operator.
|
|
22737
|
+
* acorn source: https://github.com/acornjs/acorn/blob/8.18.0/acorn/src/expression.js
|
|
22738
|
+
*/
|
|
22739
|
+
parseExpression(
|
|
22740
|
+
forInit?: string | boolean,
|
|
22741
|
+
refDestructuringErrors?: any
|
|
22742
|
+
): any;
|
|
22743
|
+
getToken(): TokenParser;
|
|
22744
|
+
initialContext(): TokContextLike[];
|
|
22745
|
+
enterScope(flags: number): void;
|
|
22746
|
+
treatFunctionsAsVarInScope(scope: { flags: number }): number | boolean;
|
|
22747
|
+
currentScope(): ScopeParser;
|
|
22748
|
+
currentVarScope(): ScopeParser;
|
|
22749
|
+
currentThisScope(): ScopeParser;
|
|
22750
|
+
|
|
22751
|
+
/**
|
|
22752
|
+
* Report a parse error, naming where in the source it was found.
|
|
22753
|
+
* acorn source: https://github.com/acornjs/acorn/blob/8.18.0/acorn/src/location.js
|
|
22754
|
+
*/
|
|
22755
|
+
raise(pos: number, message: string): never;
|
|
22756
|
+
raiseRecoverable(pos: number, message: string): never;
|
|
22757
|
+
curPosition(): undefined | Position;
|
|
22758
|
+
skipLineComment(startSkip: number): void;
|
|
22759
|
+
[Symbol.iterator](): Iterator<TokenParser>;
|
|
22760
|
+
static extend(...plugins: ((parser?: any) => any)[]): any;
|
|
22761
|
+
static parse(input: string, options?: Partial<OptionsParser>): ProgramParser;
|
|
22762
|
+
static parseExpressionAt(
|
|
22763
|
+
input: string,
|
|
22764
|
+
pos: number,
|
|
22765
|
+
options?: Partial<OptionsParser>
|
|
22766
|
+
): ExpressionParser;
|
|
22767
|
+
static tokenizer(
|
|
22768
|
+
input: string,
|
|
22769
|
+
options?: Partial<OptionsParser>
|
|
22770
|
+
): ParserParser;
|
|
22771
|
+
}
|
|
21993
22772
|
type ParserState = ParserStateBase & Record<string, any>;
|
|
21994
22773
|
declare interface ParserStateBase {
|
|
21995
22774
|
source: string | Buffer;
|
|
@@ -22095,6 +22874,12 @@ declare interface PerformanceOptions {
|
|
|
22095
22874
|
*/
|
|
22096
22875
|
all?: boolean;
|
|
22097
22876
|
|
|
22877
|
+
/**
|
|
22878
|
+
* Report references in ESM output that keep webpack's runtime form, naming what stops each from being written as a literal 'import()' or 'new URL()' another bundler can follow (requires 'hints' to be enabled).
|
|
22879
|
+
* @since 5.111.0
|
|
22880
|
+
*/
|
|
22881
|
+
analyzableBailouts?: boolean;
|
|
22882
|
+
|
|
22098
22883
|
/**
|
|
22099
22884
|
* Filter function to select assets that are checked.
|
|
22100
22885
|
*/
|
|
@@ -22148,18 +22933,6 @@ declare interface PerformanceOptions {
|
|
|
22148
22933
|
*/
|
|
22149
22934
|
dynamicExports?: boolean;
|
|
22150
22935
|
|
|
22151
|
-
/**
|
|
22152
|
-
* Report a production build whose 'devtool' writes the source map into the JavaScript, so everyone loading the page downloads it (requires 'hints' to be enabled).
|
|
22153
|
-
* @since 5.110.0
|
|
22154
|
-
*/
|
|
22155
|
-
embeddedSourceMaps?: boolean;
|
|
22156
|
-
|
|
22157
|
-
/**
|
|
22158
|
-
* Report modules shipped by more than one entrypoint, which every page that loads them downloads again (requires 'hints' to be enabled).
|
|
22159
|
-
* @since 5.110.0
|
|
22160
|
-
*/
|
|
22161
|
-
entrypointOverlap?: boolean;
|
|
22162
|
-
|
|
22163
22936
|
/**
|
|
22164
22937
|
* Report modules that call 'eval' directly, which stops minification, scope hoisting and tree shaking (requires 'hints' to be enabled).
|
|
22165
22938
|
* @since 5.110.0
|
|
@@ -22241,6 +23014,12 @@ declare interface PerformanceOptions {
|
|
|
22241
23014
|
*/
|
|
22242
23015
|
scopeHoistingBailouts?: boolean;
|
|
22243
23016
|
|
|
23017
|
+
/**
|
|
23018
|
+
* Report source maps that cost more than they give: a production 'devtool' that writes the map into the JavaScript, and modules a loader transformed without returning a map, which leaves positions pointing at the loader's output (requires 'hints' to be enabled).
|
|
23019
|
+
* @since 5.111.0
|
|
23020
|
+
*/
|
|
23021
|
+
sourceMaps?: boolean;
|
|
23022
|
+
|
|
22244
23023
|
/**
|
|
22245
23024
|
* Report splits 'optimization.splitChunks' refused because 'maxInitialRequests' or 'maxAsyncRequests' was already reached (requires 'hints' to be enabled).
|
|
22246
23025
|
* @since 5.110.0
|
|
@@ -22266,34 +23045,22 @@ declare interface PerformanceOptions {
|
|
|
22266
23045
|
unsplitVendors?: boolean;
|
|
22267
23046
|
|
|
22268
23047
|
/**
|
|
22269
|
-
* Report '
|
|
22270
|
-
* @since 5.
|
|
22271
|
-
*/
|
|
22272
|
-
unusedAliases?: boolean;
|
|
22273
|
-
|
|
22274
|
-
/**
|
|
22275
|
-
* Report keys defined by 'DefinePlugin' that no module ever referenced, which cost a parser hook per module and invalidate the build when their value changes.
|
|
22276
|
-
* @since 5.110.0
|
|
22277
|
-
*/
|
|
22278
|
-
unusedDefines?: boolean;
|
|
22279
|
-
|
|
22280
|
-
/**
|
|
22281
|
-
* Report requests listed in 'externals' that no module ever imported, which usually means the request is misspelled and the real one got bundled instead.
|
|
22282
|
-
* @since 5.110.0
|
|
23048
|
+
* Report asset files emitted for an import whose binding nothing reads, so the bytes ship for nothing (requires 'hints' to be enabled).
|
|
23049
|
+
* @since 5.111.0
|
|
22283
23050
|
*/
|
|
22284
|
-
|
|
23051
|
+
unusedAssets?: boolean;
|
|
22285
23052
|
|
|
22286
23053
|
/**
|
|
22287
|
-
* Report
|
|
22288
|
-
* @since 5.
|
|
23054
|
+
* Report configuration that no build used: 'resolve.alias' entries nothing matched, 'DefinePlugin' keys nothing referenced, 'externals' nothing imported, 'module.rules' that never matched, and Module Federation 'shared' keys or 'remotes' nothing imported.
|
|
23055
|
+
* @since 5.111.0
|
|
22289
23056
|
*/
|
|
22290
|
-
|
|
23057
|
+
unusedConfig?: boolean;
|
|
22291
23058
|
|
|
22292
23059
|
/**
|
|
22293
|
-
* Report
|
|
22294
|
-
* @since 5.
|
|
23060
|
+
* Report modules bundled although nothing uses what they export, naming the re-export or the side-effect statement that kept each one (requires 'hints' to be enabled).
|
|
23061
|
+
* @since 5.111.0
|
|
22295
23062
|
*/
|
|
22296
|
-
|
|
23063
|
+
unusedModules?: boolean;
|
|
22297
23064
|
}
|
|
22298
23065
|
declare interface PitchLoaderDefinitionFunction<
|
|
22299
23066
|
OptionsType = {},
|
|
@@ -22395,6 +23162,19 @@ declare interface PnpApi {
|
|
|
22395
23162
|
options: { considerBuiltins: boolean }
|
|
22396
23163
|
) => null | string;
|
|
22397
23164
|
}
|
|
23165
|
+
|
|
23166
|
+
/**
|
|
23167
|
+
* A `{ line, column }` pair, as `options.locations` reports one.
|
|
23168
|
+
*/
|
|
23169
|
+
declare abstract class Position {
|
|
23170
|
+
line: number;
|
|
23171
|
+
column: number;
|
|
23172
|
+
offset(n: number): Position;
|
|
23173
|
+
}
|
|
23174
|
+
declare interface PositionLike {
|
|
23175
|
+
line: number;
|
|
23176
|
+
column: number;
|
|
23177
|
+
}
|
|
22398
23178
|
declare class PrefetchPlugin {
|
|
22399
23179
|
/**
|
|
22400
23180
|
* Creates an instance of PrefetchPlugin.
|
|
@@ -22626,7 +23406,7 @@ declare class PrintContext<TPath, TNode, TPrintOptions = object> {
|
|
|
22626
23406
|
* them ahead of the next top-level node as well.
|
|
22627
23407
|
*/
|
|
22628
23408
|
takeInserts(start: number, end: number): string;
|
|
22629
|
-
sourceMap(options: SourceMapOptions): SourceMap;
|
|
23409
|
+
sourceMap(options: SourceMapOptions, code?: string): SourceMap;
|
|
22630
23410
|
|
|
22631
23411
|
/**
|
|
22632
23412
|
* Stand the text `resolve` gives back in place of every deferred write left
|
|
@@ -22718,6 +23498,7 @@ declare interface ProfilingPluginOptions {
|
|
|
22718
23498
|
*/
|
|
22719
23499
|
outputPath?: string;
|
|
22720
23500
|
}
|
|
23501
|
+
type ProgramParser = ProgramImport & NodeLike;
|
|
22721
23502
|
declare class ProgressPlugin {
|
|
22722
23503
|
/**
|
|
22723
23504
|
* Creates an instance of ProgressPlugin.
|
|
@@ -23193,21 +23974,7 @@ declare interface ReadFileSync {
|
|
|
23193
23974
|
): string;
|
|
23194
23975
|
(
|
|
23195
23976
|
path: PathOrFileDescriptorFs,
|
|
23196
|
-
options?:
|
|
23197
|
-
| null
|
|
23198
|
-
| "ascii"
|
|
23199
|
-
| "utf8"
|
|
23200
|
-
| "utf-8"
|
|
23201
|
-
| "utf16le"
|
|
23202
|
-
| "utf-16le"
|
|
23203
|
-
| "ucs2"
|
|
23204
|
-
| "ucs-2"
|
|
23205
|
-
| "base64"
|
|
23206
|
-
| "base64url"
|
|
23207
|
-
| "latin1"
|
|
23208
|
-
| "binary"
|
|
23209
|
-
| "hex"
|
|
23210
|
-
| (ObjectEncodingOptionsFs & { flag?: string })
|
|
23977
|
+
options: ObjectEncodingOptionsFs & { flag?: string }
|
|
23211
23978
|
): string | Buffer;
|
|
23212
23979
|
}
|
|
23213
23980
|
declare interface ReadFileTypes {
|
|
@@ -23609,6 +24376,11 @@ declare interface RealContentHashPluginOptions {
|
|
|
23609
24376
|
* the hash digest to use
|
|
23610
24377
|
*/
|
|
23611
24378
|
hashDigest: string;
|
|
24379
|
+
|
|
24380
|
+
/**
|
|
24381
|
+
* run only where analyzable output marked a name for repair
|
|
24382
|
+
*/
|
|
24383
|
+
onDemand?: boolean;
|
|
23612
24384
|
}
|
|
23613
24385
|
declare interface RealDependencyLocation {
|
|
23614
24386
|
start: SourcePosition;
|
|
@@ -23691,7 +24463,7 @@ declare interface RecursiveNonNullable<T> {}
|
|
|
23691
24463
|
*/
|
|
23692
24464
|
declare abstract class Reference {
|
|
23693
24465
|
identifier: Identifier;
|
|
23694
|
-
from:
|
|
24466
|
+
from: ScopeScopeAnalyzer;
|
|
23695
24467
|
resolved?: Variable;
|
|
23696
24468
|
}
|
|
23697
24469
|
type ReferenceableItem = string | object;
|
|
@@ -23711,6 +24483,44 @@ declare interface ReferencedExport {
|
|
|
23711
24483
|
*/
|
|
23712
24484
|
canInline?: boolean;
|
|
23713
24485
|
}
|
|
24486
|
+
|
|
24487
|
+
/**
|
|
24488
|
+
* The cursor a regexp literal is validated through.
|
|
24489
|
+
*/
|
|
24490
|
+
declare abstract class RegExpValidationState {
|
|
24491
|
+
parser: ParserParser;
|
|
24492
|
+
validFlags: string;
|
|
24493
|
+
unicodeProperties: any;
|
|
24494
|
+
source: string;
|
|
24495
|
+
flags: string;
|
|
24496
|
+
start: number;
|
|
24497
|
+
switchU: boolean;
|
|
24498
|
+
switchV: boolean;
|
|
24499
|
+
switchN: boolean;
|
|
24500
|
+
pos: number;
|
|
24501
|
+
lastIntValue: number;
|
|
24502
|
+
lastStringValue: string;
|
|
24503
|
+
lastAssertionIsQuantifiable: boolean;
|
|
24504
|
+
numCapturingParens: number;
|
|
24505
|
+
maxBackReference: number;
|
|
24506
|
+
groupNames: any;
|
|
24507
|
+
backReferenceNames: string[];
|
|
24508
|
+
branchID: null | BranchID;
|
|
24509
|
+
reset(start: number, pattern: string, flags: string): void;
|
|
24510
|
+
raise(message: string): void;
|
|
24511
|
+
|
|
24512
|
+
/**
|
|
24513
|
+
* The code point at an index, joining a surrogate pair where the `u` flag
|
|
24514
|
+
* asks for code points rather than units.
|
|
24515
|
+
*/
|
|
24516
|
+
at(i: number, forceU?: boolean): number;
|
|
24517
|
+
nextIndex(i: number, forceU?: boolean): number;
|
|
24518
|
+
current(forceU?: boolean): number;
|
|
24519
|
+
lookahead(forceU?: boolean): number;
|
|
24520
|
+
advance(forceU?: boolean): void;
|
|
24521
|
+
eat(ch: number, forceU?: boolean): boolean;
|
|
24522
|
+
eatChars(chs: number[], forceU?: boolean): boolean;
|
|
24523
|
+
}
|
|
23714
24524
|
type Remotes = (string | RemotesObject)[] | RemotesObject;
|
|
23715
24525
|
|
|
23716
24526
|
/**
|
|
@@ -24461,7 +25271,7 @@ declare interface ResolveOptionsResolverFactoryObject2 {
|
|
|
24461
25271
|
resolver?: Resolver;
|
|
24462
25272
|
|
|
24463
25273
|
/**
|
|
24464
|
-
* A list of directories to resolve modules from, can be absolute path, folder name, or a `file:`
|
|
25274
|
+
* A list of directories to resolve modules from, can be absolute path, folder name, or a `file:` URL
|
|
24465
25275
|
*/
|
|
24466
25276
|
modules?: string | URL_url | (string | URL_url)[];
|
|
24467
25277
|
|
|
@@ -24488,7 +25298,7 @@ declare interface ResolveOptionsResolverFactoryObject2 {
|
|
|
24488
25298
|
pnpApi?: null | PnpApi;
|
|
24489
25299
|
|
|
24490
25300
|
/**
|
|
24491
|
-
* A list of root paths, each an absolute path or a `file:`
|
|
25301
|
+
* A list of root paths, each an absolute path or a `file:` URL
|
|
24492
25302
|
*/
|
|
24493
25303
|
roots?: (string | URL_url)[];
|
|
24494
25304
|
|
|
@@ -24503,7 +25313,7 @@ declare interface ResolveOptionsResolverFactoryObject2 {
|
|
|
24503
25313
|
resolveToContext?: boolean;
|
|
24504
25314
|
|
|
24505
25315
|
/**
|
|
24506
|
-
* A list of resolve restrictions, each an absolute path, a `file:`
|
|
25316
|
+
* A list of resolve restrictions, each an absolute path, a `file:` URL, or a RegExp
|
|
24507
25317
|
*/
|
|
24508
25318
|
restrictions?: (string | RegExp | URL_url)[];
|
|
24509
25319
|
|
|
@@ -24523,7 +25333,7 @@ declare interface ResolveOptionsResolverFactoryObject2 {
|
|
|
24523
25333
|
preferAbsolute?: boolean;
|
|
24524
25334
|
|
|
24525
25335
|
/**
|
|
24526
|
-
* TypeScript config file path (or `file:`
|
|
25336
|
+
* TypeScript config file path (or `file:` URL) or config object with configFile and references
|
|
24527
25337
|
*/
|
|
24528
25338
|
tsconfig?: string | boolean | URL_url | UserTsconfigOptions;
|
|
24529
25339
|
}
|
|
@@ -24550,12 +25360,129 @@ declare interface ResolvedContextTimestampAndHash {
|
|
|
24550
25360
|
timestampHash?: string;
|
|
24551
25361
|
hash: string;
|
|
24552
25362
|
}
|
|
24553
|
-
declare interface
|
|
25363
|
+
declare interface ResolvedOptionsDefaults {
|
|
24554
25364
|
/**
|
|
24555
25365
|
* - platform target properties
|
|
24556
25366
|
*/
|
|
24557
25367
|
platform: false | PlatformTargetProperties;
|
|
24558
25368
|
}
|
|
25369
|
+
declare interface ResolvedOptionsParser {
|
|
25370
|
+
/**
|
|
25371
|
+
* the edition, as the number the parser compares against
|
|
25372
|
+
*/
|
|
25373
|
+
ecmaVersion: number;
|
|
25374
|
+
|
|
25375
|
+
/**
|
|
25376
|
+
* the goal symbol
|
|
25377
|
+
*/
|
|
25378
|
+
sourceType: "module" | "commonjs" | "script";
|
|
25379
|
+
|
|
25380
|
+
/**
|
|
25381
|
+
* whether the code is strict whatever it says
|
|
25382
|
+
*/
|
|
25383
|
+
strict: boolean;
|
|
25384
|
+
|
|
25385
|
+
/**
|
|
25386
|
+
* called where a semicolon was inserted
|
|
25387
|
+
*/
|
|
25388
|
+
onInsertedSemicolon:
|
|
25389
|
+
null | ((lastTokEnd: number, lastTokEndLoc?: null | Position) => void);
|
|
25390
|
+
|
|
25391
|
+
/**
|
|
25392
|
+
* called at a trailing comma
|
|
25393
|
+
*/
|
|
25394
|
+
onTrailingComma:
|
|
25395
|
+
null | ((lastTokEnd: number, lastTokEndLoc?: null | Position) => void);
|
|
25396
|
+
|
|
25397
|
+
/**
|
|
25398
|
+
* whether reserved words may name things
|
|
25399
|
+
*/
|
|
25400
|
+
allowReserved: boolean | "never";
|
|
25401
|
+
|
|
25402
|
+
/**
|
|
25403
|
+
* whether `return` may sit at the top level
|
|
25404
|
+
*/
|
|
25405
|
+
allowReturnOutsideFunction: boolean;
|
|
25406
|
+
|
|
25407
|
+
/**
|
|
25408
|
+
* whether module syntax may sit anywhere
|
|
25409
|
+
*/
|
|
25410
|
+
allowImportExportEverywhere: boolean;
|
|
25411
|
+
|
|
25412
|
+
/**
|
|
25413
|
+
* whether `await` may sit outside a function
|
|
25414
|
+
*/
|
|
25415
|
+
allowAwaitOutsideFunction: boolean;
|
|
25416
|
+
|
|
25417
|
+
/**
|
|
25418
|
+
* whether `super` may sit outside a method
|
|
25419
|
+
*/
|
|
25420
|
+
allowSuperOutsideMethod: boolean;
|
|
25421
|
+
|
|
25422
|
+
/**
|
|
25423
|
+
* whether a leading `#!` line is skipped
|
|
25424
|
+
*/
|
|
25425
|
+
allowHashBang: boolean;
|
|
25426
|
+
|
|
25427
|
+
/**
|
|
25428
|
+
* whether private names must be declared
|
|
25429
|
+
*/
|
|
25430
|
+
checkPrivateFields: boolean;
|
|
25431
|
+
|
|
25432
|
+
/**
|
|
25433
|
+
* whether nodes carry `loc`
|
|
25434
|
+
*/
|
|
25435
|
+
locations: boolean;
|
|
25436
|
+
|
|
25437
|
+
/**
|
|
25438
|
+
* where the first offset falls
|
|
25439
|
+
*/
|
|
25440
|
+
startLocation: null | { line: number; column: number };
|
|
25441
|
+
|
|
25442
|
+
/**
|
|
25443
|
+
* where tokens are reported
|
|
25444
|
+
*/
|
|
25445
|
+
onToken: null | ((token?: any) => void);
|
|
25446
|
+
|
|
25447
|
+
/**
|
|
25448
|
+
* where comments are reported
|
|
25449
|
+
*/
|
|
25450
|
+
onComment:
|
|
25451
|
+
| null
|
|
25452
|
+
| ((
|
|
25453
|
+
isBlock: boolean,
|
|
25454
|
+
text: string,
|
|
25455
|
+
start: number,
|
|
25456
|
+
end: number,
|
|
25457
|
+
startLoc?: null | Position,
|
|
25458
|
+
endLoc?: null | Position
|
|
25459
|
+
) => void);
|
|
25460
|
+
|
|
25461
|
+
/**
|
|
25462
|
+
* whether nodes carry `range`
|
|
25463
|
+
*/
|
|
25464
|
+
ranges: boolean;
|
|
25465
|
+
|
|
25466
|
+
/**
|
|
25467
|
+
* a program node to append to
|
|
25468
|
+
*/
|
|
25469
|
+
program: null | NodeLike;
|
|
25470
|
+
|
|
25471
|
+
/**
|
|
25472
|
+
* the name errors and locations carry
|
|
25473
|
+
*/
|
|
25474
|
+
sourceFile: null | string;
|
|
25475
|
+
|
|
25476
|
+
/**
|
|
25477
|
+
* the name every node carries
|
|
25478
|
+
*/
|
|
25479
|
+
directSourceFile: null | string;
|
|
25480
|
+
|
|
25481
|
+
/**
|
|
25482
|
+
* whether parentheses become nodes
|
|
25483
|
+
*/
|
|
25484
|
+
preserveParens: boolean;
|
|
25485
|
+
}
|
|
24559
25486
|
declare abstract class Resolver {
|
|
24560
25487
|
fileSystem: FileSystem;
|
|
24561
25488
|
options: ResolveOptionsResolverFactoryObject1;
|
|
@@ -25330,6 +26257,12 @@ declare class RuntimeModule extends Module {
|
|
|
25330
26257
|
*/
|
|
25331
26258
|
attach(compilation: Compilation, chunk: Chunk, chunkGraph?: ChunkGraph): void;
|
|
25332
26259
|
|
|
26260
|
+
/**
|
|
26261
|
+
* The `[handlerMap, key]` pairs this module installs onto a chunk handler map
|
|
26262
|
+
* such as `__webpack_require__.f`, or `null` where it cannot name them.
|
|
26263
|
+
*/
|
|
26264
|
+
getInstalledChunkHandlers(): null | [string, string][];
|
|
26265
|
+
|
|
25333
26266
|
/**
|
|
25334
26267
|
* Generates runtime code for this runtime module.
|
|
25335
26268
|
*/
|
|
@@ -25347,6 +26280,11 @@ declare class RuntimeModule extends Module {
|
|
|
25347
26280
|
*/
|
|
25348
26281
|
shouldIsolate(): boolean;
|
|
25349
26282
|
|
|
26283
|
+
/**
|
|
26284
|
+
* The answer a runtime module gives when it installs no chunk handler at all
|
|
26285
|
+
*/
|
|
26286
|
+
static NO_CHUNK_HANDLERS: [string, string][];
|
|
26287
|
+
|
|
25350
26288
|
/**
|
|
25351
26289
|
* Runtime modules without any dependencies to other runtime modules
|
|
25352
26290
|
*/
|
|
@@ -25497,6 +26435,7 @@ declare abstract class RuntimeTemplate {
|
|
|
25497
26435
|
supportsArrowFunction(): boolean;
|
|
25498
26436
|
supportsAsyncFunction(): boolean;
|
|
25499
26437
|
supportsGenerator(): boolean;
|
|
26438
|
+
supportsTopLevelAwait(): boolean;
|
|
25500
26439
|
supportsOptionalChaining(): boolean;
|
|
25501
26440
|
supportsSpread(): boolean;
|
|
25502
26441
|
supportsObjectHasOwn(): boolean;
|
|
@@ -25510,6 +26449,19 @@ declare abstract class RuntimeTemplate {
|
|
|
25510
26449
|
supportsSourceImport(): boolean;
|
|
25511
26450
|
supportsModulePreload(): boolean;
|
|
25512
26451
|
|
|
26452
|
+
/**
|
|
26453
|
+
* Whether the deferred fill rewrote a chunk whose hashed name would otherwise go
|
|
26454
|
+
* stale, which `RealContentHashPlugin` reads to run — and to repair `[chunkhash]`
|
|
26455
|
+
* names — where `optimization.realContentHash` did not ask for it.
|
|
26456
|
+
*/
|
|
26457
|
+
needsAnalyzableRepair(): boolean;
|
|
26458
|
+
|
|
26459
|
+
/**
|
|
26460
|
+
* The assets the deferred fill rewrote under a name that has to be repaired: an
|
|
26461
|
+
* on-demand repair renames only these and whatever names them.
|
|
26462
|
+
*/
|
|
26463
|
+
analyzableRepairedAssets(): ReadonlySet<string>;
|
|
26464
|
+
|
|
25513
26465
|
/**
|
|
25514
26466
|
* Whether a reference a foreign bundler can follow without running webpack's runtime
|
|
25515
26467
|
* may be emitted — the one question every caller asks, in the form it is asking for:
|
|
@@ -25533,6 +26485,30 @@ declare abstract class RuntimeTemplate {
|
|
|
25533
26485
|
runtime?: RuntimeSpec
|
|
25534
26486
|
): boolean;
|
|
25535
26487
|
|
|
26488
|
+
/**
|
|
26489
|
+
* Names the module whose code generation starts, so the reasons its references
|
|
26490
|
+
* record are handed back by `finishAnalyzableBailouts` and attributed to it.
|
|
26491
|
+
*/
|
|
26492
|
+
beginAnalyzableBailouts(module: Module): void;
|
|
26493
|
+
|
|
26494
|
+
/**
|
|
26495
|
+
* Ends the collection `beginAnalyzableBailouts` started, so the reasons can be
|
|
26496
|
+
* stored beside the result and reapplied when the cache restores it.
|
|
26497
|
+
*/
|
|
26498
|
+
finishAnalyzableBailouts(): undefined | string[];
|
|
26499
|
+
|
|
26500
|
+
/**
|
|
26501
|
+
* Reapplies the bailouts a cached code generation result was stored with, so a
|
|
26502
|
+
* restored module reports the same reasons a generated one does.
|
|
26503
|
+
*/
|
|
26504
|
+
restoreAnalyzableBailouts(module: Module, reasons: string[]): void;
|
|
26505
|
+
|
|
26506
|
+
/**
|
|
26507
|
+
* The reasons a module's references keep the runtime form, as recorded while its
|
|
26508
|
+
* code was generated.
|
|
26509
|
+
*/
|
|
26510
|
+
analyzableBailoutsOf(module: Module): string[];
|
|
26511
|
+
|
|
25536
26512
|
/**
|
|
25537
26513
|
* Builds the analyzable `new URL(specifier, import.meta.url)` expression the ESM
|
|
25538
26514
|
* wasm/asset loader backends use to reference an emitted binary relative to the
|
|
@@ -26095,30 +27071,16 @@ declare abstract class RuntimeTemplate {
|
|
|
26095
27071
|
*/
|
|
26096
27072
|
runtimeRequirements: Set<string>;
|
|
26097
27073
|
/**
|
|
26098
|
-
* the module the `import()` is emitted into
|
|
27074
|
+
* the module the `import()` is emitted into, to report against
|
|
26099
27075
|
*/
|
|
26100
27076
|
originModule?: Module;
|
|
26101
27077
|
}): string;
|
|
26102
27078
|
|
|
26103
|
-
/**
|
|
26104
|
-
* For ESM module output, load a single statically-named chunk through the
|
|
26105
|
-
* `analyzableChunkImport` helper — a literal `import("./chunk.js")` other bundlers
|
|
26106
|
-
* and webpack itself can follow, wrapped to keep `ensureChunk` timing and deduplication.
|
|
26107
|
-
* Returns `null` to fall back to the runtime `ensureChunk` form.
|
|
26108
|
-
*/
|
|
26109
|
-
analyzableChunkImport(
|
|
26110
|
-
chunk: Chunk,
|
|
26111
|
-
comment: string,
|
|
26112
|
-
runtimeRequirements: Set<string>,
|
|
26113
|
-
originModule: undefined | Module,
|
|
26114
|
-
chunkGraph: ChunkGraph
|
|
26115
|
-
): null | string;
|
|
26116
|
-
|
|
26117
27079
|
/**
|
|
26118
27080
|
* The `../` path from a chunk's own asset back to the output root. Hashes are
|
|
26119
27081
|
* neutralized first: a runtime module is generated once to be hashed, before any
|
|
26120
27082
|
* hash exists, so resolving one there throws — and `RuntimeModule.updateHash`
|
|
26121
|
-
*
|
|
27083
|
+
* lets that throw fail the build rather than hashing it.
|
|
26122
27084
|
*/
|
|
26123
27085
|
chunkRootOutputDir(chunk: Chunk, enforceRelative: boolean): string;
|
|
26124
27086
|
|
|
@@ -26132,32 +27094,30 @@ declare abstract class RuntimeTemplate {
|
|
|
26132
27094
|
overridePublicPath: undefined | string,
|
|
26133
27095
|
chunk: Chunk,
|
|
26134
27096
|
module: Module,
|
|
26135
|
-
chunkGraph: ChunkGraph
|
|
26136
|
-
runtimeRequirements: Set<string>
|
|
27097
|
+
chunkGraph: ChunkGraph
|
|
26137
27098
|
): null | string;
|
|
26138
27099
|
|
|
26139
27100
|
/**
|
|
26140
27101
|
* Static `new URL(<file>, import.meta.url)` for every stylesheet a runtime can load,
|
|
26141
|
-
* keyed by chunk id
|
|
26142
|
-
*
|
|
27102
|
+
* keyed by chunk id, or `null` when they have to keep the runtime
|
|
27103
|
+
* `publicPath + getChunkCssFilename(id)` form. Both the runtime module reading them
|
|
26143
27104
|
* and the plugin declaring what it needs ask this, so the two always agree. The
|
|
26144
27105
|
* runtime hands an absolute url string to `link.href`, and so does this — the browser
|
|
26145
27106
|
* resolves the element against the document, which is not where the chunk sits, and
|
|
26146
|
-
* the loader reads the url as text either way.
|
|
26147
|
-
* that also carries the hot handler; see below.
|
|
27107
|
+
* the loader reads the url as text either way.
|
|
26148
27108
|
*/
|
|
26149
27109
|
analyzableCssChunkUrls(
|
|
26150
27110
|
runtimeChunk: Chunk,
|
|
26151
27111
|
chunkGraph: ChunkGraph,
|
|
26152
27112
|
runtimeRequirements: ReadonlySet<string>,
|
|
26153
27113
|
consumingModule?: Module
|
|
26154
|
-
): null |
|
|
27114
|
+
): null | Map<ChunkId, string>;
|
|
26155
27115
|
|
|
26156
27116
|
/**
|
|
26157
27117
|
* Static `new URL(<file>, import.meta.url).href` for every javascript chunk a
|
|
26158
27118
|
* runtime can hint at with `<link rel="prefetch"/"modulepreload">`, keyed by chunk
|
|
26159
|
-
* id
|
|
26160
|
-
*
|
|
27119
|
+
* id, or `null` when they have to keep the runtime
|
|
27120
|
+
* `publicPath + getChunkScriptFilename(id)` form. Both the runtime module reading
|
|
26161
27121
|
* them and the plugin declaring what it needs ask this, so the two always agree.
|
|
26162
27122
|
*/
|
|
26163
27123
|
analyzableChunkScriptUrls(
|
|
@@ -26165,7 +27125,37 @@ declare abstract class RuntimeTemplate {
|
|
|
26165
27125
|
chunkGraph: ChunkGraph,
|
|
26166
27126
|
runtimeRequirements: ReadonlySet<string>,
|
|
26167
27127
|
consumingModule?: Module
|
|
26168
|
-
): null |
|
|
27128
|
+
): null | Map<ChunkId, string>;
|
|
27129
|
+
|
|
27130
|
+
/**
|
|
27131
|
+
* Records that this runtime reads its chunks some way other than a native
|
|
27132
|
+
* `import()`, so no literal can name what it loads. Recorded on the entries that
|
|
27133
|
+
* chose it, which is where the setting behind it lives.
|
|
27134
|
+
*/
|
|
27135
|
+
reportChunkImportBailout(chunk: Chunk, chunkGraph: ChunkGraph): void;
|
|
27136
|
+
|
|
27137
|
+
/**
|
|
27138
|
+
* Whether the loader still needs to build a url from a chunk id, which is the case
|
|
27139
|
+
* for a chunk it can be asked for that `analyzableChunkImports` leaves unnamed: one
|
|
27140
|
+
* carrying a runtime of its own, or one a second entrypoint has at startup.
|
|
27141
|
+
*/
|
|
27142
|
+
chunkImportsNeedRuntimeUrl(
|
|
27143
|
+
runtimeChunk: Chunk,
|
|
27144
|
+
chunkGraph: ChunkGraph
|
|
27145
|
+
): boolean;
|
|
27146
|
+
|
|
27147
|
+
/**
|
|
27148
|
+
* A literal `import()` specifier for every javascript chunk a runtime loads on
|
|
27149
|
+
* demand, keyed by chunk id, or `null` when one of them cannot be named here. The
|
|
27150
|
+
* map is written into the runtime chunk rather than at each import site, so a
|
|
27151
|
+
* hashed chunk name reaches no module that imports it.
|
|
27152
|
+
*/
|
|
27153
|
+
analyzableChunkImports(
|
|
27154
|
+
runtimeChunk: Chunk,
|
|
27155
|
+
chunkGraph: ChunkGraph,
|
|
27156
|
+
runtimeRequirements: ReadonlySet<string>,
|
|
27157
|
+
consumingModule?: Module
|
|
27158
|
+
): null | Map<ChunkId, string>;
|
|
26169
27159
|
|
|
26170
27160
|
/**
|
|
26171
27161
|
* Static `new URL(<file>, import.meta.url)` for the binary emitted for an async wasm
|
|
@@ -26267,17 +27257,45 @@ declare interface RuntimeValueOptions {
|
|
|
26267
27257
|
version?: string | (() => string);
|
|
26268
27258
|
}
|
|
26269
27259
|
|
|
27260
|
+
/**
|
|
27261
|
+
* Helper function for joining two ranges into a single range. This is useful
|
|
27262
|
+
* when working with AST nodes, as it allows you to combine the ranges of child nodes
|
|
27263
|
+
* to create the range of the _parent node_.
|
|
27264
|
+
*/
|
|
27265
|
+
declare interface ScopeInfo {
|
|
27266
|
+
definitions: StackedMap<string, VariableInfo | ScopeInfo>;
|
|
27267
|
+
topLevelScope: boolean | "arrow";
|
|
27268
|
+
inShorthand: string | boolean;
|
|
27269
|
+
inTaggedTemplateTag: boolean;
|
|
27270
|
+
inTry: boolean;
|
|
27271
|
+
isStrict: boolean;
|
|
27272
|
+
isAsmJs: boolean;
|
|
27273
|
+
terminated?: 1 | 2;
|
|
27274
|
+
}
|
|
27275
|
+
|
|
27276
|
+
/**
|
|
27277
|
+
* One lexical scope, holding the names declared directly in it. Each set is
|
|
27278
|
+
* built only once a name goes into it, which most scopes never do.
|
|
27279
|
+
*/
|
|
27280
|
+
declare abstract class ScopeParser {
|
|
27281
|
+
flags: number;
|
|
27282
|
+
var?: Set<string>;
|
|
27283
|
+
lexical?: Set<string>;
|
|
27284
|
+
functions?: Set<string>;
|
|
27285
|
+
firstLexical?: string;
|
|
27286
|
+
}
|
|
27287
|
+
|
|
26270
27288
|
/**
|
|
26271
27289
|
* A lexical scope. One shape for every kind, so the property loads in the
|
|
26272
27290
|
* resolution loop stay monomorphic.
|
|
26273
27291
|
*/
|
|
26274
|
-
declare abstract class
|
|
27292
|
+
declare abstract class ScopeScopeAnalyzer {
|
|
26275
27293
|
type: ScopeType;
|
|
26276
27294
|
block: NodeEstreeIndex;
|
|
26277
|
-
upper: null |
|
|
26278
|
-
childScopes:
|
|
27295
|
+
upper: null | ScopeScopeAnalyzer;
|
|
27296
|
+
childScopes: ScopeScopeAnalyzer[];
|
|
26279
27297
|
variables: Variable[];
|
|
26280
|
-
variableScope:
|
|
27298
|
+
variableScope: ScopeScopeAnalyzer;
|
|
26281
27299
|
|
|
26282
27300
|
/**
|
|
26283
27301
|
* For a function scope with parameters, the offset where its body
|
|
@@ -26289,22 +27307,6 @@ declare abstract class Scope {
|
|
|
26289
27307
|
paramBoundary: number;
|
|
26290
27308
|
getBinding(name: string): undefined | Variable;
|
|
26291
27309
|
}
|
|
26292
|
-
|
|
26293
|
-
/**
|
|
26294
|
-
* Helper function for joining two ranges into a single range. This is useful
|
|
26295
|
-
* when working with AST nodes, as it allows you to combine the ranges of child nodes
|
|
26296
|
-
* to create the range of the _parent node_.
|
|
26297
|
-
*/
|
|
26298
|
-
declare interface ScopeInfo {
|
|
26299
|
-
definitions: StackedMap<string, VariableInfo | ScopeInfo>;
|
|
26300
|
-
topLevelScope: boolean | "arrow";
|
|
26301
|
-
inShorthand: string | boolean;
|
|
26302
|
-
inTaggedTemplateTag: boolean;
|
|
26303
|
-
inTry: boolean;
|
|
26304
|
-
isStrict: boolean;
|
|
26305
|
-
isAsmJs: boolean;
|
|
26306
|
-
terminated?: 1 | 2;
|
|
26307
|
-
}
|
|
26308
27310
|
type ScopeType =
|
|
26309
27311
|
| "function"
|
|
26310
27312
|
| "module"
|
|
@@ -26896,6 +27898,15 @@ declare interface SourceLike {
|
|
|
26896
27898
|
*/
|
|
26897
27899
|
clearCache?: (options?: ClearCacheOptions, visited?: WeakSet<Source>) => void;
|
|
26898
27900
|
}
|
|
27901
|
+
|
|
27902
|
+
/**
|
|
27903
|
+
* The `loc` a node carries when `options.locations` is on.
|
|
27904
|
+
*/
|
|
27905
|
+
declare abstract class SourceLocationParser {
|
|
27906
|
+
start?: null | PositionLike;
|
|
27907
|
+
end?: null | PositionLike;
|
|
27908
|
+
source: any;
|
|
27909
|
+
}
|
|
26899
27910
|
declare interface SourceMap {
|
|
26900
27911
|
version: 3;
|
|
26901
27912
|
file: string;
|
|
@@ -27506,7 +28517,7 @@ declare abstract class StackedMap<K, V> {
|
|
|
27506
28517
|
}
|
|
27507
28518
|
|
|
27508
28519
|
/**
|
|
27509
|
-
* Updates
|
|
28520
|
+
* Updates map size using the provided map.
|
|
27510
28521
|
*/
|
|
27511
28522
|
declare interface StarListDeserializerContext {
|
|
27512
28523
|
read: () => HarmonyExportImportedSpecifierDependency[];
|
|
@@ -27515,7 +28526,7 @@ declare interface StarListDeserializerContext {
|
|
|
27515
28526
|
}
|
|
27516
28527
|
|
|
27517
28528
|
/**
|
|
27518
|
-
* Updates
|
|
28529
|
+
* Updates map size using the provided map.
|
|
27519
28530
|
*/
|
|
27520
28531
|
declare interface StarListSerializerContext {
|
|
27521
28532
|
write: (
|
|
@@ -28635,16 +29646,25 @@ declare interface TimestampAndHash {
|
|
|
28635
29646
|
timestamp?: number;
|
|
28636
29647
|
hash: string;
|
|
28637
29648
|
}
|
|
28638
|
-
|
|
28639
|
-
|
|
28640
|
-
|
|
28641
|
-
|
|
28642
|
-
|
|
28643
|
-
|
|
28644
|
-
|
|
28645
|
-
|
|
28646
|
-
|
|
28647
|
-
|
|
29649
|
+
declare interface TokContextLike {
|
|
29650
|
+
token: string;
|
|
29651
|
+
isExpr: boolean;
|
|
29652
|
+
preserveSpace?: boolean;
|
|
29653
|
+
override?: any;
|
|
29654
|
+
generator?: boolean;
|
|
29655
|
+
}
|
|
29656
|
+
|
|
29657
|
+
/**
|
|
29658
|
+
* A token as `options.onToken` receives one.
|
|
29659
|
+
*/
|
|
29660
|
+
declare abstract class TokenParser {
|
|
29661
|
+
type: any;
|
|
29662
|
+
value: any;
|
|
29663
|
+
start: any;
|
|
29664
|
+
end: any;
|
|
29665
|
+
loc?: SourceLocationParser;
|
|
29666
|
+
range?: any[];
|
|
29667
|
+
}
|
|
28648
29668
|
|
|
28649
29669
|
/**
|
|
28650
29670
|
* Position-based view over the lexer — webpack's stand-in for the spec's
|
|
@@ -28707,6 +29727,12 @@ declare class TokenStream {
|
|
|
28707
29727
|
*/
|
|
28708
29728
|
advance(): void;
|
|
28709
29729
|
|
|
29730
|
+
/**
|
|
29731
|
+
* Step over the whitespace the next token would be, without tokenizing it —
|
|
29732
|
+
* for the sites that discard whitespace tokens. No-op while a token is cached.
|
|
29733
|
+
*/
|
|
29734
|
+
skipWhitespace(): void;
|
|
29735
|
+
|
|
28710
29736
|
/**
|
|
28711
29737
|
* Mark (CSS Syntax §3 "mark") — push the current cursor position.
|
|
28712
29738
|
*/
|
|
@@ -28724,6 +29750,34 @@ declare class TokenStream {
|
|
|
28724
29750
|
*/
|
|
28725
29751
|
discardMark(): void;
|
|
28726
29752
|
}
|
|
29753
|
+
type TokenSyntax = NodeSyntax & {
|
|
29754
|
+
value: string;
|
|
29755
|
+
unescaped: string;
|
|
29756
|
+
numericValue: number;
|
|
29757
|
+
typeFlag: "number" | "id" | "integer" | "unrestricted";
|
|
29758
|
+
sign: "" | "+" | "-";
|
|
29759
|
+
unit: string;
|
|
29760
|
+
contentStart: number;
|
|
29761
|
+
contentEnd: number;
|
|
29762
|
+
};
|
|
29763
|
+
|
|
29764
|
+
/**
|
|
29765
|
+
* A token's kind, carrying what the parser needs to know about it without
|
|
29766
|
+
* re-inspecting the source: whether an expression may follow, its binary
|
|
29767
|
+
* precedence, and how it updates the tokenizer's context.
|
|
29768
|
+
*/
|
|
29769
|
+
declare abstract class TokenType {
|
|
29770
|
+
label: string;
|
|
29771
|
+
keyword?: string;
|
|
29772
|
+
beforeExpr: boolean;
|
|
29773
|
+
startsExpr: boolean;
|
|
29774
|
+
isLoop: boolean;
|
|
29775
|
+
isAssign: boolean;
|
|
29776
|
+
prefix: boolean;
|
|
29777
|
+
postfix: boolean;
|
|
29778
|
+
binop: null | number;
|
|
29779
|
+
updateContext: null | ((prevType: TokenType) => void);
|
|
29780
|
+
}
|
|
28727
29781
|
declare class TopLevelSymbol {
|
|
28728
29782
|
/**
|
|
28729
29783
|
* Creates an instance of TopLevelSymbol.
|
|
@@ -28917,17 +29971,17 @@ declare interface UserAliasOptions {
|
|
|
28917
29971
|
}
|
|
28918
29972
|
declare interface UserTsconfigOptions {
|
|
28919
29973
|
/**
|
|
28920
|
-
* A path, or `file:`
|
|
29974
|
+
* A path, or `file:` URL, pointing at the tsconfig file
|
|
28921
29975
|
*/
|
|
28922
29976
|
configFile?: string | URL_url;
|
|
28923
29977
|
|
|
28924
29978
|
/**
|
|
28925
|
-
* References to other tsconfig files. 'auto' inherits from TypeScript config, or an array of relative/absolute paths or `file:`
|
|
29979
|
+
* References to other tsconfig files. 'auto' inherits from TypeScript config, or an array of relative/absolute paths or `file:` URLs
|
|
28926
29980
|
*/
|
|
28927
29981
|
references?: "auto" | (string | URL_url)[];
|
|
28928
29982
|
|
|
28929
29983
|
/**
|
|
28930
|
-
* Override baseUrl from tsconfig.json with a path or `file:`
|
|
29984
|
+
* Override baseUrl from tsconfig.json with a path or `file:` URL
|
|
28931
29985
|
*/
|
|
28932
29986
|
baseUrl?: string | URL_url;
|
|
28933
29987
|
}
|
|
@@ -28944,7 +29998,7 @@ declare abstract class Variable {
|
|
|
28944
29998
|
name: string;
|
|
28945
29999
|
identifiers: Identifier[];
|
|
28946
30000
|
references: Reference[];
|
|
28947
|
-
scope:
|
|
30001
|
+
scope: ScopeScopeAnalyzer;
|
|
28948
30002
|
}
|
|
28949
30003
|
declare class VariableInfo {
|
|
28950
30004
|
/**
|
|
@@ -29972,34 +31026,6 @@ declare interface chunkModuleHashMap {
|
|
|
29972
31026
|
[index: number]: string;
|
|
29973
31027
|
[index: string]: string;
|
|
29974
31028
|
}
|
|
29975
|
-
type ecmaVersion =
|
|
29976
|
-
| 3
|
|
29977
|
-
| 5
|
|
29978
|
-
| 6
|
|
29979
|
-
| 7
|
|
29980
|
-
| 8
|
|
29981
|
-
| 9
|
|
29982
|
-
| 10
|
|
29983
|
-
| 11
|
|
29984
|
-
| 12
|
|
29985
|
-
| 13
|
|
29986
|
-
| 14
|
|
29987
|
-
| 15
|
|
29988
|
-
| 16
|
|
29989
|
-
| 17
|
|
29990
|
-
| 2015
|
|
29991
|
-
| 2016
|
|
29992
|
-
| 2017
|
|
29993
|
-
| 2018
|
|
29994
|
-
| 2019
|
|
29995
|
-
| 2020
|
|
29996
|
-
| 2021
|
|
29997
|
-
| 2022
|
|
29998
|
-
| 2023
|
|
29999
|
-
| 2024
|
|
30000
|
-
| 2025
|
|
30001
|
-
| 2026
|
|
30002
|
-
| "latest";
|
|
30003
31029
|
declare function exports(
|
|
30004
31030
|
options: Configuration,
|
|
30005
31031
|
callback: CallbackWebpackFunction_2<Stats, void>
|
|
@@ -30125,7 +31151,6 @@ declare namespace exports {
|
|
|
30125
31151
|
export namespace RuntimeGlobals {
|
|
30126
31152
|
export let amdDefine: "__webpack_require__.amdD";
|
|
30127
31153
|
export let amdOptions: "__webpack_require__.amdO";
|
|
30128
|
-
export let analyzableChunkImport: "__webpack_require__.ei";
|
|
30129
31154
|
export let asyncModule: "__webpack_require__.a";
|
|
30130
31155
|
export let asyncModuleDoneSymbol: "__webpack_require__.aD";
|
|
30131
31156
|
export let asyncModuleExportSymbol: "__webpack_require__.aE";
|
|
@@ -30168,7 +31193,10 @@ declare namespace exports {
|
|
|
30168
31193
|
export let harmonyModuleDecorator: "__webpack_require__.hmd";
|
|
30169
31194
|
export let hasCssModules: "has css modules";
|
|
30170
31195
|
export let hasFetchPriority: "has fetch priority";
|
|
31196
|
+
export let hasChunkPriority: "has chunk priority";
|
|
30171
31197
|
export let hasOwnProperty: "__webpack_require__.o";
|
|
31198
|
+
export let hasSealedDeferredNamespace: "has sealed deferred namespace";
|
|
31199
|
+
export let hasSynthesizedDeferredNamespace: "has synthesized deferred namespace";
|
|
30172
31200
|
export let hmrDownloadManifest: "__webpack_require__.hmrM";
|
|
30173
31201
|
export let hmrDownloadUpdateHandlers: "__webpack_require__.hmrC";
|
|
30174
31202
|
export let hmrInvalidateModuleHandlers: "__webpack_require__.hmrI";
|
|
@@ -30204,6 +31232,7 @@ declare namespace exports {
|
|
|
30204
31232
|
export let scriptNonce: "__webpack_require__.nc";
|
|
30205
31233
|
export let setAnonymousDefaultName: "__webpack_require__.dn";
|
|
30206
31234
|
export let shareScopeMap: "__webpack_require__.S";
|
|
31235
|
+
export let specNamespaceObject: "__webpack_require__.ns";
|
|
30207
31236
|
export let startup: "__webpack_require__.x";
|
|
30208
31237
|
export let startupAssetHints: "__webpack_require__.SAH";
|
|
30209
31238
|
export let startupEntrypoint: "__webpack_require__.X";
|
|
@@ -30235,7 +31264,7 @@ declare namespace exports {
|
|
|
30235
31264
|
export const applyWebpackOptionsDefaults: (
|
|
30236
31265
|
options: WebpackOptionsNormalized,
|
|
30237
31266
|
compilerIndex?: number
|
|
30238
|
-
) =>
|
|
31267
|
+
) => ResolvedOptionsDefaults;
|
|
30239
31268
|
}
|
|
30240
31269
|
export namespace dependencies {
|
|
30241
31270
|
export {
|
|
@@ -30459,6 +31488,38 @@ declare namespace exports {
|
|
|
30459
31488
|
errors?: (string | Error)[];
|
|
30460
31489
|
}[]
|
|
30461
31490
|
) => { warnings?: (string | Error)[]; errors?: (string | Error)[] };
|
|
31491
|
+
export function cssMinify(
|
|
31492
|
+
input: { [index: string]: string | Buffer },
|
|
31493
|
+
sourceMap?: object,
|
|
31494
|
+
minimizerOptions?: {
|
|
31495
|
+
as?: "stylesheet" | "block-contents";
|
|
31496
|
+
environment?: CssEnvironment;
|
|
31497
|
+
convertLengthUnits?: boolean;
|
|
31498
|
+
mergeDistantRules?: boolean;
|
|
31499
|
+
rewriteCustomProperties?: boolean;
|
|
31500
|
+
unusedSymbols?: string[];
|
|
31501
|
+
pseudoClasses?: { [index: string]: string };
|
|
31502
|
+
renderEmbeddedSource?: (
|
|
31503
|
+
source: string,
|
|
31504
|
+
info: { type: string; hostType: string }
|
|
31505
|
+
) =>
|
|
31506
|
+
| undefined
|
|
31507
|
+
| string
|
|
31508
|
+
| EmbeddedSourceResult
|
|
31509
|
+
| Promise<undefined | string | EmbeddedSourceResult>;
|
|
31510
|
+
} & CssTransformOptions
|
|
31511
|
+
): Promise<{
|
|
31512
|
+
code: string;
|
|
31513
|
+
map?: SourceMap;
|
|
31514
|
+
warnings?: (string | Error)[];
|
|
31515
|
+
errors?: (string | Error)[];
|
|
31516
|
+
}>;
|
|
31517
|
+
export namespace cssMinify {
|
|
31518
|
+
export let supportsWorkerThreads: () => boolean;
|
|
31519
|
+
export let getTypes: () => string[];
|
|
31520
|
+
export let getEmbeddedTypes: () => string[];
|
|
31521
|
+
export let filter: (name: string) => boolean;
|
|
31522
|
+
}
|
|
30462
31523
|
export let embeddedText: (
|
|
30463
31524
|
answer?: string | { code?: string }
|
|
30464
31525
|
) => undefined | string;
|
|
@@ -30483,7 +31544,7 @@ declare namespace exports {
|
|
|
30483
31544
|
input: string | TokenStream,
|
|
30484
31545
|
pos?: number,
|
|
30485
31546
|
options?: ParseOptionsSyntax
|
|
30486
|
-
) => undefined |
|
|
31547
|
+
) => undefined | TokenSyntax | FunctionNode | SimpleBlock;
|
|
30487
31548
|
export let parseADeclaration: (
|
|
30488
31549
|
input: string | TokenStream,
|
|
30489
31550
|
pos?: number,
|
|
@@ -30711,7 +31772,12 @@ declare namespace exports {
|
|
|
30711
31772
|
parentOf(n?: number): number;
|
|
30712
31773
|
children(n?: number): number[];
|
|
30713
31774
|
};
|
|
31775
|
+
export let BLOCK_CONTENTS: "block-contents";
|
|
31776
|
+
export let CLASSIC_SCRIPT: "script";
|
|
30714
31777
|
export let EMBEDDED_LANGUAGES: string[];
|
|
31778
|
+
export let EVENT_HANDLER: "event-handler";
|
|
31779
|
+
export let JSON_TYPE: "json";
|
|
31780
|
+
export let MODULE_SCRIPT: "module";
|
|
30715
31781
|
export let NS_HTML: 0;
|
|
30716
31782
|
export let NS_MATHML: 1;
|
|
30717
31783
|
export let NS_SVG: 2;
|
|
@@ -30755,6 +31821,12 @@ declare namespace exports {
|
|
|
30755
31821
|
}
|
|
30756
31822
|
) => string;
|
|
30757
31823
|
export let buildHeadTags: (opts: OutputHtmlOptions) => string;
|
|
31824
|
+
export let builtinEmbeddedRenderer: (
|
|
31825
|
+
options?: BuiltinEmbeddedRendererOptions
|
|
31826
|
+
) => (
|
|
31827
|
+
source: string,
|
|
31828
|
+
info: { type: string; hostType: string; as?: string }
|
|
31829
|
+
) => undefined | string;
|
|
30758
31830
|
export let collectEmbeddedDiagnostics: (
|
|
30759
31831
|
reported: {
|
|
30760
31832
|
warnings?: (string | Error)[];
|
|
@@ -30771,6 +31843,41 @@ declare namespace exports {
|
|
|
30771
31843
|
minimal?: boolean
|
|
30772
31844
|
) => string;
|
|
30773
31845
|
export let escapeText: (s: string) => string;
|
|
31846
|
+
export function htmlMinify(
|
|
31847
|
+
input: { [index: string]: string | Buffer },
|
|
31848
|
+
sourceMap?: RawSourceMap,
|
|
31849
|
+
minimizerOptions?: Omit<
|
|
31850
|
+
HtmlPrintOptions,
|
|
31851
|
+
"renderEmbeddedSource" | "deferEmbeddedSource"
|
|
31852
|
+
> & {
|
|
31853
|
+
environment?: CssEnvironment;
|
|
31854
|
+
css?: {
|
|
31855
|
+
convertLengthUnits?: boolean;
|
|
31856
|
+
rewriteCustomProperties?: boolean;
|
|
31857
|
+
unusedSymbols?: string[];
|
|
31858
|
+
pseudoClasses?: { [index: string]: string };
|
|
31859
|
+
};
|
|
31860
|
+
minifyConditionalComments?: boolean;
|
|
31861
|
+
renderEmbeddedSource?: (
|
|
31862
|
+
source: string,
|
|
31863
|
+
info: { type: string; hostType: string; as?: string }
|
|
31864
|
+
) =>
|
|
31865
|
+
| undefined
|
|
31866
|
+
| string
|
|
31867
|
+
| EmbeddedSourceResult
|
|
31868
|
+
| Promise<undefined | string | EmbeddedSourceResult>;
|
|
31869
|
+
}
|
|
31870
|
+
): Promise<{
|
|
31871
|
+
code: string;
|
|
31872
|
+
warnings?: (string | Error)[];
|
|
31873
|
+
errors?: (string | Error)[];
|
|
31874
|
+
}>;
|
|
31875
|
+
export namespace htmlMinify {
|
|
31876
|
+
export let supportsWorkerThreads: () => boolean;
|
|
31877
|
+
export let getTypes: () => string[];
|
|
31878
|
+
export let getEmbeddedTypes: () => string[];
|
|
31879
|
+
export let filter: (name: string) => boolean;
|
|
31880
|
+
}
|
|
30774
31881
|
export let isAsciiWhitespace: (cc: number) => boolean;
|
|
30775
31882
|
export let metaTag: (name: string, content: string) => string;
|
|
30776
31883
|
export let parseCssUrls: (input: string) => [string, number, number][];
|
|
@@ -30927,6 +32034,7 @@ declare namespace exports {
|
|
|
30927
32034
|
HtmlPrintOptions
|
|
30928
32035
|
>
|
|
30929
32036
|
) => string;
|
|
32037
|
+
export let stripJsonWhitespace: (json: string) => string;
|
|
30930
32038
|
export let tokenize: (
|
|
30931
32039
|
input: string,
|
|
30932
32040
|
pos?: number,
|
|
@@ -31251,6 +32359,7 @@ declare namespace exports {
|
|
|
31251
32359
|
ConcatenationScope,
|
|
31252
32360
|
ContextExclusionPlugin,
|
|
31253
32361
|
ContextReplacementPlugin,
|
|
32362
|
+
CopyPlugin,
|
|
31254
32363
|
DefinePlugin,
|
|
31255
32364
|
Dependency,
|
|
31256
32365
|
DynamicEntryPlugin,
|