@depup/webpack 5.110.1-depup.0 → 5.111.1-depup.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 +7 -8
- package/changes.json +7 -11
- package/lib/APIPlugin.js +26 -11
- 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/CompatibilityPlugin.js +3 -4
- package/lib/Compilation.js +337 -338
- package/lib/Compiler.js +213 -51
- package/lib/ConcatenationScope.js +25 -35
- package/lib/ConstPlugin.js +16 -132
- package/lib/CopyPlugin.js +1054 -0
- package/lib/DefinePlugin.js +24 -8
- package/lib/DependencyTemplate.js +2 -1
- package/lib/DotenvPlugin.js +64 -40
- package/lib/ErrorHelpers.js +113 -0
- package/lib/ExportsInfo.js +30 -16
- package/lib/ExternalModule.js +47 -22
- package/lib/FileSystemInfo.js +17 -14
- package/lib/FlagDependencyExportsPlugin.js +53 -34
- package/lib/FlagDependencyUsagePlugin.js +17 -15
- package/lib/Generator.js +24 -2
- package/lib/HotModuleReplacementPlugin.js +55 -7
- package/lib/IgnorePlugin.js +1 -1
- package/lib/JavascriptMetaInfoPlugin.js +5 -3
- package/lib/LoaderOptionsPlugin.js +1 -1
- package/lib/MainTemplate.js +5 -1
- package/lib/Module.js +19 -10
- package/lib/ModuleGraph.js +6 -9
- package/lib/MultiCompiler.js +7 -17
- package/lib/MultiWatching.js +1 -1
- package/lib/NormalModule.js +148 -70
- 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 +1147 -847
- package/lib/SourceMapDevToolPlugin.js +54 -104
- package/lib/TemplatedPathPlugin.js +16 -59
- package/lib/Watching.js +9 -0
- package/lib/WebpackOptionsApply.js +84 -91
- package/lib/asset/AssetBytesGenerator.js +7 -1
- package/lib/asset/AssetGenerator.js +50 -24
- package/lib/asset/AssetModule.js +3 -0
- package/lib/asset/AssetSourceGenerator.js +7 -1
- package/lib/asset/WebManifestParser.js +7 -5
- package/lib/async-modules/AsyncModuleHelpers.js +10 -4
- package/lib/buildChunkGraph.js +11 -15
- package/lib/cache/AddBuildDependenciesPlugin.js +33 -4
- package/lib/cache/IdleFileCachePlugin.js +2 -2
- package/lib/cache/MemoryCachePlugin.js +4 -4
- package/lib/cache/MemoryWithGcCachePlugin.js +7 -8
- package/lib/cache/PackFileCacheStrategy.js +17 -19
- package/lib/cache/getLazyHashedEtag.js +3 -5
- package/lib/config/browserslistTargetHandler.js +17 -4
- package/lib/config/defaults.js +162 -142
- package/lib/config/getClaimedAssetTypes.js +10 -11
- package/lib/config/normalization.js +100 -20
- package/lib/config/target.js +13 -4
- package/lib/container/ContainerReferencePlugin.js +6 -0
- package/lib/container/RemoteRuntimeModule.js +9 -0
- package/lib/container/declaredRemotes.js +39 -0
- package/lib/{ContextExclusionPlugin.js → context/ContextExclusionPlugin.js} +1 -1
- package/lib/{ContextModule.js → context/ContextModule.js} +54 -115
- package/lib/{ContextModuleFactory.js → context/ContextModuleFactory.js} +19 -21
- package/lib/{ContextReplacementPlugin.js → context/ContextReplacementPlugin.js} +4 -4
- package/lib/css/CssGenerator.js +27 -11
- package/lib/css/CssInjectStyleRuntimeModule.js +9 -0
- package/lib/css/CssLoadingRuntimeModule.js +92 -15
- package/lib/css/CssModule.js +1 -1
- package/lib/css/CssModulesPlugin.js +3 -10
- package/lib/css/CssParser.js +162 -31
- package/lib/css/CssServerStylesRuntimeModule.js +9 -0
- package/lib/css/cssMinify.js +43 -32
- package/lib/css/data.js +3526 -871
- package/lib/css/syntax.js +6455 -1237
- package/lib/debug/ProfilingPlugin.js +7 -4
- package/lib/dependencies/AMDDefineDependencyParserPlugin.js +6 -3
- package/lib/dependencies/AMDRuntimeModules.js +18 -0
- package/lib/dependencies/CommonJsExportRequireDependency.js +13 -12
- package/lib/dependencies/CommonJsExportsParserPlugin.js +12 -13
- package/lib/dependencies/CommonJsImportsParserPlugin.js +5 -5
- package/lib/dependencies/CommonJsPlugin.js +19 -3
- package/lib/dependencies/CommonJsRequireDependency.js +32 -9
- package/lib/dependencies/CommonJsSelfReferenceDependency.js +2 -4
- package/lib/dependencies/ContextDependency.js +1 -1
- package/lib/dependencies/ContextDependencyHelpers.js +3 -9
- package/lib/dependencies/ContextDependencyTemplateAsRequireCall.js +20 -7
- package/lib/dependencies/ContextElementDependency.js +1 -1
- package/lib/dependencies/CssIcssExportDependency.js +13 -9
- package/lib/dependencies/CssIcssImportDependency.js +3 -6
- package/lib/dependencies/CssUrlDependency.js +3 -5
- package/lib/dependencies/HarmonyCompatibilityDependency.js +67 -22
- package/lib/dependencies/HarmonyDetectionParserPlugin.js +3 -4
- package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +10 -4
- package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +12 -7
- package/lib/dependencies/HarmonyExportExpressionDependency.js +47 -33
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +217 -34
- package/lib/dependencies/HarmonyExportInitFragment.js +110 -23
- package/lib/dependencies/HarmonyExportSpecifierDependency.js +25 -58
- package/lib/dependencies/HarmonyImportBareSideEffectDependency.js +59 -0
- package/lib/dependencies/HarmonyImportDependency.js +99 -41
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +198 -25
- package/lib/dependencies/HarmonyImportSideEffectDependency.js +117 -4
- package/lib/dependencies/HarmonyImportSpecifierDependency.js +40 -3
- package/lib/dependencies/HarmonyModulesPlugin.js +20 -0
- package/lib/dependencies/HtmlEntryDependency.js +136 -104
- package/lib/dependencies/HtmlInlineScriptDependency.js +3 -4
- package/lib/dependencies/HtmlInlineStyleDependency.js +3 -4
- package/lib/dependencies/ImportContextDependency.js +43 -3
- package/lib/dependencies/ImportDependency.js +8 -29
- package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +1 -1
- package/lib/dependencies/ImportMetaGlobHelpers.js +1 -1
- package/lib/dependencies/ImportMetaMainDependency.js +104 -0
- package/lib/dependencies/ImportMetaPlugin.js +67 -25
- package/lib/dependencies/ImportParserPlugin.js +25 -15
- package/lib/dependencies/LoaderPlugin.js +26 -1
- package/lib/dependencies/RequireContextDependencyParserPlugin.js +1 -1
- package/lib/dependencies/RequireHeaderDependency.js +20 -21
- package/lib/dependencies/SystemRuntimeModule.js +9 -0
- package/lib/dependencies/URLContextDependency.js +1 -1
- package/lib/dependencies/URLDependency.js +6 -5
- package/lib/dependencies/WorkerAndWorkletPlugin.js +16 -21
- package/lib/dependencies/WorkerDependency.js +12 -18
- package/lib/dependencies/WorkletDependency.js +12 -20
- 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/HookWebpackError.js +3 -2
- 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 +21 -5
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +91 -53
- package/lib/hmr/HotModuleReplacement.runtime.js +8 -2
- package/lib/hmr/HotModuleReplacementRuntimeModule.js +9 -0
- package/lib/hmr/LazyCompilationPlugin.js +3 -5
- package/lib/html/HtmlGenerator.js +72 -87
- package/lib/html/HtmlModulesPlugin.js +479 -215
- package/lib/html/HtmlParser.js +110 -147
- package/lib/html/builtinEmbeddedRenderer.js +107 -0
- package/lib/html/data.js +142 -7
- package/lib/html/htmlMinify.js +92 -122
- package/lib/html/syntax.js +2031 -1556
- package/lib/ids/HashedModuleIdsPlugin.js +2 -1
- package/lib/index.js +49 -3
- package/lib/javascript/ChunkFormatHelpers.js +4 -3
- package/lib/javascript/JavascriptGenerator.js +8 -1
- package/lib/javascript/JavascriptModule.js +1 -0
- package/lib/javascript/JavascriptModulesPlugin.js +76 -80
- package/lib/javascript/JavascriptParser.js +1970 -900
- 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 +1500 -0
- package/lib/javascript/regexp.js +1762 -0
- package/lib/javascript/regexpData.js +51 -0
- package/lib/javascript/syntax.js +9061 -5262
- package/lib/json/JsonGenerator.js +7 -1
- package/lib/library/ModuleLibraryPlugin.js +171 -132
- package/lib/loaders/LoaderRunner.js +170 -14
- package/lib/node/NodeWatchFileSystem.js +3 -9
- package/lib/node/ReadFileChunkLoadingRuntimeModule.js +22 -0
- package/lib/node/ReadFileCompileAsyncWasmPlugin.js +8 -15
- package/lib/node/RequireChunkLoadingRuntimeModule.js +22 -0
- package/lib/optimize/AggressiveMergingPlugin.js +3 -5
- package/lib/optimize/ConcatenatedModule.js +222 -125
- package/lib/optimize/ConstExportsPlugin.js +50 -34
- package/lib/optimize/FlagIncludedChunksPlugin.js +3 -11
- package/lib/optimize/InlineExports.js +20 -2
- package/lib/optimize/InnerGraphPlugin.js +7 -13
- package/lib/optimize/LimitChunkCountPlugin.js +5 -8
- package/lib/optimize/MangleExportsPlugin.js +13 -4
- package/lib/optimize/ModuleConcatenationPlugin.js +27 -5
- package/lib/optimize/RealContentHashPlugin.js +179 -44
- package/lib/optimize/SideEffectsFlagPlugin.js +24 -28
- package/lib/optimize/SplitChunksPlugin.js +2 -4
- package/lib/performance/AnalyzableBailoutsPlugin.js +115 -0
- package/lib/performance/BroadContextsPlugin.js +1 -1
- package/lib/performance/CacheEffectivenessPlugin.js +7 -7
- 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/SizeLimitsPlugin.js +2 -4
- 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 +8 -8
- 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 +29 -35
- package/lib/prefetch/ResourceHintRuntimeModule.js +9 -0
- package/lib/prefetch/StartupAssetHintRuntimeModule.js +16 -10
- package/lib/rules/RuleSetCompiler.js +211 -4
- package/lib/runtime/AsyncModuleRuntimeModule.js +103 -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 +12 -4
- 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 +11 -4
- package/lib/runtime/HasOwnPropertyRuntimeModule.js +9 -0
- package/lib/runtime/HelperRuntimeModule.js +10 -0
- package/lib/runtime/MakeDeferredNamespaceObjectRuntime.js +313 -222
- 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/DataUriPlugin.js +3 -6
- package/lib/schemes/HttpUriPlugin.js +22 -5
- package/lib/schemes/VirtualUrlPlugin.js +1 -1
- package/lib/serialization/BinaryMiddleware.js +9 -9
- package/lib/serialization/FileMiddleware.js +31 -18
- package/lib/serialization/ObjectMiddleware.js +168 -139
- 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 +6 -5
- package/lib/stats/DefaultStatsPrinterPlugin.js +3 -0
- package/lib/typescript/TypeScriptPlugin.js +10 -13
- package/lib/url/URLParserPlugin.js +6 -8
- package/lib/util/ArrayQueue.js +3 -3
- package/lib/util/LocConverter.js +4 -7
- package/lib/util/SourceProcessor.js +115 -99
- package/lib/util/URLAbsoluteSpecifier.js +3 -1
- package/lib/util/async.js +292 -0
- package/lib/util/buildDiagnostics.js +69 -0
- package/lib/util/chainedImports.js +3 -4
- package/lib/util/concatenate.js +4 -4
- package/lib/util/conventions.js +5 -1
- package/lib/util/createHooksRegistry.js +1 -2
- package/lib/util/createMappings.js +25 -3
- package/lib/util/dataURL.js +2 -3
- package/lib/util/deterministicGrouping.js +8 -13
- package/lib/util/findGraphRoots.js +6 -13
- package/lib/util/fs.js +27 -1
- package/lib/util/globUtils.js +1 -1
- package/lib/util/handlerKeys.js +40 -0
- package/lib/util/hash/wasm-hash.js +3 -4
- package/lib/util/identifier.js +20 -0
- package/lib/util/internalSerializables.js +7 -1
- package/lib/util/registerExternalSerializer.js +6 -45
- package/lib/util/removeBOM.js +82 -1
- package/lib/util/semver.js +5 -3
- package/lib/wasm-async/AsyncWasmCompileRuntimeModule.js +14 -3
- package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +14 -3
- package/lib/wasm-async/AsyncWebAssemblyGenerator.js +6 -1
- package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +5 -1
- package/lib/wasm-async/UniversalCompileAsyncWasmPlugin.js +7 -12
- package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +12 -4
- package/lib/wasm-sync/WebAssemblyGenerator.js +6 -1
- package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +5 -1
- package/lib/wasm-sync/WebAssemblyUtils.js +2 -4
- package/lib/web/FetchCompileAsyncWasmPlugin.js +10 -6
- package/lib/web/FetchCompileWasmPlugin.js +4 -2
- package/lib/web/JsonpChunkLoadingRuntimeModule.js +36 -0
- package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +19 -0
- package/package.json +55 -46
- 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 +1795 -608
- 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,
|
|
@@ -234,8 +233,11 @@ declare interface AbstractLibraryPluginOptions {
|
|
|
234
233
|
*/
|
|
235
234
|
type: string;
|
|
236
235
|
}
|
|
237
|
-
|
|
238
|
-
|
|
236
|
+
type AdditionalData = AdditionalDataKnown & Record<string, any>;
|
|
237
|
+
declare interface AdditionalDataKnown {
|
|
238
|
+
/**
|
|
239
|
+
* the AST webpack should parse instead of the source
|
|
240
|
+
*/
|
|
239
241
|
webpackAST: object;
|
|
240
242
|
}
|
|
241
243
|
type AfterContextResolveData = ContextResolveData &
|
|
@@ -330,6 +332,26 @@ declare interface AllCodeGenerationSchemas {
|
|
|
330
332
|
*/
|
|
331
333
|
chunkInitFragments: InitFragment<any>[];
|
|
332
334
|
|
|
335
|
+
/**
|
|
336
|
+
* native external reexport source and attributes
|
|
337
|
+
*/
|
|
338
|
+
externalReexport: string;
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* export definitions left out of a javascript module's source on demand (see `KnownMeta.onDemandExports`), to be placed before its body where it is wrapped
|
|
342
|
+
*/
|
|
343
|
+
exportsSource: string;
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* export definitions left out on demand that read the module's own declarations, to be placed after its body where it is wrapped
|
|
347
|
+
*/
|
|
348
|
+
exportsBindingSource: string;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* final name of each used export of a concatenated module whose definitions were left out on demand
|
|
352
|
+
*/
|
|
353
|
+
exportsFinalName: Record<string, string>;
|
|
354
|
+
|
|
333
355
|
/**
|
|
334
356
|
* url for asset modules
|
|
335
357
|
*/
|
|
@@ -358,7 +380,8 @@ declare interface AllCodeGenerationSchemas {
|
|
|
358
380
|
type AnalyzableForm =
|
|
359
381
|
"import" | "url" | "url-runtime" | "url-inline" | "wasm" | "wasm-relative";
|
|
360
382
|
type AnyLoaderContext = NormalModuleLoaderContext<any> &
|
|
361
|
-
|
|
383
|
+
LoaderRunnerMutableContext<any> &
|
|
384
|
+
LoaderRunnerReadonlyContext<any> &
|
|
362
385
|
LoaderPluginLoaderContext &
|
|
363
386
|
HotModuleReplacementPluginLoaderContext;
|
|
364
387
|
|
|
@@ -574,6 +597,28 @@ declare abstract class AssetSourceGenerator extends Generator {
|
|
|
574
597
|
): null | Source;
|
|
575
598
|
}
|
|
576
599
|
declare abstract class AssetSourceParser extends ParserClass {}
|
|
600
|
+
declare interface AssetSymlink {
|
|
601
|
+
/**
|
|
602
|
+
* what the link points at, left as it is written
|
|
603
|
+
*/
|
|
604
|
+
target: string;
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* whether it points at a directory, which is what Windows needs in order to create one
|
|
608
|
+
*/
|
|
609
|
+
isDirectory: boolean;
|
|
610
|
+
}
|
|
611
|
+
declare interface AssetTimestamps {
|
|
612
|
+
/**
|
|
613
|
+
* last access time, in milliseconds
|
|
614
|
+
*/
|
|
615
|
+
atime: number;
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* last modification time, in milliseconds
|
|
619
|
+
*/
|
|
620
|
+
mtime: number;
|
|
621
|
+
}
|
|
577
622
|
declare class AsyncDependenciesBlock extends DependenciesBlock {
|
|
578
623
|
constructor(
|
|
579
624
|
groupOptions: null | string | GroupOptionsAsyncDependenciesBlock,
|
|
@@ -868,7 +913,7 @@ declare interface BasenameCacheEntry {
|
|
|
868
913
|
*/
|
|
869
914
|
declare abstract class BasicEvaluatedExpression {
|
|
870
915
|
expression?:
|
|
871
|
-
|
|
|
916
|
+
| ProgramImport
|
|
872
917
|
| ImportDeclaration
|
|
873
918
|
| ExportNamedDeclaration
|
|
874
919
|
| ExportAllDeclaration
|
|
@@ -1127,7 +1172,7 @@ declare abstract class BasicEvaluatedExpression {
|
|
|
1127
1172
|
*/
|
|
1128
1173
|
setExpression(
|
|
1129
1174
|
expression?:
|
|
1130
|
-
|
|
|
1175
|
+
| ProgramImport
|
|
1131
1176
|
| ImportDeclaration
|
|
1132
1177
|
| ExportNamedDeclaration
|
|
1133
1178
|
| ExportAllDeclaration
|
|
@@ -1217,6 +1262,17 @@ declare interface Bootstrap {
|
|
|
1217
1262
|
afterStartup: string[];
|
|
1218
1263
|
allowInlineStartup: boolean;
|
|
1219
1264
|
}
|
|
1265
|
+
|
|
1266
|
+
/**
|
|
1267
|
+
* Which disjunction branch a named group sits in, so that the same name in two
|
|
1268
|
+
* alternatives of one disjunction is allowed and a repeat in one is not.
|
|
1269
|
+
*/
|
|
1270
|
+
declare abstract class BranchID {
|
|
1271
|
+
parent: null | BranchID;
|
|
1272
|
+
base: BranchID;
|
|
1273
|
+
separatedFrom(alt: BranchID): boolean;
|
|
1274
|
+
sibling(): BranchID;
|
|
1275
|
+
}
|
|
1220
1276
|
type BufferEncoding =
|
|
1221
1277
|
| "ascii"
|
|
1222
1278
|
| "utf8"
|
|
@@ -1271,8 +1327,82 @@ declare interface BufferedMap {
|
|
|
1271
1327
|
*/
|
|
1272
1328
|
file: string;
|
|
1273
1329
|
}
|
|
1330
|
+
type BuildDependencyItem =
|
|
1331
|
+
| string
|
|
1332
|
+
| {
|
|
1333
|
+
/**
|
|
1334
|
+
* Request to a dependency (resolved as directory relative to the context directory).
|
|
1335
|
+
*/
|
|
1336
|
+
dependency: string;
|
|
1337
|
+
/**
|
|
1338
|
+
* When true, the dependency may be missing. Existence changes invalidate the cache.
|
|
1339
|
+
*/
|
|
1340
|
+
optional?: boolean;
|
|
1341
|
+
};
|
|
1342
|
+
declare interface BuildDiagnostics {
|
|
1343
|
+
/**
|
|
1344
|
+
* what parser plugins reported as optimization bailouts, replayed into the module graph of every compilation that reuses the module
|
|
1345
|
+
*/
|
|
1346
|
+
optimizationBailouts?: string[];
|
|
1347
|
+
|
|
1348
|
+
/**
|
|
1349
|
+
* the statement whose side effect keeps the module in the bundle, as `type at location`
|
|
1350
|
+
*/
|
|
1351
|
+
sideEffectStatement?: string;
|
|
1352
|
+
|
|
1353
|
+
/**
|
|
1354
|
+
* how many `#__PURE__` annotations sit where the parser does not read them
|
|
1355
|
+
*/
|
|
1356
|
+
ineffectivePureAnnotations?: number;
|
|
1357
|
+
|
|
1358
|
+
/**
|
|
1359
|
+
* how many times the module reads `this` at its top level
|
|
1360
|
+
*/
|
|
1361
|
+
topLevelThis?: number;
|
|
1362
|
+
|
|
1363
|
+
/**
|
|
1364
|
+
* true when the module calls `eval` directly
|
|
1365
|
+
*/
|
|
1366
|
+
usesEval?: boolean;
|
|
1367
|
+
|
|
1368
|
+
/**
|
|
1369
|
+
* reasons why the module is not cacheable (e.g. paths of loaders that marked it)
|
|
1370
|
+
*/
|
|
1371
|
+
notCacheableReasons?: string[];
|
|
1372
|
+
}
|
|
1274
1373
|
type BuildInfo = KnownBuildInfo & Record<string, any>;
|
|
1275
1374
|
type BuildMeta = KnownBuildMeta & Record<string, any>;
|
|
1375
|
+
declare interface BuiltinEmbeddedRendererOptions {
|
|
1376
|
+
/**
|
|
1377
|
+
* 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
|
|
1378
|
+
*/
|
|
1379
|
+
environment?: CssEnvironment;
|
|
1380
|
+
|
|
1381
|
+
/**
|
|
1382
|
+
* 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
|
|
1383
|
+
*/
|
|
1384
|
+
convertLengthUnits?: boolean;
|
|
1385
|
+
|
|
1386
|
+
/**
|
|
1387
|
+
* 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
|
|
1388
|
+
*/
|
|
1389
|
+
rewriteCustomProperties?: boolean;
|
|
1390
|
+
|
|
1391
|
+
/**
|
|
1392
|
+
* which of the meaning-preserving rewrites the minifying print makes; each is on unless it is `false`
|
|
1393
|
+
*/
|
|
1394
|
+
transforms?: CssTransformOptions;
|
|
1395
|
+
|
|
1396
|
+
/**
|
|
1397
|
+
* 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
|
|
1398
|
+
*/
|
|
1399
|
+
unusedSymbols?: string[];
|
|
1400
|
+
|
|
1401
|
+
/**
|
|
1402
|
+
* 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
|
|
1403
|
+
*/
|
|
1404
|
+
pseudoClasses?: { [index: string]: string };
|
|
1405
|
+
}
|
|
1276
1406
|
declare abstract class ByTypeGenerator extends Generator {
|
|
1277
1407
|
map: { [index: string]: undefined | Generator };
|
|
1278
1408
|
generateError?: (
|
|
@@ -1295,7 +1425,9 @@ declare class CacheClass {
|
|
|
1295
1425
|
hooks: {
|
|
1296
1426
|
get: AsyncSeriesBailHook<[string, null | Etag, GotHandler<any>[]], any>;
|
|
1297
1427
|
store: AsyncParallelHook<[string, null | Etag, any]>;
|
|
1298
|
-
storeBuildDependencies: AsyncParallelHook<
|
|
1428
|
+
storeBuildDependencies: AsyncParallelHook<
|
|
1429
|
+
[Iterable<string>, Iterable<string>]
|
|
1430
|
+
>;
|
|
1299
1431
|
beginIdle: SyncHook<[]>;
|
|
1300
1432
|
endIdle: AsyncParallelHook<[]>;
|
|
1301
1433
|
shutdown: AsyncParallelHook<[]>;
|
|
@@ -1328,6 +1460,7 @@ declare class CacheClass {
|
|
|
1328
1460
|
*/
|
|
1329
1461
|
storeBuildDependencies(
|
|
1330
1462
|
dependencies: Iterable<string>,
|
|
1463
|
+
optionalDependencies: Iterable<string>,
|
|
1331
1464
|
callback: CallbackCacheCache<void>
|
|
1332
1465
|
): void;
|
|
1333
1466
|
|
|
@@ -2991,6 +3124,10 @@ type CodeGenValue<K extends string> = K extends
|
|
|
2991
3124
|
| "topLevelDeclarations"
|
|
2992
3125
|
| "freeNames"
|
|
2993
3126
|
| "chunkInitFragments"
|
|
3127
|
+
| "externalReexport"
|
|
3128
|
+
| "exportsSource"
|
|
3129
|
+
| "exportsBindingSource"
|
|
3130
|
+
| "exportsFinalName"
|
|
2994
3131
|
| "url"
|
|
2995
3132
|
| "fullContentHash"
|
|
2996
3133
|
? AllCodeGenerationSchemas[K]
|
|
@@ -3222,7 +3359,7 @@ declare interface ColorsOptions {
|
|
|
3222
3359
|
type CommentJavascriptParser = CommentImport & {
|
|
3223
3360
|
start: number;
|
|
3224
3361
|
end: number;
|
|
3225
|
-
loc?: null |
|
|
3362
|
+
loc?: null | SourceLocationImport;
|
|
3226
3363
|
};
|
|
3227
3364
|
declare interface CommonJsImportSettings {
|
|
3228
3365
|
name?: string;
|
|
@@ -3528,6 +3665,7 @@ declare class Compilation {
|
|
|
3528
3665
|
contextDependencies: LazySet<string>;
|
|
3529
3666
|
missingDependencies: LazySet<string>;
|
|
3530
3667
|
buildDependencies: LazySet<string>;
|
|
3668
|
+
optionalBuildDependencies: LazySet<string>;
|
|
3531
3669
|
|
|
3532
3670
|
/**
|
|
3533
3671
|
* @deprecated
|
|
@@ -4341,7 +4479,7 @@ declare class Compiler {
|
|
|
4341
4479
|
check?: (value: T) => boolean
|
|
4342
4480
|
): void;
|
|
4343
4481
|
}
|
|
4344
|
-
type ComponentValue =
|
|
4482
|
+
type ComponentValue = TokenSyntax | FunctionNode | SimpleBlock;
|
|
4345
4483
|
declare class ConcatSource extends Source {
|
|
4346
4484
|
constructor(...args: ConcatSourceChild[]);
|
|
4347
4485
|
getChildren(): Source[];
|
|
@@ -4395,18 +4533,18 @@ declare interface ConcatenatedModuleInfo {
|
|
|
4395
4533
|
eager: boolean;
|
|
4396
4534
|
module: Module;
|
|
4397
4535
|
index: number;
|
|
4398
|
-
ast?:
|
|
4536
|
+
ast?: ProgramImport;
|
|
4399
4537
|
internalSource?: Source;
|
|
4400
4538
|
source?: ReplaceSource;
|
|
4401
4539
|
chunkInitFragments?: InitFragment<ChunkRenderContextJavascriptModulesPlugin>[];
|
|
4402
4540
|
runtimeRequirements?: ReadonlySet<string>;
|
|
4403
|
-
globalScope?:
|
|
4541
|
+
globalScope?: ScopeScopeAnalyzer;
|
|
4404
4542
|
|
|
4405
4543
|
/**
|
|
4406
4544
|
* the module's free references
|
|
4407
4545
|
*/
|
|
4408
4546
|
unresolvedReferences?: Reference[];
|
|
4409
|
-
moduleScope?:
|
|
4547
|
+
moduleScope?: ScopeScopeAnalyzer;
|
|
4410
4548
|
internalNames: Map<string, string>;
|
|
4411
4549
|
exportMap?: Map<string, string>;
|
|
4412
4550
|
rawExportMap?: Map<string, string>;
|
|
@@ -4522,18 +4660,6 @@ declare class ConcatenationScope {
|
|
|
4522
4660
|
*/
|
|
4523
4661
|
isWrapped(): boolean;
|
|
4524
4662
|
|
|
4525
|
-
/**
|
|
4526
|
-
* Records a `require(...)` call that was replaced as a whole by a
|
|
4527
|
-
* concatenation reference, so nothing else rewrites a range inside it.
|
|
4528
|
-
*/
|
|
4529
|
-
registerReplacedRequire(range: [number, number]): void;
|
|
4530
|
-
|
|
4531
|
-
/**
|
|
4532
|
-
* Checks whether an offset sits inside an already-replaced `require(...)` call.
|
|
4533
|
-
* Containment, not exact match: `new require(...)` is replaced from `new`.
|
|
4534
|
-
*/
|
|
4535
|
-
isInsideReplacedRequire(start: number): boolean;
|
|
4536
|
-
|
|
4537
4663
|
/**
|
|
4538
4664
|
* Records the symbol that should be used when the current module exports a
|
|
4539
4665
|
* named binding.
|
|
@@ -4578,7 +4704,15 @@ declare class ConcatenationScope {
|
|
|
4578
4704
|
static isModuleReference(name: string): boolean;
|
|
4579
4705
|
|
|
4580
4706
|
/**
|
|
4581
|
-
*
|
|
4707
|
+
* Checks whether an identifier buries a reference token without being one,
|
|
4708
|
+
* which nothing can resolve: it would reach the output as an undeclared global.
|
|
4709
|
+
*/
|
|
4710
|
+
static isLeakedModuleReference(name: string): boolean;
|
|
4711
|
+
|
|
4712
|
+
/**
|
|
4713
|
+
* Finds all encoded module references in a generated source. A match that
|
|
4714
|
+
* continues an identifier is reported as `leaked`: it is a token a wider
|
|
4715
|
+
* replacement swallowed, so substituting it would rewrite the middle of a name.
|
|
4582
4716
|
*/
|
|
4583
4717
|
static findModuleReferences(source: Source): ModuleReferenceMatch[];
|
|
4584
4718
|
|
|
@@ -5293,6 +5427,167 @@ declare interface ContextTimestampAndHash {
|
|
|
5293
5427
|
symlinks?: Set<string>;
|
|
5294
5428
|
}
|
|
5295
5429
|
type ContextTypes = KnownContext & Record<any, any>;
|
|
5430
|
+
declare interface CopiedFileData {
|
|
5431
|
+
/**
|
|
5432
|
+
* absolute path of the source file
|
|
5433
|
+
*/
|
|
5434
|
+
absoluteFilename: string;
|
|
5435
|
+
|
|
5436
|
+
/**
|
|
5437
|
+
* path of the source file, relative to the compiler context
|
|
5438
|
+
*/
|
|
5439
|
+
sourceFilename: string;
|
|
5440
|
+
|
|
5441
|
+
/**
|
|
5442
|
+
* path of the copied file, relative to `to`
|
|
5443
|
+
*/
|
|
5444
|
+
filename: string;
|
|
5445
|
+
}
|
|
5446
|
+
|
|
5447
|
+
/**
|
|
5448
|
+
* Options of the glob in 'from'.
|
|
5449
|
+
*/
|
|
5450
|
+
declare interface CopyGlobOptions {
|
|
5451
|
+
/**
|
|
5452
|
+
* Whether the glob matches the case of a file name. Defaults to 'true'.
|
|
5453
|
+
*/
|
|
5454
|
+
caseSensitive?: boolean;
|
|
5455
|
+
|
|
5456
|
+
/**
|
|
5457
|
+
* How many directory levels below the base of the glob are read, where '1' reads only the base itself. Defaults to no limit.
|
|
5458
|
+
*/
|
|
5459
|
+
deep?: number;
|
|
5460
|
+
|
|
5461
|
+
/**
|
|
5462
|
+
* Whether the glob reaches a file or a directory whose name starts with a dot without naming it. Defaults to 'true'.
|
|
5463
|
+
*/
|
|
5464
|
+
dot?: boolean;
|
|
5465
|
+
|
|
5466
|
+
/**
|
|
5467
|
+
* 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.
|
|
5468
|
+
*/
|
|
5469
|
+
followSymlinks?: boolean;
|
|
5470
|
+
|
|
5471
|
+
/**
|
|
5472
|
+
* Globs of the files which are not copied, resolved like 'from'. A directory one of them matches is skipped whole.
|
|
5473
|
+
*/
|
|
5474
|
+
ignore?: string[];
|
|
5475
|
+
}
|
|
5476
|
+
|
|
5477
|
+
/**
|
|
5478
|
+
* A pattern of files which are copied to the output directory.
|
|
5479
|
+
*/
|
|
5480
|
+
declare interface CopyObjectPattern {
|
|
5481
|
+
/**
|
|
5482
|
+
* 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.
|
|
5483
|
+
*/
|
|
5484
|
+
context?: string;
|
|
5485
|
+
|
|
5486
|
+
/**
|
|
5487
|
+
* Filename template of a copied file inside 'to'. Defaults to '[path][base]', which keeps the name and the directory structure below 'from'.
|
|
5488
|
+
*/
|
|
5489
|
+
filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
|
5490
|
+
|
|
5491
|
+
/**
|
|
5492
|
+
* Glob or path from where the files are copied.
|
|
5493
|
+
*/
|
|
5494
|
+
from: string | string[];
|
|
5495
|
+
|
|
5496
|
+
/**
|
|
5497
|
+
* Options of the glob in 'from'.
|
|
5498
|
+
*/
|
|
5499
|
+
globOptions?: CopyGlobOptions;
|
|
5500
|
+
|
|
5501
|
+
/**
|
|
5502
|
+
* Asset info of a copied file.
|
|
5503
|
+
*/
|
|
5504
|
+
info?: AssetInfo | ((file: CopiedFileData) => AssetInfo);
|
|
5505
|
+
|
|
5506
|
+
/**
|
|
5507
|
+
* 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.
|
|
5508
|
+
*/
|
|
5509
|
+
preservePermissions?: boolean;
|
|
5510
|
+
|
|
5511
|
+
/**
|
|
5512
|
+
* 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.
|
|
5513
|
+
*/
|
|
5514
|
+
preserveTimestamps?: boolean;
|
|
5515
|
+
|
|
5516
|
+
/**
|
|
5517
|
+
* Directory the files are copied to, relative to 'output.path', which is where they land by default.
|
|
5518
|
+
*/
|
|
5519
|
+
to?: string | ((file: CopiedFileData) => string);
|
|
5520
|
+
|
|
5521
|
+
/**
|
|
5522
|
+
* Modifies the content of a copied file.
|
|
5523
|
+
*/
|
|
5524
|
+
transform?:
|
|
5525
|
+
| {
|
|
5526
|
+
/**
|
|
5527
|
+
* Whether the result of the transform is cached, and what it is cached under. Defaults to 'true'.
|
|
5528
|
+
*/
|
|
5529
|
+
cache?:
|
|
5530
|
+
| boolean
|
|
5531
|
+
| {
|
|
5532
|
+
/**
|
|
5533
|
+
* Everything beside the content of the file the transform depends on, serialized into the cache key as JSON.
|
|
5534
|
+
*/
|
|
5535
|
+
keys?:
|
|
5536
|
+
| CopyTransformCacheKeys
|
|
5537
|
+
| ((
|
|
5538
|
+
defaultKeys: CopyTransformCacheKeys,
|
|
5539
|
+
absoluteFilename: string
|
|
5540
|
+
) =>
|
|
5541
|
+
CopyTransformCacheKeys | Promise<CopyTransformCacheKeys>);
|
|
5542
|
+
};
|
|
5543
|
+
/**
|
|
5544
|
+
* Modifies the content of a copied file.
|
|
5545
|
+
*/
|
|
5546
|
+
transformer: (
|
|
5547
|
+
content: Buffer,
|
|
5548
|
+
absoluteFilename: string
|
|
5549
|
+
) => string | Buffer | Promise<string | Buffer>;
|
|
5550
|
+
}
|
|
5551
|
+
| ((
|
|
5552
|
+
content: Buffer,
|
|
5553
|
+
absoluteFilename: string
|
|
5554
|
+
) => string | Buffer | Promise<string | Buffer>);
|
|
5555
|
+
}
|
|
5556
|
+
|
|
5557
|
+
/**
|
|
5558
|
+
* Patterns of files which are copied to the output directory, and the options of the copying itself.
|
|
5559
|
+
*/
|
|
5560
|
+
declare interface CopyOptions {
|
|
5561
|
+
/**
|
|
5562
|
+
* Maximum number of files which are read at the same time. Defaults to '100'.
|
|
5563
|
+
*/
|
|
5564
|
+
concurrency?: number;
|
|
5565
|
+
|
|
5566
|
+
/**
|
|
5567
|
+
* Patterns of files which are copied to the output directory.
|
|
5568
|
+
*/
|
|
5569
|
+
patterns: CopyPattern[];
|
|
5570
|
+
|
|
5571
|
+
/**
|
|
5572
|
+
* 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.
|
|
5573
|
+
*/
|
|
5574
|
+
stage?: number;
|
|
5575
|
+
}
|
|
5576
|
+
type CopyPattern = string | CopyObjectPattern;
|
|
5577
|
+
declare class CopyPlugin {
|
|
5578
|
+
constructor(options: CopyOptions);
|
|
5579
|
+
patterns: CopyPattern[];
|
|
5580
|
+
concurrency: number;
|
|
5581
|
+
stage: number;
|
|
5582
|
+
|
|
5583
|
+
/**
|
|
5584
|
+
* Apply the plugin
|
|
5585
|
+
*/
|
|
5586
|
+
apply(compiler: Compiler): void;
|
|
5587
|
+
}
|
|
5588
|
+
declare interface CopyTransformCacheKeys {
|
|
5589
|
+
[index: string]: any;
|
|
5590
|
+
}
|
|
5296
5591
|
type CreateData = NormalModuleCreateData & { settings: ModuleSettings };
|
|
5297
5592
|
type CreateReadStreamFSImplementation = FSImplementation & {
|
|
5298
5593
|
read: (...args: any[]) => any;
|
|
@@ -5496,6 +5791,11 @@ declare class CssLoadingRuntimeModule extends RuntimeModule {
|
|
|
5496
5791
|
linkInsert: SyncWaterfallHook<[string, Chunk], string>;
|
|
5497
5792
|
};
|
|
5498
5793
|
|
|
5794
|
+
/**
|
|
5795
|
+
* The answer a runtime module gives when it installs no chunk handler at all
|
|
5796
|
+
*/
|
|
5797
|
+
static NO_CHUNK_HANDLERS: [string, string][];
|
|
5798
|
+
|
|
5499
5799
|
/**
|
|
5500
5800
|
* Runtime modules without any dependencies to other runtime modules
|
|
5501
5801
|
*/
|
|
@@ -5935,6 +6235,11 @@ declare interface CssPrintOptions {
|
|
|
5935
6235
|
*/
|
|
5936
6236
|
convertLengthUnits?: boolean;
|
|
5937
6237
|
|
|
6238
|
+
/**
|
|
6239
|
+
* 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
|
|
6240
|
+
*/
|
|
6241
|
+
mergeDistantRules?: boolean;
|
|
6242
|
+
|
|
5938
6243
|
/**
|
|
5939
6244
|
* 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
|
|
5940
6245
|
*/
|
|
@@ -5949,6 +6254,16 @@ declare interface CssPrintOptions {
|
|
|
5949
6254
|
* which of the meaning-preserving rewrites the minifying print makes; each is on unless it is `false`
|
|
5950
6255
|
*/
|
|
5951
6256
|
transforms?: CssTransformOptions;
|
|
6257
|
+
|
|
6258
|
+
/**
|
|
6259
|
+
* 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
|
|
6260
|
+
*/
|
|
6261
|
+
unusedSymbols?: string[];
|
|
6262
|
+
|
|
6263
|
+
/**
|
|
6264
|
+
* 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
|
|
6265
|
+
*/
|
|
6266
|
+
pseudoClasses?: { [index: string]: string };
|
|
5952
6267
|
}
|
|
5953
6268
|
declare interface CssProcessOptions {
|
|
5954
6269
|
/**
|
|
@@ -5996,6 +6311,11 @@ declare interface CssProcessOptions {
|
|
|
5996
6311
|
*/
|
|
5997
6312
|
convertLengthUnits?: boolean;
|
|
5998
6313
|
|
|
6314
|
+
/**
|
|
6315
|
+
* 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
|
|
6316
|
+
*/
|
|
6317
|
+
mergeDistantRules?: boolean;
|
|
6318
|
+
|
|
5999
6319
|
/**
|
|
6000
6320
|
* 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
|
|
6001
6321
|
*/
|
|
@@ -6009,6 +6329,16 @@ declare interface CssProcessOptions {
|
|
|
6009
6329
|
info: { type: string; hostType: string }
|
|
6010
6330
|
) => undefined | string;
|
|
6011
6331
|
|
|
6332
|
+
/**
|
|
6333
|
+
* 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
|
|
6334
|
+
*/
|
|
6335
|
+
pseudoClasses?: { [index: string]: string };
|
|
6336
|
+
|
|
6337
|
+
/**
|
|
6338
|
+
* 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
|
|
6339
|
+
*/
|
|
6340
|
+
unusedSymbols?: string[];
|
|
6341
|
+
|
|
6012
6342
|
/**
|
|
6013
6343
|
* which of the meaning-preserving rewrites the minifying print makes; each is on unless it is `false`
|
|
6014
6344
|
*/
|
|
@@ -6020,11 +6350,36 @@ declare interface CssProcessOptions {
|
|
|
6020
6350
|
deferEmbeddedSource?: DeferredEmbeddedSource[];
|
|
6021
6351
|
}
|
|
6022
6352
|
declare interface CssTransformOptions {
|
|
6353
|
+
/**
|
|
6354
|
+
* write a color the target cannot read as an extra declaration before it, in a spelling it does read
|
|
6355
|
+
*/
|
|
6356
|
+
colorFallbacks?: boolean;
|
|
6357
|
+
|
|
6358
|
+
/**
|
|
6359
|
+
* write a spelling the target cannot read as one it can — the same value, said another way
|
|
6360
|
+
*/
|
|
6361
|
+
lowerUnsupported?: boolean;
|
|
6362
|
+
|
|
6363
|
+
/**
|
|
6364
|
+
* write a name that matches ASCII case-insensitively — an at-rule, property, pseudo, function, unit or keyword — in lowercase
|
|
6365
|
+
*/
|
|
6366
|
+
foldCase?: boolean;
|
|
6367
|
+
|
|
6368
|
+
/**
|
|
6369
|
+
* write an escaped identifier the shortest way that names it, in a value or an id
|
|
6370
|
+
*/
|
|
6371
|
+
rewriteEscapes?: boolean;
|
|
6372
|
+
|
|
6023
6373
|
/**
|
|
6024
6374
|
* 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
|
|
6025
6375
|
*/
|
|
6026
6376
|
comments?: string | boolean | RegExp | ((comment: string) => boolean);
|
|
6027
6377
|
|
|
6378
|
+
/**
|
|
6379
|
+
* write the query or selector list a `@custom-media` / `@custom-selector` names wherever one asks for it, and drop the rule that named it
|
|
6380
|
+
*/
|
|
6381
|
+
resolveCustomAtRules?: boolean;
|
|
6382
|
+
|
|
6028
6383
|
/**
|
|
6029
6384
|
* write a family of longhands as the one shorthand that sets them
|
|
6030
6385
|
*/
|
|
@@ -6050,6 +6405,11 @@ declare interface CssTransformOptions {
|
|
|
6050
6405
|
*/
|
|
6051
6406
|
removeDeadRules?: boolean;
|
|
6052
6407
|
|
|
6408
|
+
/**
|
|
6409
|
+
* write a `:dir()` the target cannot read as the `[dir]` attribute selector, which reads the attribute rather than the directionality an element may inherit
|
|
6410
|
+
*/
|
|
6411
|
+
rewriteDirSelector?: boolean;
|
|
6412
|
+
|
|
6053
6413
|
/**
|
|
6054
6414
|
* write each color in the shortest spelling of the same value
|
|
6055
6415
|
*/
|
|
@@ -6108,13 +6468,14 @@ declare interface DefaultHandlerOptions {
|
|
|
6108
6468
|
estimatedTime?: boolean;
|
|
6109
6469
|
phaseTimings?: boolean;
|
|
6110
6470
|
}
|
|
6111
|
-
|
|
6112
|
-
declare interface DeferredEmbeddedSource {
|
|
6113
|
-
source: string;
|
|
6114
|
-
build: (answer?: string) => string;
|
|
6471
|
+
type DeferredEmbeddedSource = DeferredWrite & {
|
|
6115
6472
|
type: string;
|
|
6116
6473
|
hostType: string;
|
|
6117
6474
|
as?: string;
|
|
6475
|
+
};
|
|
6476
|
+
declare interface DeferredWrite {
|
|
6477
|
+
source: string;
|
|
6478
|
+
build: (answer?: string) => string;
|
|
6118
6479
|
}
|
|
6119
6480
|
type DefineConfigInput =
|
|
6120
6481
|
| Configuration
|
|
@@ -6196,8 +6557,8 @@ declare class DelegatedPlugin {
|
|
|
6196
6557
|
/**
|
|
6197
6558
|
* Creates an instance of DelegatedPlugin.
|
|
6198
6559
|
*/
|
|
6199
|
-
constructor(options:
|
|
6200
|
-
options:
|
|
6560
|
+
constructor(options: OptionsDelegatedModuleFactoryPlugin);
|
|
6561
|
+
options: OptionsDelegatedModuleFactoryPlugin;
|
|
6201
6562
|
|
|
6202
6563
|
/**
|
|
6203
6564
|
* Applies the plugin by registering its hooks on the compiler.
|
|
@@ -6542,6 +6903,11 @@ declare interface DependencyTemplateContext {
|
|
|
6542
6903
|
* chunkInitFragments
|
|
6543
6904
|
*/
|
|
6544
6905
|
chunkInitFragments: InitFragment<GenerateContext>[];
|
|
6906
|
+
|
|
6907
|
+
/**
|
|
6908
|
+
* get access to the code generation data
|
|
6909
|
+
*/
|
|
6910
|
+
getData?: () => CodeGenerationResultData;
|
|
6545
6911
|
}
|
|
6546
6912
|
declare abstract class DependencyTemplates {
|
|
6547
6913
|
/**
|
|
@@ -6996,6 +7362,19 @@ declare interface DotenvPluginOptions {
|
|
|
6996
7362
|
*/
|
|
6997
7363
|
template?: string[];
|
|
6998
7364
|
}
|
|
7365
|
+
|
|
7366
|
+
declare interface DualModeResolve {
|
|
7367
|
+
(
|
|
7368
|
+
context: string,
|
|
7369
|
+
request: string,
|
|
7370
|
+
callback: (
|
|
7371
|
+
err: null | ErrorWithDetail,
|
|
7372
|
+
res?: string | false,
|
|
7373
|
+
req?: ResolveRequest
|
|
7374
|
+
) => void
|
|
7375
|
+
): void;
|
|
7376
|
+
(context: string, request: string): Promise<string>;
|
|
7377
|
+
}
|
|
6999
7378
|
declare class DynamicEntryPlugin {
|
|
7000
7379
|
/**
|
|
7001
7380
|
* Creates an instance of DynamicEntryPlugin.
|
|
@@ -7009,7 +7388,35 @@ declare class DynamicEntryPlugin {
|
|
|
7009
7388
|
*/
|
|
7010
7389
|
apply(compiler: Compiler): void;
|
|
7011
7390
|
}
|
|
7012
|
-
type
|
|
7391
|
+
type EcmaVersion =
|
|
7392
|
+
| 3
|
|
7393
|
+
| 5
|
|
7394
|
+
| 6
|
|
7395
|
+
| 7
|
|
7396
|
+
| 8
|
|
7397
|
+
| 9
|
|
7398
|
+
| 10
|
|
7399
|
+
| 11
|
|
7400
|
+
| 12
|
|
7401
|
+
| 13
|
|
7402
|
+
| 14
|
|
7403
|
+
| 15
|
|
7404
|
+
| 16
|
|
7405
|
+
| 17
|
|
7406
|
+
| 2015
|
|
7407
|
+
| 2016
|
|
7408
|
+
| 2017
|
|
7409
|
+
| 2018
|
|
7410
|
+
| 2019
|
|
7411
|
+
| 2020
|
|
7412
|
+
| 2021
|
|
7413
|
+
| 2022
|
|
7414
|
+
| 2023
|
|
7415
|
+
| 2024
|
|
7416
|
+
| 2025
|
|
7417
|
+
| 2026
|
|
7418
|
+
| "latest";
|
|
7419
|
+
type Effect = EffectUse | EffectBasic;
|
|
7013
7420
|
declare interface EffectBasic {
|
|
7014
7421
|
type: string;
|
|
7015
7422
|
value: any;
|
|
@@ -7656,6 +8063,12 @@ declare interface Environment {
|
|
|
7656
8063
|
* The environment supports template literals.
|
|
7657
8064
|
*/
|
|
7658
8065
|
templateLiteral?: boolean;
|
|
8066
|
+
|
|
8067
|
+
/**
|
|
8068
|
+
* The environment supports top-level await ('await x' at the top level of a module).
|
|
8069
|
+
* @since 5.111.0
|
|
8070
|
+
*/
|
|
8071
|
+
topLevelAwait?: boolean;
|
|
7659
8072
|
}
|
|
7660
8073
|
declare class EnvironmentPlugin {
|
|
7661
8074
|
/**
|
|
@@ -7863,13 +8276,6 @@ declare interface Experiments {
|
|
|
7863
8276
|
*/
|
|
7864
8277
|
lazyCompilation?: boolean | LazyCompilationOptions;
|
|
7865
8278
|
|
|
7866
|
-
/**
|
|
7867
|
-
* Allow output javascript files as module source type.
|
|
7868
|
-
* @since 5.0.0
|
|
7869
|
-
* @experimental
|
|
7870
|
-
*/
|
|
7871
|
-
outputModule?: boolean;
|
|
7872
|
-
|
|
7873
8279
|
/**
|
|
7874
8280
|
* Enable experimental tc39 proposal https://github.com/tc39/proposal-source-phase-imports. This allows importing modules at source phase.
|
|
7875
8281
|
* @since 5.106.0
|
|
@@ -7959,13 +8365,6 @@ declare interface ExperimentsNormalized {
|
|
|
7959
8365
|
*/
|
|
7960
8366
|
lazyCompilation?: false | LazyCompilationOptions;
|
|
7961
8367
|
|
|
7962
|
-
/**
|
|
7963
|
-
* Allow output javascript files as module source type.
|
|
7964
|
-
* @since 5.0.0
|
|
7965
|
-
* @experimental
|
|
7966
|
-
*/
|
|
7967
|
-
outputModule?: boolean;
|
|
7968
|
-
|
|
7969
8368
|
/**
|
|
7970
8369
|
* Enable experimental tc39 proposal https://github.com/tc39/proposal-source-phase-imports. This allows importing modules at source phase.
|
|
7971
8370
|
* @since 5.106.0
|
|
@@ -8115,7 +8514,9 @@ declare abstract class ExportInfo {
|
|
|
8115
8514
|
isReexport(): undefined | boolean;
|
|
8116
8515
|
|
|
8117
8516
|
/**
|
|
8118
|
-
*
|
|
8517
|
+
* Walks the reexport chain and returns the first target whose module passes
|
|
8518
|
+
* `validTargetModuleFilter`. Returns undefined when there is no target, false
|
|
8519
|
+
* when the chain ends without a valid module.
|
|
8119
8520
|
*/
|
|
8120
8521
|
findTarget(
|
|
8121
8522
|
moduleGraph: ModuleGraph,
|
|
@@ -8123,13 +8524,21 @@ declare abstract class ExportInfo {
|
|
|
8123
8524
|
): undefined | null | false | TargetItemWithoutConnection;
|
|
8124
8525
|
|
|
8125
8526
|
/**
|
|
8126
|
-
*
|
|
8527
|
+
* Resolves the reexport chain as far as `resolveTargetFilter` allows and
|
|
8528
|
+
* returns where it ends. Returns undefined when there is no target, the
|
|
8529
|
+
* targets disagree, or the chain is circular.
|
|
8127
8530
|
*/
|
|
8128
8531
|
getTarget(
|
|
8129
8532
|
moduleGraph: ModuleGraph,
|
|
8130
8533
|
resolveTargetFilter?: (target: TargetItemWithConnection) => boolean
|
|
8131
8534
|
): undefined | TargetItemWithConnection;
|
|
8132
8535
|
|
|
8536
|
+
/**
|
|
8537
|
+
* Returns whether resolving the target leads back to this export, which
|
|
8538
|
+
* `getTarget` cannot express as it reports a cycle as "no target".
|
|
8539
|
+
*/
|
|
8540
|
+
hasCircularTarget(moduleGraph: ModuleGraph): boolean;
|
|
8541
|
+
|
|
8133
8542
|
/**
|
|
8134
8543
|
* Move the target forward as long resolveTargetFilter is fulfilled
|
|
8135
8544
|
*/
|
|
@@ -8169,6 +8578,7 @@ declare abstract class ExportMode {
|
|
|
8169
8578
|
items: null | NormalReexportItem[];
|
|
8170
8579
|
name: null | string;
|
|
8171
8580
|
partialNamespaceExportInfo: null | ExportInfo;
|
|
8581
|
+
circular: boolean;
|
|
8172
8582
|
ignored: null | Set<string>;
|
|
8173
8583
|
hidden?: null | Set<string>;
|
|
8174
8584
|
userRequest: null | string;
|
|
@@ -8474,7 +8884,7 @@ declare interface ExposesConfig {
|
|
|
8474
8884
|
declare interface ExposesObject {
|
|
8475
8885
|
[index: string]: string | ExposesConfig | string[];
|
|
8476
8886
|
}
|
|
8477
|
-
type
|
|
8887
|
+
type ExpressionEstreeIndex =
|
|
8478
8888
|
| ImportExpressionImport
|
|
8479
8889
|
| UnaryExpression
|
|
8480
8890
|
| ArrayExpression
|
|
@@ -8510,6 +8920,38 @@ declare interface ExpressionExpressionInfo {
|
|
|
8510
8920
|
getMembersOptionals: () => boolean[];
|
|
8511
8921
|
getMemberRanges: () => [number, number][];
|
|
8512
8922
|
}
|
|
8923
|
+
type ExpressionParser =
|
|
8924
|
+
| (ImportExpressionImport & NodeLike)
|
|
8925
|
+
| (UnaryExpression & NodeLike)
|
|
8926
|
+
| (ArrayExpression & NodeLike)
|
|
8927
|
+
| (ArrowFunctionExpression & NodeLike)
|
|
8928
|
+
| (AssignmentExpression & NodeLike)
|
|
8929
|
+
| (AwaitExpression & NodeLike)
|
|
8930
|
+
| (BinaryExpression & NodeLike)
|
|
8931
|
+
| (SimpleCallExpression & NodeLike)
|
|
8932
|
+
| (NewExpression & NodeLike)
|
|
8933
|
+
| (ChainExpression & NodeLike)
|
|
8934
|
+
| (ClassExpression & NodeLike)
|
|
8935
|
+
| (ConditionalExpression & NodeLike)
|
|
8936
|
+
| (FunctionExpression & NodeLike)
|
|
8937
|
+
| (Identifier & NodeLike)
|
|
8938
|
+
| (SimpleLiteral & NodeLike)
|
|
8939
|
+
| (RegExpLiteral & NodeLike)
|
|
8940
|
+
| (BigIntLiteral & NodeLike)
|
|
8941
|
+
| (LogicalExpression & NodeLike)
|
|
8942
|
+
| (MemberExpression & NodeLike)
|
|
8943
|
+
| (MetaProperty & NodeLike)
|
|
8944
|
+
| (ObjectExpression & NodeLike)
|
|
8945
|
+
| (SequenceExpression & NodeLike)
|
|
8946
|
+
| (TaggedTemplateExpression & NodeLike)
|
|
8947
|
+
| (TemplateLiteral & NodeLike)
|
|
8948
|
+
| (ThisExpression & NodeLike)
|
|
8949
|
+
| (UpdateExpression & NodeLike)
|
|
8950
|
+
| (YieldExpression & NodeLike)
|
|
8951
|
+
| (NodeLike & {
|
|
8952
|
+
type: "ParenthesizedExpression";
|
|
8953
|
+
expression: ExpressionParser;
|
|
8954
|
+
});
|
|
8513
8955
|
declare interface ExtensionAliasOption {
|
|
8514
8956
|
alias: string | string[];
|
|
8515
8957
|
extension: string;
|
|
@@ -8684,6 +9126,12 @@ declare class ExternalModule extends Module {
|
|
|
8684
9126
|
normalModuleFactory: NormalModuleFactory
|
|
8685
9127
|
): void;
|
|
8686
9128
|
canBeWrappedInConcatenation(): boolean;
|
|
9129
|
+
|
|
9130
|
+
/**
|
|
9131
|
+
* The request this external resolves to for its own type, with the record form
|
|
9132
|
+
* narrowed to its entry. An array is a module specifier plus a property path.
|
|
9133
|
+
*/
|
|
9134
|
+
getResolvedRequest(): undefined | string | string[];
|
|
8687
9135
|
static getCompilationHooks: (compilation: Compilation) => {
|
|
8688
9136
|
/**
|
|
8689
9137
|
* @since 5.106.0
|
|
@@ -8757,6 +9205,11 @@ declare interface ExternalModuleInfo {
|
|
|
8757
9205
|
*/
|
|
8758
9206
|
deferredNamespaceObjectName?: string;
|
|
8759
9207
|
|
|
9208
|
+
/**
|
|
9209
|
+
* an import reads the spec namespace object the module hands out
|
|
9210
|
+
*/
|
|
9211
|
+
specNamespaceObjectUsed: boolean;
|
|
9212
|
+
|
|
8760
9213
|
/**
|
|
8761
9214
|
* "default-with-named" namespace
|
|
8762
9215
|
*/
|
|
@@ -9086,7 +9539,7 @@ declare interface FileCacheOptions {
|
|
|
9086
9539
|
/**
|
|
9087
9540
|
* Dependencies the build depends on (in multiple categories, default categories: 'defaultWebpack').
|
|
9088
9541
|
*/
|
|
9089
|
-
buildDependencies?: { [index: string]:
|
|
9542
|
+
buildDependencies?: { [index: string]: BuildDependencyItem[] };
|
|
9090
9543
|
|
|
9091
9544
|
/**
|
|
9092
9545
|
* Base directory for the cache (defaults to node_modules/.cache/webpack).
|
|
@@ -9317,6 +9770,7 @@ declare abstract class FileSystemInfo {
|
|
|
9317
9770
|
resolveBuildDependencies(
|
|
9318
9771
|
context: string,
|
|
9319
9772
|
deps: Iterable<string>,
|
|
9773
|
+
optionalDeps: undefined | Iterable<string>,
|
|
9320
9774
|
callback: (
|
|
9321
9775
|
err?: null | Error,
|
|
9322
9776
|
resolveBuildDependenciesResult?: ResolveBuildDependenciesResult
|
|
@@ -9483,12 +9937,23 @@ declare class Generator {
|
|
|
9483
9937
|
[index: string]: undefined | Generator;
|
|
9484
9938
|
}): ByTypeGenerator;
|
|
9485
9939
|
|
|
9940
|
+
/**
|
|
9941
|
+
* Returns what a module that failed to build says about it in the output.
|
|
9942
|
+
* The stack it carries is written relative to the context, keeping a
|
|
9943
|
+
* position only where a second build names the same one.
|
|
9944
|
+
*/
|
|
9945
|
+
static buildErrorMessage(
|
|
9946
|
+
error: Error,
|
|
9947
|
+
requestShortener?: RequestShortener
|
|
9948
|
+
): string;
|
|
9949
|
+
|
|
9486
9950
|
/**
|
|
9487
9951
|
* Returns the statement a module that failed to build throws when executed.
|
|
9488
9952
|
*/
|
|
9489
9953
|
static throwBuildErrorCode(
|
|
9490
9954
|
error: Error,
|
|
9491
|
-
parseErrorConstructor?: string
|
|
9955
|
+
parseErrorConstructor?: string,
|
|
9956
|
+
requestShortener?: RequestShortener
|
|
9492
9957
|
): string;
|
|
9493
9958
|
}
|
|
9494
9959
|
declare interface GeneratorOptions {
|
|
@@ -9607,6 +10072,11 @@ declare class GetChunkFilenameRuntimeModule extends RuntimeModule {
|
|
|
9607
10072
|
| ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string);
|
|
9608
10073
|
allChunks: boolean;
|
|
9609
10074
|
|
|
10075
|
+
/**
|
|
10076
|
+
* The answer a runtime module gives when it installs no chunk handler at all
|
|
10077
|
+
*/
|
|
10078
|
+
static NO_CHUNK_HANDLERS: [string, string][];
|
|
10079
|
+
|
|
9610
10080
|
/**
|
|
9611
10081
|
* Runtime modules without any dependencies to other runtime modules
|
|
9612
10082
|
*/
|
|
@@ -9634,6 +10104,11 @@ declare class GetChunkFilenameRuntimeModule extends RuntimeModule {
|
|
|
9634
10104
|
static getSourceBasicTypes(module: Module): ReadonlySet<string>;
|
|
9635
10105
|
}
|
|
9636
10106
|
|
|
10107
|
+
declare interface GetOptionsMethod<OptionsType> {
|
|
10108
|
+
(): OptionsType;
|
|
10109
|
+
(schema: Parameters<typeof validateFunction>[0]): OptionsType;
|
|
10110
|
+
}
|
|
10111
|
+
|
|
9637
10112
|
/**
|
|
9638
10113
|
* Creates a callback wrapper that waits for a fixed number of completions and
|
|
9639
10114
|
* forwards the first error immediately.
|
|
@@ -9892,6 +10367,9 @@ declare class HarmonyImportDependencyTemplate extends DependencyTemplate {
|
|
|
9892
10367
|
referencedModule: Module
|
|
9893
10368
|
): undefined | string | boolean | SortableSet<string>;
|
|
9894
10369
|
}
|
|
10370
|
+
declare abstract class HarmonyImportSideEffectDependency extends HarmonyImportDependency {
|
|
10371
|
+
unusedSpecifiers?: UnusedSpecifiers;
|
|
10372
|
+
}
|
|
9895
10373
|
declare interface HarmonySettings {
|
|
9896
10374
|
ids: string[];
|
|
9897
10375
|
source: string;
|
|
@@ -9900,6 +10378,16 @@ declare interface HarmonySettings {
|
|
|
9900
10378
|
await: boolean;
|
|
9901
10379
|
attributes?: ImportAttributes;
|
|
9902
10380
|
phase: ImportPhaseType;
|
|
10381
|
+
|
|
10382
|
+
/**
|
|
10383
|
+
* whether the binding is referenced anywhere
|
|
10384
|
+
*/
|
|
10385
|
+
used: boolean;
|
|
10386
|
+
|
|
10387
|
+
/**
|
|
10388
|
+
* the statement's own dependency
|
|
10389
|
+
*/
|
|
10390
|
+
dependency?: HarmonyImportSideEffectDependency;
|
|
9903
10391
|
}
|
|
9904
10392
|
declare abstract class HarmonyStarExportsList {
|
|
9905
10393
|
dependencies: HarmonyExportImportedSpecifierDependency[];
|
|
@@ -10029,10 +10517,6 @@ declare class HotModuleReplacementPlugin {
|
|
|
10029
10517
|
*/
|
|
10030
10518
|
static getParserHooks(parser: JavascriptParser): HMRJavascriptParserHooks;
|
|
10031
10519
|
}
|
|
10032
|
-
|
|
10033
|
-
/**
|
|
10034
|
-
* These properties are added by the HotModuleReplacementPlugin
|
|
10035
|
-
*/
|
|
10036
10520
|
declare interface HotModuleReplacementPluginLoaderContext {
|
|
10037
10521
|
hot?: boolean;
|
|
10038
10522
|
}
|
|
@@ -10085,6 +10569,7 @@ declare interface HtmlEmittedContext {
|
|
|
10085
10569
|
declare interface HtmlEntryInfo {
|
|
10086
10570
|
request: string;
|
|
10087
10571
|
entryName: string;
|
|
10572
|
+
index: number;
|
|
10088
10573
|
type:
|
|
10089
10574
|
| "html"
|
|
10090
10575
|
| "script"
|
|
@@ -10196,7 +10681,7 @@ declare class HtmlModulesPlugin {
|
|
|
10196
10681
|
*/
|
|
10197
10682
|
static computeContentHash(
|
|
10198
10683
|
content: string | Buffer,
|
|
10199
|
-
outputOptions:
|
|
10684
|
+
outputOptions: OutputNormalizedWithDefaults
|
|
10200
10685
|
): string;
|
|
10201
10686
|
|
|
10202
10687
|
/**
|
|
@@ -10206,9 +10691,14 @@ declare class HtmlModulesPlugin {
|
|
|
10206
10691
|
*/
|
|
10207
10692
|
static getChunkFilenameTemplate(
|
|
10208
10693
|
chunk: Chunk,
|
|
10209
|
-
outputOptions:
|
|
10694
|
+
outputOptions: OutputNormalizedWithDefaults
|
|
10210
10695
|
): ChunkFilenameTemplate;
|
|
10211
10696
|
|
|
10697
|
+
/**
|
|
10698
|
+
* Returns true, when the chunk has html.
|
|
10699
|
+
*/
|
|
10700
|
+
static chunkHasHtml(chunk: Chunk, chunkGraph: ChunkGraph): boolean;
|
|
10701
|
+
|
|
10212
10702
|
/**
|
|
10213
10703
|
* Per-compilation hooks for the experimental HTML support.
|
|
10214
10704
|
*/
|
|
@@ -10352,14 +10842,11 @@ declare interface HtmlParserOptions {
|
|
|
10352
10842
|
*/
|
|
10353
10843
|
urlHints?: UrlHintRule[];
|
|
10354
10844
|
}
|
|
10355
|
-
|
|
10356
|
-
CssProcessOptions,
|
|
10357
|
-
"environment" | "convertLengthUnits" | "rewriteCustomProperties"
|
|
10358
|
-
> & {
|
|
10359
|
-
cssTransforms?: CssTransformOptions;
|
|
10845
|
+
declare interface HtmlPrintOptions {
|
|
10360
10846
|
transforms?: HtmlTransformOptions;
|
|
10361
10847
|
collapseWhitespace?: boolean | "all" | "conservative" | "smart";
|
|
10362
10848
|
mergeStyles?: boolean;
|
|
10849
|
+
mergeScripts?: boolean;
|
|
10363
10850
|
removeEmptyAttributes?: boolean;
|
|
10364
10851
|
removeEmptyElements?: boolean;
|
|
10365
10852
|
removeRedundantAttributes?: boolean | "all" | "smart";
|
|
@@ -10372,7 +10859,7 @@ type HtmlPrintOptions = Pick<
|
|
|
10372
10859
|
) => undefined | string;
|
|
10373
10860
|
deferEmbeddedSource?: DeferredEmbeddedSource[];
|
|
10374
10861
|
deferSrcdoc?: boolean;
|
|
10375
|
-
}
|
|
10862
|
+
}
|
|
10376
10863
|
declare interface HtmlProcessOptions {
|
|
10377
10864
|
/**
|
|
10378
10865
|
* context element tag name for fragment parsing (see `parseHtml`); the HTML analog of the CSS parser's `as` parse-mode option
|
|
@@ -10389,26 +10876,6 @@ declare interface HtmlProcessOptions {
|
|
|
10389
10876
|
*/
|
|
10390
10877
|
minimize?: boolean;
|
|
10391
10878
|
|
|
10392
|
-
/**
|
|
10393
|
-
* 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
|
|
10394
|
-
*/
|
|
10395
|
-
environment?: CssEnvironment;
|
|
10396
|
-
|
|
10397
|
-
/**
|
|
10398
|
-
* CSS's too, handed over with `environment` (see `HtmlPrintOptions`)
|
|
10399
|
-
*/
|
|
10400
|
-
convertLengthUnits?: boolean;
|
|
10401
|
-
|
|
10402
|
-
/**
|
|
10403
|
-
* CSS's too, handed over with `environment` (see `HtmlPrintOptions`)
|
|
10404
|
-
*/
|
|
10405
|
-
rewriteCustomProperties?: boolean;
|
|
10406
|
-
|
|
10407
|
-
/**
|
|
10408
|
-
* CSS's per-transform switches too, handed over with `environment` (see `HtmlPrintOptions`)
|
|
10409
|
-
*/
|
|
10410
|
-
cssTransforms?: CssTransformOptions;
|
|
10411
|
-
|
|
10412
10879
|
/**
|
|
10413
10880
|
* which of the meaning-preserving rewrites the minifying print makes; each is on unless it is `false`
|
|
10414
10881
|
*/
|
|
@@ -10434,6 +10901,11 @@ declare interface HtmlProcessOptions {
|
|
|
10434
10901
|
*/
|
|
10435
10902
|
mergeStyles?: boolean;
|
|
10436
10903
|
|
|
10904
|
+
/**
|
|
10905
|
+
* 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)
|
|
10906
|
+
*/
|
|
10907
|
+
mergeScripts?: boolean;
|
|
10908
|
+
|
|
10437
10909
|
/**
|
|
10438
10910
|
* print an element's attributes commonest name first, ties by name, which nothing in HTML reads (default false)
|
|
10439
10911
|
*/
|
|
@@ -10445,7 +10917,7 @@ declare interface HtmlProcessOptions {
|
|
|
10445
10917
|
sortTokenLists?: boolean;
|
|
10446
10918
|
|
|
10447
10919
|
/**
|
|
10448
|
-
* drop an attribute whose value is the element's own default; `true` is `"smart"`, and `"all"` also drops the spec defaults a selector can match (default false)
|
|
10920
|
+
* drop an attribute whose value is the element's own default; `true` is `"smart"`, and `"all"` also drops the spec defaults a selector can match, and with them a value naming no keyword where that says the same (default false)
|
|
10449
10921
|
*/
|
|
10450
10922
|
removeRedundantAttributes?: boolean | "all" | "smart";
|
|
10451
10923
|
|
|
@@ -10460,12 +10932,12 @@ declare interface HtmlProcessOptions {
|
|
|
10460
10932
|
deferSrcdoc?: boolean;
|
|
10461
10933
|
|
|
10462
10934
|
/**
|
|
10463
|
-
* 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.
|
|
10935
|
+
* 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`
|
|
10464
10936
|
*/
|
|
10465
10937
|
deferEmbeddedSource?: DeferredEmbeddedSource[];
|
|
10466
10938
|
|
|
10467
10939
|
/**
|
|
10468
|
-
* renders each nested body this document embeds — an inline `<style>`, every `style=""` (
|
|
10940
|
+
* 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
|
|
10469
10941
|
*/
|
|
10470
10942
|
renderEmbeddedSource?: (
|
|
10471
10943
|
source: string,
|
|
@@ -10720,25 +11192,15 @@ declare interface HtmlTransformHtmlContext {
|
|
|
10720
11192
|
}
|
|
10721
11193
|
declare interface HtmlTransformOptions {
|
|
10722
11194
|
/**
|
|
10723
|
-
* write a boolean attribute
|
|
11195
|
+
* write a boolean attribute as the bare name its presence already means; `true` only the spellings the spec canonicalizes, `"all"` any value
|
|
10724
11196
|
*/
|
|
10725
|
-
collapseBooleanAttributes?: boolean;
|
|
11197
|
+
collapseBooleanAttributes?: boolean | "all";
|
|
10726
11198
|
|
|
10727
11199
|
/**
|
|
10728
11200
|
* 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
|
|
10729
11201
|
*/
|
|
10730
11202
|
comments?: string | boolean | RegExp | ((comment: string) => boolean);
|
|
10731
11203
|
|
|
10732
|
-
/**
|
|
10733
|
-
* strip the whitespace between a JSON `<script>`'s tokens
|
|
10734
|
-
*/
|
|
10735
|
-
minifyJson?: boolean;
|
|
10736
|
-
|
|
10737
|
-
/**
|
|
10738
|
-
* run the CSS minifier over an inline `<style>` and every `style=""`
|
|
10739
|
-
*/
|
|
10740
|
-
minifyStyles?: boolean;
|
|
10741
|
-
|
|
10742
11204
|
/**
|
|
10743
11205
|
* drop or re-pick an attribute value's quotes
|
|
10744
11206
|
*/
|
|
@@ -10759,6 +11221,11 @@ declare interface HtmlTransformOptions {
|
|
|
10759
11221
|
*/
|
|
10760
11222
|
normalizeNumericAttributes?: boolean;
|
|
10761
11223
|
|
|
11224
|
+
/**
|
|
11225
|
+
* drop the whitespace around a URL value (`href`, `src`, `action`, …), which resolving the URL skips over
|
|
11226
|
+
*/
|
|
11227
|
+
normalizeUrlAttributes?: boolean;
|
|
11228
|
+
|
|
10762
11229
|
/**
|
|
10763
11230
|
* leave out an optional tag other than the `<html>` / `<head>` / `<body>` shell, which is `removeImpliedTags`
|
|
10764
11231
|
*/
|
|
@@ -11251,6 +11718,15 @@ declare interface ImportMetaParserOptionsKnown {
|
|
|
11251
11718
|
declare interface ImportMetaParserOptionsUnknown {
|
|
11252
11719
|
[index: string]: boolean;
|
|
11253
11720
|
}
|
|
11721
|
+
|
|
11722
|
+
declare interface ImportModuleMethod {
|
|
11723
|
+
(
|
|
11724
|
+
request: string,
|
|
11725
|
+
options: undefined | ImportModuleOptions,
|
|
11726
|
+
callback: (err?: null | Error, exports?: any) => void
|
|
11727
|
+
): void;
|
|
11728
|
+
(request: string, options?: ImportModuleOptions): Promise<any>;
|
|
11729
|
+
}
|
|
11254
11730
|
declare interface ImportModuleOptions {
|
|
11255
11731
|
/**
|
|
11256
11732
|
* the target layer
|
|
@@ -11405,13 +11881,19 @@ declare class InitFragment<GenerateContext> {
|
|
|
11405
11881
|
declare abstract class InlinedUsedName {
|
|
11406
11882
|
value: InlinedValue;
|
|
11407
11883
|
suffix: string[];
|
|
11408
|
-
render(comment
|
|
11884
|
+
render(comment?: string): string;
|
|
11885
|
+
|
|
11886
|
+
/**
|
|
11887
|
+
* Updates the hash with the data contributed by this instance.
|
|
11888
|
+
*/
|
|
11889
|
+
updateHash(hash: Hash): void;
|
|
11409
11890
|
}
|
|
11410
11891
|
declare abstract class InlinedValue {
|
|
11411
11892
|
kind: InlinedValueKind;
|
|
11412
11893
|
value?: null | string | number | boolean;
|
|
11413
11894
|
renderLiteral(): string;
|
|
11414
11895
|
render(comment: string): string;
|
|
11896
|
+
equals(other: InlinedValue): boolean;
|
|
11415
11897
|
serialize(__0: ObjectSerializerContextObjectMiddlewareObject_3): void;
|
|
11416
11898
|
deserialize(__0: ObjectDeserializerContextObjectMiddlewareObject_2): void;
|
|
11417
11899
|
}
|
|
@@ -11686,15 +12168,6 @@ declare class JavascriptModulesPlugin {
|
|
|
11686
12168
|
[Module, Partial<RenderBootstrapContext>],
|
|
11687
12169
|
string | void
|
|
11688
12170
|
>;
|
|
11689
|
-
/**
|
|
11690
|
-
* Offers a module's rendered export-definition call to a consumer that can place
|
|
11691
|
-
* it better — a library whose entry exports the same bindings natively takes it
|
|
11692
|
-
* over and emits it only where the module is wrapped. Return true to take it.
|
|
11693
|
-
*/
|
|
11694
|
-
onDemandExportsGeneration: SyncBailHook<
|
|
11695
|
-
[Module, RuntimeSpec, string, boolean],
|
|
11696
|
-
boolean | void
|
|
11697
|
-
>;
|
|
11698
12171
|
/**
|
|
11699
12172
|
* @since 5.22.0
|
|
11700
12173
|
*/
|
|
@@ -11775,15 +12248,6 @@ declare class JavascriptModulesPlugin {
|
|
|
11775
12248
|
[Module, Partial<RenderBootstrapContext>],
|
|
11776
12249
|
string | void
|
|
11777
12250
|
>;
|
|
11778
|
-
/**
|
|
11779
|
-
* Offers a module's rendered export-definition call to a consumer that can place
|
|
11780
|
-
* it better — a library whose entry exports the same bindings natively takes it
|
|
11781
|
-
* over and emits it only where the module is wrapped. Return true to take it.
|
|
11782
|
-
*/
|
|
11783
|
-
onDemandExportsGeneration: SyncBailHook<
|
|
11784
|
-
[Module, RuntimeSpec, string, boolean],
|
|
11785
|
-
boolean | void
|
|
11786
|
-
>;
|
|
11787
12251
|
/**
|
|
11788
12252
|
* @since 5.22.0
|
|
11789
12253
|
*/
|
|
@@ -11864,15 +12328,6 @@ declare class JavascriptModulesPlugin {
|
|
|
11864
12328
|
[Module, Partial<RenderBootstrapContext>],
|
|
11865
12329
|
string | void
|
|
11866
12330
|
>;
|
|
11867
|
-
/**
|
|
11868
|
-
* Offers a module's rendered export-definition call to a consumer that can place
|
|
11869
|
-
* it better — a library whose entry exports the same bindings natively takes it
|
|
11870
|
-
* over and emits it only where the module is wrapped. Return true to take it.
|
|
11871
|
-
*/
|
|
11872
|
-
onDemandExportsGeneration: SyncBailHook<
|
|
11873
|
-
[Module, RuntimeSpec, string, boolean],
|
|
11874
|
-
boolean | void
|
|
11875
|
-
>;
|
|
11876
12331
|
/**
|
|
11877
12332
|
* @since 5.22.0
|
|
11878
12333
|
*/
|
|
@@ -11955,15 +12410,6 @@ declare class JavascriptModulesPlugin {
|
|
|
11955
12410
|
[Module, Partial<RenderBootstrapContext>],
|
|
11956
12411
|
string | void
|
|
11957
12412
|
>;
|
|
11958
|
-
/**
|
|
11959
|
-
* Offers a module's rendered export-definition call to a consumer that can place
|
|
11960
|
-
* it better — a library whose entry exports the same bindings natively takes it
|
|
11961
|
-
* over and emits it only where the module is wrapped. Return true to take it.
|
|
11962
|
-
*/
|
|
11963
|
-
onDemandExportsGeneration: SyncBailHook<
|
|
11964
|
-
[Module, RuntimeSpec, string, boolean],
|
|
11965
|
-
boolean | void
|
|
11966
|
-
>;
|
|
11967
12413
|
/**
|
|
11968
12414
|
* @since 5.22.0
|
|
11969
12415
|
*/
|
|
@@ -12044,15 +12490,6 @@ declare class JavascriptModulesPlugin {
|
|
|
12044
12490
|
[Module, Partial<RenderBootstrapContext>],
|
|
12045
12491
|
string | void
|
|
12046
12492
|
>;
|
|
12047
|
-
/**
|
|
12048
|
-
* Offers a module's rendered export-definition call to a consumer that can place
|
|
12049
|
-
* it better — a library whose entry exports the same bindings natively takes it
|
|
12050
|
-
* over and emits it only where the module is wrapped. Return true to take it.
|
|
12051
|
-
*/
|
|
12052
|
-
onDemandExportsGeneration: SyncBailHook<
|
|
12053
|
-
[Module, RuntimeSpec, string, boolean],
|
|
12054
|
-
boolean | void
|
|
12055
|
-
>;
|
|
12056
12493
|
/**
|
|
12057
12494
|
* @since 5.22.0
|
|
12058
12495
|
*/
|
|
@@ -12133,15 +12570,6 @@ declare class JavascriptModulesPlugin {
|
|
|
12133
12570
|
[Module, Partial<RenderBootstrapContext>],
|
|
12134
12571
|
string | void
|
|
12135
12572
|
>;
|
|
12136
|
-
/**
|
|
12137
|
-
* Offers a module's rendered export-definition call to a consumer that can place
|
|
12138
|
-
* it better — a library whose entry exports the same bindings natively takes it
|
|
12139
|
-
* over and emits it only where the module is wrapped. Return true to take it.
|
|
12140
|
-
*/
|
|
12141
|
-
onDemandExportsGeneration: SyncBailHook<
|
|
12142
|
-
[Module, RuntimeSpec, string, boolean],
|
|
12143
|
-
boolean | void
|
|
12144
|
-
>;
|
|
12145
12573
|
/**
|
|
12146
12574
|
* @since 5.22.0
|
|
12147
12575
|
*/
|
|
@@ -12221,15 +12649,6 @@ declare class JavascriptModulesPlugin {
|
|
|
12221
12649
|
[Module, Partial<RenderBootstrapContext>],
|
|
12222
12650
|
string | void
|
|
12223
12651
|
>;
|
|
12224
|
-
/**
|
|
12225
|
-
* Offers a module's rendered export-definition call to a consumer that can place
|
|
12226
|
-
* it better — a library whose entry exports the same bindings natively takes it
|
|
12227
|
-
* over and emits it only where the module is wrapped. Return true to take it.
|
|
12228
|
-
*/
|
|
12229
|
-
onDemandExportsGeneration: SyncBailHook<
|
|
12230
|
-
[Module, RuntimeSpec, string, boolean],
|
|
12231
|
-
boolean | void
|
|
12232
|
-
>;
|
|
12233
12652
|
/**
|
|
12234
12653
|
* @since 5.22.0
|
|
12235
12654
|
*/
|
|
@@ -12391,6 +12810,11 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12391
12810
|
boolean | void
|
|
12392
12811
|
>
|
|
12393
12812
|
>;
|
|
12813
|
+
/**
|
|
12814
|
+
* Every statement the hoisting pass reads, which a tap on this turns
|
|
12815
|
+
* back into a walk of them all. Tap `preStatementByType` instead.
|
|
12816
|
+
* @deprecated TODO webpack 6: remove, with the statement walk it turns on
|
|
12817
|
+
*/
|
|
12394
12818
|
preStatement: SyncBailHook<
|
|
12395
12819
|
[
|
|
12396
12820
|
| ImportDeclaration
|
|
@@ -12425,6 +12849,9 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12425
12849
|
boolean | void
|
|
12426
12850
|
>;
|
|
12427
12851
|
/**
|
|
12852
|
+
* Each declaration the parser records: a variable, function or class
|
|
12853
|
+
* one. Any other type turns the pass back into a walk of every
|
|
12854
|
+
* statement, and goes away with that walk in webpack 6.
|
|
12428
12855
|
* @since 5.109.0
|
|
12429
12856
|
*/
|
|
12430
12857
|
preStatementByType: HookMap<
|
|
@@ -12462,6 +12889,11 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12462
12889
|
boolean | void
|
|
12463
12890
|
>
|
|
12464
12891
|
>;
|
|
12892
|
+
/**
|
|
12893
|
+
* Every statement the block pass reads, which a tap on this turns back
|
|
12894
|
+
* into a walk of them all. Tap `blockPreStatementByType` instead.
|
|
12895
|
+
* @deprecated TODO webpack 6: remove, with the statement walk it turns on
|
|
12896
|
+
*/
|
|
12465
12897
|
blockPreStatement: SyncBailHook<
|
|
12466
12898
|
[
|
|
12467
12899
|
| ImportDeclaration
|
|
@@ -12496,6 +12928,9 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12496
12928
|
boolean | void
|
|
12497
12929
|
>;
|
|
12498
12930
|
/**
|
|
12931
|
+
* Each statement the parser records for the block pass: a variable, class
|
|
12932
|
+
* or export declaration. Any other type turns the pass back into a walk
|
|
12933
|
+
* of every statement, and goes away with that walk in webpack 6.
|
|
12499
12934
|
* @since 5.109.0
|
|
12500
12935
|
*/
|
|
12501
12936
|
blockPreStatementByType: HookMap<
|
|
@@ -12570,10 +13005,13 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12570
13005
|
/**
|
|
12571
13006
|
* @since 5.105.0
|
|
12572
13007
|
*/
|
|
12573
|
-
collectGuards: SyncBailHook<
|
|
13008
|
+
collectGuards: SyncBailHook<
|
|
13009
|
+
[ExpressionEstreeIndex],
|
|
13010
|
+
void | GuardCollection
|
|
13011
|
+
>;
|
|
12574
13012
|
classExtendsExpression: SyncBailHook<
|
|
12575
13013
|
[
|
|
12576
|
-
|
|
13014
|
+
ExpressionEstreeIndex,
|
|
12577
13015
|
ClassExpression | ClassDeclaration | MaybeNamedClassDeclaration
|
|
12578
13016
|
],
|
|
12579
13017
|
boolean | void
|
|
@@ -12590,7 +13028,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12590
13028
|
*/
|
|
12591
13029
|
classBodyValue: SyncBailHook<
|
|
12592
13030
|
[
|
|
12593
|
-
|
|
13031
|
+
ExpressionEstreeIndex,
|
|
12594
13032
|
MethodDefinition | PropertyDefinition,
|
|
12595
13033
|
ClassExpression | ClassDeclaration | MaybeNamedClassDeclaration
|
|
12596
13034
|
],
|
|
@@ -12699,16 +13137,20 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12699
13137
|
* @since 5.101.3
|
|
12700
13138
|
*/
|
|
12701
13139
|
collectDestructuringAssignmentProperties: SyncBailHook<
|
|
12702
|
-
[
|
|
13140
|
+
[ExpressionEstreeIndex],
|
|
12703
13141
|
boolean | void
|
|
12704
13142
|
>;
|
|
12705
|
-
canRename: HookMap<SyncBailHook<[
|
|
12706
|
-
rename: HookMap<SyncBailHook<[
|
|
13143
|
+
canRename: HookMap<SyncBailHook<[ExpressionEstreeIndex], boolean | void>>;
|
|
13144
|
+
rename: HookMap<SyncBailHook<[ExpressionEstreeIndex], boolean | void>>;
|
|
12707
13145
|
assign: HookMap<SyncBailHook<[AssignmentExpression], boolean | void>>;
|
|
13146
|
+
write: HookMap<SyncBailHook<[WriteStatement], boolean | void>>;
|
|
13147
|
+
writeMemberChain: HookMap<
|
|
13148
|
+
SyncBailHook<[WriteStatement, string[]], boolean | void>
|
|
13149
|
+
>;
|
|
12708
13150
|
assignMemberChain: HookMap<
|
|
12709
13151
|
SyncBailHook<[AssignmentExpression, string[]], boolean | void>
|
|
12710
13152
|
>;
|
|
12711
|
-
typeof: HookMap<SyncBailHook<[
|
|
13153
|
+
typeof: HookMap<SyncBailHook<[ExpressionEstreeIndex], boolean | void>>;
|
|
12712
13154
|
importCall: SyncBailHook<
|
|
12713
13155
|
[
|
|
12714
13156
|
ImportExpressionJavascriptParser,
|
|
@@ -12759,7 +13201,13 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12759
13201
|
>;
|
|
12760
13202
|
memberChainOfCallMemberChain: HookMap<
|
|
12761
13203
|
SyncBailHook<
|
|
12762
|
-
[
|
|
13204
|
+
[
|
|
13205
|
+
ExpressionEstreeIndex,
|
|
13206
|
+
string[],
|
|
13207
|
+
CallExpression,
|
|
13208
|
+
string[],
|
|
13209
|
+
[number, number][]
|
|
13210
|
+
],
|
|
12763
13211
|
boolean | void
|
|
12764
13212
|
>
|
|
12765
13213
|
>;
|
|
@@ -12781,7 +13229,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12781
13229
|
* @since 5.71.0
|
|
12782
13230
|
*/
|
|
12783
13231
|
binaryExpression: SyncBailHook<[BinaryExpression], boolean | void>;
|
|
12784
|
-
expression: HookMap<SyncBailHook<[
|
|
13232
|
+
expression: HookMap<SyncBailHook<[ExpressionEstreeIndex], boolean | void>>;
|
|
12785
13233
|
expressionMemberChain: HookMap<
|
|
12786
13234
|
SyncBailHook<
|
|
12787
13235
|
[MemberExpression, string[], boolean[], [number, number][]],
|
|
@@ -12799,12 +13247,18 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12799
13247
|
[LogicalExpression],
|
|
12800
13248
|
boolean | void
|
|
12801
13249
|
>;
|
|
12802
|
-
program: SyncBailHook<
|
|
13250
|
+
program: SyncBailHook<
|
|
13251
|
+
[ProgramImport, CommentJavascriptParser[]],
|
|
13252
|
+
boolean | void
|
|
13253
|
+
>;
|
|
12803
13254
|
/**
|
|
12804
13255
|
* @since 5.99.0
|
|
12805
13256
|
*/
|
|
12806
13257
|
terminate: SyncBailHook<[ReturnStatement | ThrowStatement], boolean | void>;
|
|
12807
|
-
finish: SyncBailHook<
|
|
13258
|
+
finish: SyncBailHook<
|
|
13259
|
+
[ProgramImport, CommentJavascriptParser[]],
|
|
13260
|
+
boolean | void
|
|
13261
|
+
>;
|
|
12808
13262
|
/**
|
|
12809
13263
|
* @since 5.99.9
|
|
12810
13264
|
*/
|
|
@@ -12882,7 +13336,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12882
13336
|
| ForOfStatement
|
|
12883
13337
|
| ExportDefaultDeclaration;
|
|
12884
13338
|
destructuringAssignmentProperties?: WeakMap<
|
|
12885
|
-
|
|
13339
|
+
ExpressionEstreeIndex,
|
|
12886
13340
|
Set<DestructuringAssignmentProperty>
|
|
12887
13341
|
>;
|
|
12888
13342
|
currentTagData?:
|
|
@@ -12898,7 +13352,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12898
13352
|
* Destructuring assignment properties for.
|
|
12899
13353
|
*/
|
|
12900
13354
|
destructuringAssignmentPropertiesFor(
|
|
12901
|
-
node:
|
|
13355
|
+
node: ExpressionEstreeIndex
|
|
12902
13356
|
): undefined | Set<DestructuringAssignmentProperty>;
|
|
12903
13357
|
|
|
12904
13358
|
/**
|
|
@@ -12944,9 +13398,11 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12944
13398
|
): void;
|
|
12945
13399
|
|
|
12946
13400
|
/**
|
|
12947
|
-
*
|
|
13401
|
+
* Walk every statement of a scope to declare what hoists to it. Only a tap
|
|
13402
|
+
* on the deprecated `preStatement` hook asks for this.
|
|
13403
|
+
* @deprecated TODO webpack 6: remove, with the `preStatement` hook
|
|
12948
13404
|
*/
|
|
12949
|
-
|
|
13405
|
+
preWalkStatements(
|
|
12950
13406
|
statements: (
|
|
12951
13407
|
| ImportDeclaration
|
|
12952
13408
|
| ExportNamedDeclaration
|
|
@@ -12978,9 +13434,89 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12978
13434
|
): void;
|
|
12979
13435
|
|
|
12980
13436
|
/**
|
|
12981
|
-
* Pre
|
|
13437
|
+
* Pre walk block statement.
|
|
13438
|
+
* @deprecated TODO webpack 6: remove, with the `preStatement` hook
|
|
12982
13439
|
*/
|
|
12983
|
-
|
|
13440
|
+
preWalkBlockStatement(statement: BlockStatement): void;
|
|
13441
|
+
|
|
13442
|
+
/**
|
|
13443
|
+
* Pre walk if statement.
|
|
13444
|
+
* @deprecated TODO webpack 6: remove, with the `preStatement` hook
|
|
13445
|
+
*/
|
|
13446
|
+
preWalkIfStatement(statement: IfStatement): void;
|
|
13447
|
+
|
|
13448
|
+
/**
|
|
13449
|
+
* Pre walk labeled statement.
|
|
13450
|
+
* @deprecated TODO webpack 6: remove, with the `preStatement` hook
|
|
13451
|
+
*/
|
|
13452
|
+
preWalkLabeledStatement(statement: LabeledStatement): void;
|
|
13453
|
+
|
|
13454
|
+
/**
|
|
13455
|
+
* Pre walk with statement.
|
|
13456
|
+
* @deprecated TODO webpack 6: remove, with the `preStatement` hook
|
|
13457
|
+
*/
|
|
13458
|
+
preWalkWithStatement(statement: WithStatement): void;
|
|
13459
|
+
|
|
13460
|
+
/**
|
|
13461
|
+
* Pre walk switch statement.
|
|
13462
|
+
* @deprecated TODO webpack 6: remove, with the `preStatement` hook
|
|
13463
|
+
*/
|
|
13464
|
+
preWalkSwitchStatement(statement: SwitchStatement): void;
|
|
13465
|
+
|
|
13466
|
+
/**
|
|
13467
|
+
* Pre walk switch cases.
|
|
13468
|
+
* @deprecated TODO webpack 6: remove, with the `preStatement` hook
|
|
13469
|
+
*/
|
|
13470
|
+
preWalkSwitchCases(switchCases: SwitchCase[]): void;
|
|
13471
|
+
|
|
13472
|
+
/**
|
|
13473
|
+
* Pre walk try statement.
|
|
13474
|
+
* @deprecated TODO webpack 6: remove, with the `preStatement` hook
|
|
13475
|
+
*/
|
|
13476
|
+
preWalkTryStatement(statement: TryStatement): void;
|
|
13477
|
+
|
|
13478
|
+
/**
|
|
13479
|
+
* Pre walk catch clause.
|
|
13480
|
+
* @deprecated TODO webpack 6: remove, with the `preStatement` hook
|
|
13481
|
+
*/
|
|
13482
|
+
preWalkCatchClause(catchClause: CatchClause): void;
|
|
13483
|
+
|
|
13484
|
+
/**
|
|
13485
|
+
* Pre walk while statement.
|
|
13486
|
+
* @deprecated TODO webpack 6: remove, with the `preStatement` hook
|
|
13487
|
+
*/
|
|
13488
|
+
preWalkWhileStatement(statement: WhileStatement): void;
|
|
13489
|
+
|
|
13490
|
+
/**
|
|
13491
|
+
* Pre walk do while statement.
|
|
13492
|
+
* @deprecated TODO webpack 6: remove, with the `preStatement` hook
|
|
13493
|
+
*/
|
|
13494
|
+
preWalkDoWhileStatement(statement: DoWhileStatement): void;
|
|
13495
|
+
|
|
13496
|
+
/**
|
|
13497
|
+
* Pre walk for statement.
|
|
13498
|
+
* @deprecated TODO webpack 6: remove, with the `preStatement` hook
|
|
13499
|
+
*/
|
|
13500
|
+
preWalkForStatement(statement: ForStatement): void;
|
|
13501
|
+
|
|
13502
|
+
/**
|
|
13503
|
+
* Pre walk for in statement.
|
|
13504
|
+
* @deprecated TODO webpack 6: remove, with the `preStatement` hook
|
|
13505
|
+
*/
|
|
13506
|
+
preWalkForInStatement(statement: ForInStatement): void;
|
|
13507
|
+
|
|
13508
|
+
/**
|
|
13509
|
+
* Pre walk for of statement. `for await` is reported by the walk, not here.
|
|
13510
|
+
* @deprecated TODO webpack 6: remove, with the `preStatement` hook
|
|
13511
|
+
*/
|
|
13512
|
+
preWalkForOfStatement(statement: ForOfStatement): void;
|
|
13513
|
+
|
|
13514
|
+
/**
|
|
13515
|
+
* Scan every top-level statement for the program's module declarations.
|
|
13516
|
+
* The parser records them now, so nothing inside webpack scans for them.
|
|
13517
|
+
* @deprecated TODO webpack 6: remove
|
|
13518
|
+
*/
|
|
13519
|
+
modulePreWalkStatements(
|
|
12984
13520
|
statements: (
|
|
12985
13521
|
| ImportDeclaration
|
|
12986
13522
|
| ExportNamedDeclaration
|
|
@@ -13012,7 +13548,9 @@ declare class JavascriptParser extends ParserClass {
|
|
|
13012
13548
|
): void;
|
|
13013
13549
|
|
|
13014
13550
|
/**
|
|
13015
|
-
*
|
|
13551
|
+
* Walk every statement of a list to declare what it binds. Only a tap on the
|
|
13552
|
+
* deprecated `blockPreStatement` hook asks for this.
|
|
13553
|
+
* @deprecated TODO webpack 6: remove, with the `blockPreStatement` hook
|
|
13016
13554
|
*/
|
|
13017
13555
|
blockPreWalkStatements(
|
|
13018
13556
|
statements: (
|
|
@@ -13191,11 +13729,6 @@ declare class JavascriptParser extends ParserClass {
|
|
|
13191
13729
|
*/
|
|
13192
13730
|
walkNestedStatement(statement: Statement): void;
|
|
13193
13731
|
|
|
13194
|
-
/**
|
|
13195
|
-
* Pre walk block statement.
|
|
13196
|
-
*/
|
|
13197
|
-
preWalkBlockStatement(statement: BlockStatement): void;
|
|
13198
|
-
|
|
13199
13732
|
/**
|
|
13200
13733
|
* Walk block statement.
|
|
13201
13734
|
*/
|
|
@@ -13206,11 +13739,6 @@ declare class JavascriptParser extends ParserClass {
|
|
|
13206
13739
|
*/
|
|
13207
13740
|
walkExpressionStatement(statement: ExpressionStatement): void;
|
|
13208
13741
|
|
|
13209
|
-
/**
|
|
13210
|
-
* Pre walk if statement.
|
|
13211
|
-
*/
|
|
13212
|
-
preWalkIfStatement(statement: IfStatement): void;
|
|
13213
|
-
|
|
13214
13742
|
/**
|
|
13215
13743
|
* Walks a conditional branch with its guard frame (if any) pushed onto the
|
|
13216
13744
|
* parser-state guard stack for the duration of the branch body.
|
|
@@ -13222,35 +13750,20 @@ declare class JavascriptParser extends ParserClass {
|
|
|
13222
13750
|
*/
|
|
13223
13751
|
walkIfStatement(statement: IfStatement): void;
|
|
13224
13752
|
|
|
13225
|
-
/**
|
|
13226
|
-
* Pre walk labeled statement.
|
|
13227
|
-
*/
|
|
13228
|
-
preWalkLabeledStatement(statement: LabeledStatement): void;
|
|
13229
|
-
|
|
13230
13753
|
/**
|
|
13231
13754
|
* Walk labeled statement.
|
|
13232
13755
|
*/
|
|
13233
13756
|
walkLabeledStatement(statement: LabeledStatement): void;
|
|
13234
13757
|
|
|
13235
|
-
/**
|
|
13236
|
-
* Pre walk with statement.
|
|
13237
|
-
*/
|
|
13238
|
-
preWalkWithStatement(statement: WithStatement): void;
|
|
13239
|
-
|
|
13240
13758
|
/**
|
|
13241
13759
|
* Walk with statement.
|
|
13242
13760
|
*/
|
|
13243
13761
|
walkWithStatement(statement: WithStatement): void;
|
|
13244
13762
|
|
|
13245
13763
|
/**
|
|
13246
|
-
*
|
|
13764
|
+
* Walk switch statement.
|
|
13247
13765
|
*/
|
|
13248
|
-
|
|
13249
|
-
|
|
13250
|
-
/**
|
|
13251
|
-
* Walk switch statement.
|
|
13252
|
-
*/
|
|
13253
|
-
walkSwitchStatement(statement: SwitchStatement): void;
|
|
13766
|
+
walkSwitchStatement(statement: SwitchStatement): void;
|
|
13254
13767
|
|
|
13255
13768
|
/**
|
|
13256
13769
|
* Walk terminating statement.
|
|
@@ -13267,61 +13780,31 @@ declare class JavascriptParser extends ParserClass {
|
|
|
13267
13780
|
*/
|
|
13268
13781
|
walkThrowStatement(statement: ThrowStatement): void;
|
|
13269
13782
|
|
|
13270
|
-
/**
|
|
13271
|
-
* Pre walk try statement.
|
|
13272
|
-
*/
|
|
13273
|
-
preWalkTryStatement(statement: TryStatement): void;
|
|
13274
|
-
|
|
13275
13783
|
/**
|
|
13276
13784
|
* Walk try statement.
|
|
13277
13785
|
*/
|
|
13278
13786
|
walkTryStatement(statement: TryStatement): void;
|
|
13279
13787
|
|
|
13280
|
-
/**
|
|
13281
|
-
* Pre walk while statement.
|
|
13282
|
-
*/
|
|
13283
|
-
preWalkWhileStatement(statement: WhileStatement): void;
|
|
13284
|
-
|
|
13285
13788
|
/**
|
|
13286
13789
|
* Walk while statement.
|
|
13287
13790
|
*/
|
|
13288
13791
|
walkWhileStatement(statement: WhileStatement): void;
|
|
13289
13792
|
|
|
13290
|
-
/**
|
|
13291
|
-
* Pre walk do while statement.
|
|
13292
|
-
*/
|
|
13293
|
-
preWalkDoWhileStatement(statement: DoWhileStatement): void;
|
|
13294
|
-
|
|
13295
13793
|
/**
|
|
13296
13794
|
* Walk do while statement.
|
|
13297
13795
|
*/
|
|
13298
13796
|
walkDoWhileStatement(statement: DoWhileStatement): void;
|
|
13299
13797
|
|
|
13300
|
-
/**
|
|
13301
|
-
* Pre walk for statement.
|
|
13302
|
-
*/
|
|
13303
|
-
preWalkForStatement(statement: ForStatement): void;
|
|
13304
|
-
|
|
13305
13798
|
/**
|
|
13306
13799
|
* Walk for statement.
|
|
13307
13800
|
*/
|
|
13308
13801
|
walkForStatement(statement: ForStatement): void;
|
|
13309
13802
|
|
|
13310
|
-
/**
|
|
13311
|
-
* Pre walk for in statement.
|
|
13312
|
-
*/
|
|
13313
|
-
preWalkForInStatement(statement: ForInStatement): void;
|
|
13314
|
-
|
|
13315
13803
|
/**
|
|
13316
13804
|
* Walk for in statement.
|
|
13317
13805
|
*/
|
|
13318
13806
|
walkForInStatement(statement: ForInStatement): void;
|
|
13319
13807
|
|
|
13320
|
-
/**
|
|
13321
|
-
* Pre walk for of statement.
|
|
13322
|
-
*/
|
|
13323
|
-
preWalkForOfStatement(statement: ForOfStatement): void;
|
|
13324
|
-
|
|
13325
13808
|
/**
|
|
13326
13809
|
* Walk for of statement.
|
|
13327
13810
|
*/
|
|
@@ -13356,7 +13839,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
13356
13839
|
*/
|
|
13357
13840
|
enterDestructuringAssignment(
|
|
13358
13841
|
pattern: Pattern,
|
|
13359
|
-
expression:
|
|
13842
|
+
expression: ExpressionEstreeIndex
|
|
13360
13843
|
):
|
|
13361
13844
|
| undefined
|
|
13362
13845
|
| ImportExpressionImport
|
|
@@ -13466,21 +13949,11 @@ declare class JavascriptParser extends ParserClass {
|
|
|
13466
13949
|
statement: ClassDeclaration | MaybeNamedClassDeclaration
|
|
13467
13950
|
): void;
|
|
13468
13951
|
|
|
13469
|
-
/**
|
|
13470
|
-
* Pre walk switch cases.
|
|
13471
|
-
*/
|
|
13472
|
-
preWalkSwitchCases(switchCases: SwitchCase[]): void;
|
|
13473
|
-
|
|
13474
13952
|
/**
|
|
13475
13953
|
* Processes the provided switch case.
|
|
13476
13954
|
*/
|
|
13477
13955
|
walkSwitchCases(switchCases: SwitchCase[]): void;
|
|
13478
13956
|
|
|
13479
|
-
/**
|
|
13480
|
-
* Pre walk catch clause.
|
|
13481
|
-
*/
|
|
13482
|
-
preWalkCatchClause(catchClause: CatchClause): void;
|
|
13483
|
-
|
|
13484
13957
|
/**
|
|
13485
13958
|
* Processes the provided catch clause.
|
|
13486
13959
|
*/
|
|
@@ -14047,12 +14520,14 @@ declare class JavascriptParser extends ParserClass {
|
|
|
14047
14520
|
/**
|
|
14048
14521
|
* Returns parsed string.
|
|
14049
14522
|
*/
|
|
14050
|
-
parseString(expression:
|
|
14523
|
+
parseString(expression: ExpressionEstreeIndex): string;
|
|
14051
14524
|
|
|
14052
14525
|
/**
|
|
14053
14526
|
* Parses calculated string.
|
|
14054
14527
|
*/
|
|
14055
|
-
parseCalculatedString(
|
|
14528
|
+
parseCalculatedString(
|
|
14529
|
+
expression: ExpressionEstreeIndex
|
|
14530
|
+
): CalculatedStringResult;
|
|
14056
14531
|
|
|
14057
14532
|
/**
|
|
14058
14533
|
* Returns evaluation result.
|
|
@@ -14113,7 +14588,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
14113
14588
|
start?: number;
|
|
14114
14589
|
end?: number;
|
|
14115
14590
|
range?: [number, number];
|
|
14116
|
-
loc?: null |
|
|
14591
|
+
loc?: null | SourceLocationImport;
|
|
14117
14592
|
}): DependencyLocation;
|
|
14118
14593
|
|
|
14119
14594
|
/**
|
|
@@ -14121,6 +14596,12 @@ declare class JavascriptParser extends ParserClass {
|
|
|
14121
14596
|
*/
|
|
14122
14597
|
getComments(range: [number, number]): CommentJavascriptParser[];
|
|
14123
14598
|
|
|
14599
|
+
/**
|
|
14600
|
+
* Where the comments written for `statement` begin: the run of comments
|
|
14601
|
+
* before it that whitespace alone separates from it and from each other.
|
|
14602
|
+
*/
|
|
14603
|
+
getAttachedCommentsStart(statement: StatementPathItem): number;
|
|
14604
|
+
|
|
14124
14605
|
/**
|
|
14125
14606
|
* Reports whether `identifier` may occur as a word in the source text of
|
|
14126
14607
|
* `range`. A conservative pre-filter for expensive AST scans: `false` means
|
|
@@ -14151,7 +14632,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
14151
14632
|
/**
|
|
14152
14633
|
* Checks whether this javascript parser is statement level expression.
|
|
14153
14634
|
*/
|
|
14154
|
-
isStatementLevelExpression(expr:
|
|
14635
|
+
isStatementLevelExpression(expr: ExpressionEstreeIndex): boolean;
|
|
14155
14636
|
|
|
14156
14637
|
/**
|
|
14157
14638
|
* Returns tag data.
|
|
@@ -14410,7 +14891,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
14410
14891
|
* Gets name for expression.
|
|
14411
14892
|
*/
|
|
14412
14893
|
getNameForExpression(
|
|
14413
|
-
expression:
|
|
14894
|
+
expression: ExpressionEstreeIndex
|
|
14414
14895
|
):
|
|
14415
14896
|
| undefined
|
|
14416
14897
|
| {
|
|
@@ -14423,7 +14904,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
14423
14904
|
* Returns parser.
|
|
14424
14905
|
*/
|
|
14425
14906
|
static extend(
|
|
14426
|
-
...plugins: ((BaseParser: typeof
|
|
14907
|
+
...plugins: ((BaseParser: typeof ParserParser) => typeof ParserParser)[]
|
|
14427
14908
|
): typeof JavascriptParser;
|
|
14428
14909
|
static ALLOWED_MEMBER_TYPES_ALL: number;
|
|
14429
14910
|
static ALLOWED_MEMBER_TYPES_CALL_EXPRESSION: number;
|
|
@@ -14616,6 +15097,12 @@ declare interface JavascriptParserOptions {
|
|
|
14616
15097
|
*/
|
|
14617
15098
|
sourceImport?: boolean;
|
|
14618
15099
|
|
|
15100
|
+
/**
|
|
15101
|
+
* 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.
|
|
15102
|
+
* @since 5.111.0
|
|
15103
|
+
*/
|
|
15104
|
+
specNamespaceObject?: boolean;
|
|
15105
|
+
|
|
14619
15106
|
/**
|
|
14620
15107
|
* Deprecated in favor of "exportsPresence". Emit errors instead of warnings when imported names don't exist in imported module.
|
|
14621
15108
|
* @deprecated
|
|
@@ -14801,6 +15288,11 @@ declare class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
|
|
|
14801
15288
|
compilation: Compilation
|
|
14802
15289
|
) => JsonpCompilationPluginHooks;
|
|
14803
15290
|
|
|
15291
|
+
/**
|
|
15292
|
+
* The answer a runtime module gives when it installs no chunk handler at all
|
|
15293
|
+
*/
|
|
15294
|
+
static NO_CHUNK_HANDLERS: [string, string][];
|
|
15295
|
+
|
|
14804
15296
|
/**
|
|
14805
15297
|
* Runtime modules without any dependencies to other runtime modules
|
|
14806
15298
|
*/
|
|
@@ -14888,6 +15380,26 @@ declare interface KnownAssetInfo {
|
|
|
14888
15380
|
*/
|
|
14889
15381
|
sourceFilename?: string;
|
|
14890
15382
|
|
|
15383
|
+
/**
|
|
15384
|
+
* true, when the asset was copied from a file by `output.copy`
|
|
15385
|
+
*/
|
|
15386
|
+
copied?: boolean;
|
|
15387
|
+
|
|
15388
|
+
/**
|
|
15389
|
+
* when set, the asset is emitted as a symbolic link rather than as its content
|
|
15390
|
+
*/
|
|
15391
|
+
symlink?: AssetSymlink;
|
|
15392
|
+
|
|
15393
|
+
/**
|
|
15394
|
+
* when set, the file the asset is written to is given these permissions
|
|
15395
|
+
*/
|
|
15396
|
+
mode?: number;
|
|
15397
|
+
|
|
15398
|
+
/**
|
|
15399
|
+
* when set, the file the asset is written to is stamped with these times
|
|
15400
|
+
*/
|
|
15401
|
+
timestamps?: AssetTimestamps;
|
|
15402
|
+
|
|
14891
15403
|
/**
|
|
14892
15404
|
* size in bytes, only set after asset has been emitted
|
|
14893
15405
|
*/
|
|
@@ -14926,14 +15438,20 @@ declare interface KnownAssetModuleBuildInfo {
|
|
|
14926
15438
|
filename?: string;
|
|
14927
15439
|
assetInfo?: AssetInfo;
|
|
14928
15440
|
fullContentHash?: string;
|
|
15441
|
+
|
|
15442
|
+
/**
|
|
15443
|
+
* the resource this asset is named after, when
|
|
15444
|
+
* something re-encoded it. Unlike `matchResource` this is serialized, so a
|
|
15445
|
+
* rename set while building survives the persistent cache
|
|
15446
|
+
*/
|
|
15447
|
+
assetResource?: string;
|
|
14929
15448
|
}
|
|
14930
15449
|
declare interface KnownBuildInfo {
|
|
14931
|
-
cacheable?: boolean;
|
|
14932
|
-
|
|
14933
15450
|
/**
|
|
14934
|
-
*
|
|
15451
|
+
* the module hands out a spec Module Namespace Exotic Object
|
|
14935
15452
|
*/
|
|
14936
|
-
|
|
15453
|
+
specNamespaceObject?: boolean;
|
|
15454
|
+
cacheable?: boolean;
|
|
14937
15455
|
strict?: boolean;
|
|
14938
15456
|
moduleArgument?: string;
|
|
14939
15457
|
exportsArgument?: string;
|
|
@@ -14950,50 +15468,30 @@ declare interface KnownBuildInfo {
|
|
|
14950
15468
|
topLevelDeclarations?: Set<string>;
|
|
14951
15469
|
|
|
14952
15470
|
/**
|
|
14953
|
-
* true when the module is
|
|
15471
|
+
* true when the module is in a synchronous circular dependency chain
|
|
14954
15472
|
*/
|
|
14955
15473
|
isCircular?: boolean;
|
|
14956
15474
|
|
|
14957
15475
|
/**
|
|
14958
|
-
*
|
|
14959
|
-
*/
|
|
14960
|
-
usesEval?: boolean;
|
|
14961
|
-
|
|
14962
|
-
/**
|
|
14963
|
-
* how many `#__PURE__` annotations sit where the parser does not read them
|
|
15476
|
+
* CircularKind bit flags from CircularModulesPlugin; unset when the plugin did not run
|
|
14964
15477
|
*/
|
|
14965
|
-
|
|
15478
|
+
circularKind?: number;
|
|
14966
15479
|
|
|
14967
15480
|
/**
|
|
14968
|
-
*
|
|
15481
|
+
* module uses top-level `for await…of` or `await using`, which can't be lowered to a generator
|
|
14969
15482
|
*/
|
|
14970
|
-
|
|
15483
|
+
usesTopLevelAwaitForOf?: boolean;
|
|
14971
15484
|
|
|
14972
15485
|
/**
|
|
14973
|
-
*
|
|
15486
|
+
* what the build recorded for stats and the performance hints to report
|
|
14974
15487
|
*/
|
|
14975
|
-
|
|
15488
|
+
diagnostics?: BuildDiagnostics;
|
|
14976
15489
|
}
|
|
14977
15490
|
declare interface KnownBuildMeta {
|
|
14978
15491
|
exportsType?: "default" | "namespace" | "flagged" | "dynamic";
|
|
14979
15492
|
defaultObject?: false | "redirect" | "redirect-warn";
|
|
14980
15493
|
async?: boolean;
|
|
14981
15494
|
sideEffectFree?: boolean;
|
|
14982
|
-
|
|
14983
|
-
/**
|
|
14984
|
-
* using in ModuleLibraryPlugin
|
|
14985
|
-
*/
|
|
14986
|
-
exportsFinalNameByRuntime?: Map<string, Record<string, string>>;
|
|
14987
|
-
|
|
14988
|
-
/**
|
|
14989
|
-
* using in ModuleLibraryPlugin
|
|
14990
|
-
*/
|
|
14991
|
-
exportsSourceByRuntime?: Map<string, string>;
|
|
14992
|
-
|
|
14993
|
-
/**
|
|
14994
|
-
* export definitions `ModuleLibraryPlugin` took over, re-emitted only where the module is wrapped
|
|
14995
|
-
*/
|
|
14996
|
-
exportsBindingSourceByRuntime?: Map<string, string>;
|
|
14997
15495
|
}
|
|
14998
15496
|
declare interface KnownConcatenatedModuleBuildInfo {
|
|
14999
15497
|
fileDependencies?: LazySet<string>;
|
|
@@ -15089,6 +15587,11 @@ declare interface KnownJavascriptModuleBuildInfo {
|
|
|
15089
15587
|
*/
|
|
15090
15588
|
moduleConcatenationBailout?: string;
|
|
15091
15589
|
|
|
15590
|
+
/**
|
|
15591
|
+
* what rules the module out as a concatenation root, while it may still be an inner module
|
|
15592
|
+
*/
|
|
15593
|
+
moduleConcatenationRootBailout?: string;
|
|
15594
|
+
|
|
15092
15595
|
/**
|
|
15093
15596
|
* using in APIPlugin
|
|
15094
15597
|
*/
|
|
@@ -15130,6 +15633,11 @@ declare interface KnownJsonModuleBuildInfo {
|
|
|
15130
15633
|
declare interface KnownMeta {
|
|
15131
15634
|
importVarMap?: Map<Module, string>;
|
|
15132
15635
|
deferredImportVarMap?: Map<Module, string>;
|
|
15636
|
+
|
|
15637
|
+
/**
|
|
15638
|
+
* generate export definitions on demand
|
|
15639
|
+
*/
|
|
15640
|
+
onDemandExports?: boolean;
|
|
15133
15641
|
}
|
|
15134
15642
|
declare interface KnownNormalModuleBuildInfo {
|
|
15135
15643
|
parsed?: boolean;
|
|
@@ -15615,6 +16123,11 @@ declare interface LStatTypes {
|
|
|
15615
16123
|
) => void
|
|
15616
16124
|
): void;
|
|
15617
16125
|
}
|
|
16126
|
+
declare interface LabelLike {
|
|
16127
|
+
kind?: null | string;
|
|
16128
|
+
name?: string;
|
|
16129
|
+
statementStart?: number;
|
|
16130
|
+
}
|
|
15618
16131
|
|
|
15619
16132
|
/**
|
|
15620
16133
|
* Options for the default backend.
|
|
@@ -15986,6 +16499,11 @@ declare class LoadScriptRuntimeModule extends HelperRuntimeModule {
|
|
|
15986
16499
|
compilation: Compilation
|
|
15987
16500
|
) => LoadScriptCompilationHooks;
|
|
15988
16501
|
|
|
16502
|
+
/**
|
|
16503
|
+
* The answer a runtime module gives when it installs no chunk handler at all
|
|
16504
|
+
*/
|
|
16505
|
+
static NO_CHUNK_HANDLERS: [string, string][];
|
|
16506
|
+
|
|
15989
16507
|
/**
|
|
15990
16508
|
* Runtime modules without any dependencies to other runtime modules
|
|
15991
16509
|
*/
|
|
@@ -16019,10 +16537,33 @@ declare class LoadScriptRuntimeModule extends HelperRuntimeModule {
|
|
|
16019
16537
|
declare interface Loader {
|
|
16020
16538
|
[index: string]: any;
|
|
16021
16539
|
}
|
|
16022
|
-
type
|
|
16023
|
-
|
|
16540
|
+
type LoaderContextLibIndex<OptionsType> =
|
|
16541
|
+
NormalModuleLoaderContext<OptionsType> &
|
|
16542
|
+
LoaderRunnerMutableContext<OptionsType> &
|
|
16543
|
+
LoaderRunnerReadonlyContext<OptionsType> &
|
|
16544
|
+
LoaderPluginLoaderContext &
|
|
16545
|
+
HotModuleReplacementPluginLoaderContext;
|
|
16546
|
+
type LoaderContextNormalModule<T> = NormalModuleLoaderContext<T> &
|
|
16547
|
+
LoaderRunnerMutableContext<T> &
|
|
16548
|
+
LoaderRunnerReadonlyContext<T> &
|
|
16024
16549
|
LoaderPluginLoaderContext &
|
|
16025
16550
|
HotModuleReplacementPluginLoaderContext;
|
|
16551
|
+
declare interface LoaderContextUtils {
|
|
16552
|
+
/**
|
|
16553
|
+
* returns a new request string using absolute paths when possible
|
|
16554
|
+
*/
|
|
16555
|
+
absolutify: (context: string, request: string) => string;
|
|
16556
|
+
|
|
16557
|
+
/**
|
|
16558
|
+
* returns a new request string avoiding absolute paths when possible
|
|
16559
|
+
*/
|
|
16560
|
+
contextify: (context: string, request: string) => string;
|
|
16561
|
+
|
|
16562
|
+
/**
|
|
16563
|
+
* creates a hash with the compilation's function
|
|
16564
|
+
*/
|
|
16565
|
+
createHash: (algorithm?: string | typeof Hash) => Hash;
|
|
16566
|
+
}
|
|
16026
16567
|
type LoaderDefinition<
|
|
16027
16568
|
OptionsType = {},
|
|
16028
16569
|
ContextAdditions = {}
|
|
@@ -16036,7 +16577,8 @@ declare interface LoaderDefinitionFunction<
|
|
|
16036
16577
|
> {
|
|
16037
16578
|
(
|
|
16038
16579
|
this: NormalModuleLoaderContext<OptionsType> &
|
|
16039
|
-
|
|
16580
|
+
LoaderRunnerMutableContext<OptionsType> &
|
|
16581
|
+
LoaderRunnerReadonlyContext<OptionsType> &
|
|
16040
16582
|
LoaderPluginLoaderContext &
|
|
16041
16583
|
HotModuleReplacementPluginLoaderContext &
|
|
16042
16584
|
ContextAdditions,
|
|
@@ -16045,6 +16587,21 @@ declare interface LoaderDefinitionFunction<
|
|
|
16045
16587
|
additionalData?: AdditionalData
|
|
16046
16588
|
): string | void | Buffer | Promise<string | Buffer>;
|
|
16047
16589
|
}
|
|
16590
|
+
declare interface LoaderEntry {
|
|
16591
|
+
request: string;
|
|
16592
|
+
path: string;
|
|
16593
|
+
query: string;
|
|
16594
|
+
fragment: string;
|
|
16595
|
+
options?: string | object;
|
|
16596
|
+
ident: string;
|
|
16597
|
+
normal?: Function;
|
|
16598
|
+
pitch?: Function;
|
|
16599
|
+
raw?: boolean;
|
|
16600
|
+
data?: object;
|
|
16601
|
+
pitchExecuted: boolean;
|
|
16602
|
+
normalExecuted: boolean;
|
|
16603
|
+
type?: "module" | "commonjs";
|
|
16604
|
+
}
|
|
16048
16605
|
declare interface LoaderItem {
|
|
16049
16606
|
loader: string;
|
|
16050
16607
|
options?: null | string | Record<string, any>;
|
|
@@ -16094,10 +16651,6 @@ declare interface LoaderOptionsPluginOptions {
|
|
|
16094
16651
|
context?: string;
|
|
16095
16652
|
};
|
|
16096
16653
|
}
|
|
16097
|
-
|
|
16098
|
-
/**
|
|
16099
|
-
* These properties are added by the LoaderPlugin
|
|
16100
|
-
*/
|
|
16101
16654
|
declare interface LoaderPluginLoaderContext {
|
|
16102
16655
|
/**
|
|
16103
16656
|
* Resolves the given request to a module, applies all configured loaders and calls
|
|
@@ -16105,7 +16658,7 @@ declare interface LoaderPluginLoaderContext {
|
|
|
16105
16658
|
* instance of NormalModule). Use this function if you need to know the source code
|
|
16106
16659
|
* of another module to generate the result.
|
|
16107
16660
|
*/
|
|
16108
|
-
loadModule(
|
|
16661
|
+
loadModule: (
|
|
16109
16662
|
request: string,
|
|
16110
16663
|
callback: (
|
|
16111
16664
|
err: null | Error,
|
|
@@ -16113,36 +16666,27 @@ declare interface LoaderPluginLoaderContext {
|
|
|
16113
16666
|
sourceMap?: null | object,
|
|
16114
16667
|
module?: Module
|
|
16115
16668
|
) => void
|
|
16116
|
-
)
|
|
16117
|
-
importModule
|
|
16118
|
-
request: string,
|
|
16119
|
-
options: undefined | ImportModuleOptions,
|
|
16120
|
-
callback: (err?: null | Error, exports?: any) => void
|
|
16121
|
-
): void;
|
|
16122
|
-
importModule(request: string, options?: ImportModuleOptions): Promise<any>;
|
|
16669
|
+
) => void;
|
|
16670
|
+
importModule: ImportModuleMethod;
|
|
16123
16671
|
}
|
|
16124
|
-
|
|
16125
|
-
/**
|
|
16126
|
-
* The properties are added by https://github.com/webpack/loader-runner
|
|
16127
|
-
*/
|
|
16128
|
-
declare interface LoaderRunnerLoaderContext<OptionsType> {
|
|
16672
|
+
declare interface LoaderRunnerMutableContext<OptionsType> {
|
|
16129
16673
|
/**
|
|
16130
16674
|
* Add a directory as dependency of the loader result.
|
|
16131
16675
|
*/
|
|
16132
|
-
addContextDependency(context: string)
|
|
16676
|
+
addContextDependency: (context: string) => void;
|
|
16133
16677
|
|
|
16134
16678
|
/**
|
|
16135
16679
|
* Adds a file as dependency of the loader result in order to make them watchable.
|
|
16136
16680
|
* For example, html-loader uses this technique as it finds src and src-set attributes.
|
|
16137
16681
|
* Then, it sets the url's for those attributes as dependencies of the html file that is parsed.
|
|
16138
16682
|
*/
|
|
16139
|
-
addDependency(file: string)
|
|
16140
|
-
addMissingDependency(context: string)
|
|
16683
|
+
addDependency: (file: string) => void;
|
|
16684
|
+
addMissingDependency: (context: string) => void;
|
|
16141
16685
|
|
|
16142
16686
|
/**
|
|
16143
16687
|
* Make this loader async.
|
|
16144
16688
|
*/
|
|
16145
|
-
async()
|
|
16689
|
+
async: () => (
|
|
16146
16690
|
err?: null | Error,
|
|
16147
16691
|
content?: string | Buffer,
|
|
16148
16692
|
sourceMap?: null | string | RawSourceMap,
|
|
@@ -16155,7 +16699,7 @@ declare interface LoaderRunnerLoaderContext<OptionsType> {
|
|
|
16155
16699
|
* This means the loader shouldn't have other dependencies than specified with this.addDependency.
|
|
16156
16700
|
* Most loaders are deterministic and cacheable.
|
|
16157
16701
|
*/
|
|
16158
|
-
cacheable(flag?: boolean)
|
|
16702
|
+
cacheable: (flag?: boolean) => void;
|
|
16159
16703
|
callback: (
|
|
16160
16704
|
err?: null | Error,
|
|
16161
16705
|
content?: string | Buffer,
|
|
@@ -16166,15 +16710,13 @@ declare interface LoaderRunnerLoaderContext<OptionsType> {
|
|
|
16166
16710
|
/**
|
|
16167
16711
|
* Remove all dependencies of the loader result. Even initial dependencies and these of other loaders.
|
|
16168
16712
|
*/
|
|
16169
|
-
clearDependencies()
|
|
16713
|
+
clearDependencies: () => void;
|
|
16170
16714
|
|
|
16171
16715
|
/**
|
|
16172
16716
|
* The directory of the module. Can be used as context for resolving other stuff.
|
|
16173
16717
|
* eg '/workspaces/ts-loader/examples/vanilla/src'
|
|
16174
16718
|
*/
|
|
16175
16719
|
context: string;
|
|
16176
|
-
readonly currentRequest: string;
|
|
16177
|
-
readonly data: any;
|
|
16178
16720
|
|
|
16179
16721
|
/**
|
|
16180
16722
|
* alias of addDependency
|
|
@@ -16182,53 +16724,22 @@ declare interface LoaderRunnerLoaderContext<OptionsType> {
|
|
|
16182
16724
|
* For example, html-loader uses this technique as it finds src and src-set attributes.
|
|
16183
16725
|
* Then, it sets the url's for those attributes as dependencies of the html file that is parsed.
|
|
16184
16726
|
*/
|
|
16185
|
-
dependency(file: string)
|
|
16186
|
-
getContextDependencies()
|
|
16187
|
-
getDependencies()
|
|
16188
|
-
getMissingDependencies()
|
|
16727
|
+
dependency: (file: string) => void;
|
|
16728
|
+
getContextDependencies: () => string[];
|
|
16729
|
+
getDependencies: () => string[];
|
|
16730
|
+
getMissingDependencies: () => string[];
|
|
16189
16731
|
|
|
16190
16732
|
/**
|
|
16191
16733
|
* The index in the loaders array of the current loader.
|
|
16192
16734
|
* In the example: in loader1: 0, in loader2: 1
|
|
16193
16735
|
*/
|
|
16194
16736
|
loaderIndex: number;
|
|
16195
|
-
readonly previousRequest: string;
|
|
16196
|
-
readonly query: string | OptionsType;
|
|
16197
|
-
readonly remainingRequest: string;
|
|
16198
|
-
readonly request: string;
|
|
16199
16737
|
|
|
16200
16738
|
/**
|
|
16201
16739
|
* An array of all the loaders. It is writeable in the pitch phase.
|
|
16202
16740
|
* loaders = [{request: string, path: string, query: string, module: function}]
|
|
16203
|
-
|
|
16204
|
-
|
|
16205
|
-
* { request: "/abc/loader1.js?xyz",
|
|
16206
|
-
* path: "/abc/loader1.js",
|
|
16207
|
-
* query: "?xyz",
|
|
16208
|
-
* module: [Function]
|
|
16209
|
-
* },
|
|
16210
|
-
* { request: "/abc/node_modules/loader2/index.js",
|
|
16211
|
-
* path: "/abc/node_modules/loader2/index.js",
|
|
16212
|
-
* query: "",
|
|
16213
|
-
* module: [Function]
|
|
16214
|
-
* }
|
|
16215
|
-
* ]
|
|
16216
|
-
*/
|
|
16217
|
-
loaders: {
|
|
16218
|
-
request: string;
|
|
16219
|
-
path: string;
|
|
16220
|
-
query: string;
|
|
16221
|
-
fragment: string;
|
|
16222
|
-
options?: string | object;
|
|
16223
|
-
ident: string;
|
|
16224
|
-
normal?: Function;
|
|
16225
|
-
pitch?: Function;
|
|
16226
|
-
raw?: boolean;
|
|
16227
|
-
data?: object;
|
|
16228
|
-
pitchExecuted: boolean;
|
|
16229
|
-
normalExecuted: boolean;
|
|
16230
|
-
type?: "module" | "commonjs";
|
|
16231
|
-
}[];
|
|
16741
|
+
*/
|
|
16742
|
+
loaders: LoaderEntry[];
|
|
16232
16743
|
|
|
16233
16744
|
/**
|
|
16234
16745
|
* The resource path.
|
|
@@ -16266,6 +16777,14 @@ declare interface LoaderRunnerLoaderContext<OptionsType> {
|
|
|
16266
16777
|
*/
|
|
16267
16778
|
environment: Environment;
|
|
16268
16779
|
}
|
|
16780
|
+
declare interface LoaderRunnerReadonlyContext<OptionsType> {
|
|
16781
|
+
readonly currentRequest: string;
|
|
16782
|
+
readonly data: any;
|
|
16783
|
+
readonly previousRequest: string;
|
|
16784
|
+
readonly query: string | OptionsType;
|
|
16785
|
+
readonly remainingRequest: string;
|
|
16786
|
+
readonly request: string;
|
|
16787
|
+
}
|
|
16269
16788
|
declare class LoaderTargetPlugin {
|
|
16270
16789
|
/**
|
|
16271
16790
|
* Creates an instance of LoaderTargetPlugin.
|
|
@@ -16478,7 +16997,7 @@ declare abstract class MainTemplate {
|
|
|
16478
16997
|
options: PathData
|
|
16479
16998
|
) => InterpolatedPathAndAssetInfo;
|
|
16480
16999
|
get requireFn(): "__webpack_require__";
|
|
16481
|
-
get outputOptions():
|
|
17000
|
+
get outputOptions(): OutputNormalizedWithDefaults;
|
|
16482
17001
|
}
|
|
16483
17002
|
declare interface MakeCacheableResult<T> {
|
|
16484
17003
|
(value: string, cache?: object): T;
|
|
@@ -17182,6 +17701,11 @@ declare class ModuleChunkLoadingRuntimeModule extends RuntimeModule {
|
|
|
17182
17701
|
linkPrefetch: SyncWaterfallHook<[string, Chunk], string>;
|
|
17183
17702
|
};
|
|
17184
17703
|
|
|
17704
|
+
/**
|
|
17705
|
+
* The answer a runtime module gives when it installs no chunk handler at all
|
|
17706
|
+
*/
|
|
17707
|
+
static NO_CHUNK_HANDLERS: [string, string][];
|
|
17708
|
+
|
|
17185
17709
|
/**
|
|
17186
17710
|
* Runtime modules without any dependencies to other runtime modules
|
|
17187
17711
|
*/
|
|
@@ -17985,7 +18509,7 @@ declare interface ModuleOptions {
|
|
|
17985
18509
|
defaultRules?: (undefined | null | false | "" | 0 | RuleSetRule | "...")[];
|
|
17986
18510
|
|
|
17987
18511
|
/**
|
|
17988
|
-
* Enable warnings for full dynamic dependencies.
|
|
18512
|
+
* Enable warnings for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextCritical'.
|
|
17989
18513
|
* @deprecated
|
|
17990
18514
|
*/
|
|
17991
18515
|
exprContextCritical?: boolean;
|
|
@@ -18185,6 +18709,7 @@ declare interface ModuleReferenceMatch {
|
|
|
18185
18709
|
start: number;
|
|
18186
18710
|
end: number;
|
|
18187
18711
|
name: string;
|
|
18712
|
+
leaked: boolean;
|
|
18188
18713
|
}
|
|
18189
18714
|
declare interface ModuleReferenceOptions {
|
|
18190
18715
|
/**
|
|
@@ -18673,7 +19198,7 @@ declare interface NodeEnvironmentPluginOptions {
|
|
|
18673
19198
|
infrastructureLogging: InfrastructureLogging;
|
|
18674
19199
|
}
|
|
18675
19200
|
type NodeEstreeIndex =
|
|
18676
|
-
|
|
|
19201
|
+
| ProgramImport
|
|
18677
19202
|
| ImportDeclaration
|
|
18678
19203
|
| ExportNamedDeclaration
|
|
18679
19204
|
| ExportAllDeclaration
|
|
@@ -18747,6 +19272,14 @@ type NodeEstreeIndex =
|
|
|
18747
19272
|
| AssignmentPattern
|
|
18748
19273
|
| SwitchCase
|
|
18749
19274
|
| TemplateElement;
|
|
19275
|
+
declare interface NodeLike {
|
|
19276
|
+
type: string;
|
|
19277
|
+
start: number;
|
|
19278
|
+
end: number;
|
|
19279
|
+
loc?: any;
|
|
19280
|
+
sourceFile?: string;
|
|
19281
|
+
range?: [number, number];
|
|
19282
|
+
}
|
|
18750
19283
|
|
|
18751
19284
|
/**
|
|
18752
19285
|
* Options object for node compatibility features.
|
|
@@ -18892,7 +19425,12 @@ declare class NormalModule extends Module {
|
|
|
18892
19425
|
sourceMap?: null | string | RawSourceMap,
|
|
18893
19426
|
associatedObjectForCache?: object
|
|
18894
19427
|
): Source;
|
|
18895
|
-
|
|
19428
|
+
|
|
19429
|
+
/**
|
|
19430
|
+
* Marks the module as failed, so what it generates says so. A tap or a
|
|
19431
|
+
* loader may fail with anything, and what reads the failure expects an error.
|
|
19432
|
+
*/
|
|
19433
|
+
markModuleAsErrored(error?: any): void;
|
|
18896
19434
|
applyNoParseRule(
|
|
18897
19435
|
rule: string | RegExp | ((content: string) => boolean),
|
|
18898
19436
|
content: string
|
|
@@ -18933,9 +19471,11 @@ declare class NormalModule extends Module {
|
|
|
18933
19471
|
*/
|
|
18934
19472
|
beforeSnapshot: SyncHook<[NormalModule]>;
|
|
18935
19473
|
/**
|
|
19474
|
+
* Async since 5.111.0, so a tap can await work of its own — minifying an
|
|
19475
|
+
* asset, say, which before only a loader could do. `tap` keeps working.
|
|
18936
19476
|
* @since 5.99.0
|
|
18937
19477
|
*/
|
|
18938
|
-
processResult:
|
|
19478
|
+
processResult: AsyncSeriesWaterfallHook<
|
|
18939
19479
|
[
|
|
18940
19480
|
[
|
|
18941
19481
|
string | Buffer,
|
|
@@ -19513,62 +20053,38 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
|
19513
20053
|
resolveOptions?: ResolveOptionsWithDependencyType
|
|
19514
20054
|
): ResolverWithOptions;
|
|
19515
20055
|
}
|
|
19516
|
-
|
|
19517
|
-
/**
|
|
19518
|
-
* These properties are added by the NormalModule
|
|
19519
|
-
*/
|
|
19520
20056
|
declare interface NormalModuleLoaderContext<OptionsType> {
|
|
19521
20057
|
version: number;
|
|
19522
20058
|
|
|
19523
|
-
/**
|
|
19524
|
-
* Extracts and parses the options of the current loader.
|
|
19525
|
-
* Parses string options as JSON or a query string.
|
|
19526
|
-
* Extracts and parses the options of the current loader.
|
|
19527
|
-
* Parses string options as JSON or a query string, and optionally validates them against a provided schema.
|
|
19528
|
-
*/
|
|
19529
|
-
|
|
19530
20059
|
/**
|
|
19531
20060
|
* Extracts and parses the options of the current loader.
|
|
19532
20061
|
* Parses string options as JSON or a query string.
|
|
19533
20062
|
*/
|
|
19534
|
-
getOptions
|
|
19535
|
-
|
|
19536
|
-
/**
|
|
19537
|
-
* Extracts and parses the options of the current loader.
|
|
19538
|
-
* Parses string options as JSON or a query string.
|
|
19539
|
-
* Extracts and parses the options of the current loader.
|
|
19540
|
-
* Parses string options as JSON or a query string, and optionally validates them against a provided schema.
|
|
19541
|
-
*/
|
|
19542
|
-
|
|
19543
|
-
/**
|
|
19544
|
-
* Extracts and parses the options of the current loader.
|
|
19545
|
-
* Parses string options as JSON or a query string, and optionally validates them against a provided schema.
|
|
19546
|
-
*/
|
|
19547
|
-
getOptions(schema: Parameters<typeof validateFunction>[0]): OptionsType;
|
|
20063
|
+
getOptions: GetOptionsMethod<OptionsType>;
|
|
19548
20064
|
|
|
19549
20065
|
/**
|
|
19550
20066
|
* Emits a warning for this module.
|
|
19551
20067
|
* The warning will be displayed to the user during compilation.
|
|
19552
20068
|
*/
|
|
19553
|
-
emitWarning(warning: string | Error)
|
|
20069
|
+
emitWarning: (warning: string | Error) => void;
|
|
19554
20070
|
|
|
19555
20071
|
/**
|
|
19556
20072
|
* Emits an error for this module.
|
|
19557
20073
|
* The error will be displayed to the user and typically causes the compilation to fail.
|
|
19558
20074
|
*/
|
|
19559
|
-
emitError(error: string | Error)
|
|
20075
|
+
emitError: (error: string | Error) => void;
|
|
19560
20076
|
|
|
19561
20077
|
/**
|
|
19562
20078
|
* Gets a logger instance scoped to this loader and module.
|
|
19563
20079
|
* Useful for emitting debug or compilation information in a structured way.
|
|
19564
20080
|
*/
|
|
19565
|
-
getLogger(name?: string)
|
|
20081
|
+
getLogger: (name?: string) => WebpackLogger;
|
|
19566
20082
|
|
|
19567
20083
|
/**
|
|
19568
20084
|
* Resolves a module request (e.g., a relative path or module name) to an absolute file path.
|
|
19569
20085
|
* It uses Webpack's internal resolver, taking into account configured aliases and extensions.
|
|
19570
20086
|
*/
|
|
19571
|
-
resolve(
|
|
20087
|
+
resolve: (
|
|
19572
20088
|
context: string,
|
|
19573
20089
|
request: string,
|
|
19574
20090
|
callback: (
|
|
@@ -19576,41 +20092,26 @@ declare interface NormalModuleLoaderContext<OptionsType> {
|
|
|
19576
20092
|
res?: string | false,
|
|
19577
20093
|
req?: ResolveRequest
|
|
19578
20094
|
) => void
|
|
19579
|
-
)
|
|
20095
|
+
) => void;
|
|
19580
20096
|
|
|
19581
20097
|
/**
|
|
19582
20098
|
* Creates a resolve function with specific options.
|
|
19583
20099
|
* The returned function can be used as a Promise-based resolver or a callback-based resolver.
|
|
19584
20100
|
*/
|
|
19585
|
-
getResolve(options?: ResolveOptionsWithDependencyType)
|
|
19586
|
-
(
|
|
19587
|
-
context: string,
|
|
19588
|
-
request: string,
|
|
19589
|
-
callback: (
|
|
19590
|
-
err: null | ErrorWithDetail,
|
|
19591
|
-
res?: string | false,
|
|
19592
|
-
req?: ResolveRequest
|
|
19593
|
-
) => void
|
|
19594
|
-
): void;
|
|
19595
|
-
(context: string, request: string): Promise<string>;
|
|
19596
|
-
};
|
|
20101
|
+
getResolve: (options?: ResolveOptionsWithDependencyType) => DualModeResolve;
|
|
19597
20102
|
|
|
19598
20103
|
/**
|
|
19599
20104
|
* Emits a new file (asset) to the compilation output directory.
|
|
19600
20105
|
* This allows loaders to generate additional files alongside the main module output.
|
|
19601
20106
|
*/
|
|
19602
|
-
emitFile(
|
|
20107
|
+
emitFile: (
|
|
19603
20108
|
name: string,
|
|
19604
20109
|
content: string | Buffer,
|
|
19605
20110
|
sourceMap?: string,
|
|
19606
20111
|
assetInfo?: AssetInfo
|
|
19607
|
-
)
|
|
19608
|
-
addBuildDependency(dep: string)
|
|
19609
|
-
utils:
|
|
19610
|
-
absolutify: (context: string, request: string) => string;
|
|
19611
|
-
contextify: (context: string, request: string) => string;
|
|
19612
|
-
createHash: (algorithm?: string | typeof Hash) => Hash;
|
|
19613
|
-
};
|
|
20112
|
+
) => void;
|
|
20113
|
+
addBuildDependency: (dep: string) => void;
|
|
20114
|
+
utils: LoaderContextUtils;
|
|
19614
20115
|
rootContext: string;
|
|
19615
20116
|
fs: InputFileSystem;
|
|
19616
20117
|
sourceMap?: boolean;
|
|
@@ -19744,7 +20245,7 @@ declare namespace ObjectDeserializerContextObjectMiddlewareObject_1 {
|
|
|
19744
20245
|
}
|
|
19745
20246
|
|
|
19746
20247
|
/**
|
|
19747
|
-
* Updates
|
|
20248
|
+
* Updates map size using the provided map.
|
|
19748
20249
|
*/
|
|
19749
20250
|
declare interface ObjectDeserializerContextObjectMiddlewareObject_2<
|
|
19750
20251
|
T extends ReadonlyArray<any> = ReadonlyArray<any>
|
|
@@ -19755,7 +20256,7 @@ declare interface ObjectDeserializerContextObjectMiddlewareObject_2<
|
|
|
19755
20256
|
}
|
|
19756
20257
|
|
|
19757
20258
|
/**
|
|
19758
|
-
* Updates
|
|
20259
|
+
* Updates map size using the provided map.
|
|
19759
20260
|
*/
|
|
19760
20261
|
declare interface ObjectDeserializerContextObjectMiddlewareObject_3 {
|
|
19761
20262
|
read: () => string;
|
|
@@ -19803,7 +20304,7 @@ declare interface ObjectEncodingOptionsTypes {
|
|
|
19803
20304
|
}
|
|
19804
20305
|
|
|
19805
20306
|
/**
|
|
19806
|
-
* Updates
|
|
20307
|
+
* Updates map size using the provided map.
|
|
19807
20308
|
*/
|
|
19808
20309
|
declare interface ObjectSerializer {
|
|
19809
20310
|
serialize: (
|
|
@@ -19816,7 +20317,7 @@ declare interface ObjectSerializer {
|
|
|
19816
20317
|
}
|
|
19817
20318
|
|
|
19818
20319
|
/**
|
|
19819
|
-
* Updates
|
|
20320
|
+
* Updates map size using the provided map.
|
|
19820
20321
|
*/
|
|
19821
20322
|
declare interface ObjectSerializerContextObjectMiddlewareObject_1 {
|
|
19822
20323
|
write: (
|
|
@@ -19848,7 +20349,7 @@ declare namespace ObjectSerializerContextObjectMiddlewareObject_2 {
|
|
|
19848
20349
|
}
|
|
19849
20350
|
|
|
19850
20351
|
/**
|
|
19851
|
-
* Updates
|
|
20352
|
+
* Updates map size using the provided map.
|
|
19852
20353
|
*/
|
|
19853
20354
|
declare interface ObjectSerializerContextObjectMiddlewareObject_3<
|
|
19854
20355
|
T extends ReadonlyArray<any> = ReadonlyArray<any>
|
|
@@ -19867,7 +20368,7 @@ declare interface ObjectSerializerContextObjectMiddlewareObject_3<
|
|
|
19867
20368
|
}
|
|
19868
20369
|
|
|
19869
20370
|
/**
|
|
19870
|
-
* Updates
|
|
20371
|
+
* Updates map size using the provided map.
|
|
19871
20372
|
*/
|
|
19872
20373
|
declare interface ObjectSerializerContextObjectMiddlewareObject_4 {
|
|
19873
20374
|
write: (
|
|
@@ -19886,7 +20387,7 @@ declare interface ObjectSerializerContextObjectMiddlewareObject_4 {
|
|
|
19886
20387
|
}
|
|
19887
20388
|
|
|
19888
20389
|
/**
|
|
19889
|
-
* Updates
|
|
20390
|
+
* Updates map size using the provided map.
|
|
19890
20391
|
*/
|
|
19891
20392
|
declare interface ObjectSerializerSnapshot {
|
|
19892
20393
|
length: number;
|
|
@@ -20014,10 +20515,15 @@ declare interface Optimization {
|
|
|
20014
20515
|
mergeDuplicateChunks?: boolean;
|
|
20015
20516
|
|
|
20016
20517
|
/**
|
|
20017
|
-
* Enable minimizing the output. Uses optimization.minimizer. An object
|
|
20518
|
+
* Enable minimizing the output. Uses optimization.minimizer. An options object implies 'true' and sets optimization.minimizeOptions.
|
|
20018
20519
|
*/
|
|
20019
20520
|
minimize?: boolean | OptimizationMinimizeOptions;
|
|
20020
20521
|
|
|
20522
|
+
/**
|
|
20523
|
+
* Enable minimizing the output, configured per asset type. An absent type is minimized with the defaults; `false` disables minimizing it.
|
|
20524
|
+
*/
|
|
20525
|
+
minimizeOptions?: OptimizationMinimizeOptions;
|
|
20526
|
+
|
|
20021
20527
|
/**
|
|
20022
20528
|
* Minimizer(s) to use for minimizing the output.
|
|
20023
20529
|
*/
|
|
@@ -20108,6 +20614,12 @@ declare interface Optimization {
|
|
|
20108
20614
|
* @since 5.110.0
|
|
20109
20615
|
*/
|
|
20110
20616
|
declare interface OptimizationMinimizeCss {
|
|
20617
|
+
/**
|
|
20618
|
+
* 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.
|
|
20619
|
+
* @since 5.111.0
|
|
20620
|
+
*/
|
|
20621
|
+
colorFallbacks?: boolean;
|
|
20622
|
+
|
|
20111
20623
|
/**
|
|
20112
20624
|
* 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.
|
|
20113
20625
|
* @since 5.110.0
|
|
@@ -20120,6 +20632,24 @@ declare interface OptimizationMinimizeCss {
|
|
|
20120
20632
|
*/
|
|
20121
20633
|
convertLengthUnits?: boolean;
|
|
20122
20634
|
|
|
20635
|
+
/**
|
|
20636
|
+
* 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.
|
|
20637
|
+
* @since 5.111.0
|
|
20638
|
+
*/
|
|
20639
|
+
foldCase?: boolean;
|
|
20640
|
+
|
|
20641
|
+
/**
|
|
20642
|
+
* 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.
|
|
20643
|
+
* @since 5.111.0
|
|
20644
|
+
*/
|
|
20645
|
+
lowerUnsupported?: boolean;
|
|
20646
|
+
|
|
20647
|
+
/**
|
|
20648
|
+
* 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.
|
|
20649
|
+
* @since 5.111.0
|
|
20650
|
+
*/
|
|
20651
|
+
mergeDistantRules?: boolean;
|
|
20652
|
+
|
|
20123
20653
|
/**
|
|
20124
20654
|
* 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.
|
|
20125
20655
|
* @since 5.110.0
|
|
@@ -20138,6 +20668,12 @@ declare interface OptimizationMinimizeCss {
|
|
|
20138
20668
|
*/
|
|
20139
20669
|
normalizeQuotes?: boolean;
|
|
20140
20670
|
|
|
20671
|
+
/**
|
|
20672
|
+
* 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.
|
|
20673
|
+
* @since 5.111.0
|
|
20674
|
+
*/
|
|
20675
|
+
pseudoClasses?: { [index: string]: string };
|
|
20676
|
+
|
|
20141
20677
|
/**
|
|
20142
20678
|
* 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.
|
|
20143
20679
|
* @since 5.110.0
|
|
@@ -20145,17 +20681,35 @@ declare interface OptimizationMinimizeCss {
|
|
|
20145
20681
|
reduceFunctions?: boolean;
|
|
20146
20682
|
|
|
20147
20683
|
/**
|
|
20148
|
-
* Drop a rule or declaration nothing can read: a rule whose block ends up empty, a declaration
|
|
20684
|
+
* 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`.
|
|
20149
20685
|
* @since 5.110.0
|
|
20150
20686
|
*/
|
|
20151
20687
|
removeDeadRules?: boolean;
|
|
20152
20688
|
|
|
20689
|
+
/**
|
|
20690
|
+
* 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()`.
|
|
20691
|
+
* @since 5.111.0
|
|
20692
|
+
*/
|
|
20693
|
+
resolveCustomAtRules?: boolean;
|
|
20694
|
+
|
|
20153
20695
|
/**
|
|
20154
20696
|
* 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.
|
|
20155
20697
|
* @since 5.110.0
|
|
20156
20698
|
*/
|
|
20157
20699
|
rewriteCustomProperties?: boolean;
|
|
20158
20700
|
|
|
20701
|
+
/**
|
|
20702
|
+
* 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.
|
|
20703
|
+
* @since 5.111.0
|
|
20704
|
+
*/
|
|
20705
|
+
rewriteDirSelector?: boolean;
|
|
20706
|
+
|
|
20707
|
+
/**
|
|
20708
|
+
* 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.
|
|
20709
|
+
* @since 5.111.0
|
|
20710
|
+
*/
|
|
20711
|
+
rewriteEscapes?: boolean;
|
|
20712
|
+
|
|
20159
20713
|
/**
|
|
20160
20714
|
* 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.
|
|
20161
20715
|
* @since 5.110.0
|
|
@@ -20163,7 +20717,7 @@ declare interface OptimizationMinimizeCss {
|
|
|
20163
20717
|
shortenColors?: boolean;
|
|
20164
20718
|
|
|
20165
20719
|
/**
|
|
20166
|
-
*
|
|
20720
|
+
* 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.
|
|
20167
20721
|
* @since 5.110.0
|
|
20168
20722
|
*/
|
|
20169
20723
|
shortenMediaQueries?: boolean;
|
|
@@ -20186,6 +20740,12 @@ declare interface OptimizationMinimizeCss {
|
|
|
20186
20740
|
*/
|
|
20187
20741
|
shortenValues?: boolean;
|
|
20188
20742
|
|
|
20743
|
+
/**
|
|
20744
|
+
* 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.
|
|
20745
|
+
* @since 5.111.0
|
|
20746
|
+
*/
|
|
20747
|
+
unusedSymbols?: string[];
|
|
20748
|
+
|
|
20189
20749
|
/**
|
|
20190
20750
|
* 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.
|
|
20191
20751
|
* @since 5.110.0
|
|
@@ -20199,10 +20759,10 @@ declare interface OptimizationMinimizeCss {
|
|
|
20199
20759
|
*/
|
|
20200
20760
|
declare interface OptimizationMinimizeHtml {
|
|
20201
20761
|
/**
|
|
20202
|
-
* Write a boolean attribute
|
|
20762
|
+
* 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.
|
|
20203
20763
|
* @since 5.110.0
|
|
20204
20764
|
*/
|
|
20205
|
-
collapseBooleanAttributes?: boolean;
|
|
20765
|
+
collapseBooleanAttributes?: boolean | "all";
|
|
20206
20766
|
|
|
20207
20767
|
/**
|
|
20208
20768
|
* 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.
|
|
@@ -20216,6 +20776,12 @@ declare interface OptimizationMinimizeHtml {
|
|
|
20216
20776
|
*/
|
|
20217
20777
|
comments?: string | boolean | RegExp | ((comment: string) => boolean);
|
|
20218
20778
|
|
|
20779
|
+
/**
|
|
20780
|
+
* 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.
|
|
20781
|
+
* @since 5.111.0
|
|
20782
|
+
*/
|
|
20783
|
+
mergeScripts?: boolean;
|
|
20784
|
+
|
|
20219
20785
|
/**
|
|
20220
20786
|
* 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.
|
|
20221
20787
|
* @since 5.110.0
|
|
@@ -20228,24 +20794,6 @@ declare interface OptimizationMinimizeHtml {
|
|
|
20228
20794
|
*/
|
|
20229
20795
|
minifyConditionalComments?: boolean;
|
|
20230
20796
|
|
|
20231
|
-
/**
|
|
20232
|
-
* 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.
|
|
20233
|
-
* @since 5.110.0
|
|
20234
|
-
*/
|
|
20235
|
-
minifyJson?: boolean;
|
|
20236
|
-
|
|
20237
|
-
/**
|
|
20238
|
-
* 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.
|
|
20239
|
-
* @since 5.110.0
|
|
20240
|
-
*/
|
|
20241
|
-
minifySrcdoc?: boolean;
|
|
20242
|
-
|
|
20243
|
-
/**
|
|
20244
|
-
* Run the CSS minimizer over an inline `<style>` element and every `style=""` attribute, with the options `optimization.minimize.css` names. On by default.
|
|
20245
|
-
* @since 5.110.0
|
|
20246
|
-
*/
|
|
20247
|
-
minifyStyles?: boolean;
|
|
20248
|
-
|
|
20249
20797
|
/**
|
|
20250
20798
|
* 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.
|
|
20251
20799
|
* @since 5.110.0
|
|
@@ -20259,7 +20807,7 @@ declare interface OptimizationMinimizeHtml {
|
|
|
20259
20807
|
normalizeEnumeratedAttributes?: boolean;
|
|
20260
20808
|
|
|
20261
20809
|
/**
|
|
20262
|
-
* 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.
|
|
20810
|
+
* 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.
|
|
20263
20811
|
* @since 5.110.0
|
|
20264
20812
|
*/
|
|
20265
20813
|
normalizeListAttributes?: boolean;
|
|
@@ -20270,6 +20818,12 @@ declare interface OptimizationMinimizeHtml {
|
|
|
20270
20818
|
*/
|
|
20271
20819
|
normalizeNumericAttributes?: boolean;
|
|
20272
20820
|
|
|
20821
|
+
/**
|
|
20822
|
+
* 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.
|
|
20823
|
+
* @since 5.111.0
|
|
20824
|
+
*/
|
|
20825
|
+
normalizeUrlAttributes?: boolean;
|
|
20826
|
+
|
|
20273
20827
|
/**
|
|
20274
20828
|
* 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.
|
|
20275
20829
|
* @since 5.110.0
|
|
@@ -20307,7 +20861,7 @@ declare interface OptimizationMinimizeHtml {
|
|
|
20307
20861
|
sortAttributes?: boolean;
|
|
20308
20862
|
|
|
20309
20863
|
/**
|
|
20310
|
-
* 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.
|
|
20864
|
+
* 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.
|
|
20311
20865
|
* @since 5.110.0
|
|
20312
20866
|
*/
|
|
20313
20867
|
sortTokenLists?: boolean;
|
|
@@ -20403,9 +20957,15 @@ declare interface OptimizationNormalized {
|
|
|
20403
20957
|
mergeDuplicateChunks?: boolean;
|
|
20404
20958
|
|
|
20405
20959
|
/**
|
|
20406
|
-
* Enable minimizing the output. Uses optimization.minimizer.
|
|
20960
|
+
* Enable minimizing the output. Uses optimization.minimizer.
|
|
20407
20961
|
*/
|
|
20408
|
-
minimize?:
|
|
20962
|
+
minimize?: boolean;
|
|
20963
|
+
|
|
20964
|
+
/**
|
|
20965
|
+
* Enable minimizing the output, configured per asset type. An absent type is minimized with the defaults; `false` disables minimizing it.
|
|
20966
|
+
* @since 5.110.0
|
|
20967
|
+
*/
|
|
20968
|
+
minimizeOptions?: OptimizationMinimizeOptions;
|
|
20409
20969
|
|
|
20410
20970
|
/**
|
|
20411
20971
|
* Minimizer(s) to use for minimizing the output.
|
|
@@ -20533,7 +21093,8 @@ type OptimizationNormalizedWithDefaults = OptimizationNormalized & {
|
|
|
20533
21093
|
mangleWasmImports: NonNullable<undefined | boolean>;
|
|
20534
21094
|
portableRecords: NonNullable<undefined | boolean>;
|
|
20535
21095
|
realContentHash: NonNullable<undefined | boolean>;
|
|
20536
|
-
minimize: NonNullable<undefined |
|
|
21096
|
+
minimize: NonNullable<undefined | boolean>;
|
|
21097
|
+
minimizeOptions: OptimizationMinimizeOptions;
|
|
20537
21098
|
minimizer: (
|
|
20538
21099
|
| ((this: Compiler, compiler: Compiler) => void)
|
|
20539
21100
|
| WebpackPluginInstance
|
|
@@ -20821,7 +21382,17 @@ declare interface OptimizationSplitChunksOptions {
|
|
|
20821
21382
|
*/
|
|
20822
21383
|
usedExports?: boolean;
|
|
20823
21384
|
}
|
|
20824
|
-
declare
|
|
21385
|
+
declare abstract class OptionsApply {
|
|
21386
|
+
/**
|
|
21387
|
+
* Returns options object.
|
|
21388
|
+
*/
|
|
21389
|
+
process(
|
|
21390
|
+
options: WebpackOptionsNormalizedWithDefaults,
|
|
21391
|
+
compiler: Compiler,
|
|
21392
|
+
interception?: WebpackOptionsInterception
|
|
21393
|
+
): WebpackOptionsNormalizedWithDefaults;
|
|
21394
|
+
}
|
|
21395
|
+
declare interface OptionsDelegatedModuleFactoryPlugin {
|
|
20825
21396
|
/**
|
|
20826
21397
|
* source
|
|
20827
21398
|
*/
|
|
@@ -20857,15 +21428,126 @@ declare interface Options {
|
|
|
20857
21428
|
*/
|
|
20858
21429
|
associatedObjectForCache?: object;
|
|
20859
21430
|
}
|
|
20860
|
-
declare
|
|
21431
|
+
declare interface OptionsParser {
|
|
20861
21432
|
/**
|
|
20862
|
-
*
|
|
21433
|
+
* which edition to parse
|
|
20863
21434
|
*/
|
|
20864
|
-
|
|
20865
|
-
|
|
20866
|
-
|
|
20867
|
-
|
|
20868
|
-
|
|
21435
|
+
ecmaVersion: EcmaVersion;
|
|
21436
|
+
|
|
21437
|
+
/**
|
|
21438
|
+
* the goal symbol
|
|
21439
|
+
*/
|
|
21440
|
+
sourceType?: "module" | "commonjs" | "script";
|
|
21441
|
+
|
|
21442
|
+
/**
|
|
21443
|
+
* whether the code is strict whatever it says
|
|
21444
|
+
*/
|
|
21445
|
+
strict?: boolean;
|
|
21446
|
+
|
|
21447
|
+
/**
|
|
21448
|
+
* called where a semicolon was inserted
|
|
21449
|
+
*/
|
|
21450
|
+
onInsertedSemicolon?: (
|
|
21451
|
+
lastTokEnd: number,
|
|
21452
|
+
lastTokEndLoc?: null | Position
|
|
21453
|
+
) => void;
|
|
21454
|
+
|
|
21455
|
+
/**
|
|
21456
|
+
* called at a trailing comma
|
|
21457
|
+
*/
|
|
21458
|
+
onTrailingComma?: (
|
|
21459
|
+
lastTokEnd: number,
|
|
21460
|
+
lastTokEndLoc?: null | Position
|
|
21461
|
+
) => void;
|
|
21462
|
+
|
|
21463
|
+
/**
|
|
21464
|
+
* whether reserved words may name things
|
|
21465
|
+
*/
|
|
21466
|
+
allowReserved?: boolean | "never";
|
|
21467
|
+
|
|
21468
|
+
/**
|
|
21469
|
+
* whether `return` may sit at the top level
|
|
21470
|
+
*/
|
|
21471
|
+
allowReturnOutsideFunction?: boolean;
|
|
21472
|
+
|
|
21473
|
+
/**
|
|
21474
|
+
* whether module syntax may sit anywhere
|
|
21475
|
+
*/
|
|
21476
|
+
allowImportExportEverywhere?: boolean;
|
|
21477
|
+
|
|
21478
|
+
/**
|
|
21479
|
+
* whether `await` may sit outside a function
|
|
21480
|
+
*/
|
|
21481
|
+
allowAwaitOutsideFunction?: boolean;
|
|
21482
|
+
|
|
21483
|
+
/**
|
|
21484
|
+
* whether `super` may sit outside a method
|
|
21485
|
+
*/
|
|
21486
|
+
allowSuperOutsideMethod?: boolean;
|
|
21487
|
+
|
|
21488
|
+
/**
|
|
21489
|
+
* whether a leading `#!` line is skipped
|
|
21490
|
+
*/
|
|
21491
|
+
allowHashBang?: boolean;
|
|
21492
|
+
|
|
21493
|
+
/**
|
|
21494
|
+
* whether private names must be declared
|
|
21495
|
+
*/
|
|
21496
|
+
checkPrivateFields?: boolean;
|
|
21497
|
+
|
|
21498
|
+
/**
|
|
21499
|
+
* whether nodes carry `loc`
|
|
21500
|
+
*/
|
|
21501
|
+
locations?: boolean;
|
|
21502
|
+
|
|
21503
|
+
/**
|
|
21504
|
+
* where the first offset falls
|
|
21505
|
+
*/
|
|
21506
|
+
startLocation?: { line: number; column: number };
|
|
21507
|
+
|
|
21508
|
+
/**
|
|
21509
|
+
* where tokens are reported
|
|
21510
|
+
*/
|
|
21511
|
+
onToken?: any[] | ((token?: any) => void);
|
|
21512
|
+
|
|
21513
|
+
/**
|
|
21514
|
+
* where comments are reported
|
|
21515
|
+
*/
|
|
21516
|
+
onComment?:
|
|
21517
|
+
| any[]
|
|
21518
|
+
| ((
|
|
21519
|
+
isBlock: boolean,
|
|
21520
|
+
text: string,
|
|
21521
|
+
start: number,
|
|
21522
|
+
end: number,
|
|
21523
|
+
startLoc?: null | Position,
|
|
21524
|
+
endLoc?: null | Position
|
|
21525
|
+
) => void);
|
|
21526
|
+
|
|
21527
|
+
/**
|
|
21528
|
+
* whether nodes carry `range`
|
|
21529
|
+
*/
|
|
21530
|
+
ranges?: boolean;
|
|
21531
|
+
|
|
21532
|
+
/**
|
|
21533
|
+
* a program node to append to
|
|
21534
|
+
*/
|
|
21535
|
+
program?: NodeLike;
|
|
21536
|
+
|
|
21537
|
+
/**
|
|
21538
|
+
* the name errors and locations carry
|
|
21539
|
+
*/
|
|
21540
|
+
sourceFile?: string;
|
|
21541
|
+
|
|
21542
|
+
/**
|
|
21543
|
+
* the name every node carries
|
|
21544
|
+
*/
|
|
21545
|
+
directSourceFile?: string;
|
|
21546
|
+
|
|
21547
|
+
/**
|
|
21548
|
+
* whether parentheses become nodes
|
|
21549
|
+
*/
|
|
21550
|
+
preserveParens?: boolean;
|
|
20869
21551
|
}
|
|
20870
21552
|
declare interface OriginRecord {
|
|
20871
21553
|
module: null | Module;
|
|
@@ -20959,6 +21641,12 @@ declare interface Output {
|
|
|
20959
21641
|
*/
|
|
20960
21642
|
compareBeforeEmit?: boolean;
|
|
20961
21643
|
|
|
21644
|
+
/**
|
|
21645
|
+
* Copy files and directories to the output directory.
|
|
21646
|
+
* @since 5.111.0
|
|
21647
|
+
*/
|
|
21648
|
+
copy?: string | CopyPattern[];
|
|
21649
|
+
|
|
20962
21650
|
/**
|
|
20963
21651
|
* This option enables cross-origin loading of chunks.
|
|
20964
21652
|
*/
|
|
@@ -21243,6 +21931,24 @@ declare interface OutputFileSystem {
|
|
|
21243
21931
|
pathLike: PathLikeFs,
|
|
21244
21932
|
callback: (err: null | NodeJS.ErrnoException) => void
|
|
21245
21933
|
) => void;
|
|
21934
|
+
symlink?: (
|
|
21935
|
+
target: PathLikeFs,
|
|
21936
|
+
path: PathLikeFs,
|
|
21937
|
+
type: undefined | null | "file" | "dir" | "junction",
|
|
21938
|
+
callback: (err: null | NodeJS.ErrnoException) => void
|
|
21939
|
+
) => void;
|
|
21940
|
+
readlink?: ReadlinkFs;
|
|
21941
|
+
chmod?: (
|
|
21942
|
+
path: PathLikeFs,
|
|
21943
|
+
mode: string | number,
|
|
21944
|
+
callback: (err: null | NodeJS.ErrnoException) => void
|
|
21945
|
+
) => void;
|
|
21946
|
+
utimes?: (
|
|
21947
|
+
path: PathLikeFs,
|
|
21948
|
+
atime: string | number | Date,
|
|
21949
|
+
mtime: string | number | Date,
|
|
21950
|
+
callback: (err: null | NodeJS.ErrnoException) => void
|
|
21951
|
+
) => void;
|
|
21246
21952
|
stat: StatFs;
|
|
21247
21953
|
lstat?: LStatFs;
|
|
21248
21954
|
readFile: ReadFileFs;
|
|
@@ -21484,6 +22190,11 @@ declare interface OutputNormalized {
|
|
|
21484
22190
|
*/
|
|
21485
22191
|
compareBeforeEmit?: boolean;
|
|
21486
22192
|
|
|
22193
|
+
/**
|
|
22194
|
+
* Patterns of files which are copied to the output directory, and the options of the copying itself.
|
|
22195
|
+
*/
|
|
22196
|
+
copy?: CopyOptions;
|
|
22197
|
+
|
|
21487
22198
|
/**
|
|
21488
22199
|
* This option enables cross-origin loading of chunks.
|
|
21489
22200
|
*/
|
|
@@ -21781,7 +22492,7 @@ declare interface ParameterizedComparator<TArg extends object, T> {
|
|
|
21781
22492
|
type ParseErrorSeverity = "error" | "warning";
|
|
21782
22493
|
declare interface ParseOptionsJavascriptParser {
|
|
21783
22494
|
sourceType: "module" | "script";
|
|
21784
|
-
ecmaVersion:
|
|
22495
|
+
ecmaVersion: EcmaVersion;
|
|
21785
22496
|
locations?: boolean;
|
|
21786
22497
|
comments?: boolean;
|
|
21787
22498
|
ranges?: boolean;
|
|
@@ -21789,7 +22500,7 @@ declare interface ParseOptionsJavascriptParser {
|
|
|
21789
22500
|
allowReturnOutsideFunction?: boolean;
|
|
21790
22501
|
|
|
21791
22502
|
/**
|
|
21792
|
-
* internal: serve `range` lazily and skip
|
|
22503
|
+
* internal: serve `range` lazily and skip the parser's location/range tracking
|
|
21793
22504
|
*/
|
|
21794
22505
|
lazyNodes?: boolean;
|
|
21795
22506
|
|
|
@@ -21815,7 +22526,7 @@ declare interface ParseOptionsSyntax {
|
|
|
21815
22526
|
comment?: (input: string, start: number, end: number) => number;
|
|
21816
22527
|
}
|
|
21817
22528
|
declare interface ParseResult {
|
|
21818
|
-
ast:
|
|
22529
|
+
ast: ProgramImport;
|
|
21819
22530
|
comments: CommentJavascriptParser[];
|
|
21820
22531
|
}
|
|
21821
22532
|
declare interface ParsedIdentifier {
|
|
@@ -21957,6 +22668,111 @@ declare interface ParserOptionsByModuleTypeKnown {
|
|
|
21957
22668
|
declare interface ParserOptionsByModuleTypeUnknown {
|
|
21958
22669
|
[index: string]: { [index: string]: any };
|
|
21959
22670
|
}
|
|
22671
|
+
|
|
22672
|
+
/**
|
|
22673
|
+
* The ECMAScript parser webpack owns, ported from acorn 8.18.0 so the bundler
|
|
22674
|
+
* ships no parser dependency. `lib/javascript/syntax.js` subclasses it and
|
|
22675
|
+
* overrides the hot paths.
|
|
22676
|
+
* acorn source: https://github.com/acornjs/acorn/blob/8.18.0/acorn/src/state.js
|
|
22677
|
+
*/
|
|
22678
|
+
declare class ParserParser {
|
|
22679
|
+
constructor(
|
|
22680
|
+
options: undefined | null | Partial<OptionsParser>,
|
|
22681
|
+
input: string,
|
|
22682
|
+
startPos?: number
|
|
22683
|
+
);
|
|
22684
|
+
options: ResolvedOptionsParser;
|
|
22685
|
+
sourceFile: null | string;
|
|
22686
|
+
keywords: RegExp;
|
|
22687
|
+
reservedWords: RegExp;
|
|
22688
|
+
reservedWordsStrict: RegExp;
|
|
22689
|
+
reservedWordsStrictBind: RegExp;
|
|
22690
|
+
input: string;
|
|
22691
|
+
containsEsc: boolean;
|
|
22692
|
+
pos: number;
|
|
22693
|
+
curLine: number;
|
|
22694
|
+
lineStart: number;
|
|
22695
|
+
type: TokenType;
|
|
22696
|
+
value: any;
|
|
22697
|
+
end: number;
|
|
22698
|
+
start: number;
|
|
22699
|
+
endLoc?: Position;
|
|
22700
|
+
startLoc?: Position;
|
|
22701
|
+
lastTokStartLoc?: null | Position;
|
|
22702
|
+
lastTokEndLoc?: null | Position;
|
|
22703
|
+
lastTokEnd: number;
|
|
22704
|
+
lastTokStart: number;
|
|
22705
|
+
context: TokContextLike[];
|
|
22706
|
+
exprAllowed: boolean;
|
|
22707
|
+
inModule: boolean;
|
|
22708
|
+
strict: boolean;
|
|
22709
|
+
potentialArrowAt: number;
|
|
22710
|
+
potentialArrowInForAwait: boolean;
|
|
22711
|
+
awaitIdentPos: number;
|
|
22712
|
+
awaitPos: number;
|
|
22713
|
+
yieldPos: number;
|
|
22714
|
+
labels: LabelLike[];
|
|
22715
|
+
undefinedExports: Record<string, NodeLike>;
|
|
22716
|
+
scopeStack: ScopeParser[];
|
|
22717
|
+
regexpState: null | RegExpValidationState;
|
|
22718
|
+
privateNameStack: any[];
|
|
22719
|
+
get inFunction(): boolean;
|
|
22720
|
+
get inGenerator(): boolean;
|
|
22721
|
+
get inAsync(): boolean;
|
|
22722
|
+
get canAwait(): boolean;
|
|
22723
|
+
get allowReturn(): boolean;
|
|
22724
|
+
get allowSuper(): boolean;
|
|
22725
|
+
get allowDirectSuper(): boolean;
|
|
22726
|
+
get treatFunctionsAsVar(): number | boolean;
|
|
22727
|
+
get allowNewDotTarget(): boolean;
|
|
22728
|
+
get allowUsing(): boolean;
|
|
22729
|
+
get inClassStaticBlock(): boolean;
|
|
22730
|
+
|
|
22731
|
+
/**
|
|
22732
|
+
* Whether a directive prologue starting at `start` opens with `"use strict"`.
|
|
22733
|
+
* acorn source: https://github.com/acornjs/acorn/blob/8.18.0/acorn/src/parseutil.js
|
|
22734
|
+
*/
|
|
22735
|
+
strictDirective(start: number): boolean;
|
|
22736
|
+
unexpected(pos?: number): never;
|
|
22737
|
+
parse(): any;
|
|
22738
|
+
|
|
22739
|
+
/**
|
|
22740
|
+
* Read a full expression, including the comma operator.
|
|
22741
|
+
* acorn source: https://github.com/acornjs/acorn/blob/8.18.0/acorn/src/expression.js
|
|
22742
|
+
*/
|
|
22743
|
+
parseExpression(
|
|
22744
|
+
forInit?: string | boolean,
|
|
22745
|
+
refDestructuringErrors?: any
|
|
22746
|
+
): any;
|
|
22747
|
+
getToken(): TokenParser;
|
|
22748
|
+
initialContext(): TokContextLike[];
|
|
22749
|
+
enterScope(flags: number): void;
|
|
22750
|
+
treatFunctionsAsVarInScope(scope: { flags: number }): number | boolean;
|
|
22751
|
+
currentScope(): ScopeParser;
|
|
22752
|
+
currentVarScope(): ScopeParser;
|
|
22753
|
+
currentThisScope(): ScopeParser;
|
|
22754
|
+
|
|
22755
|
+
/**
|
|
22756
|
+
* Report a parse error, naming where in the source it was found.
|
|
22757
|
+
* acorn source: https://github.com/acornjs/acorn/blob/8.18.0/acorn/src/location.js
|
|
22758
|
+
*/
|
|
22759
|
+
raise(pos: number, message: string): never;
|
|
22760
|
+
raiseRecoverable(pos: number, message: string): never;
|
|
22761
|
+
curPosition(): undefined | Position;
|
|
22762
|
+
skipLineComment(startSkip: number): void;
|
|
22763
|
+
[Symbol.iterator](): Iterator<TokenParser>;
|
|
22764
|
+
static extend(...plugins: ((parser?: any) => any)[]): any;
|
|
22765
|
+
static parse(input: string, options?: Partial<OptionsParser>): ProgramParser;
|
|
22766
|
+
static parseExpressionAt(
|
|
22767
|
+
input: string,
|
|
22768
|
+
pos: number,
|
|
22769
|
+
options?: Partial<OptionsParser>
|
|
22770
|
+
): ExpressionParser;
|
|
22771
|
+
static tokenizer(
|
|
22772
|
+
input: string,
|
|
22773
|
+
options?: Partial<OptionsParser>
|
|
22774
|
+
): ParserParser;
|
|
22775
|
+
}
|
|
21960
22776
|
type ParserState = ParserStateBase & Record<string, any>;
|
|
21961
22777
|
declare interface ParserStateBase {
|
|
21962
22778
|
source: string | Buffer;
|
|
@@ -22062,6 +22878,12 @@ declare interface PerformanceOptions {
|
|
|
22062
22878
|
*/
|
|
22063
22879
|
all?: boolean;
|
|
22064
22880
|
|
|
22881
|
+
/**
|
|
22882
|
+
* 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).
|
|
22883
|
+
* @since 5.111.0
|
|
22884
|
+
*/
|
|
22885
|
+
analyzableBailouts?: boolean;
|
|
22886
|
+
|
|
22065
22887
|
/**
|
|
22066
22888
|
* Filter function to select assets that are checked.
|
|
22067
22889
|
*/
|
|
@@ -22115,18 +22937,6 @@ declare interface PerformanceOptions {
|
|
|
22115
22937
|
*/
|
|
22116
22938
|
dynamicExports?: boolean;
|
|
22117
22939
|
|
|
22118
|
-
/**
|
|
22119
|
-
* 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).
|
|
22120
|
-
* @since 5.110.0
|
|
22121
|
-
*/
|
|
22122
|
-
embeddedSourceMaps?: boolean;
|
|
22123
|
-
|
|
22124
|
-
/**
|
|
22125
|
-
* Report modules shipped by more than one entrypoint, which every page that loads them downloads again (requires 'hints' to be enabled).
|
|
22126
|
-
* @since 5.110.0
|
|
22127
|
-
*/
|
|
22128
|
-
entrypointOverlap?: boolean;
|
|
22129
|
-
|
|
22130
22940
|
/**
|
|
22131
22941
|
* Report modules that call 'eval' directly, which stops minification, scope hoisting and tree shaking (requires 'hints' to be enabled).
|
|
22132
22942
|
* @since 5.110.0
|
|
@@ -22208,6 +23018,12 @@ declare interface PerformanceOptions {
|
|
|
22208
23018
|
*/
|
|
22209
23019
|
scopeHoistingBailouts?: boolean;
|
|
22210
23020
|
|
|
23021
|
+
/**
|
|
23022
|
+
* 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).
|
|
23023
|
+
* @since 5.111.0
|
|
23024
|
+
*/
|
|
23025
|
+
sourceMaps?: boolean;
|
|
23026
|
+
|
|
22211
23027
|
/**
|
|
22212
23028
|
* Report splits 'optimization.splitChunks' refused because 'maxInitialRequests' or 'maxAsyncRequests' was already reached (requires 'hints' to be enabled).
|
|
22213
23029
|
* @since 5.110.0
|
|
@@ -22233,34 +23049,22 @@ declare interface PerformanceOptions {
|
|
|
22233
23049
|
unsplitVendors?: boolean;
|
|
22234
23050
|
|
|
22235
23051
|
/**
|
|
22236
|
-
* Report '
|
|
22237
|
-
* @since 5.
|
|
22238
|
-
*/
|
|
22239
|
-
unusedAliases?: boolean;
|
|
22240
|
-
|
|
22241
|
-
/**
|
|
22242
|
-
* 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.
|
|
22243
|
-
* @since 5.110.0
|
|
23052
|
+
* Report asset files emitted for an import whose binding nothing reads, so the bytes ship for nothing (requires 'hints' to be enabled).
|
|
23053
|
+
* @since 5.111.0
|
|
22244
23054
|
*/
|
|
22245
|
-
|
|
23055
|
+
unusedAssets?: boolean;
|
|
22246
23056
|
|
|
22247
23057
|
/**
|
|
22248
|
-
* Report
|
|
22249
|
-
* @since 5.
|
|
23058
|
+
* 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.
|
|
23059
|
+
* @since 5.111.0
|
|
22250
23060
|
*/
|
|
22251
|
-
|
|
23061
|
+
unusedConfig?: boolean;
|
|
22252
23062
|
|
|
22253
23063
|
/**
|
|
22254
|
-
* Report modules bundled although nothing uses what they export,
|
|
22255
|
-
* @since 5.
|
|
23064
|
+
* 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).
|
|
23065
|
+
* @since 5.111.0
|
|
22256
23066
|
*/
|
|
22257
|
-
|
|
22258
|
-
|
|
22259
|
-
/**
|
|
22260
|
-
* Report rules in 'module.rules' that never matched a module, which cost condition evaluation on every build. Note that plugins may add rules too, so a reported rule is not necessarily one you wrote.
|
|
22261
|
-
* @since 5.110.0
|
|
22262
|
-
*/
|
|
22263
|
-
unusedRules?: boolean;
|
|
23067
|
+
unusedModules?: boolean;
|
|
22264
23068
|
}
|
|
22265
23069
|
declare interface PitchLoaderDefinitionFunction<
|
|
22266
23070
|
OptionsType = {},
|
|
@@ -22268,7 +23072,8 @@ declare interface PitchLoaderDefinitionFunction<
|
|
|
22268
23072
|
> {
|
|
22269
23073
|
(
|
|
22270
23074
|
this: NormalModuleLoaderContext<OptionsType> &
|
|
22271
|
-
|
|
23075
|
+
LoaderRunnerMutableContext<OptionsType> &
|
|
23076
|
+
LoaderRunnerReadonlyContext<OptionsType> &
|
|
22272
23077
|
LoaderPluginLoaderContext &
|
|
22273
23078
|
HotModuleReplacementPluginLoaderContext &
|
|
22274
23079
|
ContextAdditions,
|
|
@@ -22362,6 +23167,19 @@ declare interface PnpApi {
|
|
|
22362
23167
|
options: { considerBuiltins: boolean }
|
|
22363
23168
|
) => null | string;
|
|
22364
23169
|
}
|
|
23170
|
+
|
|
23171
|
+
/**
|
|
23172
|
+
* A `{ line, column }` pair, as `options.locations` reports one.
|
|
23173
|
+
*/
|
|
23174
|
+
declare abstract class Position {
|
|
23175
|
+
line: number;
|
|
23176
|
+
column: number;
|
|
23177
|
+
offset(n: number): Position;
|
|
23178
|
+
}
|
|
23179
|
+
declare interface PositionLike {
|
|
23180
|
+
line: number;
|
|
23181
|
+
column: number;
|
|
23182
|
+
}
|
|
22365
23183
|
declare class PrefetchPlugin {
|
|
22366
23184
|
/**
|
|
22367
23185
|
* Creates an instance of PrefetchPlugin.
|
|
@@ -22593,7 +23411,7 @@ declare class PrintContext<TPath, TNode, TPrintOptions = object> {
|
|
|
22593
23411
|
* them ahead of the next top-level node as well.
|
|
22594
23412
|
*/
|
|
22595
23413
|
takeInserts(start: number, end: number): string;
|
|
22596
|
-
sourceMap(options: SourceMapOptions): SourceMap;
|
|
23414
|
+
sourceMap(options: SourceMapOptions, code?: string): SourceMap;
|
|
22597
23415
|
|
|
22598
23416
|
/**
|
|
22599
23417
|
* Stand the text `resolve` gives back in place of every deferred write left
|
|
@@ -22685,6 +23503,7 @@ declare interface ProfilingPluginOptions {
|
|
|
22685
23503
|
*/
|
|
22686
23504
|
outputPath?: string;
|
|
22687
23505
|
}
|
|
23506
|
+
type ProgramParser = ProgramImport & NodeLike;
|
|
22688
23507
|
declare class ProgressPlugin {
|
|
22689
23508
|
/**
|
|
22690
23509
|
* Creates an instance of ProgressPlugin.
|
|
@@ -22923,7 +23742,8 @@ declare interface RawLoaderDefinitionFunction<
|
|
|
22923
23742
|
> {
|
|
22924
23743
|
(
|
|
22925
23744
|
this: NormalModuleLoaderContext<OptionsType> &
|
|
22926
|
-
|
|
23745
|
+
LoaderRunnerMutableContext<OptionsType> &
|
|
23746
|
+
LoaderRunnerReadonlyContext<OptionsType> &
|
|
22927
23747
|
LoaderPluginLoaderContext &
|
|
22928
23748
|
HotModuleReplacementPluginLoaderContext &
|
|
22929
23749
|
ContextAdditions,
|
|
@@ -23138,30 +23958,12 @@ declare interface ReadFileFs {
|
|
|
23138
23958
|
}
|
|
23139
23959
|
declare interface ReadFileSync {
|
|
23140
23960
|
(
|
|
23141
|
-
path: PathOrFileDescriptorFs,
|
|
23142
|
-
options?: null | { encoding?: null; flag?: string }
|
|
23143
|
-
): Buffer;
|
|
23144
|
-
(
|
|
23145
|
-
path: PathOrFileDescriptorFs,
|
|
23146
|
-
options:
|
|
23147
|
-
| "ascii"
|
|
23148
|
-
| "utf8"
|
|
23149
|
-
| "utf-8"
|
|
23150
|
-
| "utf16le"
|
|
23151
|
-
| "utf-16le"
|
|
23152
|
-
| "ucs2"
|
|
23153
|
-
| "ucs-2"
|
|
23154
|
-
| "base64"
|
|
23155
|
-
| "base64url"
|
|
23156
|
-
| "latin1"
|
|
23157
|
-
| "binary"
|
|
23158
|
-
| "hex"
|
|
23159
|
-
| { encoding: BufferEncoding; flag?: string }
|
|
23160
|
-
): string;
|
|
23961
|
+
path: PathOrFileDescriptorFs,
|
|
23962
|
+
options?: null | { encoding?: null; flag?: string }
|
|
23963
|
+
): Buffer;
|
|
23161
23964
|
(
|
|
23162
23965
|
path: PathOrFileDescriptorFs,
|
|
23163
|
-
options
|
|
23164
|
-
| null
|
|
23966
|
+
options:
|
|
23165
23967
|
| "ascii"
|
|
23166
23968
|
| "utf8"
|
|
23167
23969
|
| "utf-8"
|
|
@@ -23174,7 +23976,11 @@ declare interface ReadFileSync {
|
|
|
23174
23976
|
| "latin1"
|
|
23175
23977
|
| "binary"
|
|
23176
23978
|
| "hex"
|
|
23177
|
-
|
|
|
23979
|
+
| { encoding: BufferEncoding; flag?: string }
|
|
23980
|
+
): string;
|
|
23981
|
+
(
|
|
23982
|
+
path: PathOrFileDescriptorFs,
|
|
23983
|
+
options: ObjectEncodingOptionsFs & { flag?: string }
|
|
23178
23984
|
): string | Buffer;
|
|
23179
23985
|
}
|
|
23180
23986
|
declare interface ReadFileTypes {
|
|
@@ -23576,6 +24382,11 @@ declare interface RealContentHashPluginOptions {
|
|
|
23576
24382
|
* the hash digest to use
|
|
23577
24383
|
*/
|
|
23578
24384
|
hashDigest: string;
|
|
24385
|
+
|
|
24386
|
+
/**
|
|
24387
|
+
* run only where analyzable output marked a name for repair
|
|
24388
|
+
*/
|
|
24389
|
+
onDemand?: boolean;
|
|
23579
24390
|
}
|
|
23580
24391
|
declare interface RealDependencyLocation {
|
|
23581
24392
|
start: SourcePosition;
|
|
@@ -23658,7 +24469,7 @@ declare interface RecursiveNonNullable<T> {}
|
|
|
23658
24469
|
*/
|
|
23659
24470
|
declare abstract class Reference {
|
|
23660
24471
|
identifier: Identifier;
|
|
23661
|
-
from:
|
|
24472
|
+
from: ScopeScopeAnalyzer;
|
|
23662
24473
|
resolved?: Variable;
|
|
23663
24474
|
}
|
|
23664
24475
|
type ReferenceableItem = string | object;
|
|
@@ -23678,6 +24489,44 @@ declare interface ReferencedExport {
|
|
|
23678
24489
|
*/
|
|
23679
24490
|
canInline?: boolean;
|
|
23680
24491
|
}
|
|
24492
|
+
|
|
24493
|
+
/**
|
|
24494
|
+
* The cursor a regexp literal is validated through.
|
|
24495
|
+
*/
|
|
24496
|
+
declare abstract class RegExpValidationState {
|
|
24497
|
+
parser: ParserParser;
|
|
24498
|
+
validFlags: string;
|
|
24499
|
+
unicodeProperties: any;
|
|
24500
|
+
source: string;
|
|
24501
|
+
flags: string;
|
|
24502
|
+
start: number;
|
|
24503
|
+
switchU: boolean;
|
|
24504
|
+
switchV: boolean;
|
|
24505
|
+
switchN: boolean;
|
|
24506
|
+
pos: number;
|
|
24507
|
+
lastIntValue: number;
|
|
24508
|
+
lastStringValue: string;
|
|
24509
|
+
lastAssertionIsQuantifiable: boolean;
|
|
24510
|
+
numCapturingParens: number;
|
|
24511
|
+
maxBackReference: number;
|
|
24512
|
+
groupNames: any;
|
|
24513
|
+
backReferenceNames: string[];
|
|
24514
|
+
branchID: null | BranchID;
|
|
24515
|
+
reset(start: number, pattern: string, flags: string): void;
|
|
24516
|
+
raise(message: string): void;
|
|
24517
|
+
|
|
24518
|
+
/**
|
|
24519
|
+
* The code point at an index, joining a surrogate pair where the `u` flag
|
|
24520
|
+
* asks for code points rather than units.
|
|
24521
|
+
*/
|
|
24522
|
+
at(i: number, forceU?: boolean): number;
|
|
24523
|
+
nextIndex(i: number, forceU?: boolean): number;
|
|
24524
|
+
current(forceU?: boolean): number;
|
|
24525
|
+
lookahead(forceU?: boolean): number;
|
|
24526
|
+
advance(forceU?: boolean): void;
|
|
24527
|
+
eat(ch: number, forceU?: boolean): boolean;
|
|
24528
|
+
eatChars(chs: number[], forceU?: boolean): boolean;
|
|
24529
|
+
}
|
|
23681
24530
|
type Remotes = (string | RemotesObject)[] | RemotesObject;
|
|
23682
24531
|
|
|
23683
24532
|
/**
|
|
@@ -24428,7 +25277,7 @@ declare interface ResolveOptionsResolverFactoryObject2 {
|
|
|
24428
25277
|
resolver?: Resolver;
|
|
24429
25278
|
|
|
24430
25279
|
/**
|
|
24431
|
-
* A list of directories to resolve modules from, can be absolute path, folder name, or a `file:`
|
|
25280
|
+
* A list of directories to resolve modules from, can be absolute path, folder name, or a `file:` URL
|
|
24432
25281
|
*/
|
|
24433
25282
|
modules?: string | URL_url | (string | URL_url)[];
|
|
24434
25283
|
|
|
@@ -24455,7 +25304,7 @@ declare interface ResolveOptionsResolverFactoryObject2 {
|
|
|
24455
25304
|
pnpApi?: null | PnpApi;
|
|
24456
25305
|
|
|
24457
25306
|
/**
|
|
24458
|
-
* A list of root paths, each an absolute path or a `file:`
|
|
25307
|
+
* A list of root paths, each an absolute path or a `file:` URL
|
|
24459
25308
|
*/
|
|
24460
25309
|
roots?: (string | URL_url)[];
|
|
24461
25310
|
|
|
@@ -24470,7 +25319,7 @@ declare interface ResolveOptionsResolverFactoryObject2 {
|
|
|
24470
25319
|
resolveToContext?: boolean;
|
|
24471
25320
|
|
|
24472
25321
|
/**
|
|
24473
|
-
* A list of resolve restrictions, each an absolute path, a `file:`
|
|
25322
|
+
* A list of resolve restrictions, each an absolute path, a `file:` URL, or a RegExp
|
|
24474
25323
|
*/
|
|
24475
25324
|
restrictions?: (string | RegExp | URL_url)[];
|
|
24476
25325
|
|
|
@@ -24490,7 +25339,7 @@ declare interface ResolveOptionsResolverFactoryObject2 {
|
|
|
24490
25339
|
preferAbsolute?: boolean;
|
|
24491
25340
|
|
|
24492
25341
|
/**
|
|
24493
|
-
* TypeScript config file path (or `file:`
|
|
25342
|
+
* TypeScript config file path (or `file:` URL) or config object with configFile and references
|
|
24494
25343
|
*/
|
|
24495
25344
|
tsconfig?: string | boolean | URL_url | UserTsconfigOptions;
|
|
24496
25345
|
}
|
|
@@ -24517,12 +25366,129 @@ declare interface ResolvedContextTimestampAndHash {
|
|
|
24517
25366
|
timestampHash?: string;
|
|
24518
25367
|
hash: string;
|
|
24519
25368
|
}
|
|
24520
|
-
declare interface
|
|
25369
|
+
declare interface ResolvedOptionsDefaults {
|
|
24521
25370
|
/**
|
|
24522
25371
|
* - platform target properties
|
|
24523
25372
|
*/
|
|
24524
25373
|
platform: false | PlatformTargetProperties;
|
|
24525
25374
|
}
|
|
25375
|
+
declare interface ResolvedOptionsParser {
|
|
25376
|
+
/**
|
|
25377
|
+
* the edition, as the number the parser compares against
|
|
25378
|
+
*/
|
|
25379
|
+
ecmaVersion: number;
|
|
25380
|
+
|
|
25381
|
+
/**
|
|
25382
|
+
* the goal symbol
|
|
25383
|
+
*/
|
|
25384
|
+
sourceType: "module" | "commonjs" | "script";
|
|
25385
|
+
|
|
25386
|
+
/**
|
|
25387
|
+
* whether the code is strict whatever it says
|
|
25388
|
+
*/
|
|
25389
|
+
strict: boolean;
|
|
25390
|
+
|
|
25391
|
+
/**
|
|
25392
|
+
* called where a semicolon was inserted
|
|
25393
|
+
*/
|
|
25394
|
+
onInsertedSemicolon:
|
|
25395
|
+
null | ((lastTokEnd: number, lastTokEndLoc?: null | Position) => void);
|
|
25396
|
+
|
|
25397
|
+
/**
|
|
25398
|
+
* called at a trailing comma
|
|
25399
|
+
*/
|
|
25400
|
+
onTrailingComma:
|
|
25401
|
+
null | ((lastTokEnd: number, lastTokEndLoc?: null | Position) => void);
|
|
25402
|
+
|
|
25403
|
+
/**
|
|
25404
|
+
* whether reserved words may name things
|
|
25405
|
+
*/
|
|
25406
|
+
allowReserved: boolean | "never";
|
|
25407
|
+
|
|
25408
|
+
/**
|
|
25409
|
+
* whether `return` may sit at the top level
|
|
25410
|
+
*/
|
|
25411
|
+
allowReturnOutsideFunction: boolean;
|
|
25412
|
+
|
|
25413
|
+
/**
|
|
25414
|
+
* whether module syntax may sit anywhere
|
|
25415
|
+
*/
|
|
25416
|
+
allowImportExportEverywhere: boolean;
|
|
25417
|
+
|
|
25418
|
+
/**
|
|
25419
|
+
* whether `await` may sit outside a function
|
|
25420
|
+
*/
|
|
25421
|
+
allowAwaitOutsideFunction: boolean;
|
|
25422
|
+
|
|
25423
|
+
/**
|
|
25424
|
+
* whether `super` may sit outside a method
|
|
25425
|
+
*/
|
|
25426
|
+
allowSuperOutsideMethod: boolean;
|
|
25427
|
+
|
|
25428
|
+
/**
|
|
25429
|
+
* whether a leading `#!` line is skipped
|
|
25430
|
+
*/
|
|
25431
|
+
allowHashBang: boolean;
|
|
25432
|
+
|
|
25433
|
+
/**
|
|
25434
|
+
* whether private names must be declared
|
|
25435
|
+
*/
|
|
25436
|
+
checkPrivateFields: boolean;
|
|
25437
|
+
|
|
25438
|
+
/**
|
|
25439
|
+
* whether nodes carry `loc`
|
|
25440
|
+
*/
|
|
25441
|
+
locations: boolean;
|
|
25442
|
+
|
|
25443
|
+
/**
|
|
25444
|
+
* where the first offset falls
|
|
25445
|
+
*/
|
|
25446
|
+
startLocation: null | { line: number; column: number };
|
|
25447
|
+
|
|
25448
|
+
/**
|
|
25449
|
+
* where tokens are reported
|
|
25450
|
+
*/
|
|
25451
|
+
onToken: null | ((token?: any) => void);
|
|
25452
|
+
|
|
25453
|
+
/**
|
|
25454
|
+
* where comments are reported
|
|
25455
|
+
*/
|
|
25456
|
+
onComment:
|
|
25457
|
+
| null
|
|
25458
|
+
| ((
|
|
25459
|
+
isBlock: boolean,
|
|
25460
|
+
text: string,
|
|
25461
|
+
start: number,
|
|
25462
|
+
end: number,
|
|
25463
|
+
startLoc?: null | Position,
|
|
25464
|
+
endLoc?: null | Position
|
|
25465
|
+
) => void);
|
|
25466
|
+
|
|
25467
|
+
/**
|
|
25468
|
+
* whether nodes carry `range`
|
|
25469
|
+
*/
|
|
25470
|
+
ranges: boolean;
|
|
25471
|
+
|
|
25472
|
+
/**
|
|
25473
|
+
* a program node to append to
|
|
25474
|
+
*/
|
|
25475
|
+
program: null | NodeLike;
|
|
25476
|
+
|
|
25477
|
+
/**
|
|
25478
|
+
* the name errors and locations carry
|
|
25479
|
+
*/
|
|
25480
|
+
sourceFile: null | string;
|
|
25481
|
+
|
|
25482
|
+
/**
|
|
25483
|
+
* the name every node carries
|
|
25484
|
+
*/
|
|
25485
|
+
directSourceFile: null | string;
|
|
25486
|
+
|
|
25487
|
+
/**
|
|
25488
|
+
* whether parentheses become nodes
|
|
25489
|
+
*/
|
|
25490
|
+
preserveParens: boolean;
|
|
25491
|
+
}
|
|
24526
25492
|
declare abstract class Resolver {
|
|
24527
25493
|
fileSystem: FileSystem;
|
|
24528
25494
|
options: ResolveOptionsResolverFactoryObject1;
|
|
@@ -25297,6 +26263,12 @@ declare class RuntimeModule extends Module {
|
|
|
25297
26263
|
*/
|
|
25298
26264
|
attach(compilation: Compilation, chunk: Chunk, chunkGraph?: ChunkGraph): void;
|
|
25299
26265
|
|
|
26266
|
+
/**
|
|
26267
|
+
* The `[handlerMap, key]` pairs this module installs onto a chunk handler map
|
|
26268
|
+
* such as `__webpack_require__.f`, or `null` where it cannot name them.
|
|
26269
|
+
*/
|
|
26270
|
+
getInstalledChunkHandlers(): null | [string, string][];
|
|
26271
|
+
|
|
25300
26272
|
/**
|
|
25301
26273
|
* Generates runtime code for this runtime module.
|
|
25302
26274
|
*/
|
|
@@ -25314,6 +26286,11 @@ declare class RuntimeModule extends Module {
|
|
|
25314
26286
|
*/
|
|
25315
26287
|
shouldIsolate(): boolean;
|
|
25316
26288
|
|
|
26289
|
+
/**
|
|
26290
|
+
* The answer a runtime module gives when it installs no chunk handler at all
|
|
26291
|
+
*/
|
|
26292
|
+
static NO_CHUNK_HANDLERS: [string, string][];
|
|
26293
|
+
|
|
25317
26294
|
/**
|
|
25318
26295
|
* Runtime modules without any dependencies to other runtime modules
|
|
25319
26296
|
*/
|
|
@@ -25464,6 +26441,7 @@ declare abstract class RuntimeTemplate {
|
|
|
25464
26441
|
supportsArrowFunction(): boolean;
|
|
25465
26442
|
supportsAsyncFunction(): boolean;
|
|
25466
26443
|
supportsGenerator(): boolean;
|
|
26444
|
+
supportsTopLevelAwait(): boolean;
|
|
25467
26445
|
supportsOptionalChaining(): boolean;
|
|
25468
26446
|
supportsSpread(): boolean;
|
|
25469
26447
|
supportsObjectHasOwn(): boolean;
|
|
@@ -25477,6 +26455,19 @@ declare abstract class RuntimeTemplate {
|
|
|
25477
26455
|
supportsSourceImport(): boolean;
|
|
25478
26456
|
supportsModulePreload(): boolean;
|
|
25479
26457
|
|
|
26458
|
+
/**
|
|
26459
|
+
* Whether the deferred fill rewrote a chunk whose hashed name would otherwise go
|
|
26460
|
+
* stale, which `RealContentHashPlugin` reads to run — and to repair `[chunkhash]`
|
|
26461
|
+
* names — where `optimization.realContentHash` did not ask for it.
|
|
26462
|
+
*/
|
|
26463
|
+
needsAnalyzableRepair(): boolean;
|
|
26464
|
+
|
|
26465
|
+
/**
|
|
26466
|
+
* The assets the deferred fill rewrote under a name that has to be repaired: an
|
|
26467
|
+
* on-demand repair renames only these and whatever names them.
|
|
26468
|
+
*/
|
|
26469
|
+
analyzableRepairedAssets(): ReadonlySet<string>;
|
|
26470
|
+
|
|
25480
26471
|
/**
|
|
25481
26472
|
* Whether a reference a foreign bundler can follow without running webpack's runtime
|
|
25482
26473
|
* may be emitted — the one question every caller asks, in the form it is asking for:
|
|
@@ -25500,6 +26491,30 @@ declare abstract class RuntimeTemplate {
|
|
|
25500
26491
|
runtime?: RuntimeSpec
|
|
25501
26492
|
): boolean;
|
|
25502
26493
|
|
|
26494
|
+
/**
|
|
26495
|
+
* Names the module whose code generation starts, so the reasons its references
|
|
26496
|
+
* record are handed back by `finishAnalyzableBailouts` and attributed to it.
|
|
26497
|
+
*/
|
|
26498
|
+
beginAnalyzableBailouts(module: Module): void;
|
|
26499
|
+
|
|
26500
|
+
/**
|
|
26501
|
+
* Ends the collection `beginAnalyzableBailouts` started, so the reasons can be
|
|
26502
|
+
* stored beside the result and reapplied when the cache restores it.
|
|
26503
|
+
*/
|
|
26504
|
+
finishAnalyzableBailouts(): undefined | string[];
|
|
26505
|
+
|
|
26506
|
+
/**
|
|
26507
|
+
* Reapplies the bailouts a cached code generation result was stored with, so a
|
|
26508
|
+
* restored module reports the same reasons a generated one does.
|
|
26509
|
+
*/
|
|
26510
|
+
restoreAnalyzableBailouts(module: Module, reasons: string[]): void;
|
|
26511
|
+
|
|
26512
|
+
/**
|
|
26513
|
+
* The reasons a module's references keep the runtime form, as recorded while its
|
|
26514
|
+
* code was generated.
|
|
26515
|
+
*/
|
|
26516
|
+
analyzableBailoutsOf(module: Module): string[];
|
|
26517
|
+
|
|
25503
26518
|
/**
|
|
25504
26519
|
* Builds the analyzable `new URL(specifier, import.meta.url)` expression the ESM
|
|
25505
26520
|
* wasm/asset loader backends use to reference an emitted binary relative to the
|
|
@@ -26062,42 +27077,40 @@ declare abstract class RuntimeTemplate {
|
|
|
26062
27077
|
*/
|
|
26063
27078
|
runtimeRequirements: Set<string>;
|
|
26064
27079
|
/**
|
|
26065
|
-
* the module the `import()` is emitted into
|
|
27080
|
+
* the module the `import()` is emitted into, to report against
|
|
26066
27081
|
*/
|
|
26067
27082
|
originModule?: Module;
|
|
26068
27083
|
}): string;
|
|
26069
27084
|
|
|
26070
|
-
/**
|
|
26071
|
-
* For ESM module output, load a single statically-named chunk through the
|
|
26072
|
-
* `analyzableChunkImport` helper — a literal `import("./chunk.js")` other bundlers
|
|
26073
|
-
* and webpack itself can follow, wrapped to keep `ensureChunk` timing and deduplication.
|
|
26074
|
-
* Returns `null` to fall back to the runtime `ensureChunk` form.
|
|
26075
|
-
*/
|
|
26076
|
-
analyzableChunkImport(
|
|
26077
|
-
chunk: Chunk,
|
|
26078
|
-
comment: string,
|
|
26079
|
-
runtimeRequirements: Set<string>,
|
|
26080
|
-
originModule: undefined | Module,
|
|
26081
|
-
chunkGraph: ChunkGraph
|
|
26082
|
-
): null | string;
|
|
26083
|
-
|
|
26084
27085
|
/**
|
|
26085
27086
|
* The `../` path from a chunk's own asset back to the output root. Hashes are
|
|
26086
27087
|
* neutralized first: a runtime module is generated once to be hashed, before any
|
|
26087
27088
|
* hash exists, so resolving one there throws — and `RuntimeModule.updateHash`
|
|
26088
|
-
*
|
|
27089
|
+
* lets that throw fail the build rather than hashing it.
|
|
26089
27090
|
*/
|
|
26090
27091
|
chunkRootOutputDir(chunk: Chunk, enforceRelative: boolean): string;
|
|
26091
27092
|
|
|
27093
|
+
/**
|
|
27094
|
+
* Static literal specifier (already quoted) for the `new URL(<here>, import.meta.url)`
|
|
27095
|
+
* a worker or worklet entry chunk bakes to, or `null` to keep the runtime form. The
|
|
27096
|
+
* gate and the build are asked together so every call site agrees on both — the
|
|
27097
|
+
* `new Worker(...)` emit, and the resource hint `ResourceHintPlugin` spells for it.
|
|
27098
|
+
*/
|
|
27099
|
+
getAnalyzableWorkerUrl(
|
|
27100
|
+
overridePublicPath: undefined | string,
|
|
27101
|
+
chunk: Chunk,
|
|
27102
|
+
module: Module,
|
|
27103
|
+
chunkGraph: ChunkGraph
|
|
27104
|
+
): null | string;
|
|
27105
|
+
|
|
26092
27106
|
/**
|
|
26093
27107
|
* Static `new URL(<file>, import.meta.url)` for every stylesheet a runtime can load,
|
|
26094
|
-
* keyed by chunk id, or `null` when
|
|
27108
|
+
* keyed by chunk id, or `null` when they have to keep the runtime
|
|
26095
27109
|
* `publicPath + getChunkCssFilename(id)` form. Both the runtime module reading them
|
|
26096
27110
|
* and the plugin declaring what it needs ask this, so the two always agree. The
|
|
26097
27111
|
* runtime hands an absolute url string to `link.href`, and so does this — the browser
|
|
26098
27112
|
* resolves the element against the document, which is not where the chunk sits, and
|
|
26099
|
-
* the loader reads the url as text either way.
|
|
26100
|
-
* that also carries the hot handler; see below.
|
|
27113
|
+
* the loader reads the url as text either way.
|
|
26101
27114
|
*/
|
|
26102
27115
|
analyzableCssChunkUrls(
|
|
26103
27116
|
runtimeChunk: Chunk,
|
|
@@ -26109,7 +27122,7 @@ declare abstract class RuntimeTemplate {
|
|
|
26109
27122
|
/**
|
|
26110
27123
|
* Static `new URL(<file>, import.meta.url).href` for every javascript chunk a
|
|
26111
27124
|
* runtime can hint at with `<link rel="prefetch"/"modulepreload">`, keyed by chunk
|
|
26112
|
-
* id, or `null` when
|
|
27125
|
+
* id, or `null` when they have to keep the runtime
|
|
26113
27126
|
* `publicPath + getChunkScriptFilename(id)` form. Both the runtime module reading
|
|
26114
27127
|
* them and the plugin declaring what it needs ask this, so the two always agree.
|
|
26115
27128
|
*/
|
|
@@ -26120,6 +27133,36 @@ declare abstract class RuntimeTemplate {
|
|
|
26120
27133
|
consumingModule?: Module
|
|
26121
27134
|
): null | Map<ChunkId, string>;
|
|
26122
27135
|
|
|
27136
|
+
/**
|
|
27137
|
+
* Records that this runtime reads its chunks some way other than a native
|
|
27138
|
+
* `import()`, so no literal can name what it loads. Recorded on the entries that
|
|
27139
|
+
* chose it, which is where the setting behind it lives.
|
|
27140
|
+
*/
|
|
27141
|
+
reportChunkImportBailout(chunk: Chunk, chunkGraph: ChunkGraph): void;
|
|
27142
|
+
|
|
27143
|
+
/**
|
|
27144
|
+
* Whether the loader still needs to build a url from a chunk id, which is the case
|
|
27145
|
+
* for a chunk it can be asked for that `analyzableChunkImports` leaves unnamed: one
|
|
27146
|
+
* carrying a runtime of its own, or one a second entrypoint has at startup.
|
|
27147
|
+
*/
|
|
27148
|
+
chunkImportsNeedRuntimeUrl(
|
|
27149
|
+
runtimeChunk: Chunk,
|
|
27150
|
+
chunkGraph: ChunkGraph
|
|
27151
|
+
): boolean;
|
|
27152
|
+
|
|
27153
|
+
/**
|
|
27154
|
+
* A literal `import()` specifier for every javascript chunk a runtime loads on
|
|
27155
|
+
* demand, keyed by chunk id, or `null` when one of them cannot be named here. The
|
|
27156
|
+
* map is written into the runtime chunk rather than at each import site, so a
|
|
27157
|
+
* hashed chunk name reaches no module that imports it.
|
|
27158
|
+
*/
|
|
27159
|
+
analyzableChunkImports(
|
|
27160
|
+
runtimeChunk: Chunk,
|
|
27161
|
+
chunkGraph: ChunkGraph,
|
|
27162
|
+
runtimeRequirements: ReadonlySet<string>,
|
|
27163
|
+
consumingModule?: Module
|
|
27164
|
+
): null | Map<ChunkId, string>;
|
|
27165
|
+
|
|
26123
27166
|
/**
|
|
26124
27167
|
* Static `new URL(<file>, import.meta.url)` for the binary emitted for an async wasm
|
|
26125
27168
|
* module. Only called when `supportsAnalyzable("wasm")` holds.
|
|
@@ -26220,17 +27263,46 @@ declare interface RuntimeValueOptions {
|
|
|
26220
27263
|
version?: string | (() => string);
|
|
26221
27264
|
}
|
|
26222
27265
|
|
|
27266
|
+
/**
|
|
27267
|
+
* Helper function for joining two ranges into a single range. This is useful
|
|
27268
|
+
* when working with AST nodes, as it allows you to combine the ranges of child nodes
|
|
27269
|
+
* to create the range of the _parent node_.
|
|
27270
|
+
*/
|
|
27271
|
+
declare interface ScopeInfo {
|
|
27272
|
+
definitions: StackedMap<string, VariableInfo | ScopeInfo>;
|
|
27273
|
+
topLevelScope: boolean | "arrow";
|
|
27274
|
+
inShorthand: string | boolean;
|
|
27275
|
+
inTaggedTemplateTag: boolean;
|
|
27276
|
+
inTry: boolean;
|
|
27277
|
+
isStrict: boolean;
|
|
27278
|
+
isAsmJs: boolean;
|
|
27279
|
+
terminated?: 1 | 2;
|
|
27280
|
+
}
|
|
27281
|
+
|
|
27282
|
+
/**
|
|
27283
|
+
* One lexical scope, holding the names declared directly in it. Each set is
|
|
27284
|
+
* built only once a name goes into it, which most scopes never do.
|
|
27285
|
+
*/
|
|
27286
|
+
declare abstract class ScopeParser {
|
|
27287
|
+
flags: number;
|
|
27288
|
+
var?: Set<string>;
|
|
27289
|
+
lexical?: Set<string>;
|
|
27290
|
+
functions?: Set<string>;
|
|
27291
|
+
firstLexical?: string;
|
|
27292
|
+
hoisted?: (number | NodeLike)[];
|
|
27293
|
+
}
|
|
27294
|
+
|
|
26223
27295
|
/**
|
|
26224
27296
|
* A lexical scope. One shape for every kind, so the property loads in the
|
|
26225
27297
|
* resolution loop stay monomorphic.
|
|
26226
27298
|
*/
|
|
26227
|
-
declare abstract class
|
|
27299
|
+
declare abstract class ScopeScopeAnalyzer {
|
|
26228
27300
|
type: ScopeType;
|
|
26229
27301
|
block: NodeEstreeIndex;
|
|
26230
|
-
upper: null |
|
|
26231
|
-
childScopes:
|
|
27302
|
+
upper: null | ScopeScopeAnalyzer;
|
|
27303
|
+
childScopes: ScopeScopeAnalyzer[];
|
|
26232
27304
|
variables: Variable[];
|
|
26233
|
-
variableScope:
|
|
27305
|
+
variableScope: ScopeScopeAnalyzer;
|
|
26234
27306
|
|
|
26235
27307
|
/**
|
|
26236
27308
|
* For a function scope with parameters, the offset where its body
|
|
@@ -26242,22 +27314,6 @@ declare abstract class Scope {
|
|
|
26242
27314
|
paramBoundary: number;
|
|
26243
27315
|
getBinding(name: string): undefined | Variable;
|
|
26244
27316
|
}
|
|
26245
|
-
|
|
26246
|
-
/**
|
|
26247
|
-
* Helper function for joining two ranges into a single range. This is useful
|
|
26248
|
-
* when working with AST nodes, as it allows you to combine the ranges of child nodes
|
|
26249
|
-
* to create the range of the _parent node_.
|
|
26250
|
-
*/
|
|
26251
|
-
declare interface ScopeInfo {
|
|
26252
|
-
definitions: StackedMap<string, VariableInfo | ScopeInfo>;
|
|
26253
|
-
topLevelScope: boolean | "arrow";
|
|
26254
|
-
inShorthand: string | boolean;
|
|
26255
|
-
inTaggedTemplateTag: boolean;
|
|
26256
|
-
inTry: boolean;
|
|
26257
|
-
isStrict: boolean;
|
|
26258
|
-
isAsmJs: boolean;
|
|
26259
|
-
terminated?: 1 | 2;
|
|
26260
|
-
}
|
|
26261
27317
|
type ScopeType =
|
|
26262
27318
|
| "function"
|
|
26263
27319
|
| "module"
|
|
@@ -26849,6 +27905,15 @@ declare interface SourceLike {
|
|
|
26849
27905
|
*/
|
|
26850
27906
|
clearCache?: (options?: ClearCacheOptions, visited?: WeakSet<Source>) => void;
|
|
26851
27907
|
}
|
|
27908
|
+
|
|
27909
|
+
/**
|
|
27910
|
+
* The `loc` a node carries when `options.locations` is on.
|
|
27911
|
+
*/
|
|
27912
|
+
declare abstract class SourceLocationParser {
|
|
27913
|
+
start?: null | PositionLike;
|
|
27914
|
+
end?: null | PositionLike;
|
|
27915
|
+
source: any;
|
|
27916
|
+
}
|
|
26852
27917
|
declare interface SourceMap {
|
|
26853
27918
|
version: 3;
|
|
26854
27919
|
file: string;
|
|
@@ -27156,6 +28221,10 @@ declare class SourceProcessorSyntaxClass_1 extends SourceProcessorClass<
|
|
|
27156
28221
|
> {
|
|
27157
28222
|
constructor();
|
|
27158
28223
|
static PrintContext: typeof PrintContext;
|
|
28224
|
+
static declineDeferredWrites: (
|
|
28225
|
+
text: string,
|
|
28226
|
+
writes: DeferredWrite[]
|
|
28227
|
+
) => string;
|
|
27159
28228
|
static deferredWrite: (id: number) => string;
|
|
27160
28229
|
}
|
|
27161
28230
|
|
|
@@ -27225,6 +28294,10 @@ declare class SourceProcessorSyntaxClass_2 extends SourceProcessorClass<
|
|
|
27225
28294
|
> {
|
|
27226
28295
|
constructor();
|
|
27227
28296
|
static PrintContext: typeof PrintContext;
|
|
28297
|
+
static declineDeferredWrites: (
|
|
28298
|
+
text: string,
|
|
28299
|
+
writes: DeferredWrite[]
|
|
28300
|
+
) => string;
|
|
27228
28301
|
static deferredWrite: (id: number) => string;
|
|
27229
28302
|
}
|
|
27230
28303
|
declare interface SourceTable {
|
|
@@ -27451,7 +28524,7 @@ declare abstract class StackedMap<K, V> {
|
|
|
27451
28524
|
}
|
|
27452
28525
|
|
|
27453
28526
|
/**
|
|
27454
|
-
* Updates
|
|
28527
|
+
* Updates map size using the provided map.
|
|
27455
28528
|
*/
|
|
27456
28529
|
declare interface StarListDeserializerContext {
|
|
27457
28530
|
read: () => HarmonyExportImportedSpecifierDependency[];
|
|
@@ -27460,7 +28533,7 @@ declare interface StarListDeserializerContext {
|
|
|
27460
28533
|
}
|
|
27461
28534
|
|
|
27462
28535
|
/**
|
|
27463
|
-
* Updates
|
|
28536
|
+
* Updates map size using the provided map.
|
|
27464
28537
|
*/
|
|
27465
28538
|
declare interface StarListSerializerContext {
|
|
27466
28539
|
write: (
|
|
@@ -28580,16 +29653,25 @@ declare interface TimestampAndHash {
|
|
|
28580
29653
|
timestamp?: number;
|
|
28581
29654
|
hash: string;
|
|
28582
29655
|
}
|
|
28583
|
-
|
|
28584
|
-
|
|
28585
|
-
|
|
28586
|
-
|
|
28587
|
-
|
|
28588
|
-
|
|
28589
|
-
|
|
28590
|
-
|
|
28591
|
-
|
|
28592
|
-
|
|
29656
|
+
declare interface TokContextLike {
|
|
29657
|
+
token: string;
|
|
29658
|
+
isExpr: boolean;
|
|
29659
|
+
preserveSpace?: boolean;
|
|
29660
|
+
override?: any;
|
|
29661
|
+
generator?: boolean;
|
|
29662
|
+
}
|
|
29663
|
+
|
|
29664
|
+
/**
|
|
29665
|
+
* A token as `options.onToken` receives one.
|
|
29666
|
+
*/
|
|
29667
|
+
declare abstract class TokenParser {
|
|
29668
|
+
type: any;
|
|
29669
|
+
value: any;
|
|
29670
|
+
start: any;
|
|
29671
|
+
end: any;
|
|
29672
|
+
loc?: SourceLocationParser;
|
|
29673
|
+
range?: any[];
|
|
29674
|
+
}
|
|
28593
29675
|
|
|
28594
29676
|
/**
|
|
28595
29677
|
* Position-based view over the lexer — webpack's stand-in for the spec's
|
|
@@ -28652,6 +29734,22 @@ declare class TokenStream {
|
|
|
28652
29734
|
*/
|
|
28653
29735
|
advance(): void;
|
|
28654
29736
|
|
|
29737
|
+
/**
|
|
29738
|
+
* Step over the whitespace the next token would be, without tokenizing it —
|
|
29739
|
+
* for the sites that discard whitespace tokens. No-op while a token is cached.
|
|
29740
|
+
*/
|
|
29741
|
+
skipWhitespace(): void;
|
|
29742
|
+
|
|
29743
|
+
/**
|
|
29744
|
+
* Step over the run of selector-prelude leaves a skip-mode parse drops (CSS
|
|
29745
|
+
* Syntax §5.4.3's "append to prelude", which skip mode does not do), without
|
|
29746
|
+
* lexing one token each. Only valid where every leaf up to the next
|
|
29747
|
+
* `BC_PRELUDE_STOP` code point is dropped whatever it is — which in
|
|
29748
|
+
* `consumeAQualifiedRule` is once the two tokens the `--foo: {`
|
|
29749
|
+
* disambiguation reads have both been seen. No-op while a token is cached.
|
|
29750
|
+
*/
|
|
29751
|
+
skipPreludeLeaves(): void;
|
|
29752
|
+
|
|
28655
29753
|
/**
|
|
28656
29754
|
* Mark (CSS Syntax §3 "mark") — push the current cursor position.
|
|
28657
29755
|
*/
|
|
@@ -28669,6 +29767,34 @@ declare class TokenStream {
|
|
|
28669
29767
|
*/
|
|
28670
29768
|
discardMark(): void;
|
|
28671
29769
|
}
|
|
29770
|
+
type TokenSyntax = NodeSyntax & {
|
|
29771
|
+
value: string;
|
|
29772
|
+
unescaped: string;
|
|
29773
|
+
numericValue: number;
|
|
29774
|
+
typeFlag: "number" | "id" | "integer" | "unrestricted";
|
|
29775
|
+
sign: "" | "+" | "-";
|
|
29776
|
+
unit: string;
|
|
29777
|
+
contentStart: number;
|
|
29778
|
+
contentEnd: number;
|
|
29779
|
+
};
|
|
29780
|
+
|
|
29781
|
+
/**
|
|
29782
|
+
* A token's kind, carrying what the parser needs to know about it without
|
|
29783
|
+
* re-inspecting the source: whether an expression may follow, its binary
|
|
29784
|
+
* precedence, and how it updates the tokenizer's context.
|
|
29785
|
+
*/
|
|
29786
|
+
declare abstract class TokenType {
|
|
29787
|
+
label: string;
|
|
29788
|
+
keyword?: string;
|
|
29789
|
+
beforeExpr: boolean;
|
|
29790
|
+
startsExpr: boolean;
|
|
29791
|
+
isLoop: boolean;
|
|
29792
|
+
isAssign: boolean;
|
|
29793
|
+
prefix: boolean;
|
|
29794
|
+
postfix: boolean;
|
|
29795
|
+
binop: null | number;
|
|
29796
|
+
updateContext: null | ((prevType: TokenType) => void);
|
|
29797
|
+
}
|
|
28672
29798
|
declare class TopLevelSymbol {
|
|
28673
29799
|
/**
|
|
28674
29800
|
* Creates an instance of TopLevelSymbol.
|
|
@@ -28763,6 +29889,10 @@ declare interface TsconfigPathsMap {
|
|
|
28763
29889
|
declare const UNDEFINED_MARKER: unique symbol;
|
|
28764
29890
|
declare interface URL_url extends URL {}
|
|
28765
29891
|
type UnsafeCacheData = KnownUnsafeCacheData & Record<string, any>;
|
|
29892
|
+
declare interface UnusedSpecifiers {
|
|
29893
|
+
exportPresenceMode: ExportPresenceMode;
|
|
29894
|
+
specifiers: [string[], string][];
|
|
29895
|
+
}
|
|
28766
29896
|
declare interface UpdateHashContextDependency {
|
|
28767
29897
|
chunkGraph: ChunkGraph;
|
|
28768
29898
|
runtime: RuntimeSpec;
|
|
@@ -28858,17 +29988,17 @@ declare interface UserAliasOptions {
|
|
|
28858
29988
|
}
|
|
28859
29989
|
declare interface UserTsconfigOptions {
|
|
28860
29990
|
/**
|
|
28861
|
-
* A path, or `file:`
|
|
29991
|
+
* A path, or `file:` URL, pointing at the tsconfig file
|
|
28862
29992
|
*/
|
|
28863
29993
|
configFile?: string | URL_url;
|
|
28864
29994
|
|
|
28865
29995
|
/**
|
|
28866
|
-
* References to other tsconfig files. 'auto' inherits from TypeScript config, or an array of relative/absolute paths or `file:`
|
|
29996
|
+
* References to other tsconfig files. 'auto' inherits from TypeScript config, or an array of relative/absolute paths or `file:` URLs
|
|
28867
29997
|
*/
|
|
28868
29998
|
references?: "auto" | (string | URL_url)[];
|
|
28869
29999
|
|
|
28870
30000
|
/**
|
|
28871
|
-
* Override baseUrl from tsconfig.json with a path or `file:`
|
|
30001
|
+
* Override baseUrl from tsconfig.json with a path or `file:` URL
|
|
28872
30002
|
*/
|
|
28873
30003
|
baseUrl?: string | URL_url;
|
|
28874
30004
|
}
|
|
@@ -28885,7 +30015,7 @@ declare abstract class Variable {
|
|
|
28885
30015
|
name: string;
|
|
28886
30016
|
identifiers: Identifier[];
|
|
28887
30017
|
references: Reference[];
|
|
28888
|
-
scope:
|
|
30018
|
+
scope: ScopeScopeAnalyzer;
|
|
28889
30019
|
}
|
|
28890
30020
|
declare class VariableInfo {
|
|
28891
30021
|
/**
|
|
@@ -28927,7 +30057,7 @@ declare interface VirtualModule {
|
|
|
28927
30057
|
* The source function that provides the virtual content.
|
|
28928
30058
|
*/
|
|
28929
30059
|
source: (
|
|
28930
|
-
loaderContext:
|
|
30060
|
+
loaderContext: LoaderContextNormalModule<any>
|
|
28931
30061
|
) => string | Buffer | Promise<string | Buffer>;
|
|
28932
30062
|
|
|
28933
30063
|
/**
|
|
@@ -28943,7 +30073,7 @@ declare interface VirtualModule {
|
|
|
28943
30073
|
type VirtualModuleContent =
|
|
28944
30074
|
| string
|
|
28945
30075
|
| ((
|
|
28946
|
-
loaderContext:
|
|
30076
|
+
loaderContext: LoaderContextNormalModule<any>
|
|
28947
30077
|
) => string | Buffer | Promise<string | Buffer>)
|
|
28948
30078
|
| VirtualModule;
|
|
28949
30079
|
declare interface VirtualModules {
|
|
@@ -29849,6 +30979,8 @@ type WriteFileOptions =
|
|
|
29849
30979
|
declare interface WriteOnlySet<T> {
|
|
29850
30980
|
add: (item: T) => void;
|
|
29851
30981
|
}
|
|
30982
|
+
type WriteStatement =
|
|
30983
|
+
AssignmentExpression | UpdateExpression | ForInStatement | ForOfStatement;
|
|
29852
30984
|
type WriteStreamOptions = StreamOptions & {
|
|
29853
30985
|
fs?: null | CreateWriteStreamFSImplementation;
|
|
29854
30986
|
flush?: boolean;
|
|
@@ -29913,34 +31045,6 @@ declare interface chunkModuleHashMap {
|
|
|
29913
31045
|
[index: number]: string;
|
|
29914
31046
|
[index: string]: string;
|
|
29915
31047
|
}
|
|
29916
|
-
type ecmaVersion =
|
|
29917
|
-
| 3
|
|
29918
|
-
| 5
|
|
29919
|
-
| 6
|
|
29920
|
-
| 7
|
|
29921
|
-
| 8
|
|
29922
|
-
| 9
|
|
29923
|
-
| 10
|
|
29924
|
-
| 11
|
|
29925
|
-
| 12
|
|
29926
|
-
| 13
|
|
29927
|
-
| 14
|
|
29928
|
-
| 15
|
|
29929
|
-
| 16
|
|
29930
|
-
| 17
|
|
29931
|
-
| 2015
|
|
29932
|
-
| 2016
|
|
29933
|
-
| 2017
|
|
29934
|
-
| 2018
|
|
29935
|
-
| 2019
|
|
29936
|
-
| 2020
|
|
29937
|
-
| 2021
|
|
29938
|
-
| 2022
|
|
29939
|
-
| 2023
|
|
29940
|
-
| 2024
|
|
29941
|
-
| 2025
|
|
29942
|
-
| 2026
|
|
29943
|
-
| "latest";
|
|
29944
31048
|
declare function exports(
|
|
29945
31049
|
options: Configuration,
|
|
29946
31050
|
callback: CallbackWebpackFunction_2<Stats, void>
|
|
@@ -30066,7 +31170,6 @@ declare namespace exports {
|
|
|
30066
31170
|
export namespace RuntimeGlobals {
|
|
30067
31171
|
export let amdDefine: "__webpack_require__.amdD";
|
|
30068
31172
|
export let amdOptions: "__webpack_require__.amdO";
|
|
30069
|
-
export let analyzableChunkImport: "__webpack_require__.ei";
|
|
30070
31173
|
export let asyncModule: "__webpack_require__.a";
|
|
30071
31174
|
export let asyncModuleDoneSymbol: "__webpack_require__.aD";
|
|
30072
31175
|
export let asyncModuleExportSymbol: "__webpack_require__.aE";
|
|
@@ -30109,7 +31212,10 @@ declare namespace exports {
|
|
|
30109
31212
|
export let harmonyModuleDecorator: "__webpack_require__.hmd";
|
|
30110
31213
|
export let hasCssModules: "has css modules";
|
|
30111
31214
|
export let hasFetchPriority: "has fetch priority";
|
|
31215
|
+
export let hasChunkPriority: "has chunk priority";
|
|
30112
31216
|
export let hasOwnProperty: "__webpack_require__.o";
|
|
31217
|
+
export let hasSealedDeferredNamespace: "has sealed deferred namespace";
|
|
31218
|
+
export let hasSynthesizedDeferredNamespace: "has synthesized deferred namespace";
|
|
30113
31219
|
export let hmrDownloadManifest: "__webpack_require__.hmrM";
|
|
30114
31220
|
export let hmrDownloadUpdateHandlers: "__webpack_require__.hmrC";
|
|
30115
31221
|
export let hmrInvalidateModuleHandlers: "__webpack_require__.hmrI";
|
|
@@ -30145,6 +31251,7 @@ declare namespace exports {
|
|
|
30145
31251
|
export let scriptNonce: "__webpack_require__.nc";
|
|
30146
31252
|
export let setAnonymousDefaultName: "__webpack_require__.dn";
|
|
30147
31253
|
export let shareScopeMap: "__webpack_require__.S";
|
|
31254
|
+
export let specNamespaceObject: "__webpack_require__.ns";
|
|
30148
31255
|
export let startup: "__webpack_require__.x";
|
|
30149
31256
|
export let startupAssetHints: "__webpack_require__.SAH";
|
|
30150
31257
|
export let startupEntrypoint: "__webpack_require__.X";
|
|
@@ -30176,7 +31283,7 @@ declare namespace exports {
|
|
|
30176
31283
|
export const applyWebpackOptionsDefaults: (
|
|
30177
31284
|
options: WebpackOptionsNormalized,
|
|
30178
31285
|
compilerIndex?: number
|
|
30179
|
-
) =>
|
|
31286
|
+
) => ResolvedOptionsDefaults;
|
|
30180
31287
|
}
|
|
30181
31288
|
export namespace dependencies {
|
|
30182
31289
|
export {
|
|
@@ -30400,6 +31507,38 @@ declare namespace exports {
|
|
|
30400
31507
|
errors?: (string | Error)[];
|
|
30401
31508
|
}[]
|
|
30402
31509
|
) => { warnings?: (string | Error)[]; errors?: (string | Error)[] };
|
|
31510
|
+
export function cssMinify(
|
|
31511
|
+
input: { [index: string]: string | Buffer },
|
|
31512
|
+
sourceMap?: object,
|
|
31513
|
+
minimizerOptions?: {
|
|
31514
|
+
as?: "stylesheet" | "block-contents";
|
|
31515
|
+
environment?: CssEnvironment;
|
|
31516
|
+
convertLengthUnits?: boolean;
|
|
31517
|
+
mergeDistantRules?: boolean;
|
|
31518
|
+
rewriteCustomProperties?: boolean;
|
|
31519
|
+
unusedSymbols?: string[];
|
|
31520
|
+
pseudoClasses?: { [index: string]: string };
|
|
31521
|
+
renderEmbeddedSource?: (
|
|
31522
|
+
source: string,
|
|
31523
|
+
info: { type: string; hostType: string }
|
|
31524
|
+
) =>
|
|
31525
|
+
| undefined
|
|
31526
|
+
| string
|
|
31527
|
+
| EmbeddedSourceResult
|
|
31528
|
+
| Promise<undefined | string | EmbeddedSourceResult>;
|
|
31529
|
+
} & CssTransformOptions
|
|
31530
|
+
): Promise<{
|
|
31531
|
+
code: string;
|
|
31532
|
+
map?: SourceMap;
|
|
31533
|
+
warnings?: (string | Error)[];
|
|
31534
|
+
errors?: (string | Error)[];
|
|
31535
|
+
}>;
|
|
31536
|
+
export namespace cssMinify {
|
|
31537
|
+
export let supportsWorkerThreads: () => boolean;
|
|
31538
|
+
export let getTypes: () => string[];
|
|
31539
|
+
export let getEmbeddedTypes: () => string[];
|
|
31540
|
+
export let filter: (name: string) => boolean;
|
|
31541
|
+
}
|
|
30403
31542
|
export let embeddedText: (
|
|
30404
31543
|
answer?: string | { code?: string }
|
|
30405
31544
|
) => undefined | string;
|
|
@@ -30424,7 +31563,7 @@ declare namespace exports {
|
|
|
30424
31563
|
input: string | TokenStream,
|
|
30425
31564
|
pos?: number,
|
|
30426
31565
|
options?: ParseOptionsSyntax
|
|
30427
|
-
) => undefined |
|
|
31566
|
+
) => undefined | TokenSyntax | FunctionNode | SimpleBlock;
|
|
30428
31567
|
export let parseADeclaration: (
|
|
30429
31568
|
input: string | TokenStream,
|
|
30430
31569
|
pos?: number,
|
|
@@ -30652,7 +31791,12 @@ declare namespace exports {
|
|
|
30652
31791
|
parentOf(n?: number): number;
|
|
30653
31792
|
children(n?: number): number[];
|
|
30654
31793
|
};
|
|
31794
|
+
export let BLOCK_CONTENTS: "block-contents";
|
|
31795
|
+
export let CLASSIC_SCRIPT: "script";
|
|
30655
31796
|
export let EMBEDDED_LANGUAGES: string[];
|
|
31797
|
+
export let EVENT_HANDLER: "event-handler";
|
|
31798
|
+
export let JSON_TYPE: "json";
|
|
31799
|
+
export let MODULE_SCRIPT: "module";
|
|
30656
31800
|
export let NS_HTML: 0;
|
|
30657
31801
|
export let NS_MATHML: 1;
|
|
30658
31802
|
export let NS_SVG: 2;
|
|
@@ -30696,6 +31840,12 @@ declare namespace exports {
|
|
|
30696
31840
|
}
|
|
30697
31841
|
) => string;
|
|
30698
31842
|
export let buildHeadTags: (opts: OutputHtmlOptions) => string;
|
|
31843
|
+
export let builtinEmbeddedRenderer: (
|
|
31844
|
+
options?: BuiltinEmbeddedRendererOptions
|
|
31845
|
+
) => (
|
|
31846
|
+
source: string,
|
|
31847
|
+
info: { type: string; hostType: string; as?: string }
|
|
31848
|
+
) => undefined | string;
|
|
30699
31849
|
export let collectEmbeddedDiagnostics: (
|
|
30700
31850
|
reported: {
|
|
30701
31851
|
warnings?: (string | Error)[];
|
|
@@ -30712,6 +31862,41 @@ declare namespace exports {
|
|
|
30712
31862
|
minimal?: boolean
|
|
30713
31863
|
) => string;
|
|
30714
31864
|
export let escapeText: (s: string) => string;
|
|
31865
|
+
export function htmlMinify(
|
|
31866
|
+
input: { [index: string]: string | Buffer },
|
|
31867
|
+
sourceMap?: RawSourceMap,
|
|
31868
|
+
minimizerOptions?: Omit<
|
|
31869
|
+
HtmlPrintOptions,
|
|
31870
|
+
"renderEmbeddedSource" | "deferEmbeddedSource"
|
|
31871
|
+
> & {
|
|
31872
|
+
environment?: CssEnvironment;
|
|
31873
|
+
css?: {
|
|
31874
|
+
convertLengthUnits?: boolean;
|
|
31875
|
+
rewriteCustomProperties?: boolean;
|
|
31876
|
+
unusedSymbols?: string[];
|
|
31877
|
+
pseudoClasses?: { [index: string]: string };
|
|
31878
|
+
};
|
|
31879
|
+
minifyConditionalComments?: boolean;
|
|
31880
|
+
renderEmbeddedSource?: (
|
|
31881
|
+
source: string,
|
|
31882
|
+
info: { type: string; hostType: string; as?: string }
|
|
31883
|
+
) =>
|
|
31884
|
+
| undefined
|
|
31885
|
+
| string
|
|
31886
|
+
| EmbeddedSourceResult
|
|
31887
|
+
| Promise<undefined | string | EmbeddedSourceResult>;
|
|
31888
|
+
}
|
|
31889
|
+
): Promise<{
|
|
31890
|
+
code: string;
|
|
31891
|
+
warnings?: (string | Error)[];
|
|
31892
|
+
errors?: (string | Error)[];
|
|
31893
|
+
}>;
|
|
31894
|
+
export namespace htmlMinify {
|
|
31895
|
+
export let supportsWorkerThreads: () => boolean;
|
|
31896
|
+
export let getTypes: () => string[];
|
|
31897
|
+
export let getEmbeddedTypes: () => string[];
|
|
31898
|
+
export let filter: (name: string) => boolean;
|
|
31899
|
+
}
|
|
30715
31900
|
export let isAsciiWhitespace: (cc: number) => boolean;
|
|
30716
31901
|
export let metaTag: (name: string, content: string) => string;
|
|
30717
31902
|
export let parseCssUrls: (input: string) => [string, number, number][];
|
|
@@ -30868,6 +32053,7 @@ declare namespace exports {
|
|
|
30868
32053
|
HtmlPrintOptions
|
|
30869
32054
|
>
|
|
30870
32055
|
) => string;
|
|
32056
|
+
export let stripJsonWhitespace: (json: string) => string;
|
|
30871
32057
|
export let tokenize: (
|
|
30872
32058
|
input: string,
|
|
30873
32059
|
pos?: number,
|
|
@@ -31192,6 +32378,7 @@ declare namespace exports {
|
|
|
31192
32378
|
ConcatenationScope,
|
|
31193
32379
|
ContextExclusionPlugin,
|
|
31194
32380
|
ContextReplacementPlugin,
|
|
32381
|
+
CopyPlugin,
|
|
31195
32382
|
DefinePlugin,
|
|
31196
32383
|
Dependency,
|
|
31197
32384
|
DynamicEntryPlugin,
|
|
@@ -31330,7 +32517,7 @@ declare namespace exports {
|
|
|
31330
32517
|
LoaderDefinitionFunction,
|
|
31331
32518
|
PitchLoaderDefinitionFunction,
|
|
31332
32519
|
RawLoaderDefinitionFunction,
|
|
31333
|
-
LoaderContext
|
|
32520
|
+
LoaderContextLibIndex as LoaderContext
|
|
31334
32521
|
};
|
|
31335
32522
|
}
|
|
31336
32523
|
declare const topLevelSymbolTag: unique symbol;
|