webpack 5.107.1 → 5.108.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/hot/dev-server.js +2 -0
- package/lib/APIPlugin.js +8 -4
- package/lib/CacheFacade.js +7 -0
- package/lib/Chunk.js +4 -0
- package/lib/ChunkGraph.js +30 -9
- package/lib/CircularModulesPlugin.js +190 -0
- package/lib/CleanPlugin.js +2 -1
- package/lib/Compilation.js +396 -65
- package/lib/Compiler.js +52 -14
- package/lib/ConcatenationScope.js +10 -3
- package/lib/ContextExclusionPlugin.js +1 -0
- package/lib/ContextModule.js +92 -47
- package/lib/ContextModuleFactory.js +45 -38
- package/lib/ContextReplacementPlugin.js +4 -0
- package/lib/DefinePlugin.js +89 -15
- package/lib/Dependency.js +111 -7
- package/lib/EntryOptionPlugin.js +39 -2
- package/lib/EntryPlugin.js +2 -0
- package/lib/ExportsInfo.js +314 -73
- package/lib/ExternalModule.js +82 -34
- package/lib/ExternalModuleFactoryPlugin.js +1 -0
- package/lib/ExternalsPlugin.js +1 -0
- package/lib/FileSystemInfo.js +173 -23
- package/lib/FlagAllModulesAsUsedPlugin.js +1 -5
- package/lib/FlagDependencyExportsPlugin.js +23 -0
- package/lib/FlagDependencyUsagePlugin.js +87 -5
- package/lib/FlagEntryExportAsUsedPlugin.js +2 -0
- package/lib/Generator.js +8 -0
- package/lib/HotModuleReplacementPlugin.js +65 -28
- package/lib/IgnorePlugin.js +1 -0
- package/lib/InitFragment.js +5 -0
- package/lib/JavascriptMetaInfoPlugin.js +7 -5
- package/lib/LazyBarrel.js +361 -0
- package/lib/LoaderTargetPlugin.js +1 -0
- package/lib/Module.js +21 -42
- package/lib/ModuleGraph.js +3 -2
- package/lib/ModuleProfile.js +27 -1
- package/lib/ModuleTemplate.js +2 -0
- package/lib/MultiCompiler.js +16 -0
- package/lib/MultiStats.js +1 -0
- package/lib/MultiWatching.js +2 -0
- package/lib/NodeStuffPlugin.js +22 -17
- package/lib/NormalModule.js +557 -77
- package/lib/NormalModuleReplacementPlugin.js +2 -0
- package/lib/PrefetchPlugin.js +2 -0
- package/lib/ProgressPlugin.js +9 -1
- package/lib/ProvidePlugin.js +1 -0
- package/lib/RawModule.js +20 -16
- package/lib/RecordIdsPlugin.js +1 -0
- package/lib/RuntimeGlobals.js +5 -0
- package/lib/RuntimePlugin.js +58 -26
- package/lib/RuntimeTemplate.js +278 -21
- package/lib/SelfModuleFactory.js +1 -0
- package/lib/SourceMapDevToolPlugin.js +105 -30
- package/lib/Stats.js +1 -0
- package/lib/Template.js +8 -2
- package/lib/TemplatedPathPlugin.js +473 -131
- package/lib/WarnCaseSensitiveModulesPlugin.js +1 -0
- package/lib/WarnDeprecatedOptionPlugin.js +4 -0
- package/lib/WarnNoModeSetPlugin.js +1 -0
- package/lib/WatchIgnorePlugin.js +1 -0
- package/lib/Watching.js +9 -0
- package/lib/WebpackOptionsApply.js +50 -5
- package/lib/asset/AssetBytesGenerator.js +11 -3
- package/lib/asset/AssetGenerator.js +47 -22
- package/lib/asset/AssetModule.js +47 -0
- package/lib/asset/AssetModulesPlugin.js +14 -14
- package/lib/asset/AssetParser.js +2 -2
- package/lib/asset/AssetSourceGenerator.js +8 -0
- package/lib/asset/RawDataUrlModule.js +12 -13
- package/lib/buildChunkGraph.js +88 -9
- package/lib/bun/BunTargetPlugin.js +48 -0
- package/lib/cache/AddBuildDependenciesPlugin.js +1 -0
- package/lib/cache/AddManagedPathsPlugin.js +3 -0
- package/lib/cache/IdleFileCachePlugin.js +4 -0
- package/lib/cache/MemoryWithGcCachePlugin.js +1 -0
- package/lib/cache/PackFileCacheStrategy.js +1 -0
- package/lib/cache/ResolverCachePlugin.js +2 -0
- package/lib/cache/getLazyHashedEtag.js +9 -2
- package/lib/cache/mergeEtags.js +2 -0
- package/lib/cli.js +109 -19
- package/lib/config/browserslistTargetHandler.js +99 -0
- package/lib/config/defaults.js +147 -7
- package/lib/config/defineConfig.js +31 -0
- package/lib/config/normalization.js +5 -0
- package/lib/config/target.js +181 -2
- package/lib/container/ContainerEntryModule.js +15 -14
- package/lib/container/ContainerExposedDependency.js +2 -2
- package/lib/container/ContainerReferencePlugin.js +1 -1
- package/lib/container/FallbackDependency.js +5 -7
- package/lib/container/FallbackModule.js +10 -9
- package/lib/container/RemoteModule.js +20 -10
- package/lib/container/RemoteRuntimeModule.js +14 -12
- package/lib/css/CssGenerator.js +353 -327
- package/lib/css/CssInjectStyleRuntimeModule.js +36 -8
- package/lib/css/CssLoadingRuntimeModule.js +118 -47
- package/lib/css/CssModule.js +52 -23
- package/lib/css/CssModulesPlugin.js +107 -124
- package/lib/css/CssParser.js +2759 -2205
- package/lib/css/syntax.js +2859 -0
- package/lib/debug/ProfilingPlugin.js +2 -0
- package/lib/deno/DenoTargetPlugin.js +47 -0
- package/lib/dependencies/AMDDefineDependency.js +22 -17
- package/lib/dependencies/AMDDefineDependencyParserPlugin.js +1 -0
- package/lib/dependencies/AMDRequireArrayDependency.js +7 -11
- package/lib/dependencies/AMDRequireContextDependency.js +7 -11
- package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +1 -0
- package/lib/dependencies/AMDRequireDependency.js +24 -20
- package/lib/dependencies/CachedConstDependency.js +3 -0
- package/lib/dependencies/CommonJsDependencyHelpers.js +1 -0
- package/lib/dependencies/CommonJsExportRequireDependency.js +79 -31
- package/lib/dependencies/CommonJsExportsDependency.js +21 -16
- package/lib/dependencies/CommonJsExportsParserPlugin.js +230 -7
- package/lib/dependencies/CommonJsFullRequireDependency.js +27 -19
- package/lib/dependencies/CommonJsImportsParserPlugin.js +51 -16
- package/lib/dependencies/CommonJsPlugin.js +1 -1
- package/lib/dependencies/CommonJsRequireContextDependency.js +10 -13
- package/lib/dependencies/CommonJsRequireDependency.js +42 -11
- package/lib/dependencies/CommonJsSelfReferenceDependency.js +22 -14
- package/lib/dependencies/ConstDependency.js +16 -11
- package/lib/dependencies/ContextDependency.js +4 -0
- package/lib/dependencies/ContextDependencyTemplateAsId.js +1 -1
- package/lib/dependencies/ContextElementDependency.js +23 -14
- package/lib/dependencies/CreateRequireParserPlugin.js +1 -0
- package/lib/dependencies/CreateScriptUrlDependency.js +5 -7
- package/lib/dependencies/CriticalDependencyWarning.js +1 -0
- package/lib/dependencies/CssIcssExportDependency.js +512 -574
- package/lib/dependencies/CssIcssImportDependency.js +9 -9
- package/lib/dependencies/CssIcssSymbolDependency.js +22 -15
- package/lib/dependencies/CssImportDependency.js +25 -1
- package/lib/dependencies/CssUrlDependency.js +23 -14
- package/lib/dependencies/DllEntryDependency.js +9 -13
- package/lib/dependencies/ExportBindingInitFragment.js +164 -0
- package/lib/dependencies/ExportsInfoDependency.js +12 -12
- package/lib/dependencies/ExternalModuleDependency.js +8 -5
- package/lib/dependencies/ExternalModuleInitFragment.js +7 -5
- package/lib/dependencies/ExternalModuleInitFragmentDependency.js +13 -10
- package/lib/dependencies/HarmonyAcceptDependency.js +11 -11
- package/lib/dependencies/HarmonyAcceptImportDependency.js +1 -0
- package/lib/dependencies/HarmonyDetectionParserPlugin.js +47 -22
- package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +28 -2
- package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +46 -22
- package/lib/dependencies/HarmonyExportExpressionDependency.js +107 -30
- package/lib/dependencies/HarmonyExportHeaderDependency.js +7 -9
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +109 -31
- package/lib/dependencies/HarmonyExportInitFragment.js +22 -20
- package/lib/dependencies/HarmonyExportSpecifierDependency.js +83 -18
- package/lib/dependencies/HarmonyExports.js +4 -1
- package/lib/dependencies/HarmonyImportDependency.js +24 -0
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +110 -74
- package/lib/dependencies/HarmonyImportGuard.js +254 -0
- package/lib/dependencies/HarmonyImportSideEffectDependency.js +18 -1
- package/lib/dependencies/HarmonyImportSpecifierDependency.js +118 -14
- package/lib/dependencies/HarmonyLinkingError.js +1 -0
- package/lib/dependencies/HarmonyModulesPlugin.js +1 -0
- package/lib/dependencies/{HtmlScriptSrcDependency.js → HtmlEntryDependency.js} +267 -154
- package/lib/dependencies/HtmlInlineHtmlDependency.js +107 -0
- package/lib/dependencies/HtmlInlineScriptDependency.js +20 -27
- package/lib/dependencies/HtmlInlineStyleDependency.js +62 -11
- package/lib/dependencies/HtmlSourceDependency.js +18 -0
- package/lib/dependencies/ImportContextDependency.js +5 -9
- package/lib/dependencies/ImportDependency.js +44 -2
- package/lib/dependencies/ImportMetaHotAcceptDependency.js +1 -0
- package/lib/dependencies/ImportMetaHotDeclineDependency.js +1 -0
- package/lib/dependencies/ImportMetaPlugin.js +74 -30
- package/lib/dependencies/ImportParserPlugin.js +19 -0
- package/lib/dependencies/ImportWeakDependency.js +1 -0
- package/lib/dependencies/JsonExportsDependency.js +9 -9
- package/lib/dependencies/LoaderImportDependency.js +1 -0
- package/lib/dependencies/LocalModule.js +11 -12
- package/lib/dependencies/LocalModuleDependency.js +11 -13
- package/lib/dependencies/ModuleDecoratorDependency.js +9 -9
- package/lib/dependencies/ModuleDependency.js +7 -0
- package/lib/dependencies/ModuleHotAcceptDependency.js +1 -0
- package/lib/dependencies/ModuleHotDeclineDependency.js +1 -0
- package/lib/dependencies/ModuleInitFragmentDependency.js +15 -11
- package/lib/dependencies/ProvidedDependency.js +31 -27
- package/lib/dependencies/PureExpressionDependency.js +7 -9
- package/lib/dependencies/RequireEnsureDependency.js +12 -13
- package/lib/dependencies/RequireHeaderDependency.js +3 -4
- package/lib/dependencies/RequireIncludeDependencyParserPlugin.js +3 -0
- package/lib/dependencies/RequireResolveContextDependency.js +7 -11
- package/lib/dependencies/RequireResolveDependency.js +1 -0
- package/lib/dependencies/RequireResolveHeaderDependency.js +3 -5
- package/lib/dependencies/RuntimeRequirementsDependency.js +6 -7
- package/lib/dependencies/StaticExportsDependency.js +10 -10
- package/lib/dependencies/SystemPlugin.js +2 -0
- package/lib/dependencies/URLContextDependency.js +5 -7
- package/lib/dependencies/URLDependency.js +14 -16
- package/lib/dependencies/UnsupportedDependency.js +8 -13
- package/lib/dependencies/WebAssemblyExportImportedDependency.js +11 -16
- package/lib/dependencies/WebAssemblyImportDependency.js +14 -16
- package/lib/dependencies/WebpackIsIncludedDependency.js +1 -0
- package/lib/dependencies/WorkerDependency.js +19 -8
- package/lib/dependencies/WorkerPlugin.js +40 -10
- package/lib/dependencies/processExportInfo.js +13 -11
- package/lib/dll/DelegatedModule.js +29 -15
- package/lib/dll/DelegatedModuleFactoryPlugin.js +1 -0
- package/lib/dll/DelegatedPlugin.js +1 -0
- package/lib/dll/DllEntryPlugin.js +3 -0
- package/lib/dll/DllModule.js +3 -2
- package/lib/dll/DllPlugin.js +16 -0
- package/lib/dll/DllReferencePlugin.js +3 -0
- package/lib/dll/LibManifestPlugin.js +1 -0
- package/lib/electron/ElectronTargetPlugin.js +22 -4
- package/lib/errors/ConcurrentCompilationError.js +1 -0
- package/lib/errors/HookWebpackError.js +11 -13
- package/lib/errors/IgnoreErrorModuleFactory.js +1 -0
- package/lib/errors/InvalidDependenciesModuleWarning.js +2 -0
- package/lib/errors/JSONParseError.js +9 -8
- package/lib/errors/ModuleBuildError.js +16 -13
- package/lib/errors/ModuleDependencyError.js +8 -1
- package/lib/errors/ModuleDependencyWarning.js +8 -1
- package/lib/errors/ModuleError.js +5 -11
- package/lib/errors/ModuleHashingError.js +4 -0
- package/lib/errors/ModuleNotFoundError.js +3 -0
- package/lib/errors/ModuleParseError.js +5 -11
- package/lib/errors/ModuleRestoreError.js +2 -0
- package/lib/errors/ModuleStoreError.js +3 -0
- package/lib/errors/ModuleWarning.js +7 -11
- package/lib/errors/NodeStuffInWebError.js +1 -0
- package/lib/errors/NonErrorEmittedError.js +2 -0
- package/lib/errors/UnhandledSchemeError.js +1 -0
- package/lib/esm/ModuleChunkLoadingPlugin.js +0 -1
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +28 -23
- package/lib/hmr/HotModuleReplacement.runtime.js +175 -30
- package/lib/hmr/HotModuleReplacementRuntimeModule.js +7 -0
- package/lib/hmr/JavascriptHotModuleReplacement.runtime.js +173 -26
- package/lib/hmr/LazyCompilationPlugin.js +134 -6
- package/lib/html/HtmlGenerator.js +292 -50
- package/lib/html/HtmlModule.js +40 -0
- package/lib/html/HtmlModulesPlugin.js +287 -60
- package/lib/html/HtmlParser.js +1108 -1099
- package/lib/html/{walkHtmlTokens.js → syntax.js} +4701 -212
- package/lib/ids/IdHelpers.js +4 -2
- package/lib/index.js +19 -0
- package/lib/javascript/BasicEvaluatedExpression.js +1 -0
- package/lib/javascript/EnableChunkLoadingPlugin.js +1 -0
- package/lib/javascript/JavascriptGenerator.js +6 -2
- package/lib/javascript/JavascriptModule.js +54 -0
- package/lib/javascript/JavascriptModulesPlugin.js +257 -102
- package/lib/javascript/JavascriptParser.js +286 -159
- package/lib/json/JsonModule.js +40 -0
- package/lib/json/JsonModulesPlugin.js +7 -0
- package/lib/json/JsonParser.js +4 -2
- package/lib/library/AssignLibraryPlugin.js +5 -3
- package/lib/library/ExportPropertyLibraryPlugin.js +1 -0
- package/lib/library/FalseIIFEUmdWarning.js +1 -0
- package/lib/library/ModuleLibraryPlugin.js +54 -29
- package/lib/library/SystemLibraryPlugin.js +3 -3
- package/lib/node/NodeTargetPlugin.js +1 -0
- package/lib/node/NodeWatchFileSystem.js +38 -22
- package/lib/node/ReadFileChunkLoadingRuntimeModule.js +10 -9
- package/lib/node/RequireChunkLoadingRuntimeModule.js +18 -16
- package/lib/optimize/ConcatenatedModule.js +397 -78
- package/lib/optimize/ConstExportsPlugin.js +211 -0
- package/lib/optimize/InlineExports.js +178 -0
- package/lib/optimize/InnerGraph.js +372 -275
- package/lib/optimize/InnerGraphPlugin.js +196 -99
- package/lib/optimize/ModuleConcatenationPlugin.js +56 -25
- package/lib/optimize/RealContentHashPlugin.js +14 -1
- package/lib/optimize/SideEffectsFlagPlugin.js +234 -64
- package/lib/runtime/AsyncModuleRuntimeModule.js +32 -30
- package/lib/runtime/AutoPublicPathRuntimeModule.js +11 -5
- package/lib/runtime/CompatGetDefaultExportRuntimeModule.js +1 -1
- package/lib/runtime/CreateFakeNamespaceObjectRuntimeModule.js +6 -4
- package/lib/runtime/DefinePropertyGettersRuntimeModule.js +33 -4
- package/lib/runtime/GetChunkFilenameRuntimeModule.js +82 -3
- package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +1 -1
- package/lib/runtime/HasOwnPropertyRuntimeModule.js +1 -1
- package/lib/runtime/LoadScriptRuntimeModule.js +18 -13
- package/lib/runtime/MakeDeferredNamespaceObjectRuntime.js +39 -26
- package/lib/runtime/MakeNamespaceObjectRuntimeModule.js +1 -1
- package/lib/runtime/OnChunksLoadedRuntimeModule.js +4 -4
- package/lib/runtime/RelativeUrlRuntimeModule.js +3 -2
- package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +1 -1
- package/lib/runtime/StartupEntrypointRuntimeModule.js +4 -3
- package/lib/runtime/WorkerRuntimeModule.js +33 -0
- package/lib/schemes/HttpUriPlugin.js +3 -2
- package/lib/serialization/AggregateErrorSerializer.js +7 -6
- package/lib/serialization/ArraySerializer.js +4 -8
- package/lib/serialization/BinaryMiddleware.js +538 -468
- package/lib/serialization/DateObjectSerializer.js +2 -2
- package/lib/serialization/ErrorObjectSerializer.js +7 -6
- package/lib/serialization/MapObjectSerializer.js +5 -9
- package/lib/serialization/NullPrototypeObjectSerializer.js +7 -9
- package/lib/serialization/ObjectMiddleware.js +50 -13
- package/lib/serialization/PlainObjectSerializer.js +9 -8
- package/lib/serialization/RegExpObjectSerializer.js +2 -2
- package/lib/serialization/Serializer.js +1 -0
- package/lib/serialization/SetObjectSerializer.js +4 -8
- package/lib/sharing/ConsumeSharedModule.js +6 -7
- package/lib/sharing/ConsumeSharedPlugin.js +1 -0
- package/lib/sharing/ConsumeSharedRuntimeModule.js +46 -41
- package/lib/sharing/ProvideSharedDependency.js +30 -15
- package/lib/sharing/ProvideSharedModule.js +30 -11
- package/lib/sharing/ProvideSharedPlugin.js +4 -2
- package/lib/sharing/SharePlugin.js +3 -0
- package/lib/sharing/ShareRuntimeModule.js +18 -16
- package/lib/sharing/resolveMatchedConfigs.js +2 -1
- package/lib/sharing/utils.js +1 -1
- package/lib/stats/DefaultStatsFactoryPlugin.js +4 -6
- package/lib/stats/DefaultStatsPrinterPlugin.js +14 -14
- package/lib/stats/StatsFactory.js +11 -9
- package/lib/stats/StatsPrinter.js +9 -2
- package/lib/url/URLParserPlugin.js +5 -2
- package/lib/util/AsyncQueue.js +10 -0
- package/lib/util/LazyBucketSortedSet.js +5 -0
- package/lib/util/LazySet.js +6 -4
- package/lib/util/LocConverter.js +11 -1
- package/lib/util/Semaphore.js +1 -0
- package/lib/util/SourceProcessor.js +106 -0
- package/lib/util/TupleSet.js +1 -0
- package/lib/util/WeakTupleMap.js +27 -1
- package/lib/util/chainedImports.js +3 -3
- package/lib/util/comparators.js +2 -2
- package/lib/util/concatenate.js +31 -7
- package/lib/util/createHash.js +0 -1
- package/lib/util/deterministicGrouping.js +19 -12
- package/lib/util/extractSourceMap.js +1 -1
- package/lib/util/findGraphRoots.js +2 -0
- package/lib/util/fs.js +16 -6
- package/lib/util/hash/DebugHash.js +1 -0
- package/lib/util/hash/hash-digest.js +24 -15
- package/lib/util/identifier.js +7 -0
- package/lib/util/internalSerializables.js +11 -2
- package/lib/util/magicComment.js +42 -0
- package/lib/util/makeSerializable.js +1 -0
- package/lib/util/nonNumericOnlyHash.js +30 -1
- package/lib/util/property.js +7 -1
- package/lib/util/publicPathPlaceholder.js +64 -0
- package/lib/util/registerExternalSerializer.js +4 -4
- package/lib/wasm-async/AsyncWasmModule.js +77 -0
- package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +1 -1
- package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +1 -96
- package/lib/wasm-async/AsyncWebAssemblyParser.js +1 -1
- package/lib/wasm-async/UniversalCompileAsyncWasmPlugin.js +1 -1
- package/lib/wasm-sync/SyncWasmModule.js +39 -0
- package/lib/wasm-sync/UnsupportedWebAssemblyFeatureError.js +1 -0
- package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +6 -3
- package/lib/wasm-sync/WasmFinalizeExportsPlugin.js +2 -1
- package/lib/wasm-sync/WebAssemblyGenerator.js +1 -0
- package/lib/wasm-sync/WebAssemblyInInitialChunkError.js +2 -0
- package/lib/wasm-sync/WebAssemblyModulesPlugin.js +10 -0
- package/lib/wasm-sync/WebAssemblyParser.js +7 -3
- package/lib/web/JsonpChunkLoadingRuntimeModule.js +45 -39
- package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +11 -10
- package/package.json +36 -28
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +212 -3
- package/schemas/plugins/HtmlGeneratorOptions.check.js +1 -1
- package/schemas/plugins/HtmlParserOptions.check.d.ts +7 -0
- package/schemas/plugins/HtmlParserOptions.check.js +6 -0
- package/schemas/plugins/HtmlParserOptions.json +3 -0
- package/schemas/plugins/css/CssAutoOrModuleParserOptions.check.js +1 -1
- package/schemas/plugins/css/CssModuleParserOptions.check.js +1 -1
- package/schemas/plugins/css/CssParserOptions.check.js +1 -1
- package/types.d.ts +1592 -314
- package/lib/css/walkCssTokens.js +0 -2020
- package/lib/util/AppendOnlyStackedSet.js +0 -93
package/types.d.ts
CHANGED
|
@@ -129,6 +129,10 @@ import { Context as ContextImport } from "vm";
|
|
|
129
129
|
declare interface Abortable {
|
|
130
130
|
signal?: AbortSignal;
|
|
131
131
|
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Represents AbstractLibraryPlugin.
|
|
135
|
+
*/
|
|
132
136
|
declare class AbstractLibraryPlugin<T> {
|
|
133
137
|
/**
|
|
134
138
|
* Creates an instance of AbstractLibraryPlugin.
|
|
@@ -311,16 +315,17 @@ declare interface AliasOption {
|
|
|
311
315
|
name: string;
|
|
312
316
|
onlyModule?: boolean;
|
|
313
317
|
}
|
|
314
|
-
type AliasOptionNewRequest = string | false | string[];
|
|
315
|
-
declare interface AliasOptions {
|
|
316
|
-
[index: string]: AliasOptionNewRequest;
|
|
317
|
-
}
|
|
318
318
|
declare interface AllCodeGenerationSchemas {
|
|
319
319
|
/**
|
|
320
320
|
* top level declarations for javascript modules
|
|
321
321
|
*/
|
|
322
322
|
topLevelDeclarations: Set<string>;
|
|
323
323
|
|
|
324
|
+
/**
|
|
325
|
+
* free identifier names in the rendered source for javascript modules
|
|
326
|
+
*/
|
|
327
|
+
freeNames: Set<string>;
|
|
328
|
+
|
|
324
329
|
/**
|
|
325
330
|
* chunk init fragments for javascript modules
|
|
326
331
|
*/
|
|
@@ -355,36 +360,6 @@ type AnyLoaderContext = NormalModuleLoaderContext<any> &
|
|
|
355
360
|
LoaderRunnerLoaderContext<any> &
|
|
356
361
|
LoaderPluginLoaderContext &
|
|
357
362
|
HotModuleReplacementPluginLoaderContext;
|
|
358
|
-
declare abstract class AppendOnlyStackedSet<T> {
|
|
359
|
-
/**
|
|
360
|
-
* Adds a value to the current scope layer, creating that layer lazily when
|
|
361
|
-
* the first write occurs.
|
|
362
|
-
*/
|
|
363
|
-
add(el: T): void;
|
|
364
|
-
|
|
365
|
-
/**
|
|
366
|
-
* Checks whether a value is present in any scope layer currently visible to
|
|
367
|
-
* this stacked set.
|
|
368
|
-
*/
|
|
369
|
-
has(el: T): boolean;
|
|
370
|
-
|
|
371
|
-
/**
|
|
372
|
-
* Removes every scope layer and any values accumulated in them.
|
|
373
|
-
*/
|
|
374
|
-
clear(): void;
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
* Creates a child stacked set that shares the existing scope history while
|
|
378
|
-
* allowing subsequent additions to be recorded in its own new layer.
|
|
379
|
-
*/
|
|
380
|
-
createChild(): AppendOnlyStackedSet<T>;
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* Iterates over the stacked sets from newest to oldest so consumers can
|
|
384
|
-
* inspect recently added values first.
|
|
385
|
-
*/
|
|
386
|
-
[Symbol.iterator](): Iterator<T>;
|
|
387
|
-
}
|
|
388
363
|
|
|
389
364
|
/**
|
|
390
365
|
* Returns object of arguments.
|
|
@@ -521,6 +496,10 @@ declare interface AssetInlineGeneratorOptions {
|
|
|
521
496
|
context: { filename: string; module: Module }
|
|
522
497
|
) => string);
|
|
523
498
|
}
|
|
499
|
+
type AssetModuleBuildInfo = KnownBuildInfo &
|
|
500
|
+
Record<string, any> &
|
|
501
|
+
KnownNormalModuleBuildInfo &
|
|
502
|
+
KnownAssetModuleBuildInfo;
|
|
524
503
|
declare abstract class AssetParser extends ParserClass {
|
|
525
504
|
dataUrlCondition?:
|
|
526
505
|
| boolean
|
|
@@ -609,6 +588,10 @@ declare class AsyncDependenciesBlock extends DependenciesBlock {
|
|
|
609
588
|
get circular(): boolean;
|
|
610
589
|
module: any;
|
|
611
590
|
}
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* Represents AsyncQueue.
|
|
594
|
+
*/
|
|
612
595
|
declare abstract class AsyncQueue<T, K, R> {
|
|
613
596
|
hooks: {
|
|
614
597
|
beforeAdd: AsyncSeriesHook<[T]>;
|
|
@@ -711,6 +694,11 @@ declare interface AsyncWebAssemblyModulesPluginOptions {
|
|
|
711
694
|
mangleImports?: boolean;
|
|
712
695
|
}
|
|
713
696
|
declare abstract class AsyncWebAssemblyParser extends ParserClass {}
|
|
697
|
+
|
|
698
|
+
/**
|
|
699
|
+
* Records modules from one compilation and adds them back as prefetch
|
|
700
|
+
* dependencies in the next compilation.
|
|
701
|
+
*/
|
|
714
702
|
declare class AutomaticPrefetchPlugin {
|
|
715
703
|
constructor();
|
|
716
704
|
|
|
@@ -725,6 +713,11 @@ declare interface BackendApi {
|
|
|
725
713
|
dispose: (callback: (err?: null | Error) => void) => void;
|
|
726
714
|
module: (module: Module) => ModuleResult;
|
|
727
715
|
}
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* Prepends or appends banner text to emitted assets that match the configured
|
|
719
|
+
* file filters.
|
|
720
|
+
*/
|
|
728
721
|
declare class BannerPlugin {
|
|
729
722
|
/**
|
|
730
723
|
* Normalizes banner options and compiles the configured banner source into a
|
|
@@ -847,6 +840,11 @@ declare interface BaseResolveRequest {
|
|
|
847
840
|
* inner relative path for internal usage
|
|
848
841
|
*/
|
|
849
842
|
__innerRequest_relativePath?: string;
|
|
843
|
+
|
|
844
|
+
/**
|
|
845
|
+
* internal: shared marker `RestrictionsPlugin` flips when it filters out an existing target, letting `ExportsFieldPlugin` fall back instead of erroring
|
|
846
|
+
*/
|
|
847
|
+
__restrictionsMarker?: { blocked: boolean };
|
|
850
848
|
}
|
|
851
849
|
declare interface BasenameCacheEntry {
|
|
852
850
|
/**
|
|
@@ -1269,6 +1267,11 @@ declare abstract class ByTypeGenerator extends Generator {
|
|
|
1269
1267
|
) => null | Source;
|
|
1270
1268
|
}
|
|
1271
1269
|
declare const CIRCULAR_CONNECTION: unique symbol;
|
|
1270
|
+
|
|
1271
|
+
/**
|
|
1272
|
+
* Abstract cache interface backed by tapable hooks for reading, writing, idle
|
|
1273
|
+
* transitions, and shutdown across webpack cache implementations.
|
|
1274
|
+
*/
|
|
1272
1275
|
declare class CacheClass {
|
|
1273
1276
|
/**
|
|
1274
1277
|
* Initializes the cache lifecycle hooks implemented by cache backends.
|
|
@@ -1552,6 +1555,11 @@ declare interface CallbackWebpackFunction_2<T, R = void> {
|
|
|
1552
1555
|
(err: null | Error, result?: T): R;
|
|
1553
1556
|
}
|
|
1554
1557
|
type Cell<T> = undefined | T;
|
|
1558
|
+
|
|
1559
|
+
/**
|
|
1560
|
+
* A Chunk is a unit of encapsulation for Modules.
|
|
1561
|
+
* Chunks are "rendered" into bundles that get emitted when the build completes.
|
|
1562
|
+
*/
|
|
1555
1563
|
declare class Chunk {
|
|
1556
1564
|
/**
|
|
1557
1565
|
* Creates an instance of Chunk.
|
|
@@ -1575,6 +1583,7 @@ declare class Chunk {
|
|
|
1575
1583
|
rendered: boolean;
|
|
1576
1584
|
hash?: string;
|
|
1577
1585
|
contentHash: Record<string, string>;
|
|
1586
|
+
contentHashFull: Record<string, string>;
|
|
1578
1587
|
renderedHash?: string;
|
|
1579
1588
|
chunkReason?: string;
|
|
1580
1589
|
extraAsync: boolean;
|
|
@@ -2368,6 +2377,11 @@ declare class ChunkGraph {
|
|
|
2368
2377
|
*/
|
|
2369
2378
|
static clearChunkGraphForChunk(chunk: Chunk): void;
|
|
2370
2379
|
}
|
|
2380
|
+
|
|
2381
|
+
/**
|
|
2382
|
+
* Represents a connected group of chunks along with the parent/child
|
|
2383
|
+
* relationships, async blocks, and traversal metadata webpack tracks for it.
|
|
2384
|
+
*/
|
|
2371
2385
|
declare abstract class ChunkGroup {
|
|
2372
2386
|
groupDebugId: number;
|
|
2373
2387
|
options: ChunkGroupOptions;
|
|
@@ -2672,9 +2686,27 @@ declare interface ChunkPathData {
|
|
|
2672
2686
|
name?: string;
|
|
2673
2687
|
hash: string;
|
|
2674
2688
|
hashWithLength?: (length: number) => string;
|
|
2689
|
+
|
|
2690
|
+
/**
|
|
2691
|
+
* builds `[chunkhash:<digest>]` per chunk in the runtime chunk-filename map
|
|
2692
|
+
*/
|
|
2693
|
+
hashWithDigest?: (digest: string, length?: number) => string;
|
|
2675
2694
|
contentHash?: Record<string, string>;
|
|
2676
2695
|
contentHashWithLength?: Record<string, (length: number) => string>;
|
|
2696
|
+
|
|
2697
|
+
/**
|
|
2698
|
+
* builds `[contenthash:<digest>]` per chunk in the runtime chunk-filename map
|
|
2699
|
+
*/
|
|
2700
|
+
contentHashWithDigest?: Record<
|
|
2701
|
+
string,
|
|
2702
|
+
(digest: string, length?: number) => string
|
|
2703
|
+
>;
|
|
2677
2704
|
}
|
|
2705
|
+
|
|
2706
|
+
/**
|
|
2707
|
+
* Adds runtime support for chunk prefetch and preload relationships discovered
|
|
2708
|
+
* in the chunk graph.
|
|
2709
|
+
*/
|
|
2678
2710
|
declare class ChunkPrefetchPreloadPlugin {
|
|
2679
2711
|
constructor();
|
|
2680
2712
|
|
|
@@ -2886,6 +2918,22 @@ declare interface CleanPluginCompilationHooks {
|
|
|
2886
2918
|
*/
|
|
2887
2919
|
keep: SyncBailHook<[string], boolean | void>;
|
|
2888
2920
|
}
|
|
2921
|
+
declare interface ClearCacheOptions {
|
|
2922
|
+
/**
|
|
2923
|
+
* drop cached source maps (default `true`)
|
|
2924
|
+
*/
|
|
2925
|
+
maps?: boolean;
|
|
2926
|
+
|
|
2927
|
+
/**
|
|
2928
|
+
* drop cached source/buffer copies (default `true`)
|
|
2929
|
+
*/
|
|
2930
|
+
source?: boolean;
|
|
2931
|
+
|
|
2932
|
+
/**
|
|
2933
|
+
* drop the parsed object form of cached source maps on `SourceMapSource` instances (default `false` — re-parsing JSON is significantly more expensive than `toString`). Only takes effect when a serialized form (buffer or string) is also retained, so the data remains recoverable.
|
|
2934
|
+
*/
|
|
2935
|
+
parsedMap?: boolean;
|
|
2936
|
+
}
|
|
2889
2937
|
declare interface CodeGenMapOverloads {
|
|
2890
2938
|
get: <K extends string>(key: K) => undefined | CodeGenValue<K>;
|
|
2891
2939
|
set: <K extends string>(
|
|
@@ -2900,6 +2948,7 @@ type CodeGenValue<K extends string> = K extends
|
|
|
2900
2948
|
| "assetInfo"
|
|
2901
2949
|
| "share-init"
|
|
2902
2950
|
| "topLevelDeclarations"
|
|
2951
|
+
| "freeNames"
|
|
2903
2952
|
| "chunkInitFragments"
|
|
2904
2953
|
| "url"
|
|
2905
2954
|
| "fullContentHash"
|
|
@@ -2988,6 +3037,11 @@ type CodeGenerationResultData = Omit<
|
|
|
2988
3037
|
"get" | "set" | "has" | "delete"
|
|
2989
3038
|
> &
|
|
2990
3039
|
CodeGenMapOverloads;
|
|
3040
|
+
|
|
3041
|
+
/**
|
|
3042
|
+
* Stores code generation results keyed by module and runtime so later stages
|
|
3043
|
+
* can retrieve emitted sources, metadata, and derived hashes.
|
|
3044
|
+
*/
|
|
2991
3045
|
declare abstract class CodeGenerationResults {
|
|
2992
3046
|
map: Map<Module, RuntimeSpecMap<CodeGenerationResult, CodeGenerationResult>>;
|
|
2993
3047
|
|
|
@@ -3131,11 +3185,6 @@ declare interface ColorsOptions {
|
|
|
3131
3185
|
*/
|
|
3132
3186
|
useColor?: boolean;
|
|
3133
3187
|
}
|
|
3134
|
-
declare interface CommentCssParser {
|
|
3135
|
-
value: string;
|
|
3136
|
-
range: [number, number];
|
|
3137
|
-
loc: { start: Position; end: Position };
|
|
3138
|
-
}
|
|
3139
3188
|
type CommentJavascriptParser = CommentImport & {
|
|
3140
3189
|
start: number;
|
|
3141
3190
|
end: number;
|
|
@@ -4038,6 +4087,27 @@ declare interface CompiledAliasOption {
|
|
|
4038
4087
|
*/
|
|
4039
4088
|
arrayAlias: boolean;
|
|
4040
4089
|
}
|
|
4090
|
+
declare interface CompiledAliasOptions {
|
|
4091
|
+
/**
|
|
4092
|
+
* declaration-ordered list
|
|
4093
|
+
*/
|
|
4094
|
+
all: CompiledAliasOption[];
|
|
4095
|
+
|
|
4096
|
+
/**
|
|
4097
|
+
* bucketed by first char code
|
|
4098
|
+
*/
|
|
4099
|
+
byFirstChar: Map<number, CompiledAliasOption[]>;
|
|
4100
|
+
|
|
4101
|
+
/**
|
|
4102
|
+
* true when an empty-prefix wildcard is present
|
|
4103
|
+
*/
|
|
4104
|
+
hasAnyFirstChar: boolean;
|
|
4105
|
+
|
|
4106
|
+
/**
|
|
4107
|
+
* true when the bucket fast-path should be used at resolve time
|
|
4108
|
+
*/
|
|
4109
|
+
useBuckets: boolean;
|
|
4110
|
+
}
|
|
4041
4111
|
declare class Compiler {
|
|
4042
4112
|
/**
|
|
4043
4113
|
* Creates an instance of Compiler.
|
|
@@ -4271,6 +4341,9 @@ declare class ConcatSource extends Source {
|
|
|
4271
4341
|
): GeneratedSourceInfo;
|
|
4272
4342
|
}
|
|
4273
4343
|
type ConcatSourceChild = string | Source | SourceLike;
|
|
4344
|
+
type ConcatenatedModuleBuildInfo = KnownBuildInfo &
|
|
4345
|
+
Record<string, any> &
|
|
4346
|
+
KnownConcatenatedModuleBuildInfo;
|
|
4274
4347
|
declare interface ConcatenatedModuleInfo {
|
|
4275
4348
|
type: "concatenated";
|
|
4276
4349
|
module: Module;
|
|
@@ -4287,6 +4360,11 @@ declare interface ConcatenatedModuleInfo {
|
|
|
4287
4360
|
rawExportMap?: Map<string, string>;
|
|
4288
4361
|
namespaceExportSymbol?: string;
|
|
4289
4362
|
namespaceObjectName?: string;
|
|
4363
|
+
|
|
4364
|
+
/**
|
|
4365
|
+
* decoupled namespace object that keeps original export names when the exports are mangled
|
|
4366
|
+
*/
|
|
4367
|
+
escapeNamespaceObjectName?: string;
|
|
4290
4368
|
concatenationScope?: ConcatenationScope;
|
|
4291
4369
|
|
|
4292
4370
|
/**
|
|
@@ -4318,6 +4396,24 @@ declare interface ConcatenatedModuleInfo {
|
|
|
4318
4396
|
* runtime namespace object that detects "__esModule"
|
|
4319
4397
|
*/
|
|
4320
4398
|
interopDefaultAccessName?: string;
|
|
4399
|
+
|
|
4400
|
+
/**
|
|
4401
|
+
* memoized getExportsType(strict=true)
|
|
4402
|
+
*/
|
|
4403
|
+
exportsTypeStrict?:
|
|
4404
|
+
| "namespace"
|
|
4405
|
+
| "dynamic"
|
|
4406
|
+
| "default-only"
|
|
4407
|
+
| "default-with-named";
|
|
4408
|
+
|
|
4409
|
+
/**
|
|
4410
|
+
* memoized getExportsType(strict=false)
|
|
4411
|
+
*/
|
|
4412
|
+
exportsTypeNonStrict?:
|
|
4413
|
+
| "namespace"
|
|
4414
|
+
| "dynamic"
|
|
4415
|
+
| "default-only"
|
|
4416
|
+
| "default-with-named";
|
|
4321
4417
|
}
|
|
4322
4418
|
declare interface ConcatenationBailoutReasonContext {
|
|
4323
4419
|
/**
|
|
@@ -4330,6 +4426,11 @@ declare interface ConcatenationBailoutReasonContext {
|
|
|
4330
4426
|
*/
|
|
4331
4427
|
chunkGraph: ChunkGraph;
|
|
4332
4428
|
}
|
|
4429
|
+
|
|
4430
|
+
/**
|
|
4431
|
+
* Tracks the symbols and cross-module references needed while rendering a
|
|
4432
|
+
* concatenated module.
|
|
4433
|
+
*/
|
|
4333
4434
|
declare class ConcatenationScope {
|
|
4334
4435
|
/**
|
|
4335
4436
|
* Creates the mutable scope object used while rendering a concatenated
|
|
@@ -4696,8 +4797,20 @@ declare class ConstDependency extends NullDependency {
|
|
|
4696
4797
|
range: number | [number, number];
|
|
4697
4798
|
runtimeRequirements: null | Set<string>;
|
|
4698
4799
|
static Template: typeof ConstDependencyTemplate;
|
|
4800
|
+
|
|
4801
|
+
/**
|
|
4802
|
+
* Compares two dependencies by source location for sorting a module's
|
|
4803
|
+
* `dependencies`, without materializing the `loc` objects (`get loc` caches
|
|
4804
|
+
* its result, so comparing through it would retain a location object on every
|
|
4805
|
+
* sorted dependency). These dependencies always carry a real source position,
|
|
4806
|
+
* so only start (line, column) and the within-statement index are compared; a
|
|
4807
|
+
* dependency without an index sorts after one that has an index at the same
|
|
4808
|
+
* position.
|
|
4809
|
+
*/
|
|
4810
|
+
static compareLocations(a: Dependency, b: Dependency): 0 | 1 | -1;
|
|
4699
4811
|
static NO_EXPORTS_REFERENCED: string[][];
|
|
4700
4812
|
static EXPORTS_OBJECT_REFERENCED: string[][];
|
|
4813
|
+
static EXPORTS_OBJECT_REFERENCED_MANGLEABLE: string[][];
|
|
4701
4814
|
|
|
4702
4815
|
/**
|
|
4703
4816
|
* Returns true if the dependency is a low priority dependency.
|
|
@@ -4709,6 +4822,10 @@ declare class ConstDependency extends NullDependency {
|
|
|
4709
4822
|
*/
|
|
4710
4823
|
static canConcatenate(dependency: Dependency): boolean;
|
|
4711
4824
|
static TRANSITIVE: symbol;
|
|
4825
|
+
static LAZY_UNTIL_LOCAL: "local";
|
|
4826
|
+
static LAZY_UNTIL_ID: "id";
|
|
4827
|
+
static LAZY_UNTIL_FALLBACK: "*";
|
|
4828
|
+
static LAZY_UNTIL_REQUEST: "@";
|
|
4712
4829
|
}
|
|
4713
4830
|
declare class ConstDependencyTemplate extends NullDependencyTemplate {
|
|
4714
4831
|
constructor();
|
|
@@ -4912,12 +5029,15 @@ declare interface ContextHash {
|
|
|
4912
5029
|
symlinks?: Set<string>;
|
|
4913
5030
|
}
|
|
4914
5031
|
type ContextMode =
|
|
4915
|
-
| "weak"
|
|
4916
5032
|
| "eager"
|
|
5033
|
+
| "weak"
|
|
4917
5034
|
| "lazy"
|
|
4918
5035
|
| "lazy-once"
|
|
4919
5036
|
| "sync"
|
|
4920
5037
|
| "async-weak";
|
|
5038
|
+
type ContextModuleBuildInfo = KnownBuildInfo &
|
|
5039
|
+
Record<string, any> &
|
|
5040
|
+
KnownContextModuleBuildInfo;
|
|
4921
5041
|
declare abstract class ContextModuleFactory extends ModuleFactory {
|
|
4922
5042
|
hooks: Readonly<{
|
|
4923
5043
|
beforeResolve: AsyncSeriesWaterfallHook<
|
|
@@ -5152,6 +5272,11 @@ declare interface CssAutoOrModuleParserOptions {
|
|
|
5152
5272
|
*/
|
|
5153
5273
|
animation?: boolean;
|
|
5154
5274
|
|
|
5275
|
+
/**
|
|
5276
|
+
* Configure how the CSS source is parsed: as a full stylesheet (default) or as a block's contents (e.g. the content of an HTML `style` attribute).
|
|
5277
|
+
*/
|
|
5278
|
+
as?: "stylesheet" | "block-contents";
|
|
5279
|
+
|
|
5155
5280
|
/**
|
|
5156
5281
|
* Enable/disable renaming of `@container` names.
|
|
5157
5282
|
*/
|
|
@@ -5317,6 +5442,13 @@ declare abstract class CssModule extends NormalModule {
|
|
|
5317
5442
|
inheritance?: [CssLayer, Supports, Media][];
|
|
5318
5443
|
exportType?: "link" | "text" | "css-style-sheet" | "style";
|
|
5319
5444
|
}
|
|
5445
|
+
type CssModuleBuildInfo = KnownBuildInfo &
|
|
5446
|
+
Record<string, any> &
|
|
5447
|
+
KnownNormalModuleBuildInfo &
|
|
5448
|
+
KnownCssModuleBuildInfo;
|
|
5449
|
+
type CssModuleBuildMeta = KnownBuildMeta &
|
|
5450
|
+
Record<string, any> &
|
|
5451
|
+
KnownCssModuleBuildMeta;
|
|
5320
5452
|
|
|
5321
5453
|
/**
|
|
5322
5454
|
* Generator options for css/module modules.
|
|
@@ -5383,6 +5515,11 @@ declare interface CssModuleParserOptions {
|
|
|
5383
5515
|
*/
|
|
5384
5516
|
animation?: boolean;
|
|
5385
5517
|
|
|
5518
|
+
/**
|
|
5519
|
+
* Configure how the CSS source is parsed: as a full stylesheet (default) or as a block's contents (e.g. the content of an HTML `style` attribute).
|
|
5520
|
+
*/
|
|
5521
|
+
as?: "stylesheet" | "block-contents";
|
|
5522
|
+
|
|
5386
5523
|
/**
|
|
5387
5524
|
* Enable/disable renaming of `@container` names.
|
|
5388
5525
|
*/
|
|
@@ -5492,12 +5629,16 @@ declare class CssModulesPlugin {
|
|
|
5492
5629
|
static chunkHasCss(chunk: Chunk, chunkGraph: ChunkGraph): boolean;
|
|
5493
5630
|
}
|
|
5494
5631
|
declare abstract class CssParser extends ParserClass {
|
|
5495
|
-
defaultMode: "global" | "auto" | "
|
|
5632
|
+
defaultMode: "global" | "auto" | "local" | "pure";
|
|
5496
5633
|
options: {
|
|
5497
5634
|
/**
|
|
5498
5635
|
* Enable/disable renaming of `@keyframes`.
|
|
5499
5636
|
*/
|
|
5500
5637
|
animation: boolean;
|
|
5638
|
+
/**
|
|
5639
|
+
* Configure how the CSS source is parsed: as a full stylesheet (default) or as a block's contents (e.g. the content of an HTML `style` attribute).
|
|
5640
|
+
*/
|
|
5641
|
+
as: string;
|
|
5501
5642
|
/**
|
|
5502
5643
|
* Enable/disable renaming of `@container` names.
|
|
5503
5644
|
*/
|
|
@@ -5541,29 +5682,20 @@ declare abstract class CssParser extends ParserClass {
|
|
|
5541
5682
|
/**
|
|
5542
5683
|
* default mode
|
|
5543
5684
|
*/
|
|
5544
|
-
defaultMode?: "global" | "auto" | "
|
|
5685
|
+
defaultMode?: "global" | "auto" | "local" | "pure";
|
|
5545
5686
|
};
|
|
5546
|
-
comments?: CommentCssParser[];
|
|
5547
5687
|
magicCommentContext: ContextImport;
|
|
5548
|
-
|
|
5549
|
-
/**
|
|
5550
|
-
* Returns comments in the range.
|
|
5551
|
-
*/
|
|
5552
|
-
getComments(range: [number, number]): CommentCssParser[];
|
|
5553
|
-
|
|
5554
|
-
/**
|
|
5555
|
-
* Parses comment options.
|
|
5556
|
-
*/
|
|
5557
|
-
parseCommentOptions(range: [number, number]): {
|
|
5558
|
-
options: null | Record<string, any>;
|
|
5559
|
-
errors: null | (Error & { comment: CommentCssParser })[];
|
|
5560
|
-
};
|
|
5561
5688
|
}
|
|
5562
5689
|
|
|
5563
5690
|
/**
|
|
5564
5691
|
* Parser options for css modules.
|
|
5565
5692
|
*/
|
|
5566
5693
|
declare interface CssParserOptions {
|
|
5694
|
+
/**
|
|
5695
|
+
* Configure how the CSS source is parsed: as a full stylesheet (default) or as a block's contents (e.g. the content of an HTML `style` attribute).
|
|
5696
|
+
*/
|
|
5697
|
+
as?: "stylesheet" | "block-contents";
|
|
5698
|
+
|
|
5567
5699
|
/**
|
|
5568
5700
|
* Configure how CSS content is exported as default.
|
|
5569
5701
|
*/
|
|
@@ -5585,6 +5717,29 @@ declare interface CssParserOptions {
|
|
|
5585
5717
|
url?: boolean;
|
|
5586
5718
|
}
|
|
5587
5719
|
type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration;
|
|
5720
|
+
type DefineConfigInput =
|
|
5721
|
+
| Configuration
|
|
5722
|
+
| MultiConfiguration
|
|
5723
|
+
| ((
|
|
5724
|
+
env: Record<string, any>,
|
|
5725
|
+
argv: Record<string, any>
|
|
5726
|
+
) => MaybePromise<Configuration | MultiConfiguration>)
|
|
5727
|
+
| ((
|
|
5728
|
+
env: Record<string, any>,
|
|
5729
|
+
argv: Record<string, any>
|
|
5730
|
+
) => MaybePromise<Configuration | MultiConfiguration>)[]
|
|
5731
|
+
| Promise<
|
|
5732
|
+
| Configuration
|
|
5733
|
+
| MultiConfiguration
|
|
5734
|
+
| ((
|
|
5735
|
+
env: Record<string, any>,
|
|
5736
|
+
argv: Record<string, any>
|
|
5737
|
+
) => MaybePromise<Configuration | MultiConfiguration>)
|
|
5738
|
+
| ((
|
|
5739
|
+
env: Record<string, any>,
|
|
5740
|
+
argv: Record<string, any>
|
|
5741
|
+
) => MaybePromise<Configuration | MultiConfiguration>)[]
|
|
5742
|
+
>;
|
|
5588
5743
|
declare class DefinePlugin {
|
|
5589
5744
|
/**
|
|
5590
5745
|
* Create a new define plugin
|
|
@@ -5635,6 +5790,15 @@ declare class DelegatedPlugin {
|
|
|
5635
5790
|
*/
|
|
5636
5791
|
apply(compiler: Compiler): void;
|
|
5637
5792
|
}
|
|
5793
|
+
|
|
5794
|
+
/**
|
|
5795
|
+
* DependenciesBlock is the base class for all Module classes in webpack. It describes a
|
|
5796
|
+
* "block" of dependencies which are pointers to other DependenciesBlock instances. For example
|
|
5797
|
+
* when a Module has a CommonJs require statement, the DependencyBlock for the CommonJs module
|
|
5798
|
+
* would be added as a dependency to the Module. DependenciesBlock is inherited by two types of classes:
|
|
5799
|
+
* Module subclasses and AsyncDependenciesBlock subclasses. The only difference between the two is that
|
|
5800
|
+
* AsyncDependenciesBlock subclasses are used for code-splitting (async boundary) and Module subclasses are not.
|
|
5801
|
+
*/
|
|
5638
5802
|
declare abstract class DependenciesBlock {
|
|
5639
5803
|
dependencies: Dependency[];
|
|
5640
5804
|
blocks: AsyncDependenciesBlock[];
|
|
@@ -5670,12 +5834,12 @@ declare abstract class DependenciesBlock {
|
|
|
5670
5834
|
/**
|
|
5671
5835
|
* Serializes this instance into the provided serializer context.
|
|
5672
5836
|
*/
|
|
5673
|
-
serialize(__0:
|
|
5837
|
+
serialize(__0: ObjectSerializerContextObjectMiddlewareObject_5): void;
|
|
5674
5838
|
|
|
5675
5839
|
/**
|
|
5676
5840
|
* Restores this instance from the provided deserializer context.
|
|
5677
5841
|
*/
|
|
5678
|
-
deserialize(__0:
|
|
5842
|
+
deserialize(__0: ObjectDeserializerContextObjectMiddlewareObject_4): void;
|
|
5679
5843
|
}
|
|
5680
5844
|
declare interface DependenciesBlockLike {
|
|
5681
5845
|
dependencies: Dependency[];
|
|
@@ -5683,7 +5847,6 @@ declare interface DependenciesBlockLike {
|
|
|
5683
5847
|
}
|
|
5684
5848
|
declare class Dependency {
|
|
5685
5849
|
constructor();
|
|
5686
|
-
weak: boolean;
|
|
5687
5850
|
optional?: boolean;
|
|
5688
5851
|
|
|
5689
5852
|
/**
|
|
@@ -5711,6 +5874,14 @@ declare class Dependency {
|
|
|
5711
5874
|
endColumn: number
|
|
5712
5875
|
): void;
|
|
5713
5876
|
|
|
5877
|
+
/**
|
|
5878
|
+
* Updates loc from a source location plus an explicit index, without
|
|
5879
|
+
* materializing the `loc` object (keeps `get loc` lazy). Replaces the
|
|
5880
|
+
* `dep.loc = Object.create(loc); dep.loc.index = i` pattern, which both
|
|
5881
|
+
* allocated a copy and stored the index outside the serialized fields.
|
|
5882
|
+
*/
|
|
5883
|
+
setLocWithIndex(loc: DependencyLocation, index: number): void;
|
|
5884
|
+
|
|
5714
5885
|
/**
|
|
5715
5886
|
* Returns a request context.
|
|
5716
5887
|
*/
|
|
@@ -5726,6 +5897,31 @@ declare class Dependency {
|
|
|
5726
5897
|
*/
|
|
5727
5898
|
couldAffectReferencingModule(): boolean | symbol;
|
|
5728
5899
|
|
|
5900
|
+
/**
|
|
5901
|
+
* Returns the export name this dependency requests from its target module (lazy barrel optimization).
|
|
5902
|
+
*/
|
|
5903
|
+
getForwardId(): null | string | true;
|
|
5904
|
+
|
|
5905
|
+
/**
|
|
5906
|
+
* Returns how this dependency may be deferred when its parent module is side-effect-free (lazy barrel optimization).
|
|
5907
|
+
*/
|
|
5908
|
+
getLazyUntil(): null | "local" | "id" | "*" | "@";
|
|
5909
|
+
|
|
5910
|
+
/**
|
|
5911
|
+
* Returns the export name for a `LAZY_UNTIL_LOCAL`/`LAZY_UNTIL_ID` classification (lazy barrel optimization).
|
|
5912
|
+
*/
|
|
5913
|
+
getLazyName(): null | string;
|
|
5914
|
+
|
|
5915
|
+
/**
|
|
5916
|
+
* Whether the lazy barrel currently defers creating this dependency's target module (lazy barrel optimization).
|
|
5917
|
+
*/
|
|
5918
|
+
isLazy(): boolean;
|
|
5919
|
+
|
|
5920
|
+
/**
|
|
5921
|
+
* Sets whether the lazy barrel defers creating this dependency's target module (lazy barrel optimization).
|
|
5922
|
+
*/
|
|
5923
|
+
setLazy(value: boolean): void;
|
|
5924
|
+
|
|
5729
5925
|
/**
|
|
5730
5926
|
* Returns the referenced module and export
|
|
5731
5927
|
* @deprecated
|
|
@@ -5798,16 +5994,28 @@ declare class Dependency {
|
|
|
5798
5994
|
/**
|
|
5799
5995
|
* Serializes this instance into the provided serializer context.
|
|
5800
5996
|
*/
|
|
5801
|
-
serialize(__0:
|
|
5997
|
+
serialize(__0: ObjectSerializerContextObjectMiddlewareObject_5): void;
|
|
5802
5998
|
|
|
5803
5999
|
/**
|
|
5804
6000
|
* Restores this instance from the provided deserializer context.
|
|
5805
6001
|
*/
|
|
5806
|
-
deserialize(__0:
|
|
6002
|
+
deserialize(__0: ObjectDeserializerContextObjectMiddlewareObject_4): void;
|
|
5807
6003
|
module: any;
|
|
5808
6004
|
get disconnect(): any;
|
|
6005
|
+
|
|
6006
|
+
/**
|
|
6007
|
+
* Compares two dependencies by source location for sorting a module's
|
|
6008
|
+
* `dependencies`, without materializing the `loc` objects (`get loc` caches
|
|
6009
|
+
* its result, so comparing through it would retain a location object on every
|
|
6010
|
+
* sorted dependency). These dependencies always carry a real source position,
|
|
6011
|
+
* so only start (line, column) and the within-statement index are compared; a
|
|
6012
|
+
* dependency without an index sorts after one that has an index at the same
|
|
6013
|
+
* position.
|
|
6014
|
+
*/
|
|
6015
|
+
static compareLocations(a: Dependency, b: Dependency): 0 | 1 | -1;
|
|
5809
6016
|
static NO_EXPORTS_REFERENCED: string[][];
|
|
5810
6017
|
static EXPORTS_OBJECT_REFERENCED: string[][];
|
|
6018
|
+
static EXPORTS_OBJECT_REFERENCED_MANGLEABLE: string[][];
|
|
5811
6019
|
|
|
5812
6020
|
/**
|
|
5813
6021
|
* Returns true if the dependency is a low priority dependency.
|
|
@@ -5819,6 +6027,10 @@ declare class Dependency {
|
|
|
5819
6027
|
*/
|
|
5820
6028
|
static canConcatenate(dependency: Dependency): boolean;
|
|
5821
6029
|
static TRANSITIVE: symbol;
|
|
6030
|
+
static LAZY_UNTIL_LOCAL: "local";
|
|
6031
|
+
static LAZY_UNTIL_ID: "id";
|
|
6032
|
+
static LAZY_UNTIL_FALLBACK: "*";
|
|
6033
|
+
static LAZY_UNTIL_REQUEST: "@";
|
|
5822
6034
|
}
|
|
5823
6035
|
declare interface DependencyConstructor {
|
|
5824
6036
|
new (...args: any[]): Dependency;
|
|
@@ -6409,7 +6621,37 @@ declare class ElectronTargetPlugin {
|
|
|
6409
6621
|
/**
|
|
6410
6622
|
* Creates an instance of ElectronTargetPlugin.
|
|
6411
6623
|
*/
|
|
6412
|
-
constructor(
|
|
6624
|
+
constructor(
|
|
6625
|
+
context?: "main" | "preload" | "renderer",
|
|
6626
|
+
type?:
|
|
6627
|
+
| "import"
|
|
6628
|
+
| "var"
|
|
6629
|
+
| "module"
|
|
6630
|
+
| "assign"
|
|
6631
|
+
| "this"
|
|
6632
|
+
| "window"
|
|
6633
|
+
| "self"
|
|
6634
|
+
| "global"
|
|
6635
|
+
| "commonjs"
|
|
6636
|
+
| "commonjs2"
|
|
6637
|
+
| "commonjs-module"
|
|
6638
|
+
| "commonjs-static"
|
|
6639
|
+
| "amd"
|
|
6640
|
+
| "amd-require"
|
|
6641
|
+
| "umd"
|
|
6642
|
+
| "umd2"
|
|
6643
|
+
| "jsonp"
|
|
6644
|
+
| "system"
|
|
6645
|
+
| "promise"
|
|
6646
|
+
| "module-import"
|
|
6647
|
+
| "script"
|
|
6648
|
+
| "node-commonjs"
|
|
6649
|
+
| "asset"
|
|
6650
|
+
| "asset-url"
|
|
6651
|
+
| "css-import"
|
|
6652
|
+
| "css-url"
|
|
6653
|
+
);
|
|
6654
|
+
type: ExternalsType;
|
|
6413
6655
|
|
|
6414
6656
|
/**
|
|
6415
6657
|
* Applies the plugin by registering its hooks on the compiler.
|
|
@@ -6481,6 +6723,11 @@ declare interface EnableLibraryPluginOptions {
|
|
|
6481
6723
|
*/
|
|
6482
6724
|
additionalApply?: () => void;
|
|
6483
6725
|
}
|
|
6726
|
+
|
|
6727
|
+
/**
|
|
6728
|
+
* Validates and enables named wasm loading backends by applying the plugin
|
|
6729
|
+
* implementations that provide their runtime support.
|
|
6730
|
+
*/
|
|
6484
6731
|
declare class EnableWasmLoadingPlugin {
|
|
6485
6732
|
/**
|
|
6486
6733
|
* Stores the wasm loading backend name that should be enabled for the
|
|
@@ -6587,6 +6834,11 @@ declare interface EntryDescription {
|
|
|
6587
6834
|
*/
|
|
6588
6835
|
filename?: string | TemplatePathFn<PathDataChunk>;
|
|
6589
6836
|
|
|
6837
|
+
/**
|
|
6838
|
+
* Generate an HTML file for this entrypoint with its JS and CSS output chunks injected. Overrides `output.html` for this entry.
|
|
6839
|
+
*/
|
|
6840
|
+
html?: boolean;
|
|
6841
|
+
|
|
6590
6842
|
/**
|
|
6591
6843
|
* Module(s) that are loaded upon startup.
|
|
6592
6844
|
*/
|
|
@@ -6616,6 +6868,11 @@ declare interface EntryDescription {
|
|
|
6616
6868
|
* The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
|
|
6617
6869
|
*/
|
|
6618
6870
|
wasmLoading?: string | false;
|
|
6871
|
+
|
|
6872
|
+
/**
|
|
6873
|
+
* Mark this entry as a worker so its output file uses 'output.workerChunkFilename'.
|
|
6874
|
+
*/
|
|
6875
|
+
worker?: boolean;
|
|
6619
6876
|
}
|
|
6620
6877
|
|
|
6621
6878
|
/**
|
|
@@ -6647,6 +6904,11 @@ declare interface EntryDescriptionNormalized {
|
|
|
6647
6904
|
*/
|
|
6648
6905
|
filename?: string | TemplatePathFn<PathDataChunk>;
|
|
6649
6906
|
|
|
6907
|
+
/**
|
|
6908
|
+
* Generate an HTML file for this entrypoint with its JS and CSS output chunks injected. Overrides `output.html` for this entry.
|
|
6909
|
+
*/
|
|
6910
|
+
html?: boolean;
|
|
6911
|
+
|
|
6650
6912
|
/**
|
|
6651
6913
|
* Module(s) that are loaded upon startup. The last one is exported.
|
|
6652
6914
|
*/
|
|
@@ -6676,6 +6938,11 @@ declare interface EntryDescriptionNormalized {
|
|
|
6676
6938
|
* The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
|
|
6677
6939
|
*/
|
|
6678
6940
|
wasmLoading?: string | false;
|
|
6941
|
+
|
|
6942
|
+
/**
|
|
6943
|
+
* Mark this entry as a worker so its output file uses 'output.workerChunkFilename'.
|
|
6944
|
+
*/
|
|
6945
|
+
worker?: boolean;
|
|
6679
6946
|
}
|
|
6680
6947
|
type EntryItem = string | string[];
|
|
6681
6948
|
type EntryLibIndex =
|
|
@@ -6700,6 +6967,7 @@ declare class EntryOptionPlugin {
|
|
|
6700
6967
|
* Applies the plugin by registering its hooks on the compiler.
|
|
6701
6968
|
*/
|
|
6702
6969
|
apply(compiler: Compiler): void;
|
|
6970
|
+
static getHooks(compiler: Compiler): EntryOptionPluginHooks;
|
|
6703
6971
|
|
|
6704
6972
|
/**
|
|
6705
6973
|
* Apply entry option.
|
|
@@ -6719,6 +6987,15 @@ declare class EntryOptionPlugin {
|
|
|
6719
6987
|
desc: EntryDescriptionNormalized
|
|
6720
6988
|
): EntryOptions;
|
|
6721
6989
|
}
|
|
6990
|
+
declare interface EntryOptionPluginHooks {
|
|
6991
|
+
/**
|
|
6992
|
+
* transform an entry into a different request (e.g. wrap a non-HTML entry in a synthetic HTML module); return `undefined` to keep the default behavior
|
|
6993
|
+
*/
|
|
6994
|
+
entry: SyncBailHook<
|
|
6995
|
+
[string, string, EntryDescriptionNormalized],
|
|
6996
|
+
undefined | string
|
|
6997
|
+
>;
|
|
6998
|
+
}
|
|
6722
6999
|
type EntryOptions = { name?: string } & Omit<
|
|
6723
7000
|
EntryDescriptionNormalized,
|
|
6724
7001
|
"import"
|
|
@@ -6745,6 +7022,11 @@ declare class EntryPlugin {
|
|
|
6745
7022
|
options: string | EntryOptions
|
|
6746
7023
|
): EntryDependency;
|
|
6747
7024
|
}
|
|
7025
|
+
declare interface EntryScriptInfo {
|
|
7026
|
+
request: string;
|
|
7027
|
+
entryName: string;
|
|
7028
|
+
type: "script" | "stylesheet" | "script-module" | "modulepreload";
|
|
7029
|
+
}
|
|
6748
7030
|
type EntryStatic = string | EntryObject | string[];
|
|
6749
7031
|
|
|
6750
7032
|
/**
|
|
@@ -6758,6 +7040,13 @@ declare interface EntryTypesIndex {
|
|
|
6758
7040
|
timestamp: number;
|
|
6759
7041
|
accuracy: number;
|
|
6760
7042
|
}
|
|
7043
|
+
|
|
7044
|
+
/**
|
|
7045
|
+
* Entrypoint serves as an encapsulation primitive for chunks that are
|
|
7046
|
+
* a part of a single ChunkGroup. They represent all bundles that need to be loaded for a
|
|
7047
|
+
* single instance of a page. Multi-page application architectures will typically yield multiple Entrypoint objects
|
|
7048
|
+
* inside of the compilation, whereas a Single Page App may only contain one with many lazy-loaded chunks.
|
|
7049
|
+
*/
|
|
6761
7050
|
declare abstract class Entrypoint extends ChunkGroup {
|
|
6762
7051
|
/**
|
|
6763
7052
|
* Sets the runtimeChunk for an entrypoint.
|
|
@@ -6847,11 +7136,26 @@ declare interface Environment {
|
|
|
6847
7136
|
*/
|
|
6848
7137
|
globalThis?: boolean;
|
|
6849
7138
|
|
|
7139
|
+
/**
|
|
7140
|
+
* The environment supports 'Object.hasOwn'.
|
|
7141
|
+
*/
|
|
7142
|
+
hasOwn?: boolean;
|
|
7143
|
+
|
|
6850
7144
|
/**
|
|
6851
7145
|
* The environment supports `import.meta.dirname` and `import.meta.filename`.
|
|
6852
7146
|
*/
|
|
6853
7147
|
importMetaDirnameAndFilename?: boolean;
|
|
6854
7148
|
|
|
7149
|
+
/**
|
|
7150
|
+
* The environment supports let for variable declarations.
|
|
7151
|
+
*/
|
|
7152
|
+
let?: boolean;
|
|
7153
|
+
|
|
7154
|
+
/**
|
|
7155
|
+
* The environment supports logical assignment operators ('a ||= b', 'a &&= b', 'a ??= b').
|
|
7156
|
+
*/
|
|
7157
|
+
logicalAssignment?: boolean;
|
|
7158
|
+
|
|
6855
7159
|
/**
|
|
6856
7160
|
* The environment supports object method shorthand ('{ module() {} }').
|
|
6857
7161
|
*/
|
|
@@ -6862,6 +7166,11 @@ declare interface Environment {
|
|
|
6862
7166
|
*/
|
|
6863
7167
|
module?: boolean;
|
|
6864
7168
|
|
|
7169
|
+
/**
|
|
7170
|
+
* The environment supports `process.getBuiltinModule()` to synchronously load Node.js core modules.
|
|
7171
|
+
*/
|
|
7172
|
+
nodeBuiltinModuleGetter?: boolean;
|
|
7173
|
+
|
|
6865
7174
|
/**
|
|
6866
7175
|
* The environment supports `node:` prefix for Node.js core modules.
|
|
6867
7176
|
*/
|
|
@@ -6872,6 +7181,16 @@ declare interface Environment {
|
|
|
6872
7181
|
*/
|
|
6873
7182
|
optionalChaining?: boolean;
|
|
6874
7183
|
|
|
7184
|
+
/**
|
|
7185
|
+
* The environment supports spread and rest in array/object literals and calls ('{ ...obj }', 'fn(...args)').
|
|
7186
|
+
*/
|
|
7187
|
+
spread?: boolean;
|
|
7188
|
+
|
|
7189
|
+
/**
|
|
7190
|
+
* The environment supports 'Symbol' (and well-known symbols like 'Symbol.toStringTag').
|
|
7191
|
+
*/
|
|
7192
|
+
symbol?: boolean;
|
|
7193
|
+
|
|
6875
7194
|
/**
|
|
6876
7195
|
* The environment supports template literals.
|
|
6877
7196
|
*/
|
|
@@ -7059,7 +7378,7 @@ declare interface Experiments {
|
|
|
7059
7378
|
futureDefaults?: boolean;
|
|
7060
7379
|
|
|
7061
7380
|
/**
|
|
7062
|
-
* Enable
|
|
7381
|
+
* Enable HTML entry support. Treats `.html` files as a first-class module type so they can be used directly as entry points.
|
|
7063
7382
|
* @experimental
|
|
7064
7383
|
*/
|
|
7065
7384
|
html?: boolean;
|
|
@@ -7208,7 +7527,28 @@ declare abstract class ExportInfo {
|
|
|
7208
7527
|
canMangleUse?: boolean;
|
|
7209
7528
|
exportsInfoOwned: boolean;
|
|
7210
7529
|
exportsInfo?: ExportsInfo;
|
|
7530
|
+
|
|
7531
|
+
/**
|
|
7532
|
+
* defined: the export binds to a small primitive constant and may be inlined
|
|
7533
|
+
* undefined: not an inlined constant export
|
|
7534
|
+
*/
|
|
7535
|
+
canInlineProvide?: InlinedValue;
|
|
7536
|
+
|
|
7537
|
+
/**
|
|
7538
|
+
* true: at least one consumer accepts inlining, none rejected
|
|
7539
|
+
* false: at least one consumer rejected inlining
|
|
7540
|
+
* undefined: collecting; no consumer has decided yet
|
|
7541
|
+
*/
|
|
7542
|
+
canInlineUse?: boolean;
|
|
7543
|
+
|
|
7544
|
+
/**
|
|
7545
|
+
* Only specific export info can be pure, so other_export_info.pure is always undefined.
|
|
7546
|
+
* true: calling the export has no observable side effects
|
|
7547
|
+
* undefined: it was not determined whether the export is pure
|
|
7548
|
+
*/
|
|
7549
|
+
pureProvide?: boolean;
|
|
7211
7550
|
get canMangle(): boolean;
|
|
7551
|
+
canInline(): undefined | InlinedValue;
|
|
7212
7552
|
|
|
7213
7553
|
/**
|
|
7214
7554
|
* Sets used in unknown way.
|
|
@@ -7257,12 +7597,12 @@ declare abstract class ExportInfo {
|
|
|
7257
7597
|
getUsed(runtime: RuntimeSpec): UsageStateType;
|
|
7258
7598
|
|
|
7259
7599
|
/**
|
|
7260
|
-
* Returns used name.
|
|
7600
|
+
* Returns used name. May return InlinedUsedName when the export is inlined to a primitive.
|
|
7261
7601
|
*/
|
|
7262
7602
|
getUsedName(
|
|
7263
7603
|
fallbackName: undefined | string,
|
|
7264
7604
|
runtime: RuntimeSpec
|
|
7265
|
-
): string | false;
|
|
7605
|
+
): string | false | InlinedUsedName;
|
|
7266
7606
|
|
|
7267
7607
|
/**
|
|
7268
7608
|
* Checks whether this export info has used name.
|
|
@@ -7272,7 +7612,7 @@ declare abstract class ExportInfo {
|
|
|
7272
7612
|
/**
|
|
7273
7613
|
* Updates used name using the provided name.
|
|
7274
7614
|
*/
|
|
7275
|
-
setUsedName(name: string): void;
|
|
7615
|
+
setUsedName(name: string | InlinedUsedName): void;
|
|
7276
7616
|
|
|
7277
7617
|
/**
|
|
7278
7618
|
* Gets terminal binding.
|
|
@@ -7307,7 +7647,7 @@ declare abstract class ExportInfo {
|
|
|
7307
7647
|
resolveTargetFilter: (target: TargetItemWithConnection) => boolean,
|
|
7308
7648
|
updateOriginalConnection?: (
|
|
7309
7649
|
target: TargetItemWithConnection
|
|
7310
|
-
) => ModuleGraphConnection
|
|
7650
|
+
) => undefined | ModuleGraphConnection
|
|
7311
7651
|
): undefined | TargetItemWithConnection;
|
|
7312
7652
|
|
|
7313
7653
|
/**
|
|
@@ -7371,6 +7711,11 @@ declare interface ExportSpec {
|
|
|
7371
7711
|
*/
|
|
7372
7712
|
terminalBinding?: boolean;
|
|
7373
7713
|
|
|
7714
|
+
/**
|
|
7715
|
+
* calling this export has no observable side effects
|
|
7716
|
+
*/
|
|
7717
|
+
isPure?: boolean;
|
|
7718
|
+
|
|
7374
7719
|
/**
|
|
7375
7720
|
* nested exports
|
|
7376
7721
|
*/
|
|
@@ -7395,9 +7740,19 @@ declare interface ExportSpec {
|
|
|
7395
7740
|
* export is not visible, because another export blends over it
|
|
7396
7741
|
*/
|
|
7397
7742
|
hidden?: boolean;
|
|
7743
|
+
|
|
7744
|
+
/**
|
|
7745
|
+
* when set: the export binds to a small primitive constant eligible for inlining
|
|
7746
|
+
*/
|
|
7747
|
+
inlined?: InlinedValue;
|
|
7398
7748
|
}
|
|
7399
7749
|
type ExportedVariableInfo = string | VariableInfo | ScopeInfo;
|
|
7400
7750
|
declare abstract class ExportsInfo {
|
|
7751
|
+
/**
|
|
7752
|
+
* Records that an owned export got an inlined used name.
|
|
7753
|
+
*/
|
|
7754
|
+
markInlinedExports(): void;
|
|
7755
|
+
|
|
7401
7756
|
/**
|
|
7402
7757
|
* Gets owned exports.
|
|
7403
7758
|
*/
|
|
@@ -7536,6 +7891,12 @@ declare abstract class ExportsInfo {
|
|
|
7536
7891
|
*/
|
|
7537
7892
|
getUsedName(name: string | string[], runtime: RuntimeSpec): UsedName;
|
|
7538
7893
|
|
|
7894
|
+
/**
|
|
7895
|
+
* Checks whether `getUsedName(name, runtime)` would return an `InlinedUsedName`,
|
|
7896
|
+
* without allocating intermediate used-name arrays (hot path for connection conditions).
|
|
7897
|
+
*/
|
|
7898
|
+
hasInlinedUsedName(name: string[], runtime: RuntimeSpec): boolean;
|
|
7899
|
+
|
|
7539
7900
|
/**
|
|
7540
7901
|
* Updates the hash with the data contributed by this instance.
|
|
7541
7902
|
*/
|
|
@@ -7587,6 +7948,11 @@ declare interface ExportsSpec {
|
|
|
7587
7948
|
*/
|
|
7588
7949
|
terminalBinding?: boolean;
|
|
7589
7950
|
|
|
7951
|
+
/**
|
|
7952
|
+
* calling these exports has no observable side effects
|
|
7953
|
+
*/
|
|
7954
|
+
isPure?: boolean;
|
|
7955
|
+
|
|
7590
7956
|
/**
|
|
7591
7957
|
* module on which the result depends on
|
|
7592
7958
|
*/
|
|
@@ -7594,9 +7960,9 @@ declare interface ExportsSpec {
|
|
|
7594
7960
|
}
|
|
7595
7961
|
type ExportsType =
|
|
7596
7962
|
| "namespace"
|
|
7963
|
+
| "dynamic"
|
|
7597
7964
|
| "default-only"
|
|
7598
|
-
| "default-with-named"
|
|
7599
|
-
| "dynamic";
|
|
7965
|
+
| "default-with-named";
|
|
7600
7966
|
type Exposes = (string | ExposesObject)[] | ExposesObject;
|
|
7601
7967
|
|
|
7602
7968
|
/**
|
|
@@ -7777,7 +8143,8 @@ declare class ExternalModule extends Module {
|
|
|
7777
8143
|
static getCompilationHooks(compilation: Compilation): ExternalModuleHooks;
|
|
7778
8144
|
static ModuleExternalInitFragment: typeof ModuleExternalInitFragment;
|
|
7779
8145
|
static getExternalModuleNodeCommonjsInitFragment: (
|
|
7780
|
-
runtimeTemplate: RuntimeTemplate
|
|
8146
|
+
runtimeTemplate: RuntimeTemplate,
|
|
8147
|
+
universal?: boolean
|
|
7781
8148
|
) => InitFragment<ChunkRenderContextJavascriptModulesPlugin>;
|
|
7782
8149
|
|
|
7783
8150
|
/**
|
|
@@ -7786,6 +8153,9 @@ declare class ExternalModule extends Module {
|
|
|
7786
8153
|
*/
|
|
7787
8154
|
static getSourceBasicTypes(module: Module): ReadonlySet<string>;
|
|
7788
8155
|
}
|
|
8156
|
+
type ExternalModuleBuildInfo = KnownBuildInfo &
|
|
8157
|
+
Record<string, any> &
|
|
8158
|
+
KnownExternalModuleBuildInfo;
|
|
7789
8159
|
declare interface ExternalModuleHooks {
|
|
7790
8160
|
chunkCondition: SyncBailHook<[Chunk, Compilation], boolean>;
|
|
7791
8161
|
}
|
|
@@ -7801,6 +8171,11 @@ declare interface ExternalModuleInfo {
|
|
|
7801
8171
|
*/
|
|
7802
8172
|
name?: string;
|
|
7803
8173
|
|
|
8174
|
+
/**
|
|
8175
|
+
* decoupled namespace object that keeps original export names when the exports are mangled
|
|
8176
|
+
*/
|
|
8177
|
+
escapeNamespaceObjectName?: string;
|
|
8178
|
+
|
|
7804
8179
|
/**
|
|
7805
8180
|
* deferred module.exports / harmony namespace object
|
|
7806
8181
|
*/
|
|
@@ -7850,6 +8225,24 @@ declare interface ExternalModuleInfo {
|
|
|
7850
8225
|
* runtime namespace object that detects "__esModule"
|
|
7851
8226
|
*/
|
|
7852
8227
|
interopDefaultAccessName?: string;
|
|
8228
|
+
|
|
8229
|
+
/**
|
|
8230
|
+
* memoized getExportsType(strict=true)
|
|
8231
|
+
*/
|
|
8232
|
+
exportsTypeStrict?:
|
|
8233
|
+
| "namespace"
|
|
8234
|
+
| "dynamic"
|
|
8235
|
+
| "default-only"
|
|
8236
|
+
| "default-with-named";
|
|
8237
|
+
|
|
8238
|
+
/**
|
|
8239
|
+
* memoized getExportsType(strict=false)
|
|
8240
|
+
*/
|
|
8241
|
+
exportsTypeNonStrict?:
|
|
8242
|
+
| "namespace"
|
|
8243
|
+
| "dynamic"
|
|
8244
|
+
| "default-only"
|
|
8245
|
+
| "default-with-named";
|
|
7853
8246
|
}
|
|
7854
8247
|
type ExternalModuleRequest = string | string[] | RequestRecord;
|
|
7855
8248
|
type Externals =
|
|
@@ -7940,6 +8333,16 @@ declare class ExternalsPlugin {
|
|
|
7940
8333
|
* Enable presets of externals for specific targets.
|
|
7941
8334
|
*/
|
|
7942
8335
|
declare interface ExternalsPresets {
|
|
8336
|
+
/**
|
|
8337
|
+
* Treat bun built-in modules like 'bun', 'bun:sqlite' or 'bun:ffi' and node.js built-in modules as external and load them via import when used (for the Bun runtime).
|
|
8338
|
+
*/
|
|
8339
|
+
bun?: boolean;
|
|
8340
|
+
|
|
8341
|
+
/**
|
|
8342
|
+
* Treat node.js built-in modules like fs, path or vm as external and load them via the required 'node:' specifier when used (for the Deno runtime).
|
|
8343
|
+
*/
|
|
8344
|
+
deno?: boolean;
|
|
8345
|
+
|
|
7943
8346
|
/**
|
|
7944
8347
|
* Treat common electron built-in modules in main and preload context like 'electron', 'ipc' or 'shell' as external and load them via require() when used.
|
|
7945
8348
|
*/
|
|
@@ -8057,6 +8460,11 @@ declare interface FallbackCacheGroup {
|
|
|
8057
8460
|
maxInitialSize: SplitChunksSizes;
|
|
8058
8461
|
automaticNameDelimiter: string;
|
|
8059
8462
|
}
|
|
8463
|
+
|
|
8464
|
+
/**
|
|
8465
|
+
* Enables asynchronous WebAssembly loading through `fetch` for environments
|
|
8466
|
+
* that can instantiate fetched binaries at runtime.
|
|
8467
|
+
*/
|
|
8060
8468
|
declare class FetchCompileAsyncWasmPlugin {
|
|
8061
8469
|
constructor();
|
|
8062
8470
|
|
|
@@ -8066,6 +8474,11 @@ declare class FetchCompileAsyncWasmPlugin {
|
|
|
8066
8474
|
*/
|
|
8067
8475
|
apply(compiler: Compiler): void;
|
|
8068
8476
|
}
|
|
8477
|
+
|
|
8478
|
+
/**
|
|
8479
|
+
* Enables synchronous WebAssembly chunk loading that fetches `.wasm` files and
|
|
8480
|
+
* compiles them in browser-like environments.
|
|
8481
|
+
*/
|
|
8069
8482
|
declare class FetchCompileWasmPlugin {
|
|
8070
8483
|
/**
|
|
8071
8484
|
* Stores options that affect generated synchronous WebAssembly runtime code.
|
|
@@ -8232,6 +8645,10 @@ declare interface FileSystem {
|
|
|
8232
8645
|
*/
|
|
8233
8646
|
realpath?: RealPathTypes;
|
|
8234
8647
|
}
|
|
8648
|
+
|
|
8649
|
+
/**
|
|
8650
|
+
* Used to access information about the filesystem in a cached way
|
|
8651
|
+
*/
|
|
8235
8652
|
declare abstract class FileSystemInfo {
|
|
8236
8653
|
fs: InputFileSystem;
|
|
8237
8654
|
logger?: WebpackLogger;
|
|
@@ -8458,6 +8875,7 @@ declare class Generator {
|
|
|
8458
8875
|
* Returns the source types available for this module.
|
|
8459
8876
|
*/
|
|
8460
8877
|
getTypes(module: NormalModule): ReadonlySet<string>;
|
|
8878
|
+
getTypesDependOnIncomingConnections(): boolean;
|
|
8461
8879
|
|
|
8462
8880
|
/**
|
|
8463
8881
|
* Returns the estimated size for the requested source type.
|
|
@@ -8592,7 +9010,8 @@ declare class GetChunkFilenameRuntimeModule extends RuntimeModule {
|
|
|
8592
9010
|
| string
|
|
8593
9011
|
| false
|
|
8594
9012
|
| ((pathData: PathDataChunk, assetInfo?: AssetInfo) => string),
|
|
8595
|
-
allChunks: boolean
|
|
9013
|
+
allChunks: boolean,
|
|
9014
|
+
usesFullHashDigest?: boolean
|
|
8596
9015
|
);
|
|
8597
9016
|
contentType: string;
|
|
8598
9017
|
global: string;
|
|
@@ -8663,6 +9082,10 @@ declare interface GroupOptionsSmartGrouping {
|
|
|
8663
9082
|
force?: boolean;
|
|
8664
9083
|
targetGroupCount?: number;
|
|
8665
9084
|
}
|
|
9085
|
+
declare interface GuardCollection {
|
|
9086
|
+
consequent?: object;
|
|
9087
|
+
alternate?: object;
|
|
9088
|
+
}
|
|
8666
9089
|
declare interface HMRJavascriptParserHooks {
|
|
8667
9090
|
hotAcceptCallback: SyncBailHook<
|
|
8668
9091
|
[
|
|
@@ -8841,8 +9264,20 @@ declare class HarmonyImportDependency extends ModuleDependency {
|
|
|
8841
9264
|
members: string[],
|
|
8842
9265
|
membersOptionals: boolean[]
|
|
8843
9266
|
) => string[];
|
|
9267
|
+
|
|
9268
|
+
/**
|
|
9269
|
+
* Compares two dependencies by source location for sorting a module's
|
|
9270
|
+
* `dependencies`, without materializing the `loc` objects (`get loc` caches
|
|
9271
|
+
* its result, so comparing through it would retain a location object on every
|
|
9272
|
+
* sorted dependency). These dependencies always carry a real source position,
|
|
9273
|
+
* so only start (line, column) and the within-statement index are compared; a
|
|
9274
|
+
* dependency without an index sorts after one that has an index at the same
|
|
9275
|
+
* position.
|
|
9276
|
+
*/
|
|
9277
|
+
static compareLocations(a: Dependency, b: Dependency): 0 | 1 | -1;
|
|
8844
9278
|
static NO_EXPORTS_REFERENCED: string[][];
|
|
8845
9279
|
static EXPORTS_OBJECT_REFERENCED: string[][];
|
|
9280
|
+
static EXPORTS_OBJECT_REFERENCED_MANGLEABLE: string[][];
|
|
8846
9281
|
|
|
8847
9282
|
/**
|
|
8848
9283
|
* Returns true if the dependency is a low priority dependency.
|
|
@@ -8854,6 +9289,10 @@ declare class HarmonyImportDependency extends ModuleDependency {
|
|
|
8854
9289
|
*/
|
|
8855
9290
|
static canConcatenate(dependency: Dependency): boolean;
|
|
8856
9291
|
static TRANSITIVE: symbol;
|
|
9292
|
+
static LAZY_UNTIL_LOCAL: "local";
|
|
9293
|
+
static LAZY_UNTIL_ID: "id";
|
|
9294
|
+
static LAZY_UNTIL_FALLBACK: "*";
|
|
9295
|
+
static LAZY_UNTIL_REQUEST: "@";
|
|
8857
9296
|
}
|
|
8858
9297
|
declare class HarmonyImportDependencyTemplate extends DependencyTemplate {
|
|
8859
9298
|
constructor();
|
|
@@ -8875,9 +9314,6 @@ declare interface HarmonySettings {
|
|
|
8875
9314
|
attributes?: ImportAttributes;
|
|
8876
9315
|
phase: ImportPhaseType;
|
|
8877
9316
|
}
|
|
8878
|
-
declare interface HarmonySpecifierGuards {
|
|
8879
|
-
guards?: AppendOnlyStackedSet<string>;
|
|
8880
|
-
}
|
|
8881
9317
|
declare abstract class HarmonyStarExportsList {
|
|
8882
9318
|
dependencies: HarmonyExportImportedSpecifierDependency[];
|
|
8883
9319
|
|
|
@@ -8890,12 +9326,12 @@ declare abstract class HarmonyStarExportsList {
|
|
|
8890
9326
|
/**
|
|
8891
9327
|
* Serializes this instance into the provided serializer context.
|
|
8892
9328
|
*/
|
|
8893
|
-
serialize(__0:
|
|
9329
|
+
serialize(__0: StarListSerializerContext): void;
|
|
8894
9330
|
|
|
8895
9331
|
/**
|
|
8896
9332
|
* Restores this instance from the provided deserializer context.
|
|
8897
9333
|
*/
|
|
8898
|
-
deserialize(__0:
|
|
9334
|
+
deserialize(__0: StarListDeserializerContext): void;
|
|
8899
9335
|
}
|
|
8900
9336
|
declare class Hash {
|
|
8901
9337
|
constructor();
|
|
@@ -8980,6 +9416,18 @@ declare interface HashedModuleIdsPluginOptions {
|
|
|
8980
9416
|
*/
|
|
8981
9417
|
hashFunction?: string | typeof Hash;
|
|
8982
9418
|
}
|
|
9419
|
+
type Head<T extends ReadonlyArray<any>> = T extends readonly [infer H, ...any[]]
|
|
9420
|
+
? H
|
|
9421
|
+
: T extends readonly []
|
|
9422
|
+
? any
|
|
9423
|
+
: T extends (infer E)[]
|
|
9424
|
+
? E
|
|
9425
|
+
: never;
|
|
9426
|
+
|
|
9427
|
+
/**
|
|
9428
|
+
* Base class for runtime modules that only emit helper functions and do not
|
|
9429
|
+
* need special staging or attachment behavior beyond `RuntimeModule`.
|
|
9430
|
+
*/
|
|
8983
9431
|
declare abstract class HelperRuntimeModule extends RuntimeModule {}
|
|
8984
9432
|
declare class HotModuleReplacementPlugin {
|
|
8985
9433
|
constructor();
|
|
@@ -9054,16 +9502,117 @@ declare abstract class HtmlGenerator extends Generator {
|
|
|
9054
9502
|
*/
|
|
9055
9503
|
declare interface HtmlGeneratorOptions {
|
|
9056
9504
|
/**
|
|
9057
|
-
* Emit the parsed and URL-rewritten HTML as a standalone `.html` output file alongside the module's JavaScript export. When unset, extraction defaults to `true` for HTML modules used as compilation entries (HTML entry points) and `false` for HTML modules imported from JavaScript. Filenames follow `output.htmlFilename` / `output.htmlChunkFilename`.
|
|
9505
|
+
* Emit the parsed and URL-rewritten HTML as a standalone `.html` output file alongside the module's JavaScript export. `true` always emits the file; `false` never does; `"inline"` exposes the processed HTML for inline write-back (e.g. `<iframe srcdoc>`) without emitting a standalone file. When unset, extraction defaults to `true` for HTML modules used as compilation entries (HTML entry points) and `false` for HTML modules imported from JavaScript. Filenames follow `output.htmlFilename` / `output.htmlChunkFilename`.
|
|
9058
9506
|
*/
|
|
9059
|
-
extract?: boolean;
|
|
9507
|
+
extract?: boolean | "inline";
|
|
9060
9508
|
}
|
|
9509
|
+
type HtmlModuleBuildInfo = KnownBuildInfo &
|
|
9510
|
+
Record<string, any> &
|
|
9511
|
+
KnownNormalModuleBuildInfo &
|
|
9512
|
+
KnownHtmlModuleBuildInfo;
|
|
9061
9513
|
declare abstract class HtmlParser extends ParserClass {
|
|
9062
9514
|
magicCommentContext: ContextImport;
|
|
9063
|
-
|
|
9064
|
-
|
|
9065
|
-
|
|
9066
|
-
|
|
9515
|
+
template?: (source: string, context: HtmlTemplateContext) => string;
|
|
9516
|
+
sourcesByTag: Record<string, Record<string, SourceItem>>;
|
|
9517
|
+
|
|
9518
|
+
/**
|
|
9519
|
+
* Runs the `template` option over the source and returns the transformed
|
|
9520
|
+
* html. Called from HtmlModulesPlugin's `processResult`, where the return
|
|
9521
|
+
* value becomes the module's stored source so the parser (which records
|
|
9522
|
+
* dependency offsets against it) and the generator (which renders from
|
|
9523
|
+
* `module.originalSource()`) stay in agreement.
|
|
9524
|
+
*/
|
|
9525
|
+
applyTemplate(source: string | Buffer, module: NormalModule): string | Buffer;
|
|
9526
|
+
}
|
|
9527
|
+
|
|
9528
|
+
/**
|
|
9529
|
+
* Parser options for html modules.
|
|
9530
|
+
*/
|
|
9531
|
+
declare interface HtmlParserOptions {
|
|
9532
|
+
/**
|
|
9533
|
+
* Configure extraction of URL-like attribute values (e.g. `<img src>`, `<link href>`, `<script src>`) as webpack dependencies. `true` (default) uses the built-in source list; `false` disables extraction entirely so attributes are left untouched and `<script src>` / `<link rel="modulepreload">` / `<link rel="stylesheet">` no longer become compilation entries; an array lets you customize which `tag`/`attribute` pairs are treated as URLs and how they are bundled. Use the string `"..."` inside the array to inline the defaults. Inline `<script>` and `<style>` bodies are always processed. Use `webpackIgnore` comments or `IgnorePlugin` to skip individual URLs.
|
|
9534
|
+
*/
|
|
9535
|
+
sources?:
|
|
9536
|
+
| boolean
|
|
9537
|
+
| (
|
|
9538
|
+
| "..."
|
|
9539
|
+
| {
|
|
9540
|
+
/**
|
|
9541
|
+
* Attribute name whose value is treated as a URL.
|
|
9542
|
+
*/
|
|
9543
|
+
attribute: string;
|
|
9544
|
+
/**
|
|
9545
|
+
* Called with the element's decoded attribute map and the decoded attribute value; return false to skip this source entry for that element.
|
|
9546
|
+
*/
|
|
9547
|
+
filter?: (
|
|
9548
|
+
attributes: Map<string, string>,
|
|
9549
|
+
value: string
|
|
9550
|
+
) => boolean;
|
|
9551
|
+
/**
|
|
9552
|
+
* Tag name to match. Omit to match any tag.
|
|
9553
|
+
*/
|
|
9554
|
+
tag?: string;
|
|
9555
|
+
/**
|
|
9556
|
+
* How the attribute value should be parsed and bundled. `src` extracts a single URL as a plain asset; `srcset` parses a `srcset`-style list of candidate URLs as plain assets; `css-url` extracts `url(...)` references from a CSS value (like an SVG presentation attribute such as `fill`) as plain assets; `script` and `script-module` emit a classic / ES-module chunk entry like `<script src>` and `<script type="module" src>`; `stylesheet` emits a CSS chunk entry like `<link rel="stylesheet">`; `stylesheet-style` treats the attribute value as a full stylesheet (like a `<style>` body) and `stylesheet-style-attribute` as a CSS block's contents (a declaration list, like a `style` attribute) — both bundle it through the CSS pipeline and replace the attribute's content with the processed CSS at render time; `srcdoc` treats the attribute value as an entity-encoded HTML document (like `<iframe srcdoc>`), bundling it through the HTML pipeline and replacing the attribute's content with the processed HTML at render time.
|
|
9557
|
+
*/
|
|
9558
|
+
type:
|
|
9559
|
+
| "script"
|
|
9560
|
+
| "css-url"
|
|
9561
|
+
| "stylesheet"
|
|
9562
|
+
| "script-module"
|
|
9563
|
+
| "src"
|
|
9564
|
+
| "srcset"
|
|
9565
|
+
| "stylesheet-style"
|
|
9566
|
+
| "stylesheet-style-attribute"
|
|
9567
|
+
| "srcdoc";
|
|
9568
|
+
}
|
|
9569
|
+
)[];
|
|
9570
|
+
|
|
9571
|
+
/**
|
|
9572
|
+
* Transform the raw source before the html parser extracts dependencies. Receives the source string and a context (`{ module, resource }`) and must return the html string to parse. Useful for compiling a templating language (Handlebars, EJS, Eta, …) to html so that URLs the template emits are still picked up as webpack dependencies. Runs synchronously.
|
|
9573
|
+
*/
|
|
9574
|
+
template?: (source: string, context: HtmlTemplateContext) => string;
|
|
9575
|
+
}
|
|
9576
|
+
declare interface HtmlTemplateContext {
|
|
9577
|
+
/**
|
|
9578
|
+
* the html module being transformed
|
|
9579
|
+
*/
|
|
9580
|
+
module: Module;
|
|
9581
|
+
|
|
9582
|
+
/**
|
|
9583
|
+
* absolute path of the module's resource
|
|
9584
|
+
*/
|
|
9585
|
+
resource: string;
|
|
9586
|
+
|
|
9587
|
+
/**
|
|
9588
|
+
* register a file (e.g. a template partial) as a build dependency so editing it triggers a rebuild
|
|
9589
|
+
*/
|
|
9590
|
+
addDependency: (dependency: string) => void;
|
|
9591
|
+
|
|
9592
|
+
/**
|
|
9593
|
+
* register a directory as a build dependency
|
|
9594
|
+
*/
|
|
9595
|
+
addContextDependency: (dependency: string) => void;
|
|
9596
|
+
|
|
9597
|
+
/**
|
|
9598
|
+
* register a not-yet-existing path as a build dependency so creating it triggers a rebuild
|
|
9599
|
+
*/
|
|
9600
|
+
addMissingDependency: (dependency: string) => void;
|
|
9601
|
+
|
|
9602
|
+
/**
|
|
9603
|
+
* register a build dependency (e.g. a template engine config) so changing it invalidates the cache
|
|
9604
|
+
*/
|
|
9605
|
+
addBuildDependency: (dependency: string) => void;
|
|
9606
|
+
|
|
9607
|
+
/**
|
|
9608
|
+
* report a non-fatal warning on the module
|
|
9609
|
+
*/
|
|
9610
|
+
emitWarning: (warning: string | Error) => void;
|
|
9611
|
+
|
|
9612
|
+
/**
|
|
9613
|
+
* report an error on the module
|
|
9614
|
+
*/
|
|
9615
|
+
emitError: (error: string | Error) => void;
|
|
9067
9616
|
}
|
|
9068
9617
|
|
|
9069
9618
|
/**
|
|
@@ -9580,6 +10129,10 @@ type InfrastructureLoggingNormalizedWithDefaults = InfrastructureLogging & {
|
|
|
9580
10129
|
colors: NonNullable<undefined | boolean>;
|
|
9581
10130
|
appendOnly: NonNullable<undefined | boolean>;
|
|
9582
10131
|
};
|
|
10132
|
+
|
|
10133
|
+
/**
|
|
10134
|
+
* Represents InitFragment.
|
|
10135
|
+
*/
|
|
9583
10136
|
declare class InitFragment<GenerateContext> {
|
|
9584
10137
|
/**
|
|
9585
10138
|
* Creates an instance of InitFragment.
|
|
@@ -9610,12 +10163,12 @@ declare class InitFragment<GenerateContext> {
|
|
|
9610
10163
|
/**
|
|
9611
10164
|
* Serializes this instance into the provided serializer context.
|
|
9612
10165
|
*/
|
|
9613
|
-
serialize(context:
|
|
10166
|
+
serialize(context: ObjectSerializerContextObjectMiddlewareObject_5): void;
|
|
9614
10167
|
|
|
9615
10168
|
/**
|
|
9616
10169
|
* Restores this instance from the provided deserializer context.
|
|
9617
10170
|
*/
|
|
9618
|
-
deserialize(context:
|
|
10171
|
+
deserialize(context: ObjectDeserializerContextObjectMiddlewareObject_4): void;
|
|
9619
10172
|
|
|
9620
10173
|
/**
|
|
9621
10174
|
* Adds the provided source to the init fragment.
|
|
@@ -9633,6 +10186,54 @@ declare class InitFragment<GenerateContext> {
|
|
|
9633
10186
|
static STAGE_ASYNC_DEPENDENCIES: number;
|
|
9634
10187
|
static STAGE_ASYNC_HARMONY_IMPORTS: number;
|
|
9635
10188
|
}
|
|
10189
|
+
declare abstract class InlinedUsedName {
|
|
10190
|
+
value: InlinedValue;
|
|
10191
|
+
suffix: string[];
|
|
10192
|
+
render(comment: string): string;
|
|
10193
|
+
}
|
|
10194
|
+
declare abstract class InlinedValue {
|
|
10195
|
+
kind: InlinedValueKind;
|
|
10196
|
+
value?: null | string | number | boolean;
|
|
10197
|
+
renderLiteral(): string;
|
|
10198
|
+
render(comment: string): string;
|
|
10199
|
+
serialize(__0: ObjectSerializerContextObjectMiddlewareObject_5): void;
|
|
10200
|
+
deserialize(__0: ObjectDeserializerContextObjectMiddlewareObject_4): void;
|
|
10201
|
+
}
|
|
10202
|
+
type InlinedValueKind = "string" | "number" | "boolean" | "undefined" | "null";
|
|
10203
|
+
declare interface InnerGraphUtils {
|
|
10204
|
+
enable: (parserState: ParserState) => void;
|
|
10205
|
+
bailout: (parserState: ParserState) => void;
|
|
10206
|
+
isEnabled: (parserState: ParserState) => boolean;
|
|
10207
|
+
addUsage: (
|
|
10208
|
+
parserState: ParserState,
|
|
10209
|
+
symbol: null | TopLevelSymbol,
|
|
10210
|
+
usage: Usage
|
|
10211
|
+
) => void;
|
|
10212
|
+
onUsage: (
|
|
10213
|
+
parserState: ParserState,
|
|
10214
|
+
onUsageCallback: (
|
|
10215
|
+
value: undefined | boolean | Set<string>,
|
|
10216
|
+
module: Module
|
|
10217
|
+
) => void
|
|
10218
|
+
) => void;
|
|
10219
|
+
setTopLevelSymbol: (
|
|
10220
|
+
parserState: ParserState,
|
|
10221
|
+
symbol?: TopLevelSymbol
|
|
10222
|
+
) => void;
|
|
10223
|
+
getTopLevelSymbol: (parserState: ParserState) => void | TopLevelSymbol;
|
|
10224
|
+
tagTopLevelSymbol: (
|
|
10225
|
+
parser: JavascriptParser,
|
|
10226
|
+
name: string,
|
|
10227
|
+
pure?: boolean | ((compilation: Compilation, module: Module) => boolean)
|
|
10228
|
+
) => undefined | TopLevelSymbol;
|
|
10229
|
+
addVariableUsage: (
|
|
10230
|
+
parser: JavascriptParser,
|
|
10231
|
+
name: string,
|
|
10232
|
+
usage: Usage
|
|
10233
|
+
) => void;
|
|
10234
|
+
inferDependencyUsage: (module: Module) => void;
|
|
10235
|
+
release: (module: Module) => void;
|
|
10236
|
+
}
|
|
9636
10237
|
|
|
9637
10238
|
/**
|
|
9638
10239
|
* Returns location of targetPath relative to rootPath.
|
|
@@ -9658,7 +10259,10 @@ declare interface InputFileSystem {
|
|
|
9658
10259
|
) => void
|
|
9659
10260
|
) => void;
|
|
9660
10261
|
readJsonSync?: (pathOrFileDescriptor: PathOrFileDescriptorFs) => JsonObjectFs;
|
|
9661
|
-
purge?: (
|
|
10262
|
+
purge?: (
|
|
10263
|
+
value?: string | string[] | Set<string>,
|
|
10264
|
+
options?: { exact?: boolean }
|
|
10265
|
+
) => void;
|
|
9662
10266
|
join?: (path1: string, path2: string) => string;
|
|
9663
10267
|
relative?: (from: string, to: string) => string;
|
|
9664
10268
|
dirname?: (dirname: string) => string;
|
|
@@ -9795,6 +10399,13 @@ declare abstract class JavascriptGenerator extends Generator {
|
|
|
9795
10399
|
generateContext: GenerateContext
|
|
9796
10400
|
): null | Source;
|
|
9797
10401
|
}
|
|
10402
|
+
type JavascriptModuleBuildInfo = KnownBuildInfo &
|
|
10403
|
+
Record<string, any> &
|
|
10404
|
+
KnownNormalModuleBuildInfo &
|
|
10405
|
+
KnownJavascriptModuleBuildInfo;
|
|
10406
|
+
type JavascriptModuleBuildMeta = KnownBuildMeta &
|
|
10407
|
+
Record<string, any> &
|
|
10408
|
+
KnownJavascriptModuleBuildMeta;
|
|
9798
10409
|
declare class JavascriptModulesPlugin {
|
|
9799
10410
|
constructor(options?: object);
|
|
9800
10411
|
options: object;
|
|
@@ -10096,10 +10707,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
10096
10707
|
boolean | void
|
|
10097
10708
|
>;
|
|
10098
10709
|
statementIf: SyncBailHook<[IfStatement], boolean | void>;
|
|
10099
|
-
collectGuards: SyncBailHook<
|
|
10100
|
-
[Expression],
|
|
10101
|
-
void | ((walk: () => void) => void)
|
|
10102
|
-
>;
|
|
10710
|
+
collectGuards: SyncBailHook<[Expression], void | GuardCollection>;
|
|
10103
10711
|
classExtendsExpression: SyncBailHook<
|
|
10104
10712
|
[
|
|
10105
10713
|
Expression,
|
|
@@ -10396,8 +11004,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
10396
11004
|
| HarmonySettings
|
|
10397
11005
|
| ImportSettings
|
|
10398
11006
|
| CommonJsImportSettings
|
|
10399
|
-
| CompatibilitySettings
|
|
10400
|
-
| HarmonySpecifierGuards;
|
|
11007
|
+
| CompatibilitySettings;
|
|
10401
11008
|
magicCommentContext: ContextImport;
|
|
10402
11009
|
|
|
10403
11010
|
/**
|
|
@@ -10717,6 +11324,12 @@ declare class JavascriptParser extends ParserClass {
|
|
|
10717
11324
|
*/
|
|
10718
11325
|
preWalkIfStatement(statement: IfStatement): void;
|
|
10719
11326
|
|
|
11327
|
+
/**
|
|
11328
|
+
* Walks a conditional branch with its guard frame (if any) pushed onto the
|
|
11329
|
+
* parser-state guard stack for the duration of the branch body.
|
|
11330
|
+
*/
|
|
11331
|
+
walkGuardedBranch(frame: undefined | null | object, walk: () => void): void;
|
|
11332
|
+
|
|
10720
11333
|
/**
|
|
10721
11334
|
* Processes the provided statement.
|
|
10722
11335
|
*/
|
|
@@ -11640,8 +12253,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
11640
12253
|
| HarmonySettings
|
|
11641
12254
|
| ImportSettings
|
|
11642
12255
|
| CommonJsImportSettings
|
|
11643
|
-
| CompatibilitySettings
|
|
11644
|
-
| HarmonySpecifierGuards;
|
|
12256
|
+
| CompatibilitySettings;
|
|
11645
12257
|
|
|
11646
12258
|
/**
|
|
11647
12259
|
* Processes the provided name.
|
|
@@ -11655,8 +12267,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
11655
12267
|
| HarmonySettings
|
|
11656
12268
|
| ImportSettings
|
|
11657
12269
|
| CommonJsImportSettings
|
|
11658
|
-
| CompatibilitySettings
|
|
11659
|
-
| HarmonySpecifierGuards,
|
|
12270
|
+
| CompatibilitySettings,
|
|
11660
12271
|
flags?: 0 | 1 | 2 | 4
|
|
11661
12272
|
): void;
|
|
11662
12273
|
|
|
@@ -11698,6 +12309,72 @@ declare class JavascriptParser extends ParserClass {
|
|
|
11698
12309
|
errors: null | (Error & { comment: CommentJavascriptParser })[];
|
|
11699
12310
|
};
|
|
11700
12311
|
|
|
12312
|
+
/**
|
|
12313
|
+
* Finds the root object of a member expression chain without allocating the
|
|
12314
|
+
* member arrays. The traversal/break logic must stay in sync with
|
|
12315
|
+
* `extractMemberExpressionChain`; it lets `getMemberExpressionInfo` reject
|
|
12316
|
+
* unrecognized roots (~77% of calls) before paying for the arrays.
|
|
12317
|
+
*/
|
|
12318
|
+
getMemberExpressionRoot(
|
|
12319
|
+
expression:
|
|
12320
|
+
| ImportExpressionImport
|
|
12321
|
+
| UnaryExpression
|
|
12322
|
+
| ArrayExpression
|
|
12323
|
+
| ArrowFunctionExpression
|
|
12324
|
+
| AssignmentExpression
|
|
12325
|
+
| AwaitExpression
|
|
12326
|
+
| BinaryExpression
|
|
12327
|
+
| SimpleCallExpression
|
|
12328
|
+
| NewExpression
|
|
12329
|
+
| ChainExpression
|
|
12330
|
+
| ClassExpression
|
|
12331
|
+
| ConditionalExpression
|
|
12332
|
+
| FunctionExpression
|
|
12333
|
+
| Identifier
|
|
12334
|
+
| SimpleLiteral
|
|
12335
|
+
| RegExpLiteral
|
|
12336
|
+
| BigIntLiteral
|
|
12337
|
+
| LogicalExpression
|
|
12338
|
+
| MemberExpression
|
|
12339
|
+
| MetaProperty
|
|
12340
|
+
| ObjectExpression
|
|
12341
|
+
| SequenceExpression
|
|
12342
|
+
| TaggedTemplateExpression
|
|
12343
|
+
| TemplateLiteral
|
|
12344
|
+
| ThisExpression
|
|
12345
|
+
| UpdateExpression
|
|
12346
|
+
| YieldExpression
|
|
12347
|
+
| Super
|
|
12348
|
+
):
|
|
12349
|
+
| ImportExpressionImport
|
|
12350
|
+
| UnaryExpression
|
|
12351
|
+
| ArrayExpression
|
|
12352
|
+
| ArrowFunctionExpression
|
|
12353
|
+
| AssignmentExpression
|
|
12354
|
+
| AwaitExpression
|
|
12355
|
+
| BinaryExpression
|
|
12356
|
+
| SimpleCallExpression
|
|
12357
|
+
| NewExpression
|
|
12358
|
+
| ChainExpression
|
|
12359
|
+
| ClassExpression
|
|
12360
|
+
| ConditionalExpression
|
|
12361
|
+
| FunctionExpression
|
|
12362
|
+
| Identifier
|
|
12363
|
+
| SimpleLiteral
|
|
12364
|
+
| RegExpLiteral
|
|
12365
|
+
| BigIntLiteral
|
|
12366
|
+
| LogicalExpression
|
|
12367
|
+
| MemberExpression
|
|
12368
|
+
| MetaProperty
|
|
12369
|
+
| ObjectExpression
|
|
12370
|
+
| SequenceExpression
|
|
12371
|
+
| TaggedTemplateExpression
|
|
12372
|
+
| TemplateLiteral
|
|
12373
|
+
| ThisExpression
|
|
12374
|
+
| UpdateExpression
|
|
12375
|
+
| YieldExpression
|
|
12376
|
+
| Super;
|
|
12377
|
+
|
|
11701
12378
|
/**
|
|
11702
12379
|
* Extract member expression chain.
|
|
11703
12380
|
*/
|
|
@@ -11901,7 +12578,7 @@ declare interface JavascriptParserOptions {
|
|
|
11901
12578
|
/**
|
|
11902
12579
|
* Specifies global mode for dynamic import.
|
|
11903
12580
|
*/
|
|
11904
|
-
dynamicImportMode?: "
|
|
12581
|
+
dynamicImportMode?: "eager" | "weak" | "lazy" | "lazy-once";
|
|
11905
12582
|
|
|
11906
12583
|
/**
|
|
11907
12584
|
* Specifies global prefetch for dynamic import.
|
|
@@ -11983,6 +12660,11 @@ declare interface JavascriptParserOptions {
|
|
|
11983
12660
|
*/
|
|
11984
12661
|
parse?: (code: string, options: ParseOptions) => ParseResult;
|
|
11985
12662
|
|
|
12663
|
+
/**
|
|
12664
|
+
* Mark the listed top-level function names for pure-function-based tree shaking.
|
|
12665
|
+
*/
|
|
12666
|
+
pureFunctions?: string[];
|
|
12667
|
+
|
|
11986
12668
|
/**
|
|
11987
12669
|
* Specifies the behavior of invalid export names in "export ... from ...". This might be useful to disable during the migration from "export ... from ..." to "export type ... from ..." when reexporting types in TypeScript.
|
|
11988
12670
|
*/
|
|
@@ -12134,6 +12816,10 @@ declare interface JsonGeneratorOptions {
|
|
|
12134
12816
|
*/
|
|
12135
12817
|
JSONParse?: boolean;
|
|
12136
12818
|
}
|
|
12819
|
+
type JsonModuleBuildInfo = KnownBuildInfo &
|
|
12820
|
+
Record<string, any> &
|
|
12821
|
+
KnownNormalModuleBuildInfo &
|
|
12822
|
+
KnownJsonModuleBuildInfo;
|
|
12137
12823
|
declare interface JsonObjectFs {
|
|
12138
12824
|
[index: string]:
|
|
12139
12825
|
| undefined
|
|
@@ -12276,6 +12962,11 @@ declare interface KnownAssetInfo {
|
|
|
12276
12962
|
*/
|
|
12277
12963
|
contenthash?: string | string[];
|
|
12278
12964
|
|
|
12965
|
+
/**
|
|
12966
|
+
* maps a `[contenthash:<digest>]` value to its digest, so `RealContentHashPlugin` re-encodes the recomputed hash in it
|
|
12967
|
+
*/
|
|
12968
|
+
contenthashDigest?: Record<string, string>;
|
|
12969
|
+
|
|
12279
12970
|
/**
|
|
12280
12971
|
* when asset was created from a source file (potentially transformed), the original filename relative to compilation context
|
|
12281
12972
|
*/
|
|
@@ -12311,152 +13002,97 @@ declare interface KnownAssetInfo {
|
|
|
12311
13002
|
*/
|
|
12312
13003
|
related?: Record<string, null | string | string[]>;
|
|
12313
13004
|
}
|
|
13005
|
+
declare interface KnownAssetModuleBuildInfo {
|
|
13006
|
+
/**
|
|
13007
|
+
* whether the asset is inlined as a data url
|
|
13008
|
+
*/
|
|
13009
|
+
dataUrl?: boolean;
|
|
13010
|
+
filename?: string;
|
|
13011
|
+
assetInfo?: AssetInfo;
|
|
13012
|
+
fullContentHash?: string;
|
|
13013
|
+
}
|
|
12314
13014
|
declare interface KnownBuildInfo {
|
|
12315
13015
|
cacheable?: boolean;
|
|
12316
|
-
parsed?: boolean;
|
|
12317
13016
|
strict?: boolean;
|
|
12318
|
-
|
|
12319
|
-
/**
|
|
12320
|
-
* using in AMD
|
|
12321
|
-
*/
|
|
12322
13017
|
moduleArgument?: string;
|
|
12323
|
-
|
|
12324
|
-
/**
|
|
12325
|
-
* using in AMD
|
|
12326
|
-
*/
|
|
12327
13018
|
exportsArgument?: string;
|
|
12328
13019
|
|
|
12329
13020
|
/**
|
|
12330
|
-
*
|
|
13021
|
+
* assets added by loaders or plugins
|
|
12331
13022
|
*/
|
|
12332
|
-
|
|
13023
|
+
assets?: Record<string, Source>;
|
|
13024
|
+
assetsInfo?: Map<string, undefined | AssetInfo>;
|
|
12333
13025
|
|
|
12334
13026
|
/**
|
|
12335
|
-
*
|
|
13027
|
+
* top level declaration names
|
|
12336
13028
|
*/
|
|
12337
|
-
|
|
13029
|
+
topLevelDeclarations?: Set<string>;
|
|
12338
13030
|
|
|
12339
13031
|
/**
|
|
12340
|
-
*
|
|
13032
|
+
* true when the module is part of a circular dependency chain
|
|
12341
13033
|
*/
|
|
12342
|
-
|
|
13034
|
+
isCircular?: boolean;
|
|
13035
|
+
}
|
|
13036
|
+
declare interface KnownBuildMeta {
|
|
13037
|
+
exportsType?: "default" | "namespace" | "flagged" | "dynamic";
|
|
13038
|
+
defaultObject?: false | "redirect" | "redirect-warn";
|
|
13039
|
+
async?: boolean;
|
|
13040
|
+
sideEffectFree?: boolean;
|
|
12343
13041
|
|
|
12344
13042
|
/**
|
|
12345
|
-
* using in
|
|
13043
|
+
* using in ModuleLibraryPlugin
|
|
12346
13044
|
*/
|
|
12347
|
-
|
|
13045
|
+
exportsFinalNameByRuntime?: Map<string, Record<string, string>>;
|
|
12348
13046
|
|
|
12349
13047
|
/**
|
|
12350
|
-
* using in
|
|
13048
|
+
* using in ModuleLibraryPlugin
|
|
12351
13049
|
*/
|
|
13050
|
+
exportsSourceByRuntime?: Map<string, string>;
|
|
13051
|
+
}
|
|
13052
|
+
declare interface KnownConcatenatedModuleBuildInfo {
|
|
13053
|
+
fileDependencies?: LazySet<string>;
|
|
12352
13054
|
contextDependencies?: LazySet<string>;
|
|
12353
|
-
|
|
12354
|
-
/**
|
|
12355
|
-
* using in NormalModule
|
|
12356
|
-
*/
|
|
12357
13055
|
missingDependencies?: LazySet<string>;
|
|
12358
13056
|
|
|
12359
13057
|
/**
|
|
12360
|
-
*
|
|
13058
|
+
* collected from the inner modules
|
|
12361
13059
|
*/
|
|
12362
|
-
|
|
12363
|
-
|
|
12364
|
-
/**
|
|
12365
|
-
* using in NormalModule
|
|
12366
|
-
*/
|
|
12367
|
-
valueDependencies?: Map<string, ValueCacheVersion>;
|
|
12368
|
-
|
|
12369
|
-
/**
|
|
12370
|
-
* using in NormalModule
|
|
12371
|
-
*/
|
|
12372
|
-
assets?: Record<string, Source>;
|
|
12373
|
-
|
|
12374
|
-
/**
|
|
12375
|
-
* using in NormalModule
|
|
12376
|
-
*/
|
|
12377
|
-
assetsInfo?: Map<string, undefined | AssetInfo>;
|
|
13060
|
+
needCreateRequire?: boolean;
|
|
12378
13061
|
|
|
12379
13062
|
/**
|
|
12380
|
-
*
|
|
13063
|
+
* taken over from the root module
|
|
12381
13064
|
*/
|
|
12382
|
-
|
|
12383
|
-
|
|
13065
|
+
inlineExports?: boolean;
|
|
13066
|
+
}
|
|
13067
|
+
declare interface KnownContext {
|
|
12384
13068
|
/**
|
|
12385
|
-
*
|
|
13069
|
+
* environments
|
|
12386
13070
|
*/
|
|
13071
|
+
environments?: string[];
|
|
13072
|
+
}
|
|
13073
|
+
declare interface KnownContextModuleBuildInfo {
|
|
12387
13074
|
snapshot?: null | Snapshot;
|
|
12388
|
-
|
|
12389
|
-
|
|
12390
|
-
|
|
12391
|
-
|
|
12392
|
-
|
|
12393
|
-
|
|
12394
|
-
/**
|
|
12395
|
-
* for assets modules
|
|
12396
|
-
*/
|
|
12397
|
-
filename?: string;
|
|
12398
|
-
|
|
12399
|
-
/**
|
|
12400
|
-
* for assets modules
|
|
12401
|
-
*/
|
|
12402
|
-
dataUrl?: boolean;
|
|
12403
|
-
|
|
12404
|
-
/**
|
|
12405
|
-
* for assets modules
|
|
12406
|
-
*/
|
|
12407
|
-
assetInfo?: AssetInfo;
|
|
12408
|
-
|
|
12409
|
-
/**
|
|
12410
|
-
* for external modules
|
|
12411
|
-
*/
|
|
12412
|
-
javascriptModule?: boolean;
|
|
12413
|
-
|
|
12414
|
-
/**
|
|
12415
|
-
* for lazy compilation modules
|
|
12416
|
-
*/
|
|
12417
|
-
active?: boolean;
|
|
12418
|
-
|
|
12419
|
-
/**
|
|
12420
|
-
* for css modules
|
|
12421
|
-
*/
|
|
13075
|
+
}
|
|
13076
|
+
declare interface KnownCreateStatsOptionsContext {
|
|
13077
|
+
forToString?: boolean;
|
|
13078
|
+
}
|
|
13079
|
+
declare interface KnownCssModuleBuildInfo {
|
|
12422
13080
|
cssData?: CssData;
|
|
12423
13081
|
|
|
12424
13082
|
/**
|
|
12425
|
-
*
|
|
13083
|
+
* charset at-rule
|
|
12426
13084
|
*/
|
|
12427
13085
|
charset?: string;
|
|
12428
|
-
|
|
12429
|
-
/**
|
|
12430
|
-
* for json modules
|
|
12431
|
-
*/
|
|
12432
|
-
jsonData?: JsonData;
|
|
12433
|
-
|
|
12434
|
-
/**
|
|
12435
|
-
* top level declaration names
|
|
12436
|
-
*/
|
|
12437
|
-
topLevelDeclarations?: Set<string>;
|
|
12438
13086
|
}
|
|
12439
|
-
declare interface
|
|
12440
|
-
exportsType?: "namespace" | "dynamic" | "default" | "flagged";
|
|
12441
|
-
defaultObject?: false | "redirect" | "redirect-warn";
|
|
12442
|
-
strictHarmonyModule?: boolean;
|
|
12443
|
-
treatAsCommonJs?: boolean;
|
|
12444
|
-
async?: boolean;
|
|
12445
|
-
sideEffectFree?: boolean;
|
|
13087
|
+
declare interface KnownCssModuleBuildMeta {
|
|
12446
13088
|
isCssModule?: boolean;
|
|
12447
13089
|
needIdInConcatenation?: boolean;
|
|
12448
|
-
jsIncompatibleExports?: Record<string, string>;
|
|
12449
|
-
exportsFinalNameByRuntime?: Map<string, Record<string, string>>;
|
|
12450
|
-
exportsSourceByRuntime?: Map<string, string>;
|
|
12451
13090
|
}
|
|
12452
|
-
declare interface
|
|
13091
|
+
declare interface KnownExternalModuleBuildInfo {
|
|
12453
13092
|
/**
|
|
12454
|
-
*
|
|
13093
|
+
* true when emitting an ESM external (`output.module`)
|
|
12455
13094
|
*/
|
|
12456
|
-
|
|
12457
|
-
}
|
|
12458
|
-
declare interface KnownCreateStatsOptionsContext {
|
|
12459
|
-
forToString?: boolean;
|
|
13095
|
+
javascriptModule?: boolean;
|
|
12460
13096
|
}
|
|
12461
13097
|
declare interface KnownHooks {
|
|
12462
13098
|
/**
|
|
@@ -12490,16 +13126,65 @@ declare interface KnownHooks {
|
|
|
12490
13126
|
*/
|
|
12491
13127
|
result: AsyncSeriesHook<[ResolveRequest, ResolveContext]>;
|
|
12492
13128
|
}
|
|
13129
|
+
declare interface KnownHtmlModuleBuildInfo {
|
|
13130
|
+
/**
|
|
13131
|
+
* entries collected from the document, grouped by kind
|
|
13132
|
+
*/
|
|
13133
|
+
htmlEntryScripts?: Record<string, EntryScriptInfo[]>;
|
|
13134
|
+
}
|
|
13135
|
+
declare interface KnownJavascriptModuleBuildInfo {
|
|
13136
|
+
/**
|
|
13137
|
+
* using in CommonJs
|
|
13138
|
+
*/
|
|
13139
|
+
moduleConcatenationBailout?: string;
|
|
13140
|
+
|
|
13141
|
+
/**
|
|
13142
|
+
* using in APIPlugin
|
|
13143
|
+
*/
|
|
13144
|
+
needCreateRequire?: boolean;
|
|
13145
|
+
|
|
13146
|
+
/**
|
|
13147
|
+
* names of locally declared functions known to be free of side effects
|
|
13148
|
+
*/
|
|
13149
|
+
pureFunctions?: Set<string>;
|
|
13150
|
+
|
|
13151
|
+
/**
|
|
13152
|
+
* whether this module was parsed with `optimization.inlineExports` enabled (gates inlining of its exports)
|
|
13153
|
+
*/
|
|
13154
|
+
inlineExports?: boolean;
|
|
13155
|
+
}
|
|
13156
|
+
declare interface KnownJavascriptModuleBuildMeta {
|
|
13157
|
+
strictHarmonyModule?: boolean;
|
|
13158
|
+
treatAsCommonJs?: boolean;
|
|
13159
|
+
}
|
|
12493
13160
|
declare interface KnownJavascriptParserState {
|
|
12494
13161
|
harmonyNamedExports?: Set<string>;
|
|
12495
13162
|
harmonyStarExports?: HarmonyStarExportsList;
|
|
12496
13163
|
lastHarmonyImportOrder?: number;
|
|
12497
13164
|
localModules?: LocalModule[];
|
|
12498
13165
|
}
|
|
13166
|
+
declare interface KnownJsonModuleBuildInfo {
|
|
13167
|
+
jsonData?: JsonData;
|
|
13168
|
+
}
|
|
12499
13169
|
declare interface KnownMeta {
|
|
12500
13170
|
importVarMap?: Map<Module, string>;
|
|
12501
13171
|
deferredImportVarMap?: Map<Module, string>;
|
|
12502
13172
|
}
|
|
13173
|
+
declare interface KnownNormalModuleBuildInfo {
|
|
13174
|
+
parsed?: boolean;
|
|
13175
|
+
hash?: string;
|
|
13176
|
+
fileDependencies?: LazySet<string>;
|
|
13177
|
+
contextDependencies?: LazySet<string>;
|
|
13178
|
+
missingDependencies?: LazySet<string>;
|
|
13179
|
+
buildDependencies?: LazySet<string>;
|
|
13180
|
+
valueDependencies?: Map<string, ValueCacheVersion>;
|
|
13181
|
+
snapshot?: null | Snapshot;
|
|
13182
|
+
|
|
13183
|
+
/**
|
|
13184
|
+
* using in HttpUriPlugin
|
|
13185
|
+
*/
|
|
13186
|
+
resourceIntegrity?: string;
|
|
13187
|
+
}
|
|
12503
13188
|
declare interface KnownNormalizedStatsOptions {
|
|
12504
13189
|
context: string;
|
|
12505
13190
|
requestShortener: RequestShortener;
|
|
@@ -12869,6 +13554,9 @@ declare interface KnownStatsProfile {
|
|
|
12869
13554
|
factory: number;
|
|
12870
13555
|
dependencies: number;
|
|
12871
13556
|
}
|
|
13557
|
+
declare interface KnownSyncWasmModuleBuildMeta {
|
|
13558
|
+
jsIncompatibleExports?: Record<string, string>;
|
|
13559
|
+
}
|
|
12872
13560
|
declare interface KnownUnsafeCacheData {
|
|
12873
13561
|
/**
|
|
12874
13562
|
* factory meta
|
|
@@ -13039,6 +13727,12 @@ type LazyFunction<
|
|
|
13039
13727
|
declare interface LazyOptions {
|
|
13040
13728
|
[index: string]: any;
|
|
13041
13729
|
}
|
|
13730
|
+
|
|
13731
|
+
/**
|
|
13732
|
+
* Like Set but with an addAll method to eventually add items from another iterable.
|
|
13733
|
+
* Access methods make sure that all delayed operations are executed.
|
|
13734
|
+
* Iteration methods deopts to normal Set performance until clear is called again (because of the chance of modifications during iteration).
|
|
13735
|
+
*/
|
|
13042
13736
|
declare class LazySet<T> {
|
|
13043
13737
|
/**
|
|
13044
13738
|
* Seeds the set with an optional iterable while preparing internal queues for
|
|
@@ -13107,7 +13801,9 @@ declare class LazySet<T> {
|
|
|
13107
13801
|
* Serializes the fully materialized set contents into webpack's object
|
|
13108
13802
|
* serialization stream.
|
|
13109
13803
|
*/
|
|
13110
|
-
serialize(
|
|
13804
|
+
serialize(
|
|
13805
|
+
__0: ObjectSerializerContextObjectMiddlewareObject_4<(number | T)[]>
|
|
13806
|
+
): void;
|
|
13111
13807
|
|
|
13112
13808
|
/**
|
|
13113
13809
|
* Returns the default iterator over values after forcing pending merges.
|
|
@@ -13117,7 +13813,9 @@ declare class LazySet<T> {
|
|
|
13117
13813
|
/**
|
|
13118
13814
|
* Restores a `LazySet` from serialized item data.
|
|
13119
13815
|
*/
|
|
13120
|
-
static deserialize<T>(
|
|
13816
|
+
static deserialize<T>(
|
|
13817
|
+
__0: ObjectDeserializerContextObjectMiddlewareObject_3<(number | T)[]>
|
|
13818
|
+
): LazySet<T>;
|
|
13121
13819
|
}
|
|
13122
13820
|
declare interface LibIdentOptions {
|
|
13123
13821
|
/**
|
|
@@ -13627,12 +14325,12 @@ declare abstract class LocalModule {
|
|
|
13627
14325
|
/**
|
|
13628
14326
|
* Serializes this instance into the provided serializer context.
|
|
13629
14327
|
*/
|
|
13630
|
-
serialize(context:
|
|
14328
|
+
serialize(context: ObjectSerializerContextObjectMiddlewareObject_2): void;
|
|
13631
14329
|
|
|
13632
14330
|
/**
|
|
13633
14331
|
* Restores this instance from the provided deserializer context.
|
|
13634
14332
|
*/
|
|
13635
|
-
deserialize(context:
|
|
14333
|
+
deserialize(context: ObjectDeserializerContextObjectMiddlewareObject_1): void;
|
|
13636
14334
|
}
|
|
13637
14335
|
declare interface LogEntry {
|
|
13638
14336
|
type:
|
|
@@ -13956,6 +14654,7 @@ declare interface MaybeMergeableInitFragment<GenerateContext> {
|
|
|
13956
14654
|
fragments: MaybeMergeableInitFragment<GenerateContext>[]
|
|
13957
14655
|
) => MaybeMergeableInitFragment<GenerateContext>[];
|
|
13958
14656
|
}
|
|
14657
|
+
type MaybePromise<T> = T | Promise<T>;
|
|
13959
14658
|
type Media = undefined | string;
|
|
13960
14659
|
|
|
13961
14660
|
/**
|
|
@@ -14090,7 +14789,6 @@ declare class Module extends DependenciesBlock {
|
|
|
14090
14789
|
factoryMeta?: FactoryMeta;
|
|
14091
14790
|
useSourceMap: boolean;
|
|
14092
14791
|
useSimpleSourceMap: boolean;
|
|
14093
|
-
hot: boolean;
|
|
14094
14792
|
buildMeta?: BuildMeta;
|
|
14095
14793
|
buildInfo?: BuildInfo;
|
|
14096
14794
|
presentationalDependencies?: Dependency[];
|
|
@@ -14362,6 +15060,11 @@ declare class Module extends DependenciesBlock {
|
|
|
14362
15060
|
*/
|
|
14363
15061
|
getSourceTypes(): ReadonlySet<string>;
|
|
14364
15062
|
|
|
15063
|
+
/**
|
|
15064
|
+
* Freshly recomputed source types when they depend on incoming connections, for chunk-graph cache invalidation; undefined otherwise. #20800
|
|
15065
|
+
*/
|
|
15066
|
+
getReferencedSourceTypes(): undefined | ReadonlySet<string>;
|
|
15067
|
+
|
|
14365
15068
|
/**
|
|
14366
15069
|
* Basic source types are high-level categories like javascript, css, webassembly, etc.
|
|
14367
15070
|
* We only have built-in knowledge about the javascript basic type here; other basic types may be
|
|
@@ -14519,9 +15222,22 @@ declare class ModuleDependency extends Dependency {
|
|
|
14519
15222
|
userRequest: string;
|
|
14520
15223
|
sourceOrder?: number;
|
|
14521
15224
|
range?: [number, number];
|
|
15225
|
+
weak: boolean;
|
|
14522
15226
|
static Template: typeof DependencyTemplate;
|
|
15227
|
+
|
|
15228
|
+
/**
|
|
15229
|
+
* Compares two dependencies by source location for sorting a module's
|
|
15230
|
+
* `dependencies`, without materializing the `loc` objects (`get loc` caches
|
|
15231
|
+
* its result, so comparing through it would retain a location object on every
|
|
15232
|
+
* sorted dependency). These dependencies always carry a real source position,
|
|
15233
|
+
* so only start (line, column) and the within-statement index are compared; a
|
|
15234
|
+
* dependency without an index sorts after one that has an index at the same
|
|
15235
|
+
* position.
|
|
15236
|
+
*/
|
|
15237
|
+
static compareLocations(a: Dependency, b: Dependency): 0 | 1 | -1;
|
|
14523
15238
|
static NO_EXPORTS_REFERENCED: string[][];
|
|
14524
15239
|
static EXPORTS_OBJECT_REFERENCED: string[][];
|
|
15240
|
+
static EXPORTS_OBJECT_REFERENCED_MANGLEABLE: string[][];
|
|
14525
15241
|
|
|
14526
15242
|
/**
|
|
14527
15243
|
* Returns true if the dependency is a low priority dependency.
|
|
@@ -14533,7 +15249,15 @@ declare class ModuleDependency extends Dependency {
|
|
|
14533
15249
|
*/
|
|
14534
15250
|
static canConcatenate(dependency: Dependency): boolean;
|
|
14535
15251
|
static TRANSITIVE: symbol;
|
|
15252
|
+
static LAZY_UNTIL_LOCAL: "local";
|
|
15253
|
+
static LAZY_UNTIL_ID: "id";
|
|
15254
|
+
static LAZY_UNTIL_FALLBACK: "*";
|
|
15255
|
+
static LAZY_UNTIL_REQUEST: "@";
|
|
14536
15256
|
}
|
|
15257
|
+
|
|
15258
|
+
/**
|
|
15259
|
+
* Represents ModuleExternalInitFragment.
|
|
15260
|
+
*/
|
|
14537
15261
|
declare class ModuleExternalInitFragment extends InitFragment<GenerateContext> {
|
|
14538
15262
|
/**
|
|
14539
15263
|
* Creates an instance of ModuleExternalInitFragment.
|
|
@@ -15466,6 +16190,11 @@ declare interface ModuleReferenceOptions {
|
|
|
15466
16190
|
*/
|
|
15467
16191
|
deferredImport: boolean;
|
|
15468
16192
|
|
|
16193
|
+
/**
|
|
16194
|
+
* true, when a whole-namespace reference may use a decoupled namespace object that keeps the original export names
|
|
16195
|
+
*/
|
|
16196
|
+
mangleableNamespace: boolean;
|
|
16197
|
+
|
|
15469
16198
|
/**
|
|
15470
16199
|
* if the position is ASI safe or unknown
|
|
15471
16200
|
*/
|
|
@@ -16002,6 +16731,7 @@ declare class NodeTargetPlugin {
|
|
|
16002
16731
|
* Applies the plugin by registering its hooks on the compiler.
|
|
16003
16732
|
*/
|
|
16004
16733
|
apply(compiler: Compiler): void;
|
|
16734
|
+
static builtins: (string | RegExp)[];
|
|
16005
16735
|
}
|
|
16006
16736
|
declare class NodeTemplatePlugin {
|
|
16007
16737
|
/**
|
|
@@ -16037,6 +16767,7 @@ declare class NormalModule extends Module {
|
|
|
16037
16767
|
matchResource?: string;
|
|
16038
16768
|
loaders: LoaderItem[];
|
|
16039
16769
|
extractSourceMap: boolean;
|
|
16770
|
+
hot: boolean;
|
|
16040
16771
|
error: null | Error;
|
|
16041
16772
|
getResource(): null | string;
|
|
16042
16773
|
|
|
@@ -16081,7 +16812,9 @@ declare class NormalModule extends Module {
|
|
|
16081
16812
|
static getCompilationHooks(
|
|
16082
16813
|
compilation: Compilation
|
|
16083
16814
|
): NormalModuleCompilationHooks;
|
|
16084
|
-
static deserialize(
|
|
16815
|
+
static deserialize(
|
|
16816
|
+
context: ObjectDeserializerContextObjectMiddlewareObject_4
|
|
16817
|
+
): NormalModule;
|
|
16085
16818
|
|
|
16086
16819
|
/**
|
|
16087
16820
|
* Gets source basic types.
|
|
@@ -16089,6 +16822,9 @@ declare class NormalModule extends Module {
|
|
|
16089
16822
|
*/
|
|
16090
16823
|
static getSourceBasicTypes(module: Module): ReadonlySet<string>;
|
|
16091
16824
|
}
|
|
16825
|
+
type NormalModuleBuildInfo = KnownBuildInfo &
|
|
16826
|
+
Record<string, any> &
|
|
16827
|
+
KnownNormalModuleBuildInfo;
|
|
16092
16828
|
declare interface NormalModuleCompilationHooks {
|
|
16093
16829
|
loader: SyncHook<[AnyLoaderContext, NormalModule]>;
|
|
16094
16830
|
beforeLoaders: SyncHook<[LoaderItem[], NormalModule, AnyLoaderContext]>;
|
|
@@ -16656,11 +17392,55 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
|
16656
17392
|
*/
|
|
16657
17393
|
declare interface NormalModuleLoaderContext<OptionsType> {
|
|
16658
17394
|
version: number;
|
|
17395
|
+
|
|
17396
|
+
/**
|
|
17397
|
+
* Extracts and parses the options of the current loader.
|
|
17398
|
+
* Parses string options as JSON or a query string.
|
|
17399
|
+
* Extracts and parses the options of the current loader.
|
|
17400
|
+
* Parses string options as JSON or a query string, and optionally validates them against a provided schema.
|
|
17401
|
+
*/
|
|
17402
|
+
|
|
17403
|
+
/**
|
|
17404
|
+
* Extracts and parses the options of the current loader.
|
|
17405
|
+
* Parses string options as JSON or a query string.
|
|
17406
|
+
*/
|
|
16659
17407
|
getOptions(): OptionsType;
|
|
17408
|
+
|
|
17409
|
+
/**
|
|
17410
|
+
* Extracts and parses the options of the current loader.
|
|
17411
|
+
* Parses string options as JSON or a query string.
|
|
17412
|
+
* Extracts and parses the options of the current loader.
|
|
17413
|
+
* Parses string options as JSON or a query string, and optionally validates them against a provided schema.
|
|
17414
|
+
*/
|
|
17415
|
+
|
|
17416
|
+
/**
|
|
17417
|
+
* Extracts and parses the options of the current loader.
|
|
17418
|
+
* Parses string options as JSON or a query string, and optionally validates them against a provided schema.
|
|
17419
|
+
*/
|
|
16660
17420
|
getOptions(schema: Parameters<typeof validateFunction>[0]): OptionsType;
|
|
16661
|
-
|
|
16662
|
-
|
|
17421
|
+
|
|
17422
|
+
/**
|
|
17423
|
+
* Emits a warning for this module.
|
|
17424
|
+
* The warning will be displayed to the user during compilation.
|
|
17425
|
+
*/
|
|
17426
|
+
emitWarning(warning: string | Error): void;
|
|
17427
|
+
|
|
17428
|
+
/**
|
|
17429
|
+
* Emits an error for this module.
|
|
17430
|
+
* The error will be displayed to the user and typically causes the compilation to fail.
|
|
17431
|
+
*/
|
|
17432
|
+
emitError(error: string | Error): void;
|
|
17433
|
+
|
|
17434
|
+
/**
|
|
17435
|
+
* Gets a logger instance scoped to this loader and module.
|
|
17436
|
+
* Useful for emitting debug or compilation information in a structured way.
|
|
17437
|
+
*/
|
|
16663
17438
|
getLogger(name?: string): WebpackLogger;
|
|
17439
|
+
|
|
17440
|
+
/**
|
|
17441
|
+
* Resolves a module request (e.g., a relative path or module name) to an absolute file path.
|
|
17442
|
+
* It uses Webpack's internal resolver, taking into account configured aliases and extensions.
|
|
17443
|
+
*/
|
|
16664
17444
|
resolve(
|
|
16665
17445
|
context: string,
|
|
16666
17446
|
request: string,
|
|
@@ -16670,6 +17450,11 @@ declare interface NormalModuleLoaderContext<OptionsType> {
|
|
|
16670
17450
|
req?: ResolveRequest
|
|
16671
17451
|
) => void
|
|
16672
17452
|
): void;
|
|
17453
|
+
|
|
17454
|
+
/**
|
|
17455
|
+
* Creates a resolve function with specific options.
|
|
17456
|
+
* The returned function can be used as a Promise-based resolver or a callback-based resolver.
|
|
17457
|
+
*/
|
|
16673
17458
|
getResolve(options?: ResolveOptionsWithDependencyType): {
|
|
16674
17459
|
(
|
|
16675
17460
|
context: string,
|
|
@@ -16682,6 +17467,11 @@ declare interface NormalModuleLoaderContext<OptionsType> {
|
|
|
16682
17467
|
): void;
|
|
16683
17468
|
(context: string, request: string): Promise<string>;
|
|
16684
17469
|
};
|
|
17470
|
+
|
|
17471
|
+
/**
|
|
17472
|
+
* Emits a new file (asset) to the compilation output directory.
|
|
17473
|
+
* This allows loaders to generate additional files alongside the main module output.
|
|
17474
|
+
*/
|
|
16685
17475
|
emitFile(
|
|
16686
17476
|
name: string,
|
|
16687
17477
|
content: string | Buffer,
|
|
@@ -16779,8 +17569,20 @@ type NormalizedStatsOptions = KnownNormalizedStatsOptions &
|
|
|
16779
17569
|
declare class NullDependency extends Dependency {
|
|
16780
17570
|
constructor();
|
|
16781
17571
|
static Template: typeof NullDependencyTemplate;
|
|
17572
|
+
|
|
17573
|
+
/**
|
|
17574
|
+
* Compares two dependencies by source location for sorting a module's
|
|
17575
|
+
* `dependencies`, without materializing the `loc` objects (`get loc` caches
|
|
17576
|
+
* its result, so comparing through it would retain a location object on every
|
|
17577
|
+
* sorted dependency). These dependencies always carry a real source position,
|
|
17578
|
+
* so only start (line, column) and the within-statement index are compared; a
|
|
17579
|
+
* dependency without an index sorts after one that has an index at the same
|
|
17580
|
+
* position.
|
|
17581
|
+
*/
|
|
17582
|
+
static compareLocations(a: Dependency, b: Dependency): 0 | 1 | -1;
|
|
16782
17583
|
static NO_EXPORTS_REFERENCED: string[][];
|
|
16783
17584
|
static EXPORTS_OBJECT_REFERENCED: string[][];
|
|
17585
|
+
static EXPORTS_OBJECT_REFERENCED_MANGLEABLE: string[][];
|
|
16784
17586
|
|
|
16785
17587
|
/**
|
|
16786
17588
|
* Returns true if the dependency is a low priority dependency.
|
|
@@ -16792,6 +17594,10 @@ declare class NullDependency extends Dependency {
|
|
|
16792
17594
|
*/
|
|
16793
17595
|
static canConcatenate(dependency: Dependency): boolean;
|
|
16794
17596
|
static TRANSITIVE: symbol;
|
|
17597
|
+
static LAZY_UNTIL_LOCAL: "local";
|
|
17598
|
+
static LAZY_UNTIL_ID: "id";
|
|
17599
|
+
static LAZY_UNTIL_FALLBACK: "*";
|
|
17600
|
+
static LAZY_UNTIL_REQUEST: "@";
|
|
16795
17601
|
}
|
|
16796
17602
|
declare class NullDependencyTemplate extends DependencyTemplate {
|
|
16797
17603
|
constructor();
|
|
@@ -16803,8 +17609,36 @@ declare interface ObjectConfiguration {
|
|
|
16803
17609
|
/**
|
|
16804
17610
|
* Updates set size using the provided set.
|
|
16805
17611
|
*/
|
|
16806
|
-
declare interface
|
|
17612
|
+
declare interface ObjectDeserializerContextObjectMiddlewareObject_1 {
|
|
17613
|
+
read: () => string;
|
|
17614
|
+
rest: ObjectDeserializerContextObjectMiddlewareObject_3<[number, boolean]>;
|
|
17615
|
+
setCircularReference: (value: ReferenceableItem) => void;
|
|
17616
|
+
}
|
|
17617
|
+
declare namespace ObjectDeserializerContextObjectMiddlewareObject_2 {
|
|
17618
|
+
export let read: () => any;
|
|
17619
|
+
export let rest: ObjectDeserializerContextObjectMiddlewareObject_3<
|
|
17620
|
+
ReadonlyArray<any>
|
|
17621
|
+
>;
|
|
17622
|
+
export let setCircularReference: (value: ReferenceableItem) => void;
|
|
17623
|
+
}
|
|
17624
|
+
|
|
17625
|
+
/**
|
|
17626
|
+
* Updates set size using the provided set.
|
|
17627
|
+
*/
|
|
17628
|
+
declare interface ObjectDeserializerContextObjectMiddlewareObject_3<
|
|
17629
|
+
T extends ReadonlyArray<any> = ReadonlyArray<any>
|
|
17630
|
+
> {
|
|
17631
|
+
read: () => Head<T>;
|
|
17632
|
+
rest: ObjectDeserializerContextObjectMiddlewareObject_3<Tail<T>>;
|
|
17633
|
+
setCircularReference: (value: ReferenceableItem) => void;
|
|
17634
|
+
}
|
|
17635
|
+
|
|
17636
|
+
/**
|
|
17637
|
+
* Updates set size using the provided set.
|
|
17638
|
+
*/
|
|
17639
|
+
declare interface ObjectDeserializerContextObjectMiddlewareObject_4 {
|
|
16807
17640
|
read: () => any;
|
|
17641
|
+
rest: ObjectDeserializerContextObjectMiddlewareObject_3<ReadonlyArray<any>>;
|
|
16808
17642
|
setCircularReference: (value: ReferenceableItem) => void;
|
|
16809
17643
|
}
|
|
16810
17644
|
|
|
@@ -16827,39 +17661,116 @@ declare interface ObjectEncodingOptionsFs {
|
|
|
16827
17661
|
| "binary"
|
|
16828
17662
|
| "hex";
|
|
16829
17663
|
}
|
|
16830
|
-
declare interface ObjectEncodingOptionsTypes {
|
|
16831
|
-
/**
|
|
16832
|
-
* encoding
|
|
16833
|
-
*/
|
|
16834
|
-
encoding?:
|
|
16835
|
-
| null
|
|
16836
|
-
| "ascii"
|
|
16837
|
-
| "utf8"
|
|
16838
|
-
| "utf-8"
|
|
16839
|
-
| "utf16le"
|
|
16840
|
-
| "utf-16le"
|
|
16841
|
-
| "ucs2"
|
|
16842
|
-
| "ucs-2"
|
|
16843
|
-
| "base64"
|
|
16844
|
-
| "base64url"
|
|
16845
|
-
| "latin1"
|
|
16846
|
-
| "binary"
|
|
16847
|
-
| "hex";
|
|
17664
|
+
declare interface ObjectEncodingOptionsTypes {
|
|
17665
|
+
/**
|
|
17666
|
+
* encoding
|
|
17667
|
+
*/
|
|
17668
|
+
encoding?:
|
|
17669
|
+
| null
|
|
17670
|
+
| "ascii"
|
|
17671
|
+
| "utf8"
|
|
17672
|
+
| "utf-8"
|
|
17673
|
+
| "utf16le"
|
|
17674
|
+
| "utf-16le"
|
|
17675
|
+
| "ucs2"
|
|
17676
|
+
| "ucs-2"
|
|
17677
|
+
| "base64"
|
|
17678
|
+
| "base64url"
|
|
17679
|
+
| "latin1"
|
|
17680
|
+
| "binary"
|
|
17681
|
+
| "hex";
|
|
17682
|
+
}
|
|
17683
|
+
|
|
17684
|
+
/**
|
|
17685
|
+
* Updates set size using the provided set.
|
|
17686
|
+
*/
|
|
17687
|
+
declare interface ObjectSerializer {
|
|
17688
|
+
serialize: (
|
|
17689
|
+
value: any,
|
|
17690
|
+
context: ObjectSerializerContextObjectMiddlewareObject_4<any>
|
|
17691
|
+
) => void;
|
|
17692
|
+
deserialize: (
|
|
17693
|
+
context: ObjectDeserializerContextObjectMiddlewareObject_3<any>
|
|
17694
|
+
) => any;
|
|
17695
|
+
}
|
|
17696
|
+
|
|
17697
|
+
/**
|
|
17698
|
+
* Updates set size using the provided set.
|
|
17699
|
+
*/
|
|
17700
|
+
declare interface ObjectSerializerContextObjectMiddlewareObject_1 {
|
|
17701
|
+
write: (
|
|
17702
|
+
value: RestoreProvidedDataExports[]
|
|
17703
|
+
) => ObjectSerializerContextObjectMiddlewareObject_4<
|
|
17704
|
+
[undefined | null | boolean, undefined | boolean, boolean]
|
|
17705
|
+
>;
|
|
17706
|
+
setCircularReference: (value: ReferenceableItem) => void;
|
|
17707
|
+
snapshot: () => ObjectSerializerSnapshot;
|
|
17708
|
+
rollback: (snapshot: ObjectSerializerSnapshot) => void;
|
|
17709
|
+
writeLazy?: (item?: any) => void;
|
|
17710
|
+
writeSeparate?: (
|
|
17711
|
+
item: any,
|
|
17712
|
+
obj?: LazyOptions
|
|
17713
|
+
) => LazyFunction<any, any, any, LazyOptions>;
|
|
17714
|
+
}
|
|
17715
|
+
|
|
17716
|
+
/**
|
|
17717
|
+
* Updates set size using the provided set.
|
|
17718
|
+
*/
|
|
17719
|
+
declare interface ObjectSerializerContextObjectMiddlewareObject_2 {
|
|
17720
|
+
write: (
|
|
17721
|
+
value: string
|
|
17722
|
+
) => ObjectSerializerContextObjectMiddlewareObject_4<[number, boolean]>;
|
|
17723
|
+
setCircularReference: (value: ReferenceableItem) => void;
|
|
17724
|
+
snapshot: () => ObjectSerializerSnapshot;
|
|
17725
|
+
rollback: (snapshot: ObjectSerializerSnapshot) => void;
|
|
17726
|
+
writeLazy?: (item?: any) => void;
|
|
17727
|
+
writeSeparate?: (
|
|
17728
|
+
item: any,
|
|
17729
|
+
obj?: LazyOptions
|
|
17730
|
+
) => LazyFunction<any, any, any, LazyOptions>;
|
|
17731
|
+
}
|
|
17732
|
+
declare namespace ObjectSerializerContextObjectMiddlewareObject_3 {
|
|
17733
|
+
export let write: (
|
|
17734
|
+
value?: any
|
|
17735
|
+
) => ObjectSerializerContextObjectMiddlewareObject_4<ReadonlyArray<any>>;
|
|
17736
|
+
export let setCircularReference: (value: ReferenceableItem) => void;
|
|
17737
|
+
export let snapshot: () => ObjectSerializerSnapshot;
|
|
17738
|
+
export let rollback: (snapshot: ObjectSerializerSnapshot) => void;
|
|
17739
|
+
export let writeLazy: undefined | ((item?: any) => void);
|
|
17740
|
+
export let writeSeparate:
|
|
17741
|
+
| undefined
|
|
17742
|
+
| ((
|
|
17743
|
+
item: any,
|
|
17744
|
+
obj?: LazyOptions
|
|
17745
|
+
) => LazyFunction<any, any, any, LazyOptions>);
|
|
16848
17746
|
}
|
|
16849
17747
|
|
|
16850
17748
|
/**
|
|
16851
17749
|
* Updates set size using the provided set.
|
|
16852
17750
|
*/
|
|
16853
|
-
declare interface
|
|
16854
|
-
|
|
16855
|
-
|
|
17751
|
+
declare interface ObjectSerializerContextObjectMiddlewareObject_4<
|
|
17752
|
+
T extends ReadonlyArray<any> = ReadonlyArray<any>
|
|
17753
|
+
> {
|
|
17754
|
+
write: (
|
|
17755
|
+
value: Head<T>
|
|
17756
|
+
) => ObjectSerializerContextObjectMiddlewareObject_4<Tail<T>>;
|
|
17757
|
+
setCircularReference: (value: ReferenceableItem) => void;
|
|
17758
|
+
snapshot: () => ObjectSerializerSnapshot;
|
|
17759
|
+
rollback: (snapshot: ObjectSerializerSnapshot) => void;
|
|
17760
|
+
writeLazy?: (item?: any) => void;
|
|
17761
|
+
writeSeparate?: (
|
|
17762
|
+
item: any,
|
|
17763
|
+
obj?: LazyOptions
|
|
17764
|
+
) => LazyFunction<any, any, any, LazyOptions>;
|
|
16856
17765
|
}
|
|
16857
17766
|
|
|
16858
17767
|
/**
|
|
16859
17768
|
* Updates set size using the provided set.
|
|
16860
17769
|
*/
|
|
16861
|
-
declare interface
|
|
16862
|
-
write: (
|
|
17770
|
+
declare interface ObjectSerializerContextObjectMiddlewareObject_5 {
|
|
17771
|
+
write: (
|
|
17772
|
+
value?: any
|
|
17773
|
+
) => ObjectSerializerContextObjectMiddlewareObject_4<ReadonlyArray<any>>;
|
|
16863
17774
|
setCircularReference: (value: ReferenceableItem) => void;
|
|
16864
17775
|
snapshot: () => ObjectSerializerSnapshot;
|
|
16865
17776
|
rollback: (snapshot: ObjectSerializerSnapshot) => void;
|
|
@@ -16978,6 +17889,11 @@ declare interface Optimization {
|
|
|
16978
17889
|
*/
|
|
16979
17890
|
flagIncludedChunks?: boolean;
|
|
16980
17891
|
|
|
17892
|
+
/**
|
|
17893
|
+
* Inline ESM exports that bind to small primitive constants (≤6-byte null/undefined/boolean/number/string). Inlining makes the import dependency inactive so DCE can drop the export and possibly the module.
|
|
17894
|
+
*/
|
|
17895
|
+
inlineExports?: boolean;
|
|
17896
|
+
|
|
16981
17897
|
/**
|
|
16982
17898
|
* Creates a module-internal dependency graph for top level symbols, exports and imports, to improve unused exports detection.
|
|
16983
17899
|
*/
|
|
@@ -17128,6 +18044,11 @@ declare interface OptimizationNormalized {
|
|
|
17128
18044
|
*/
|
|
17129
18045
|
flagIncludedChunks?: boolean;
|
|
17130
18046
|
|
|
18047
|
+
/**
|
|
18048
|
+
* Inline ESM exports that bind to small primitive constants (≤6-byte null/undefined/boolean/number/string). Inlining makes the import dependency inactive so DCE can drop the export and possibly the module.
|
|
18049
|
+
*/
|
|
18050
|
+
inlineExports?: boolean;
|
|
18051
|
+
|
|
17131
18052
|
/**
|
|
17132
18053
|
* Creates a module-internal dependency graph for top level symbols, exports and imports, to improve unused exports detection.
|
|
17133
18054
|
*/
|
|
@@ -17269,6 +18190,7 @@ type OptimizationNormalizedWithDefaults = OptimizationNormalized & {
|
|
|
17269
18190
|
usedExports: NonNullable<undefined | boolean | "global">;
|
|
17270
18191
|
mangleExports: NonNullable<undefined | boolean | "deterministic" | "size">;
|
|
17271
18192
|
innerGraph: NonNullable<undefined | boolean>;
|
|
18193
|
+
inlineExports: NonNullable<undefined | boolean>;
|
|
17272
18194
|
concatenateModules: NonNullable<undefined | boolean>;
|
|
17273
18195
|
avoidEntryIife: NonNullable<undefined | boolean>;
|
|
17274
18196
|
emitOnErrors: NonNullable<undefined | boolean>;
|
|
@@ -17801,6 +18723,11 @@ declare interface Output {
|
|
|
17801
18723
|
*/
|
|
17802
18724
|
hotUpdateMainFilename?: string;
|
|
17803
18725
|
|
|
18726
|
+
/**
|
|
18727
|
+
* Generate an HTML file for each non-HTML entrypoint with its JS and CSS output chunks injected. Can be overridden per entry via the entry descriptor `html` option.
|
|
18728
|
+
*/
|
|
18729
|
+
html?: boolean | OutputHtmlOptions;
|
|
18730
|
+
|
|
17804
18731
|
/**
|
|
17805
18732
|
* Specifies the filename template of non-initial output html files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
|
|
17806
18733
|
*/
|
|
@@ -17892,6 +18819,11 @@ declare interface Output {
|
|
|
17892
18819
|
*/
|
|
17893
18820
|
strictModuleExceptionHandling?: boolean;
|
|
17894
18821
|
|
|
18822
|
+
/**
|
|
18823
|
+
* Emit a runtime check that throws a 'MODULE_NOT_FOUND' error when a required module id is missing from the bundle.
|
|
18824
|
+
*/
|
|
18825
|
+
strictModuleResolution?: boolean;
|
|
18826
|
+
|
|
17895
18827
|
/**
|
|
17896
18828
|
* Use a Trusted Types policy to create urls for chunks. 'output.uniqueName' is used a default policy name. Passing a string sets a custom policy name.
|
|
17897
18829
|
*/
|
|
@@ -17917,6 +18849,11 @@ declare interface Output {
|
|
|
17917
18849
|
*/
|
|
17918
18850
|
webassemblyModuleFilename?: string;
|
|
17919
18851
|
|
|
18852
|
+
/**
|
|
18853
|
+
* Specifies the filename template of non-initial output worker's files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
|
|
18854
|
+
*/
|
|
18855
|
+
workerChunkFilename?: string | TemplatePathFn<PathDataChunk>;
|
|
18856
|
+
|
|
17920
18857
|
/**
|
|
17921
18858
|
* The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
|
|
17922
18859
|
*/
|
|
@@ -17973,6 +18910,16 @@ declare interface OutputFileSystem {
|
|
|
17973
18910
|
dirname?: (dirname: string) => string;
|
|
17974
18911
|
}
|
|
17975
18912
|
|
|
18913
|
+
/**
|
|
18914
|
+
* Options for the generated HTML files.
|
|
18915
|
+
*/
|
|
18916
|
+
declare interface OutputHtmlOptions {
|
|
18917
|
+
/**
|
|
18918
|
+
* How injected `<script>` tags load. `auto` (default) emits a module script for ES module output and `defer` otherwise; `defer` forces a deferred script; `blocking` emits a plain blocking script.
|
|
18919
|
+
*/
|
|
18920
|
+
scriptLoading?: "auto" | "defer" | "blocking";
|
|
18921
|
+
}
|
|
18922
|
+
|
|
17976
18923
|
/**
|
|
17977
18924
|
* Normalized options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.
|
|
17978
18925
|
*/
|
|
@@ -18126,6 +19073,11 @@ declare interface OutputNormalized {
|
|
|
18126
19073
|
*/
|
|
18127
19074
|
hotUpdateMainFilename?: string;
|
|
18128
19075
|
|
|
19076
|
+
/**
|
|
19077
|
+
* Generate an HTML file for each non-HTML entrypoint with its JS and CSS output chunks injected. Can be overridden per entry via the entry descriptor `html` option.
|
|
19078
|
+
*/
|
|
19079
|
+
html?: boolean | OutputHtmlOptions;
|
|
19080
|
+
|
|
18129
19081
|
/**
|
|
18130
19082
|
* Specifies the filename template of non-initial output html files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
|
|
18131
19083
|
*/
|
|
@@ -18207,6 +19159,11 @@ declare interface OutputNormalized {
|
|
|
18207
19159
|
*/
|
|
18208
19160
|
strictModuleExceptionHandling?: boolean;
|
|
18209
19161
|
|
|
19162
|
+
/**
|
|
19163
|
+
* Emit a runtime check that throws a 'MODULE_NOT_FOUND' error when a required module id is missing from the bundle.
|
|
19164
|
+
*/
|
|
19165
|
+
strictModuleResolution?: boolean;
|
|
19166
|
+
|
|
18210
19167
|
/**
|
|
18211
19168
|
* Use a Trusted Types policy to create urls for chunks.
|
|
18212
19169
|
*/
|
|
@@ -18227,6 +19184,11 @@ declare interface OutputNormalized {
|
|
|
18227
19184
|
*/
|
|
18228
19185
|
webassemblyModuleFilename?: string;
|
|
18229
19186
|
|
|
19187
|
+
/**
|
|
19188
|
+
* Specifies the filename template of non-initial output worker's files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
|
|
19189
|
+
*/
|
|
19190
|
+
workerChunkFilename?: string | TemplatePathFn<PathDataChunk>;
|
|
19191
|
+
|
|
18230
19192
|
/**
|
|
18231
19193
|
* The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
|
|
18232
19194
|
*/
|
|
@@ -18263,6 +19225,9 @@ type OutputNormalizedWithDefaults = OutputNormalized & {
|
|
|
18263
19225
|
devtoolNamespace: string;
|
|
18264
19226
|
publicPath: NonNullable<undefined | string | TemplatePathFn<PathData>>;
|
|
18265
19227
|
workerPublicPath: string;
|
|
19228
|
+
workerChunkFilename: NonNullable<
|
|
19229
|
+
undefined | string | TemplatePathFn<PathDataChunk>
|
|
19230
|
+
>;
|
|
18266
19231
|
workerWasmLoading: NonNullable<undefined | string | false>;
|
|
18267
19232
|
workerChunkLoading: NonNullable<undefined | string | false>;
|
|
18268
19233
|
chunkFormat: NonNullable<undefined | string | false>;
|
|
@@ -18283,6 +19248,7 @@ type OutputNormalizedWithDefaults = OutputNormalized & {
|
|
|
18283
19248
|
compareBeforeEmit: NonNullable<undefined | boolean>;
|
|
18284
19249
|
strictModuleErrorHandling: NonNullable<undefined | boolean>;
|
|
18285
19250
|
strictModuleExceptionHandling: NonNullable<undefined | boolean>;
|
|
19251
|
+
strictModuleResolution: NonNullable<undefined | boolean>;
|
|
18286
19252
|
importFunctionName: string;
|
|
18287
19253
|
importMetaName: string;
|
|
18288
19254
|
environment: RecursiveNonNullable<Environment>;
|
|
@@ -18411,6 +19377,11 @@ declare interface ParserOptionsByModuleTypeKnown {
|
|
|
18411
19377
|
*/
|
|
18412
19378
|
"css/module"?: CssAutoOrModuleParserOptions;
|
|
18413
19379
|
|
|
19380
|
+
/**
|
|
19381
|
+
* Parser options for html modules.
|
|
19382
|
+
*/
|
|
19383
|
+
html?: HtmlParserOptions;
|
|
19384
|
+
|
|
18414
19385
|
/**
|
|
18415
19386
|
* Parser options for javascript modules.
|
|
18416
19387
|
*/
|
|
@@ -18470,7 +19441,22 @@ declare interface PathCacheFunctions {
|
|
|
18470
19441
|
declare interface PathData {
|
|
18471
19442
|
chunkGraph?: ChunkGraph;
|
|
18472
19443
|
hash?: string;
|
|
19444
|
+
|
|
19445
|
+
/**
|
|
19446
|
+
* untruncated compilation hash, for re-encoding `[fullhash:<digest>]`
|
|
19447
|
+
*/
|
|
19448
|
+
fullHash?: string;
|
|
19449
|
+
|
|
19450
|
+
/**
|
|
19451
|
+
* digest `fullHash` is encoded in (defaults to `hashDigest`)
|
|
19452
|
+
*/
|
|
19453
|
+
fullHashDigest?: string;
|
|
18473
19454
|
hashWithLength?: (length: number) => string;
|
|
19455
|
+
|
|
19456
|
+
/**
|
|
19457
|
+
* builds `[fullhash:<digest>]`/`[hash:<digest>]` in the runtime chunk-filename context, where it throws because a runtime `getFullHash()` expression cannot be re-encoded
|
|
19458
|
+
*/
|
|
19459
|
+
hashWithDigest?: (digest: string, length?: number) => string;
|
|
18474
19460
|
chunk?: Chunk | ChunkPathData;
|
|
18475
19461
|
module?: Module | ModulePathData;
|
|
18476
19462
|
runtime?: RuntimeSpec;
|
|
@@ -18479,10 +19465,31 @@ declare interface PathData {
|
|
|
18479
19465
|
query?: string;
|
|
18480
19466
|
contentHashType?: string;
|
|
18481
19467
|
contentHash?: string;
|
|
19468
|
+
|
|
19469
|
+
/**
|
|
19470
|
+
* untruncated module/asset content hash, for re-encoding `[contenthash:<digest>]` from full entropy
|
|
19471
|
+
*/
|
|
19472
|
+
contentHashFull?: string;
|
|
18482
19473
|
contentHashWithLength?: (length: number) => string;
|
|
19474
|
+
|
|
19475
|
+
/**
|
|
19476
|
+
* digest the stored hashes are encoded in (for `[hash:<digest>]`)
|
|
19477
|
+
*/
|
|
19478
|
+
hashDigest?: string;
|
|
19479
|
+
|
|
19480
|
+
/**
|
|
19481
|
+
* whether `optimization.realContentHash` recomputes content hashes (records an inline `[contenthash:<digest>]` so it re-encodes in that digest)
|
|
19482
|
+
*/
|
|
19483
|
+
realContentHash?: boolean;
|
|
19484
|
+
|
|
19485
|
+
/**
|
|
19486
|
+
* treat `[hash]` as `[fullhash]` rather than the module hash (CSS local idents)
|
|
19487
|
+
*/
|
|
19488
|
+
hashAsFullHash?: boolean;
|
|
18483
19489
|
noChunkHash?: boolean;
|
|
18484
19490
|
url?: string;
|
|
18485
19491
|
local?: string;
|
|
19492
|
+
uniqueName?: string;
|
|
18486
19493
|
prepareId?: (id: string | number) => string | number;
|
|
18487
19494
|
}
|
|
18488
19495
|
type PathDataChunk = PathData & { chunk: Chunk | ChunkPathData };
|
|
@@ -18493,7 +19500,7 @@ type PathDataModule = PathData & {
|
|
|
18493
19500
|
type PathLikeFs = string | Buffer | URL;
|
|
18494
19501
|
type PathLikeTypes = string | URL_url | Buffer;
|
|
18495
19502
|
type PathOrFileDescriptorFs = string | number | Buffer | URL;
|
|
18496
|
-
type PathOrFileDescriptorTypes = string | number |
|
|
19503
|
+
type PathOrFileDescriptorTypes = string | number | URL_url | Buffer;
|
|
18497
19504
|
type Pattern =
|
|
18498
19505
|
| Identifier
|
|
18499
19506
|
| MemberExpression
|
|
@@ -18541,6 +19548,11 @@ declare interface PitchLoaderDefinitionFunction<
|
|
|
18541
19548
|
data: object
|
|
18542
19549
|
): string | void | Buffer | Promise<string | Buffer>;
|
|
18543
19550
|
}
|
|
19551
|
+
|
|
19552
|
+
/**
|
|
19553
|
+
* Should be used only for "target === false" or
|
|
19554
|
+
* when you want to overwrite platform target properties
|
|
19555
|
+
*/
|
|
18544
19556
|
declare class PlatformPlugin {
|
|
18545
19557
|
/**
|
|
18546
19558
|
* Creates an instance of PlatformPlugin.
|
|
@@ -18578,6 +19590,16 @@ declare interface PlatformTargetProperties {
|
|
|
18578
19590
|
*/
|
|
18579
19591
|
node?: null | boolean;
|
|
18580
19592
|
|
|
19593
|
+
/**
|
|
19594
|
+
* deno platform, node built-in modules (via the `node:` specifier) and web APIs are available
|
|
19595
|
+
*/
|
|
19596
|
+
deno?: null | boolean;
|
|
19597
|
+
|
|
19598
|
+
/**
|
|
19599
|
+
* bun platform, bun and node built-in modules are available
|
|
19600
|
+
*/
|
|
19601
|
+
bun?: null | boolean;
|
|
19602
|
+
|
|
18581
19603
|
/**
|
|
18582
19604
|
* nwjs platform, require of legacy nw.gui is available
|
|
18583
19605
|
*/
|
|
@@ -18587,6 +19609,11 @@ declare interface PlatformTargetProperties {
|
|
|
18587
19609
|
* electron platform, require of some electron built-in modules is available
|
|
18588
19610
|
*/
|
|
18589
19611
|
electron?: null | boolean;
|
|
19612
|
+
|
|
19613
|
+
/**
|
|
19614
|
+
* universal ESM target spanning both web and node (target `"universal"` or `["web", "node"]`)
|
|
19615
|
+
*/
|
|
19616
|
+
universal?: null | boolean;
|
|
18590
19617
|
}
|
|
18591
19618
|
type Plugin =
|
|
18592
19619
|
| undefined
|
|
@@ -18606,10 +19633,6 @@ declare interface PnpApi {
|
|
|
18606
19633
|
options: { considerBuiltins: boolean }
|
|
18607
19634
|
) => null | string;
|
|
18608
19635
|
}
|
|
18609
|
-
declare interface Position {
|
|
18610
|
-
line: number;
|
|
18611
|
-
column: number;
|
|
18612
|
-
}
|
|
18613
19636
|
declare class PrefetchPlugin {
|
|
18614
19637
|
/**
|
|
18615
19638
|
* Creates an instance of PrefetchPlugin.
|
|
@@ -18669,6 +19692,7 @@ type ProblemType =
|
|
|
18669
19692
|
| "unknown-argument"
|
|
18670
19693
|
| "unexpected-non-array-in-path"
|
|
18671
19694
|
| "unexpected-non-object-in-path"
|
|
19695
|
+
| "prototype-pollution-in-path"
|
|
18672
19696
|
| "multiple-values-unexpected"
|
|
18673
19697
|
| "invalid-value";
|
|
18674
19698
|
declare interface ProcessAssetsAdditionalOptions {
|
|
@@ -18757,7 +19781,7 @@ declare class ProgressPlugin {
|
|
|
18757
19781
|
static createDefaultHandler: (
|
|
18758
19782
|
profile: undefined | null | boolean,
|
|
18759
19783
|
logger: WebpackLogger,
|
|
18760
|
-
progressBar
|
|
19784
|
+
progressBar?:
|
|
18761
19785
|
| false
|
|
18762
19786
|
| Required<{
|
|
18763
19787
|
/**
|
|
@@ -18908,6 +19932,9 @@ declare interface ProvidesConfig {
|
|
|
18908
19932
|
declare interface ProvidesObject {
|
|
18909
19933
|
[index: string]: string | ProvidesConfig;
|
|
18910
19934
|
}
|
|
19935
|
+
type PureCondition =
|
|
19936
|
+
| boolean
|
|
19937
|
+
| ((compilation: Compilation, module: Module) => boolean);
|
|
18911
19938
|
declare interface RawChunkGroupOptions {
|
|
18912
19939
|
preloadOrder?: number;
|
|
18913
19940
|
prefetchOrder?: number;
|
|
@@ -19762,6 +20789,11 @@ declare interface ReferencedExport {
|
|
|
19762
20789
|
* when false, referenced export can not be mangled, defaults to true
|
|
19763
20790
|
*/
|
|
19764
20791
|
canMangle?: boolean;
|
|
20792
|
+
|
|
20793
|
+
/**
|
|
20794
|
+
* when false, the referenced export can not be substituted with an inlined literal at this site, defaults to true
|
|
20795
|
+
*/
|
|
20796
|
+
canInline?: boolean;
|
|
19765
20797
|
}
|
|
19766
20798
|
type Remotes = (string | RemotesObject)[] | RemotesObject;
|
|
19767
20799
|
|
|
@@ -19967,6 +20999,11 @@ declare class Replacement {
|
|
|
19967
20999
|
declare interface RequestRecord {
|
|
19968
21000
|
[index: string]: string | string[];
|
|
19969
21001
|
}
|
|
21002
|
+
|
|
21003
|
+
/**
|
|
21004
|
+
* Shortens absolute or verbose request strings so diagnostics and stats output
|
|
21005
|
+
* can be rendered relative to a chosen base directory.
|
|
21006
|
+
*/
|
|
19970
21007
|
declare abstract class RequestShortener {
|
|
19971
21008
|
contextify: (value: string) => string;
|
|
19972
21009
|
|
|
@@ -20426,12 +21463,12 @@ declare interface ResolveOptionsResolverFactoryObject2 {
|
|
|
20426
21463
|
/**
|
|
20427
21464
|
* A list of module alias configurations or an object which maps key to value
|
|
20428
21465
|
*/
|
|
20429
|
-
alias?:
|
|
21466
|
+
alias?: UserAliasOptions | UserAliasOptionEntry[];
|
|
20430
21467
|
|
|
20431
21468
|
/**
|
|
20432
21469
|
* A list of module alias configurations or an object which maps key to value, applied only after modules option
|
|
20433
21470
|
*/
|
|
20434
|
-
fallback?:
|
|
21471
|
+
fallback?: UserAliasOptions | UserAliasOptionEntry[];
|
|
20435
21472
|
|
|
20436
21473
|
/**
|
|
20437
21474
|
* An object which maps extension to extension aliases
|
|
@@ -20509,9 +21546,9 @@ declare interface ResolveOptionsResolverFactoryObject2 {
|
|
|
20509
21546
|
resolver?: Resolver;
|
|
20510
21547
|
|
|
20511
21548
|
/**
|
|
20512
|
-
* A list of directories to resolve modules from, can be absolute path or
|
|
21549
|
+
* A list of directories to resolve modules from, can be absolute path, folder name, or a `file:` `URL` instance
|
|
20513
21550
|
*/
|
|
20514
|
-
modules?: string | string[];
|
|
21551
|
+
modules?: string | URL_url | (string | URL_url)[];
|
|
20515
21552
|
|
|
20516
21553
|
/**
|
|
20517
21554
|
* A list of main fields in description files
|
|
@@ -20538,9 +21575,9 @@ declare interface ResolveOptionsResolverFactoryObject2 {
|
|
|
20538
21575
|
pnpApi?: null | PnpApi;
|
|
20539
21576
|
|
|
20540
21577
|
/**
|
|
20541
|
-
* A list of root paths
|
|
21578
|
+
* A list of root paths, each an absolute path or a `file:` `URL` instance
|
|
20542
21579
|
*/
|
|
20543
|
-
roots?: string[];
|
|
21580
|
+
roots?: (string | URL_url)[];
|
|
20544
21581
|
|
|
20545
21582
|
/**
|
|
20546
21583
|
* The request is already fully specified and no extensions or directories are resolved for it
|
|
@@ -20553,9 +21590,9 @@ declare interface ResolveOptionsResolverFactoryObject2 {
|
|
|
20553
21590
|
resolveToContext?: boolean;
|
|
20554
21591
|
|
|
20555
21592
|
/**
|
|
20556
|
-
* A list of resolve restrictions
|
|
21593
|
+
* A list of resolve restrictions, each an absolute path, a `file:` `URL` instance, or a RegExp
|
|
20557
21594
|
*/
|
|
20558
|
-
restrictions?: (string | RegExp)[];
|
|
21595
|
+
restrictions?: (string | RegExp | URL_url)[];
|
|
20559
21596
|
|
|
20560
21597
|
/**
|
|
20561
21598
|
* Use only the sync constraints of the file system calls
|
|
@@ -20573,9 +21610,9 @@ declare interface ResolveOptionsResolverFactoryObject2 {
|
|
|
20573
21610
|
preferAbsolute?: boolean;
|
|
20574
21611
|
|
|
20575
21612
|
/**
|
|
20576
|
-
* TypeScript config file path or config object with configFile and references
|
|
21613
|
+
* TypeScript config file path (or `file:` `URL` instance) or config object with configFile and references
|
|
20577
21614
|
*/
|
|
20578
|
-
tsconfig?: string | boolean |
|
|
21615
|
+
tsconfig?: string | boolean | URL_url | UserTsconfigOptions;
|
|
20579
21616
|
}
|
|
20580
21617
|
type ResolveOptionsWithDependencyType = ResolveOptions & {
|
|
20581
21618
|
dependencyType?: string;
|
|
@@ -20634,30 +21671,30 @@ declare abstract class Resolver {
|
|
|
20634
21671
|
null | ResolveRequest
|
|
20635
21672
|
>;
|
|
20636
21673
|
resolveSync(
|
|
20637
|
-
|
|
20638
|
-
|
|
21674
|
+
parent: string | URL_url,
|
|
21675
|
+
specifier: string | URL_url,
|
|
20639
21676
|
resolveContext?: ResolveContext
|
|
20640
21677
|
): string | false;
|
|
20641
21678
|
resolveSync(
|
|
20642
21679
|
context: ContextTypes,
|
|
20643
|
-
|
|
20644
|
-
|
|
21680
|
+
parent: string | URL_url,
|
|
21681
|
+
specifier: string | URL_url,
|
|
20645
21682
|
resolveContext?: ResolveContext
|
|
20646
21683
|
): string | false;
|
|
20647
21684
|
resolvePromise(
|
|
20648
|
-
|
|
20649
|
-
|
|
21685
|
+
parent: string | URL_url,
|
|
21686
|
+
specifier: string | URL_url,
|
|
20650
21687
|
resolveContext?: ResolveContext
|
|
20651
21688
|
): Promise<string | false>;
|
|
20652
21689
|
resolvePromise(
|
|
20653
21690
|
context: ContextTypes,
|
|
20654
|
-
|
|
20655
|
-
|
|
21691
|
+
parent: string | URL_url,
|
|
21692
|
+
specifier: string | URL_url,
|
|
20656
21693
|
resolveContext?: ResolveContext
|
|
20657
21694
|
): Promise<string | false>;
|
|
20658
21695
|
resolve(
|
|
20659
|
-
|
|
20660
|
-
|
|
21696
|
+
parent: string | URL_url,
|
|
21697
|
+
specifier: string | URL_url,
|
|
20661
21698
|
callback: (
|
|
20662
21699
|
err: null | ErrorWithDetail,
|
|
20663
21700
|
res?: string | false,
|
|
@@ -20665,8 +21702,8 @@ declare abstract class Resolver {
|
|
|
20665
21702
|
) => void
|
|
20666
21703
|
): void;
|
|
20667
21704
|
resolve(
|
|
20668
|
-
|
|
20669
|
-
|
|
21705
|
+
parent: string | URL_url,
|
|
21706
|
+
specifier: string | URL_url,
|
|
20670
21707
|
resolveContext: ResolveContext,
|
|
20671
21708
|
callback: (
|
|
20672
21709
|
err: null | ErrorWithDetail,
|
|
@@ -20676,8 +21713,8 @@ declare abstract class Resolver {
|
|
|
20676
21713
|
): void;
|
|
20677
21714
|
resolve(
|
|
20678
21715
|
context: ContextTypes,
|
|
20679
|
-
|
|
20680
|
-
|
|
21716
|
+
parent: string | URL_url,
|
|
21717
|
+
specifier: string | URL_url,
|
|
20681
21718
|
callback: (
|
|
20682
21719
|
err: null | ErrorWithDetail,
|
|
20683
21720
|
res?: string | false,
|
|
@@ -20686,8 +21723,8 @@ declare abstract class Resolver {
|
|
|
20686
21723
|
): void;
|
|
20687
21724
|
resolve(
|
|
20688
21725
|
context: ContextTypes,
|
|
20689
|
-
|
|
20690
|
-
|
|
21726
|
+
parent: string | URL_url,
|
|
21727
|
+
specifier: string | URL_url,
|
|
20691
21728
|
resolveContext: ResolveContext,
|
|
20692
21729
|
callback: (
|
|
20693
21730
|
err: null | ErrorWithDetail,
|
|
@@ -20786,13 +21823,15 @@ declare abstract class RestoreProvidedData {
|
|
|
20786
21823
|
/**
|
|
20787
21824
|
* Serializes this instance into the provided serializer context.
|
|
20788
21825
|
*/
|
|
20789
|
-
serialize(
|
|
21826
|
+
serialize(context: ObjectSerializerContextObjectMiddlewareObject_1): void;
|
|
20790
21827
|
}
|
|
20791
21828
|
declare interface RestoreProvidedDataExports {
|
|
20792
21829
|
name: string;
|
|
20793
21830
|
provided?: null | boolean;
|
|
20794
21831
|
canMangleProvide?: boolean;
|
|
21832
|
+
canInlineProvide?: InlinedValue;
|
|
20795
21833
|
terminalBinding: boolean;
|
|
21834
|
+
pureProvide?: boolean;
|
|
20796
21835
|
exportsInfo?: RestoreProvidedData;
|
|
20797
21836
|
}
|
|
20798
21837
|
type Rule = string | RegExp | ((str: string) => boolean);
|
|
@@ -21324,6 +22363,10 @@ declare interface RuntimeRequirementsContext {
|
|
|
21324
22363
|
codeGenerationResults: CodeGenerationResults;
|
|
21325
22364
|
}
|
|
21326
22365
|
type RuntimeSpec = undefined | string | SortableSet<string>;
|
|
22366
|
+
|
|
22367
|
+
/**
|
|
22368
|
+
* Represents RuntimeSpecMap.
|
|
22369
|
+
*/
|
|
21327
22370
|
declare class RuntimeSpecMap<T, R = T> {
|
|
21328
22371
|
/**
|
|
21329
22372
|
* Creates an instance of RuntimeSpecMap.
|
|
@@ -21398,11 +22441,35 @@ declare abstract class RuntimeTemplate {
|
|
|
21398
22441
|
isIIFE(): boolean;
|
|
21399
22442
|
isModule(): boolean;
|
|
21400
22443
|
isNeutralPlatform(): boolean;
|
|
22444
|
+
|
|
22445
|
+
/**
|
|
22446
|
+
* Whether the bundle targets node and web at once (universal `["node", "web"]` + `output.module`), like `isUniversalTarget` in `WebpackOptionsApply`.
|
|
22447
|
+
*/
|
|
22448
|
+
isUniversalTarget(): boolean;
|
|
22449
|
+
|
|
22450
|
+
/**
|
|
22451
|
+
* Runtime expression that is truthy in browser-like environments (a DOM
|
|
22452
|
+
* `document` or a worker `self`) and falsy in Node.js. Single source of
|
|
22453
|
+
* truth for branching a universal ("node-or-web") target at runtime.
|
|
22454
|
+
*/
|
|
22455
|
+
isWebLikePlatformExpression(): string;
|
|
22456
|
+
|
|
22457
|
+
/**
|
|
22458
|
+
* Expression for the global registry that collects CSS server-side when there
|
|
22459
|
+
* is no DOM (SSR). An SSR host reads it from `globalThis`; it is keyed by the
|
|
22460
|
+
* style/chunk identifier and namespaced by `output.uniqueName`.
|
|
22461
|
+
*/
|
|
22462
|
+
cssServerStyleRegistry(): string;
|
|
21401
22463
|
supportsConst(): boolean;
|
|
22464
|
+
supportsLet(): boolean;
|
|
21402
22465
|
supportsMethodShorthand(): boolean;
|
|
22466
|
+
supportsLogicalAssignment(): boolean;
|
|
21403
22467
|
supportsArrowFunction(): boolean;
|
|
21404
22468
|
supportsAsyncFunction(): boolean;
|
|
21405
22469
|
supportsOptionalChaining(): boolean;
|
|
22470
|
+
supportsSpread(): boolean;
|
|
22471
|
+
supportsObjectHasOwn(): boolean;
|
|
22472
|
+
supportsSymbol(): boolean;
|
|
21406
22473
|
supportsForOf(): boolean;
|
|
21407
22474
|
supportsDestructuring(): boolean;
|
|
21408
22475
|
supportsBigIntLiteral(): boolean;
|
|
@@ -21417,9 +22484,14 @@ declare abstract class RuntimeTemplate {
|
|
|
21417
22484
|
renderNodePrefixForCoreModule(mod: string): string;
|
|
21418
22485
|
|
|
21419
22486
|
/**
|
|
21420
|
-
* Renders return const when it is supported, otherwise var.
|
|
22487
|
+
* Renders return const when it is supported, otherwise let when supported, otherwise var.
|
|
22488
|
+
*/
|
|
22489
|
+
renderConst(): "var" | "const" | "let";
|
|
22490
|
+
|
|
22491
|
+
/**
|
|
22492
|
+
* Renders return let when it is supported, otherwise var.
|
|
21421
22493
|
*/
|
|
21422
|
-
|
|
22494
|
+
renderLet(): "var" | "let";
|
|
21423
22495
|
|
|
21424
22496
|
/**
|
|
21425
22497
|
* Returning function.
|
|
@@ -21446,6 +22518,40 @@ declare abstract class RuntimeTemplate {
|
|
|
21446
22518
|
*/
|
|
21447
22519
|
emptyFunction(): string;
|
|
21448
22520
|
|
|
22521
|
+
/**
|
|
22522
|
+
* Guards an access/call on `object` with optional chaining when supported,
|
|
22523
|
+
* otherwise an equivalent `&&` short-circuit. `object` is evaluated twice in
|
|
22524
|
+
* the fallback, so it must be side-effect free.
|
|
22525
|
+
*/
|
|
22526
|
+
optionalChaining(object: string, access: string): string;
|
|
22527
|
+
|
|
22528
|
+
/**
|
|
22529
|
+
* Reads a node builtin via `process.getBuiltinModule()`, guarded to stay falsy off node so universal `["node", "web"]` bundles don't crash (also falsy on node <22.3).
|
|
22530
|
+
*/
|
|
22531
|
+
getBuiltinModule(request: string, access?: string): string;
|
|
22532
|
+
|
|
22533
|
+
/**
|
|
22534
|
+
* Renders an object-literal method, using method shorthand when supported
|
|
22535
|
+
* and falling back to a `prop: function/arrow` property otherwise.
|
|
22536
|
+
*/
|
|
22537
|
+
method(prop: string, args: string, body: string | string[]): string;
|
|
22538
|
+
|
|
22539
|
+
/**
|
|
22540
|
+
* Returns an own-property check, using `Object.hasOwn` when supported and
|
|
22541
|
+
* falling back to `Object.prototype.hasOwnProperty.call` otherwise.
|
|
22542
|
+
*/
|
|
22543
|
+
objectHasOwn(object: string, property: string): string;
|
|
22544
|
+
|
|
22545
|
+
/**
|
|
22546
|
+
* Returns a self-defaulting assignment, using the `||=` logical assignment
|
|
22547
|
+
* operator when supported and falling back to `target = target || value`
|
|
22548
|
+
* otherwise. `target` is evaluated twice in the fallback, so it must be
|
|
22549
|
+
* side-effect free. The expression evaluates to the resulting value.
|
|
22550
|
+
* Models `||` only, so `target` must never hold a legitimate falsy value
|
|
22551
|
+
* (`0`, `""`, `false`) — it would be overwritten; use it for object/array defaults.
|
|
22552
|
+
*/
|
|
22553
|
+
assignOr(target: string, value: string): string;
|
|
22554
|
+
|
|
21449
22555
|
/**
|
|
21450
22556
|
* Returns destructure array code.
|
|
21451
22557
|
*/
|
|
@@ -21846,6 +22952,10 @@ declare abstract class RuntimeTemplate {
|
|
|
21846
22952
|
* module dependency
|
|
21847
22953
|
*/
|
|
21848
22954
|
dependency: ModuleDependency;
|
|
22955
|
+
/**
|
|
22956
|
+
* true, when a whole-namespace value may use a decoupled namespace object that keeps the original export names
|
|
22957
|
+
*/
|
|
22958
|
+
mangleableNamespace?: boolean;
|
|
21849
22959
|
}): string;
|
|
21850
22960
|
|
|
21851
22961
|
/**
|
|
@@ -22000,6 +23110,10 @@ declare interface ScopeInfo {
|
|
|
22000
23110
|
declare interface Selector<A, B> {
|
|
22001
23111
|
(input: A): undefined | null | B;
|
|
22002
23112
|
}
|
|
23113
|
+
|
|
23114
|
+
/**
|
|
23115
|
+
* Represents Serializer.
|
|
23116
|
+
*/
|
|
22003
23117
|
declare abstract class Serializer<DeserializedValue, SerializedValue, Context> {
|
|
22004
23118
|
serializeMiddlewares: SerializerMiddleware<any, any, any>[];
|
|
22005
23119
|
deserializeMiddlewares: SerializerMiddleware<any, any, any>[];
|
|
@@ -22021,6 +23135,10 @@ declare abstract class Serializer<DeserializedValue, SerializedValue, Context> {
|
|
|
22021
23135
|
context: Context & ExtendedContext
|
|
22022
23136
|
): Promise<DeserializedValue>;
|
|
22023
23137
|
}
|
|
23138
|
+
|
|
23139
|
+
/**
|
|
23140
|
+
* Represents SerializerMiddleware.
|
|
23141
|
+
*/
|
|
22024
23142
|
declare abstract class SerializerMiddleware<
|
|
22025
23143
|
DeserializedType,
|
|
22026
23144
|
SerializedType,
|
|
@@ -22268,12 +23386,12 @@ declare abstract class Snapshot {
|
|
|
22268
23386
|
/**
|
|
22269
23387
|
* Serializes this instance into the provided serializer context.
|
|
22270
23388
|
*/
|
|
22271
|
-
serialize(__0:
|
|
23389
|
+
serialize(__0: ObjectSerializerContextObjectMiddlewareObject_5): void;
|
|
22272
23390
|
|
|
22273
23391
|
/**
|
|
22274
23392
|
* Restores this instance from the provided deserializer context.
|
|
22275
23393
|
*/
|
|
22276
|
-
deserialize(__0:
|
|
23394
|
+
deserialize(__0: ObjectDeserializerContextObjectMiddlewareObject_4): void;
|
|
22277
23395
|
|
|
22278
23396
|
/**
|
|
22279
23397
|
* Gets file iterable.
|
|
@@ -22439,6 +23557,10 @@ declare interface SnapshotOptionsWebpackOptions {
|
|
|
22439
23557
|
declare interface SortFunction<T> {
|
|
22440
23558
|
(a: T, b: T): number;
|
|
22441
23559
|
}
|
|
23560
|
+
|
|
23561
|
+
/**
|
|
23562
|
+
* A subset of Set that offers sorting functionality
|
|
23563
|
+
*/
|
|
22442
23564
|
declare abstract class SortableSet<T> extends Set<T> {
|
|
22443
23565
|
/**
|
|
22444
23566
|
* Sort with a comparer function
|
|
@@ -22470,6 +23592,19 @@ declare class Source {
|
|
|
22470
23592
|
map(options?: MapOptions): null | RawSourceMap;
|
|
22471
23593
|
sourceAndMap(options?: MapOptions): SourceAndMap;
|
|
22472
23594
|
updateHash(hash: HashLike): void;
|
|
23595
|
+
|
|
23596
|
+
/**
|
|
23597
|
+
* Release cached data held by this source. clearCache is a memory
|
|
23598
|
+
* hint: it never affects correctness or output, only how expensive
|
|
23599
|
+
* the next read is. Subclasses override; the base is a no-op so
|
|
23600
|
+
* every Source supports the call. Composite sources always recurse
|
|
23601
|
+
* into wrapped sources. When the same child is reachable via several
|
|
23602
|
+
* parents (e.g. modules shared across webpack chunks), pass a shared
|
|
23603
|
+
* `visited` WeakSet so each subtree is walked at most once.
|
|
23604
|
+
* Not safe to call concurrently with source/map/sourceAndMap/
|
|
23605
|
+
* streamChunks/updateHash on the same instance.
|
|
23606
|
+
*/
|
|
23607
|
+
clearCache(options?: ClearCacheOptions, visited?: WeakSet<Source>): void;
|
|
22473
23608
|
}
|
|
22474
23609
|
declare interface SourceAndMap {
|
|
22475
23610
|
/**
|
|
@@ -22482,6 +23617,11 @@ declare interface SourceAndMap {
|
|
|
22482
23617
|
*/
|
|
22483
23618
|
map: null | RawSourceMap;
|
|
22484
23619
|
}
|
|
23620
|
+
declare interface SourceItem {
|
|
23621
|
+
type: SourceTypeOrResolver;
|
|
23622
|
+
filter?: (attributes: Map<string, string>, value: string) => boolean;
|
|
23623
|
+
namespace?: number;
|
|
23624
|
+
}
|
|
22485
23625
|
declare interface SourceLike {
|
|
22486
23626
|
/**
|
|
22487
23627
|
* source
|
|
@@ -22517,6 +23657,11 @@ declare interface SourceLike {
|
|
|
22517
23657
|
* hash updater
|
|
22518
23658
|
*/
|
|
22519
23659
|
updateHash?: (hash: HashLike) => void;
|
|
23660
|
+
|
|
23661
|
+
/**
|
|
23662
|
+
* clear cache
|
|
23663
|
+
*/
|
|
23664
|
+
clearCache?: (options?: ClearCacheOptions, visited?: WeakSet<Source>) => void;
|
|
22520
23665
|
}
|
|
22521
23666
|
declare class SourceMapDevToolPlugin {
|
|
22522
23667
|
/**
|
|
@@ -22660,6 +23805,31 @@ declare interface SourcePosition {
|
|
|
22660
23805
|
line: number;
|
|
22661
23806
|
column?: number;
|
|
22662
23807
|
}
|
|
23808
|
+
type SourceType =
|
|
23809
|
+
| "script"
|
|
23810
|
+
| "css-url"
|
|
23811
|
+
| "stylesheet"
|
|
23812
|
+
| "script-module"
|
|
23813
|
+
| "modulepreload"
|
|
23814
|
+
| "src"
|
|
23815
|
+
| "srcset"
|
|
23816
|
+
| "stylesheet-style"
|
|
23817
|
+
| "stylesheet-style-attribute"
|
|
23818
|
+
| "srcdoc"
|
|
23819
|
+
| "msapplication-task";
|
|
23820
|
+
type SourceTypeOrResolver =
|
|
23821
|
+
| "script"
|
|
23822
|
+
| "css-url"
|
|
23823
|
+
| "stylesheet"
|
|
23824
|
+
| "script-module"
|
|
23825
|
+
| "modulepreload"
|
|
23826
|
+
| "src"
|
|
23827
|
+
| "srcset"
|
|
23828
|
+
| "stylesheet-style"
|
|
23829
|
+
| "stylesheet-style-attribute"
|
|
23830
|
+
| "srcdoc"
|
|
23831
|
+
| "msapplication-task"
|
|
23832
|
+
| ((attrs: Map<string, string>, css: boolean) => SourceType);
|
|
22663
23833
|
type SourceValue = string | Buffer;
|
|
22664
23834
|
declare interface SplitChunksOptions {
|
|
22665
23835
|
chunksFilter: (chunk: Chunk) => undefined | boolean;
|
|
@@ -22707,6 +23877,15 @@ declare interface SplitData {
|
|
|
22707
23877
|
modules: string[];
|
|
22708
23878
|
size: number;
|
|
22709
23879
|
}
|
|
23880
|
+
|
|
23881
|
+
/**
|
|
23882
|
+
* Singly-linked stack entry that also exposes a Set-like API
|
|
23883
|
+
* (`has`, `size`, iteration). Each `doResolve` call prepends a new
|
|
23884
|
+
* `StackEntry` that points at the previous tip via `.parent`, so pushing
|
|
23885
|
+
* is O(1) in time and memory. Recursion detection walks the linked list
|
|
23886
|
+
* (O(n)) but the stack is typically shallow, so this is cheaper overall
|
|
23887
|
+
* than cloning a `Set` per call.
|
|
23888
|
+
*/
|
|
22710
23889
|
declare abstract class StackEntry {
|
|
22711
23890
|
name?: string;
|
|
22712
23891
|
path: string | false;
|
|
@@ -22752,7 +23931,27 @@ declare abstract class StackEntry {
|
|
|
22752
23931
|
* at the formatted form.
|
|
22753
23932
|
*/
|
|
22754
23933
|
toString(): string;
|
|
23934
|
+
|
|
23935
|
+
/**
|
|
23936
|
+
* Iterate entries from oldest (root) to newest (tip), matching how a
|
|
23937
|
+
* `Set` that was populated in insertion order would iterate. Pre-seeded
|
|
23938
|
+
* legacy `Set<string>` entries come first so error-message output stays
|
|
23939
|
+
* ordered oldest-to-newest.
|
|
23940
|
+
* Yields each entry as its formatted `toString()` form. Plugins written
|
|
23941
|
+
* against the pre-5.21 `Set<string>` shape — e.g.
|
|
23942
|
+
* `[...resolveContext.stack].find(a => a.includes("module:"))` — keep
|
|
23943
|
+
* working unchanged because each yielded value is a plain string with
|
|
23944
|
+
* all of `String.prototype` available natively. Resolves that never
|
|
23945
|
+
* iterate the stack pay nothing; iteration costs one `toString()`
|
|
23946
|
+
* allocation per stack frame.
|
|
23947
|
+
*/
|
|
23948
|
+
[Symbol.iterator](): IterableIterator<string>;
|
|
22755
23949
|
}
|
|
23950
|
+
|
|
23951
|
+
/**
|
|
23952
|
+
* Layered map that supports child scopes while memoizing lookups from parent
|
|
23953
|
+
* scopes into the current layer.
|
|
23954
|
+
*/
|
|
22756
23955
|
declare abstract class StackedMap<K, V> {
|
|
22757
23956
|
map: Map<K, InternalCell<V>>;
|
|
22758
23957
|
stack: Map<K, InternalCell<V>>[];
|
|
@@ -22812,6 +24011,32 @@ declare abstract class StackedMap<K, V> {
|
|
|
22812
24011
|
*/
|
|
22813
24012
|
createChild(): StackedMap<K, V>;
|
|
22814
24013
|
}
|
|
24014
|
+
|
|
24015
|
+
/**
|
|
24016
|
+
* Updates set size using the provided set.
|
|
24017
|
+
*/
|
|
24018
|
+
declare interface StarListDeserializerContext {
|
|
24019
|
+
read: () => HarmonyExportImportedSpecifierDependency[];
|
|
24020
|
+
rest: ObjectDeserializerContextObjectMiddlewareObject_3<[]>;
|
|
24021
|
+
setCircularReference: (value: ReferenceableItem) => void;
|
|
24022
|
+
}
|
|
24023
|
+
|
|
24024
|
+
/**
|
|
24025
|
+
* Updates set size using the provided set.
|
|
24026
|
+
*/
|
|
24027
|
+
declare interface StarListSerializerContext {
|
|
24028
|
+
write: (
|
|
24029
|
+
value: HarmonyExportImportedSpecifierDependency[]
|
|
24030
|
+
) => ObjectSerializerContextObjectMiddlewareObject_4<[]>;
|
|
24031
|
+
setCircularReference: (value: ReferenceableItem) => void;
|
|
24032
|
+
snapshot: () => ObjectSerializerSnapshot;
|
|
24033
|
+
rollback: (snapshot: ObjectSerializerSnapshot) => void;
|
|
24034
|
+
writeLazy?: (item?: any) => void;
|
|
24035
|
+
writeSeparate?: (
|
|
24036
|
+
item: any,
|
|
24037
|
+
obj?: LazyOptions
|
|
24038
|
+
) => LazyFunction<any, any, any, LazyOptions>;
|
|
24039
|
+
}
|
|
22815
24040
|
declare interface StartupRenderContext {
|
|
22816
24041
|
/**
|
|
22817
24042
|
* the chunk
|
|
@@ -23768,6 +24993,9 @@ declare interface SyncModuleIdsPluginOptions {
|
|
|
23768
24993
|
*/
|
|
23769
24994
|
mode?: "read" | "create" | "merge" | "update";
|
|
23770
24995
|
}
|
|
24996
|
+
type SyncWasmModuleBuildMeta = KnownBuildMeta &
|
|
24997
|
+
Record<string, any> &
|
|
24998
|
+
KnownSyncWasmModuleBuildMeta;
|
|
23771
24999
|
declare interface SyntheticDependencyLocation {
|
|
23772
25000
|
name: string;
|
|
23773
25001
|
index?: number;
|
|
@@ -23782,10 +25010,12 @@ declare interface TagInfo {
|
|
|
23782
25010
|
| HarmonySettings
|
|
23783
25011
|
| ImportSettings
|
|
23784
25012
|
| CommonJsImportSettings
|
|
23785
|
-
| CompatibilitySettings
|
|
23786
|
-
| HarmonySpecifierGuards;
|
|
25013
|
+
| CompatibilitySettings;
|
|
23787
25014
|
next?: TagInfo;
|
|
23788
25015
|
}
|
|
25016
|
+
type Tail<T extends ReadonlyArray<any>> = T extends readonly [any, ...infer R]
|
|
25017
|
+
? R
|
|
25018
|
+
: T;
|
|
23789
25019
|
declare interface TargetItemWithConnection {
|
|
23790
25020
|
module: Module;
|
|
23791
25021
|
connection: ModuleGraphConnection;
|
|
@@ -23897,8 +25127,19 @@ declare class TopLevelSymbol {
|
|
|
23897
25127
|
/**
|
|
23898
25128
|
* Creates an instance of TopLevelSymbol.
|
|
23899
25129
|
*/
|
|
23900
|
-
constructor(
|
|
25130
|
+
constructor(
|
|
25131
|
+
name: string,
|
|
25132
|
+
pure?: boolean | ((compilation: Compilation, module: Module) => boolean)
|
|
25133
|
+
);
|
|
23901
25134
|
name: string;
|
|
25135
|
+
conditional: boolean;
|
|
25136
|
+
pureFn?: (compilation: Compilation, module: Module) => boolean;
|
|
25137
|
+
|
|
25138
|
+
/**
|
|
25139
|
+
* Sets the pure condition
|
|
25140
|
+
*/
|
|
25141
|
+
setPure(pure: PureCondition): void;
|
|
25142
|
+
isPure(compilation: Compilation, module: Module): boolean;
|
|
23902
25143
|
}
|
|
23903
25144
|
|
|
23904
25145
|
/**
|
|
@@ -23935,7 +25176,7 @@ declare interface TsconfigPathsData {
|
|
|
23935
25176
|
/**
|
|
23936
25177
|
* tsconfig file data
|
|
23937
25178
|
*/
|
|
23938
|
-
alias:
|
|
25179
|
+
alias: CompiledAliasOptions;
|
|
23939
25180
|
|
|
23940
25181
|
/**
|
|
23941
25182
|
* tsconfig file data
|
|
@@ -23992,7 +25233,36 @@ declare interface UpdateHashContextGenerator {
|
|
|
23992
25233
|
}
|
|
23993
25234
|
type Usage = string | true | TopLevelSymbol;
|
|
23994
25235
|
type UsageStateType = 0 | 1 | 2 | 3 | 4;
|
|
23995
|
-
type UsedName = string | false | string[];
|
|
25236
|
+
type UsedName = string | false | string[] | InlinedUsedName;
|
|
25237
|
+
declare interface UserAliasOptionEntry {
|
|
25238
|
+
alias: UserAliasOptionNewRequest;
|
|
25239
|
+
name: string;
|
|
25240
|
+
onlyModule?: boolean;
|
|
25241
|
+
}
|
|
25242
|
+
type UserAliasOptionNewRequest =
|
|
25243
|
+
| string
|
|
25244
|
+
| false
|
|
25245
|
+
| URL_url
|
|
25246
|
+
| (string | URL_url)[];
|
|
25247
|
+
declare interface UserAliasOptions {
|
|
25248
|
+
[index: string]: UserAliasOptionNewRequest;
|
|
25249
|
+
}
|
|
25250
|
+
declare interface UserTsconfigOptions {
|
|
25251
|
+
/**
|
|
25252
|
+
* A path, or `file:` `URL` instance, pointing at the tsconfig file
|
|
25253
|
+
*/
|
|
25254
|
+
configFile?: string | URL_url;
|
|
25255
|
+
|
|
25256
|
+
/**
|
|
25257
|
+
* References to other tsconfig files. 'auto' inherits from TypeScript config, or an array of relative/absolute paths or `file:` `URL` instances
|
|
25258
|
+
*/
|
|
25259
|
+
references?: "auto" | (string | URL_url)[];
|
|
25260
|
+
|
|
25261
|
+
/**
|
|
25262
|
+
* Override baseUrl from tsconfig.json with a path or `file:` `URL` instance
|
|
25263
|
+
*/
|
|
25264
|
+
baseUrl?: string | URL_url;
|
|
25265
|
+
}
|
|
23996
25266
|
type Value = string | number | boolean | RegExp;
|
|
23997
25267
|
type ValueCacheVersion = string | Set<string>;
|
|
23998
25268
|
declare interface Values {
|
|
@@ -24332,6 +25602,11 @@ declare abstract class Watching {
|
|
|
24332
25602
|
*/
|
|
24333
25603
|
close(callback: (err: null | Error, result?: void) => void): void;
|
|
24334
25604
|
}
|
|
25605
|
+
|
|
25606
|
+
/**
|
|
25607
|
+
* Stores values by tuple keys while using `WeakMap` for object elements so the
|
|
25608
|
+
* cache can release entries when those objects are collected.
|
|
25609
|
+
*/
|
|
24335
25610
|
declare abstract class WeakTupleMap<K extends any[], V> {
|
|
24336
25611
|
/**
|
|
24337
25612
|
* Stores a value at the node identified by the provided tuple key.
|
|
@@ -24354,6 +25629,19 @@ declare abstract class WeakTupleMap<K extends any[], V> {
|
|
|
24354
25629
|
*/
|
|
24355
25630
|
provide(...args: [K, ...((...args: K) => V)[]]): V;
|
|
24356
25631
|
|
|
25632
|
+
/**
|
|
25633
|
+
* Memoizes `compute(thisArg, ...args)` under the tuple key `[compute,
|
|
25634
|
+
* ...args]`, computing it on a miss. Equivalent to `provide(compute, ...args,
|
|
25635
|
+
* () => compute(thisArg, ...args))` but without allocating that closure (or an
|
|
25636
|
+
* extra rest array) on every call — `ModuleGraph#cached` runs this on hot
|
|
25637
|
+
* paths where most calls hit the cache and the closure would be pure waste.
|
|
25638
|
+
*/
|
|
25639
|
+
cachedProvide(
|
|
25640
|
+
compute: (thisArg: any, ...args: K) => V,
|
|
25641
|
+
thisArg: any,
|
|
25642
|
+
args: K
|
|
25643
|
+
): V;
|
|
25644
|
+
|
|
24357
25645
|
/**
|
|
24358
25646
|
* Removes the value stored for the tuple key without pruning the trie.
|
|
24359
25647
|
*/
|
|
@@ -24420,12 +25708,12 @@ declare class WebpackError extends Error {
|
|
|
24420
25708
|
/**
|
|
24421
25709
|
* Serializes this instance into the provided serializer context.
|
|
24422
25710
|
*/
|
|
24423
|
-
serialize(__0:
|
|
25711
|
+
serialize(__0: ObjectSerializerContextObjectMiddlewareObject_5): void;
|
|
24424
25712
|
|
|
24425
25713
|
/**
|
|
24426
25714
|
* Restores this instance from the provided deserializer context.
|
|
24427
25715
|
*/
|
|
24428
|
-
deserialize(__0:
|
|
25716
|
+
deserialize(__0: ObjectDeserializerContextObjectMiddlewareObject_4): void;
|
|
24429
25717
|
|
|
24430
25718
|
/**
|
|
24431
25719
|
* Creates a `.stack` property on `targetObject`, which when accessed returns
|
|
@@ -25019,6 +26307,7 @@ declare function exports(
|
|
|
25019
26307
|
declare function exports(options: MultiConfiguration): MultiCompiler;
|
|
25020
26308
|
declare namespace exports {
|
|
25021
26309
|
export const webpack: _functionWebpack;
|
|
26310
|
+
export const defineConfig: <T extends DefineConfigInput>(config: T) => T;
|
|
25022
26311
|
export const validate: (
|
|
25023
26312
|
configuration: Configuration | MultiConfiguration
|
|
25024
26313
|
) => void;
|
|
@@ -25212,6 +26501,7 @@ declare namespace exports {
|
|
|
25212
26501
|
export let toBinary: "__webpack_require__.tb";
|
|
25213
26502
|
export let uncaughtErrorHandler: "__webpack_require__.oe";
|
|
25214
26503
|
export let wasmInstances: "__webpack_require__.w";
|
|
26504
|
+
export let worker: "__webpack_require__.wc";
|
|
25215
26505
|
}
|
|
25216
26506
|
export const UsageState: Readonly<{
|
|
25217
26507
|
Unused: 0;
|
|
@@ -25262,21 +26552,8 @@ declare namespace exports {
|
|
|
25262
26552
|
}
|
|
25263
26553
|
export namespace optimize {
|
|
25264
26554
|
export namespace InnerGraph {
|
|
25265
|
-
export let addUsage: (
|
|
25266
|
-
state: ParserState,
|
|
25267
|
-
symbol: null | TopLevelSymbol,
|
|
25268
|
-
usage: Usage
|
|
25269
|
-
) => void;
|
|
25270
|
-
export let addVariableUsage: (
|
|
25271
|
-
parser: JavascriptParser,
|
|
25272
|
-
name: string,
|
|
25273
|
-
usage: Usage
|
|
25274
|
-
) => void;
|
|
25275
|
-
export let bailout: (parserState: ParserState) => void;
|
|
25276
|
-
export let enable: (parserState: ParserState) => void;
|
|
25277
26555
|
export let getDependencyUsedByExportsCondition: (
|
|
25278
26556
|
dependency: Dependency,
|
|
25279
|
-
usedByExports: undefined | boolean | Set<string>,
|
|
25280
26557
|
moduleGraph: ModuleGraph
|
|
25281
26558
|
) =>
|
|
25282
26559
|
| null
|
|
@@ -25285,29 +26562,9 @@ declare namespace exports {
|
|
|
25285
26562
|
moduleGraphConnection: ModuleGraphConnection,
|
|
25286
26563
|
runtime: RuntimeSpec
|
|
25287
26564
|
) => ConnectionState);
|
|
25288
|
-
export let
|
|
25289
|
-
|
|
25290
|
-
) =>
|
|
25291
|
-
export let inferDependencyUsage: (state: ParserState) => void;
|
|
25292
|
-
export let isDependencyUsedByExports: (
|
|
25293
|
-
dependency: Dependency,
|
|
25294
|
-
usedByExports: undefined | boolean | Set<string>,
|
|
25295
|
-
moduleGraph: ModuleGraph,
|
|
25296
|
-
runtime: RuntimeSpec
|
|
25297
|
-
) => boolean;
|
|
25298
|
-
export let isEnabled: (parserState: ParserState) => boolean;
|
|
25299
|
-
export let onUsage: (
|
|
25300
|
-
state: ParserState,
|
|
25301
|
-
onUsageCallback: (value?: boolean | Set<string>) => void
|
|
25302
|
-
) => void;
|
|
25303
|
-
export let setTopLevelSymbol: (
|
|
25304
|
-
state: ParserState,
|
|
25305
|
-
symbol?: TopLevelSymbol
|
|
25306
|
-
) => void;
|
|
25307
|
-
export let tagTopLevelSymbol: (
|
|
25308
|
-
parser: JavascriptParser,
|
|
25309
|
-
name: string
|
|
25310
|
-
) => undefined | TopLevelSymbol;
|
|
26565
|
+
export let getInnerGraphUtils: (
|
|
26566
|
+
compilation: Compilation
|
|
26567
|
+
) => InnerGraphUtils;
|
|
25311
26568
|
export { TopLevelSymbol, topLevelSymbolTag };
|
|
25312
26569
|
}
|
|
25313
26570
|
export {
|
|
@@ -25651,6 +26908,14 @@ declare namespace exports {
|
|
|
25651
26908
|
export type ExternalItemFunctionPromise = (
|
|
25652
26909
|
data: ExternalItemFunctionData
|
|
25653
26910
|
) => Promise<ExternalItemValue>;
|
|
26911
|
+
export type ConfigurationFactory = (
|
|
26912
|
+
env: Record<string, any>,
|
|
26913
|
+
argv: Record<string, any>
|
|
26914
|
+
) => MaybePromise<Configuration | MultiConfiguration>;
|
|
26915
|
+
export type ObjectSerializerContext =
|
|
26916
|
+
typeof ObjectSerializerContextObjectMiddlewareObject_3;
|
|
26917
|
+
export type ObjectDeserializerContext =
|
|
26918
|
+
typeof ObjectDeserializerContextObjectMiddlewareObject_2;
|
|
25654
26919
|
export {
|
|
25655
26920
|
AutomaticPrefetchPlugin,
|
|
25656
26921
|
AsyncDependenciesBlock,
|
|
@@ -25738,8 +27003,22 @@ declare namespace exports {
|
|
|
25738
27003
|
Configuration,
|
|
25739
27004
|
WebpackOptionsNormalized,
|
|
25740
27005
|
WebpackPluginInstance,
|
|
27006
|
+
AssetModuleBuildInfo,
|
|
25741
27007
|
ChunkGroup,
|
|
25742
27008
|
AssetEmittedInfo,
|
|
27009
|
+
ContextModuleBuildInfo,
|
|
27010
|
+
CssModuleBuildInfo,
|
|
27011
|
+
CssModuleBuildMeta,
|
|
27012
|
+
ExternalModuleBuildInfo,
|
|
27013
|
+
HtmlModuleBuildInfo,
|
|
27014
|
+
JavascriptModuleBuildInfo,
|
|
27015
|
+
JavascriptModuleBuildMeta,
|
|
27016
|
+
JsonModuleBuildInfo,
|
|
27017
|
+
BuildInfo,
|
|
27018
|
+
BuildMeta,
|
|
27019
|
+
NormalModuleBuildInfo,
|
|
27020
|
+
ConcatenatedModuleBuildInfo,
|
|
27021
|
+
SyncWasmModuleBuildMeta,
|
|
25743
27022
|
Asset,
|
|
25744
27023
|
AssetInfo,
|
|
25745
27024
|
EntryOptions,
|
|
@@ -25765,6 +27044,7 @@ declare namespace exports {
|
|
|
25765
27044
|
Problem,
|
|
25766
27045
|
Colors,
|
|
25767
27046
|
ColorsOptions,
|
|
27047
|
+
DefineConfigInput,
|
|
25768
27048
|
StatsAsset,
|
|
25769
27049
|
StatsChunk,
|
|
25770
27050
|
StatsChunkGroup,
|
|
@@ -25779,8 +27059,6 @@ declare namespace exports {
|
|
|
25779
27059
|
StatsModuleTraceDependency,
|
|
25780
27060
|
StatsModuleTraceItem,
|
|
25781
27061
|
StatsProfile,
|
|
25782
|
-
ObjectSerializerContext,
|
|
25783
|
-
ObjectDeserializerContext,
|
|
25784
27062
|
InputFileSystem,
|
|
25785
27063
|
OutputFileSystem,
|
|
25786
27064
|
LoaderModule,
|