@depup/webpack 5.109.2-depup.0 → 5.110.3-depup.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/changes.json +7 -7
- package/lib/APIPlugin.js +123 -17
- package/lib/AsyncDependenciesBlock.js +10 -7
- package/lib/AutomaticPrefetchPlugin.js +1 -1
- package/lib/BannerPlugin.js +10 -6
- package/lib/CacheFacade.js +6 -6
- package/lib/Chunk.js +14 -11
- package/lib/ChunkGraph.js +46 -35
- package/lib/ChunkGroup.js +7 -7
- package/lib/ChunkTemplate.js +35 -44
- package/lib/CircularModulesPlugin.js +205 -28
- package/lib/CleanPlugin.js +4 -7
- package/lib/CodeGenerationResults.js +11 -8
- package/lib/CompatibilityPlugin.js +7 -7
- package/lib/Compilation.js +688 -409
- package/lib/Compiler.js +53 -38
- package/lib/ConcatenationScope.js +107 -8
- package/lib/ConditionalInitFragment.js +3 -3
- package/lib/ConstPlugin.js +13 -11
- package/lib/ContextExclusionPlugin.js +1 -1
- package/lib/ContextModule.js +146 -54
- package/lib/ContextModuleFactory.js +46 -14
- package/lib/ContextReplacementPlugin.js +12 -14
- package/lib/DefinePlugin.js +121 -37
- package/lib/DependenciesBlock.js +9 -6
- package/lib/Dependency.js +36 -16
- package/lib/DependencyTemplate.js +11 -12
- package/lib/DependencyTemplates.js +3 -3
- package/lib/DotenvPlugin.js +91 -26
- package/lib/DynamicEntryPlugin.js +8 -4
- package/lib/EntryOptionPlugin.js +8 -4
- package/lib/EntryPlugin.js +2 -2
- package/lib/Entrypoint.js +6 -2
- package/lib/EnvironmentPlugin.js +2 -2
- package/lib/EvalDevToolModulePlugin.js +8 -4
- package/lib/EvalSourceMapDevToolPlugin.js +15 -8
- package/lib/ExportsInfo.js +111 -14
- package/lib/ExportsInfoApiPlugin.js +2 -4
- package/lib/ExternalModule.js +232 -77
- package/lib/ExternalModuleFactoryPlugin.js +97 -38
- package/lib/ExternalsPlugin.js +10 -6
- package/lib/FileSystemInfo.js +44 -70
- package/lib/FlagAllModulesAsUsedPlugin.js +2 -3
- package/lib/FlagDependencyExportsPlugin.js +76 -19
- package/lib/FlagDependencyUsagePlugin.js +40 -49
- package/lib/FlagEntryExportAsUsedPlugin.js +1 -1
- package/lib/Generator.js +36 -15
- package/lib/HotModuleReplacementPlugin.js +16 -44
- package/lib/IgnorePlugin.js +8 -4
- package/lib/IgnoreWarningsPlugin.js +2 -2
- package/lib/InitFragment.js +8 -4
- package/lib/JavascriptMetaInfoPlugin.js +35 -4
- package/lib/LazyBarrel.js +3 -4
- package/lib/LibraryTemplatePlugin.js +10 -6
- package/lib/LoaderOptionsPlugin.js +7 -3
- package/lib/LoaderTargetPlugin.js +1 -1
- package/lib/MainTemplate.js +49 -42
- package/lib/ManifestPlugin.js +12 -11
- package/lib/Module.js +62 -33
- package/lib/ModuleFactory.js +3 -3
- package/lib/ModuleFilenameHelpers.js +9 -4
- package/lib/ModuleGraph.js +195 -21
- package/lib/ModuleGraphConnection.js +6 -13
- package/lib/ModuleInfoHeaderPlugin.js +8 -10
- package/lib/ModuleTemplate.js +62 -63
- package/lib/MultiCompiler.js +130 -64
- package/lib/MultiStats.js +40 -9
- package/lib/MultiWatching.js +3 -3
- package/lib/NoEmitOnErrorsPlugin.js +1 -1
- package/lib/NodeStuffPlugin.js +29 -19
- package/lib/NormalModule.js +152 -103
- package/lib/NormalModuleFactory.js +555 -110
- package/lib/NormalModuleReplacementPlugin.js +5 -8
- package/lib/NullFactory.js +6 -2
- package/lib/OptionsApply.js +7 -3
- package/lib/Parser.js +7 -3
- package/lib/PlatformPlugin.js +2 -2
- package/lib/PrefetchPlugin.js +1 -1
- package/lib/ProgressPlugin.js +16 -13
- package/lib/ProvidePlugin.js +3 -5
- package/lib/RawModule.js +25 -17
- package/lib/RecordIdsPlugin.js +3 -3
- package/lib/RequestShortener.js +1 -1
- package/lib/ResolverFactory.js +2 -2
- package/lib/RuntimeGlobals.js +22 -10
- package/lib/RuntimeModule.js +29 -19
- package/lib/RuntimePlugin.js +335 -169
- package/lib/RuntimeTemplate.js +2761 -316
- package/lib/SelfModuleFactory.js +7 -3
- package/lib/SourceMapDevToolModuleOptionsPlugin.js +6 -2
- package/lib/SourceMapDevToolPlugin.js +30 -20
- package/lib/Stats.js +3 -4
- package/lib/Template.js +32 -22
- package/lib/TemplatedPathPlugin.js +96 -14
- package/lib/UseStrictPlugin.js +4 -6
- package/lib/WarnCaseSensitiveModulesPlugin.js +4 -4
- package/lib/WarnDeprecatedOptionPlugin.js +1 -1
- package/lib/WarnNoModeSetPlugin.js +1 -1
- package/lib/WatchIgnorePlugin.js +8 -6
- package/lib/Watching.js +8 -8
- package/lib/WebpackIsIncludedPlugin.js +2 -4
- package/lib/WebpackOptionsApply.js +308 -18
- package/lib/WebpackOptionsDefaulter.js +6 -2
- package/lib/asset/AssetBytesGenerator.js +12 -10
- package/lib/asset/AssetBytesParser.js +2 -4
- package/lib/asset/AssetGenerator.js +188 -95
- package/lib/asset/AssetModule.js +7 -3
- package/lib/asset/AssetModulesPlugin.js +110 -38
- package/lib/asset/AssetParser.js +9 -7
- package/lib/asset/AssetSourceGenerator.js +60 -13
- package/lib/asset/AssetSourceParser.js +2 -4
- package/lib/asset/RawDataUrlModule.js +24 -16
- package/lib/asset/WebManifestGenerator.js +8 -10
- package/lib/asset/WebManifestParser.js +24 -10
- package/lib/async-modules/AsyncModuleHelpers.js +12 -6
- package/lib/async-modules/AwaitDependenciesInitFragment.js +2 -2
- package/lib/async-modules/InferAsyncModulesPlugin.js +2 -2
- package/lib/async-modules/isGeneratorLowered.js +4 -4
- package/lib/buildChunkGraph.js +36 -27
- package/lib/bun/BunTargetPlugin.js +1 -1
- package/lib/cache/AddBuildDependenciesPlugin.js +1 -1
- package/lib/cache/AddManagedPathsPlugin.js +1 -1
- package/lib/cache/IdleFileCachePlugin.js +2 -2
- package/lib/cache/MemoryCachePlugin.js +18 -10
- package/lib/cache/MemoryWithGcCachePlugin.js +34 -22
- package/lib/cache/PackFileCacheStrategy.js +30 -23
- package/lib/cache/ResolverCachePlugin.js +38 -18
- package/lib/cache/getLazyHashedEtag.js +1 -2
- package/lib/cache/mergeEtags.js +1 -1
- package/lib/cli.js +1 -3
- package/lib/config/browserslistTargetHandler.js +41 -5
- package/lib/config/defaults.js +270 -78
- package/lib/config/defineConfig.js +10 -2
- package/lib/config/getClaimedAssetTypes.js +65 -0
- package/lib/config/normalization.js +46 -16
- package/lib/config/target.js +46 -3
- package/lib/container/ContainerEntryDependency.js +1 -1
- package/lib/container/ContainerEntryModule.js +24 -15
- package/lib/container/ContainerEntryModuleFactory.js +7 -3
- package/lib/container/ContainerPlugin.js +9 -10
- package/lib/container/ContainerReferencePlugin.js +6 -2
- package/lib/container/FallbackDependency.js +1 -1
- package/lib/container/FallbackModule.js +24 -17
- package/lib/container/FallbackModuleFactory.js +7 -3
- package/lib/container/HoistContainerReferencesPlugin.js +6 -11
- package/lib/container/ModuleFederationPlugin.js +7 -24
- package/lib/container/RemoteModule.js +27 -19
- package/lib/container/RemoteRuntimeModule.js +10 -8
- package/lib/container/moduleFederationHooks.js +32 -0
- package/lib/css/CssGenerator.js +171 -43
- package/lib/css/CssInjectStyleRuntimeModule.js +7 -5
- package/lib/css/CssLoadingRuntimeModule.js +84 -32
- package/lib/css/CssModule.js +10 -7
- package/lib/css/CssModulesPlugin.js +172 -100
- package/lib/css/CssParser.js +1113 -568
- package/lib/css/CssServerStylesRuntimeModule.js +54 -0
- package/lib/css/cssMinify.js +168 -0
- package/lib/css/data.js +5334 -0
- package/lib/css/syntax.js +9647 -232
- package/lib/debug/ProfilingPlugin.js +14 -9
- package/lib/deno/DenoTargetPlugin.js +1 -1
- package/lib/dependencies/AMDDefineDependency.js +112 -87
- package/lib/dependencies/AMDDefineDependencyParserPlugin.js +30 -17
- package/lib/dependencies/AMDPlugin.js +9 -7
- package/lib/dependencies/AMDRequireArrayDependency.js +5 -5
- package/lib/dependencies/AMDRequireContextDependency.js +2 -2
- package/lib/dependencies/AMDRequireDependenciesBlock.js +1 -1
- package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +25 -14
- package/lib/dependencies/AMDRequireDependency.js +8 -7
- package/lib/dependencies/AMDRequireItemDependency.js +1 -1
- package/lib/dependencies/AMDRuntimeModules.js +21 -1
- package/lib/dependencies/BuildTimeConstDependency.js +102 -0
- package/lib/dependencies/CachedConstDependency.js +11 -8
- package/lib/dependencies/CommonJsDependencyHelpers.js +67 -46
- package/lib/dependencies/CommonJsExportRequireDependency.js +121 -45
- package/lib/dependencies/CommonJsExportsDependency.js +53 -49
- package/lib/dependencies/CommonJsExportsParserPlugin.js +207 -25
- package/lib/dependencies/CommonJsFullRequireDependency.js +119 -34
- package/lib/dependencies/CommonJsImportsParserPlugin.js +100 -50
- package/lib/dependencies/CommonJsObjectExportDependency.js +188 -0
- package/lib/dependencies/CommonJsPlugin.js +35 -6
- package/lib/dependencies/CommonJsRequireContextDependency.js +5 -6
- package/lib/dependencies/CommonJsRequireDependency.js +170 -27
- package/lib/dependencies/CommonJsSelfReferenceDependency.js +63 -38
- package/lib/dependencies/ConstDependency.js +8 -9
- package/lib/dependencies/ContextDependency.js +12 -8
- package/lib/dependencies/ContextDependencyHelpers.js +14 -9
- package/lib/dependencies/ContextDependencyTemplateAsId.js +4 -4
- package/lib/dependencies/ContextDependencyTemplateAsRequireCall.js +24 -11
- package/lib/dependencies/ContextElementDependency.js +31 -12
- package/lib/dependencies/CreateRequireParserPlugin.js +12 -7
- package/lib/dependencies/CreateScriptUrlDependency.js +4 -4
- package/lib/dependencies/CssIcssExportDependency.js +56 -28
- package/lib/dependencies/CssIcssImportDependency.js +17 -13
- package/lib/dependencies/CssIcssSymbolDependency.js +9 -10
- package/lib/dependencies/CssImportDependency.js +18 -9
- package/lib/dependencies/CssUrlDependency.js +17 -13
- package/lib/dependencies/DllEntryDependency.js +1 -1
- package/lib/dependencies/DynamicExports.js +2 -2
- package/lib/dependencies/ExportBindingInitFragment.js +36 -9
- package/lib/dependencies/ExportsInfoDependency.js +7 -8
- package/lib/dependencies/ExternalModuleDependency.js +9 -5
- package/lib/dependencies/ExternalModuleInitFragment.js +2 -2
- package/lib/dependencies/ExternalModuleInitFragmentDependency.js +8 -5
- package/lib/dependencies/HarmonyAcceptDependency.js +5 -5
- package/lib/dependencies/HarmonyCompatibilityDependency.js +52 -17
- package/lib/dependencies/HarmonyDetectionParserPlugin.js +11 -7
- package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +23 -14
- package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +80 -12
- package/lib/dependencies/HarmonyExportExpressionDependency.js +23 -18
- package/lib/dependencies/HarmonyExportHeaderDependency.js +7 -7
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +286 -80
- package/lib/dependencies/HarmonyExportInitFragment.js +18 -6
- package/lib/dependencies/HarmonyExportSpecifierDependency.js +51 -14
- package/lib/dependencies/HarmonyExports.js +7 -4
- package/lib/dependencies/HarmonyImportDependency.js +121 -60
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +124 -38
- package/lib/dependencies/HarmonyImportGuard.js +20 -30
- package/lib/dependencies/HarmonyImportSideEffectDependency.js +152 -9
- package/lib/dependencies/HarmonyImportSpecifierDependency.js +97 -49
- package/lib/dependencies/HarmonyModulesPlugin.js +7 -3
- package/lib/dependencies/HarmonyTopLevelThisParserPlugin.js +1 -3
- package/lib/dependencies/HtmlEntryDependency.js +49 -31
- package/lib/dependencies/HtmlInlineHtmlDependency.js +7 -8
- package/lib/dependencies/HtmlInlineScriptDependency.js +11 -8
- package/lib/dependencies/HtmlInlineStyleDependency.js +7 -10
- package/lib/dependencies/HtmlSourceDependency.js +22 -14
- package/lib/dependencies/ImportContextDependency.js +45 -5
- package/lib/dependencies/ImportDependency.js +33 -50
- package/lib/dependencies/ImportEagerDependency.js +6 -9
- package/lib/dependencies/ImportMetaContextDependency.js +2 -2
- package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +14 -13
- package/lib/dependencies/ImportMetaContextPlugin.js +7 -3
- package/lib/dependencies/ImportMetaGlobDependency.js +2 -2
- package/lib/dependencies/ImportMetaGlobDependencyParserPlugin.js +2 -3
- package/lib/dependencies/ImportMetaGlobHelpers.js +19 -22
- package/lib/dependencies/ImportMetaHotAcceptDependency.js +1 -1
- package/lib/dependencies/ImportMetaHotDeclineDependency.js +1 -1
- package/lib/dependencies/ImportMetaPlugin.js +154 -71
- package/lib/dependencies/ImportMetaResolveDependency.js +3 -4
- package/lib/dependencies/ImportParserPlugin.js +73 -49
- package/lib/dependencies/ImportPhase.js +12 -5
- package/lib/dependencies/ImportPlugin.js +7 -3
- package/lib/dependencies/ImportWeakDependency.js +6 -9
- package/lib/dependencies/JsonExportsDependency.js +11 -7
- package/lib/dependencies/LoaderDependency.js +2 -2
- package/lib/dependencies/LoaderImportDependency.js +2 -2
- package/lib/dependencies/LoaderPlugin.js +11 -7
- package/lib/dependencies/LocalModuleDependency.js +5 -5
- package/lib/dependencies/LocalModulesHelpers.js +1 -1
- package/lib/dependencies/ModuleDecoratorDependency.js +6 -7
- package/lib/dependencies/ModuleDependency.js +9 -6
- package/lib/dependencies/ModuleDependencyTemplateAsId.js +4 -4
- package/lib/dependencies/ModuleDependencyTemplateAsRequireId.js +3 -3
- package/lib/dependencies/ModuleHotAcceptDependency.js +1 -1
- package/lib/dependencies/ModuleHotDeclineDependency.js +1 -1
- package/lib/dependencies/ModuleInitFragmentDependency.js +24 -10
- package/lib/dependencies/NullDependency.js +3 -3
- package/lib/dependencies/ProvidedDependency.js +14 -10
- package/lib/dependencies/PureExpressionDependency.js +9 -10
- package/lib/dependencies/RequireContextDependency.js +2 -2
- package/lib/dependencies/RequireContextDependencyParserPlugin.js +2 -4
- package/lib/dependencies/RequireContextPlugin.js +8 -4
- package/lib/dependencies/RequireEnsureDependenciesBlock.js +2 -2
- package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +5 -8
- package/lib/dependencies/RequireEnsureDependency.js +8 -7
- package/lib/dependencies/RequireEnsurePlugin.js +7 -3
- package/lib/dependencies/RequireHeaderDependency.js +50 -12
- package/lib/dependencies/RequireIncludeDependency.js +6 -6
- package/lib/dependencies/RequireIncludeDependencyParserPlugin.js +2 -3
- package/lib/dependencies/RequireIncludePlugin.js +7 -3
- package/lib/dependencies/RequireJsStuffPlugin.js +7 -3
- package/lib/dependencies/RequireResolveContextDependency.js +2 -2
- package/lib/dependencies/RequireResolveDependency.js +4 -4
- package/lib/dependencies/RequireResolveHeaderDependency.js +4 -4
- package/lib/dependencies/RuntimeRequirementsDependency.js +5 -6
- package/lib/dependencies/StaticExportsDependency.js +2 -2
- package/lib/dependencies/SystemPlugin.js +10 -6
- package/lib/dependencies/SystemRuntimeModule.js +10 -0
- package/lib/dependencies/TopLevelAwaitDependency.js +11 -7
- package/lib/dependencies/URLContextDependency.js +2 -2
- package/lib/dependencies/URLDependency.js +110 -64
- package/lib/dependencies/URLPlugin.js +7 -3
- package/lib/dependencies/UnsupportedDependency.js +4 -4
- package/lib/dependencies/WebAssemblyExportImportedDependency.js +3 -4
- package/lib/dependencies/WebAssemblyImportDependency.js +5 -5
- package/lib/dependencies/WebpackIsIncludedDependency.js +6 -6
- package/lib/dependencies/WorkerAndWorkletPlugin.js +47 -28
- package/lib/dependencies/WorkerDependency.js +22 -22
- package/lib/dependencies/WorkletDependency.js +18 -21
- package/lib/dependencies/getFunctionExpression.js +8 -4
- package/lib/dependencies/importOptionsCheck.js +47 -0
- package/lib/dependencies/processExportInfo.js +5 -5
- package/lib/dll/DelegatedModule.js +34 -22
- package/lib/dll/DelegatedModuleFactoryPlugin.js +15 -7
- package/lib/dll/DelegatedPlugin.js +2 -2
- package/lib/dll/DllEntryPlugin.js +2 -2
- package/lib/dll/DllModule.js +22 -15
- package/lib/dll/DllModuleFactory.js +7 -3
- package/lib/dll/DllPlugin.js +7 -5
- package/lib/dll/DllReferencePlugin.js +10 -7
- package/lib/dll/LibManifestPlugin.js +5 -5
- package/lib/electron/ElectronTargetPlugin.js +53 -49
- package/lib/errors/AsyncChunkWaterfallWarning.js +36 -0
- package/lib/errors/AsyncDependencyToInitialChunkError.js +2 -2
- package/lib/errors/BroadContextsWarning.js +43 -0
- package/lib/errors/BuildCycleError.js +1 -1
- package/lib/errors/CacheEffectivenessWarning.js +55 -0
- package/lib/errors/ChunkRenderError.js +1 -1
- package/lib/errors/CircularDependenciesWarning.js +38 -0
- package/lib/errors/CodeGenerationError.js +1 -1
- package/lib/errors/CommentCompilationWarning.js +1 -1
- package/lib/errors/ConflictingResourceHintsWarning.js +35 -0
- package/lib/errors/DotenvFileError.js +29 -0
- package/lib/errors/DuplicateModulesWarning.js +45 -0
- package/lib/errors/DynamicExportsWarning.js +30 -0
- package/lib/errors/EmbeddedSourceMapsWarning.js +25 -0
- package/lib/errors/EntrypointOverlapWarning.js +45 -0
- package/lib/errors/EnvironmentNotSupportAsyncWarning.js +2 -2
- package/lib/errors/EvalUsageWarning.js +28 -0
- package/lib/errors/HookWebpackError.js +5 -5
- package/lib/errors/HotspotsWarning.js +57 -0
- package/lib/errors/IgnoreErrorModuleFactory.js +7 -3
- package/lib/errors/ImportedBindingAssignmentError.js +30 -0
- package/lib/errors/InlinedAssetsWarning.js +36 -0
- package/lib/errors/InvalidDependenciesModuleWarning.js +1 -1
- package/lib/errors/LargeModulesWarning.js +45 -0
- package/lib/errors/LegacyJavascriptWarning.js +48 -0
- package/lib/errors/MissingSideEffectsWarning.js +36 -0
- package/lib/errors/MixedExportsWarning.js +41 -0
- package/lib/errors/ModuleDependencyError.js +13 -16
- package/lib/errors/ModuleDependencyWarning.js +5 -15
- package/lib/errors/ModuleHashingError.js +1 -1
- package/lib/errors/ModuleNotFoundError.js +2 -2
- package/lib/errors/ModuleParseError.js +1 -2
- package/lib/errors/ModuleRestoreError.js +1 -1
- package/lib/errors/ModuleStoreError.js +1 -1
- package/lib/errors/NodeStuffInWebError.js +1 -1
- package/lib/errors/OsDependentRuleWarning.js +31 -0
- package/lib/errors/PureAnnotationsWarning.js +36 -0
- package/lib/errors/RedundantDynamicImportWarning.js +31 -0
- package/lib/errors/ScopeHoistingBailoutsWarning.js +41 -0
- package/lib/errors/SplitChunksCappedWarning.js +41 -0
- package/lib/errors/TinyChunksWarning.js +40 -0
- package/lib/errors/TopLevelThisWarning.js +34 -0
- package/lib/errors/UnsplitVendorsWarning.js +42 -0
- package/lib/errors/UnsupportedFeatureWarning.js +1 -1
- package/lib/errors/UnusedAliasesWarning.js +29 -0
- package/lib/errors/UnusedDefinesWarning.js +29 -0
- package/lib/errors/UnusedExternalsWarning.js +29 -0
- package/lib/errors/UnusedReexportsWarning.js +42 -0
- package/lib/errors/UnusedRuleWarning.js +29 -0
- package/lib/errors/WebpackError.js +9 -5
- package/lib/errors/deriveStackFromNestedError.js +90 -0
- package/lib/esm/ExportWebpackRequireRuntimeModule.js +2 -0
- package/lib/esm/ModuleChunkFormatPlugin.js +37 -19
- package/lib/esm/ModuleChunkLoadingPlugin.js +86 -51
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +161 -62
- package/lib/hmr/HotModuleReplacement.runtime.js +24 -5
- package/lib/hmr/HotModuleReplacementRuntimeModule.js +1 -1
- package/lib/hmr/LazyCompilationPlugin.js +45 -24
- package/lib/hmr/lazyCompilationBackend.js +9 -6
- package/lib/hmr/parserHooks.js +56 -0
- package/lib/html/HtmlGenerator.js +277 -77
- package/lib/html/HtmlModule.js +7 -3
- package/lib/html/HtmlModulesPlugin.js +366 -200
- package/lib/html/HtmlParser.js +31 -86
- package/lib/html/data.js +1928 -0
- package/lib/html/htmlMinify.js +288 -0
- package/lib/html/syntax.js +6034 -1384
- package/lib/ids/ChunkModuleIdRangePlugin.js +3 -3
- package/lib/ids/DeterministicChunkIdsPlugin.js +1 -1
- package/lib/ids/DeterministicModuleIdsPlugin.js +2 -2
- package/lib/ids/HashedModuleIdsPlugin.js +6 -2
- package/lib/ids/IdHelpers.js +7 -8
- package/lib/ids/NamedChunkIdsPlugin.js +1 -1
- package/lib/ids/NamedModuleIdsPlugin.js +1 -1
- package/lib/ids/NaturalChunkIdsPlugin.js +2 -2
- package/lib/ids/NaturalModuleIdsPlugin.js +1 -1
- package/lib/ids/OccurrenceChunkIdsPlugin.js +7 -3
- package/lib/ids/OccurrenceModuleIdsPlugin.js +7 -3
- package/lib/ids/SyncModuleIdsPlugin.js +4 -4
- package/lib/index.js +10 -0
- package/lib/javascript/ArrayPushCallbackChunkFormatPlugin.js +3 -3
- package/lib/javascript/BasicEvaluatedExpression.js +18 -14
- package/lib/javascript/ChunkFormatHelpers.js +6 -6
- package/lib/javascript/ChunkHelpers.js +1 -1
- package/lib/javascript/CommonJsChunkFormatPlugin.js +11 -5
- package/lib/javascript/EnableChunkLoadingPlugin.js +2 -2
- package/lib/javascript/JavascriptGenerator.js +65 -165
- package/lib/javascript/JavascriptModule.js +9 -3
- package/lib/javascript/JavascriptModulesPlugin.js +103 -123
- package/lib/javascript/JavascriptParser.js +242 -99
- package/lib/javascript/JavascriptParserHelpers.js +10 -7
- package/lib/javascript/ScopeAnalyzer.js +1094 -0
- package/lib/javascript/StartupHelpers.js +55 -9
- package/lib/javascript/syntax.js +2678 -232
- package/lib/json/JsonData.js +8 -4
- package/lib/json/JsonGenerator.js +38 -16
- package/lib/json/JsonModule.js +7 -3
- package/lib/json/JsonModulesPlugin.js +1 -1
- package/lib/json/JsonParser.js +5 -6
- package/lib/library/AbstractLibraryPlugin.js +20 -14
- package/lib/library/AmdLibraryPlugin.js +11 -7
- package/lib/library/AssignLibraryPlugin.js +19 -13
- package/lib/library/EnableLibraryPlugin.js +2 -2
- package/lib/library/ExportPropertyLibraryPlugin.js +15 -8
- package/lib/library/JsonpLibraryPlugin.js +11 -7
- package/lib/library/ModuleLibraryPlugin.js +256 -64
- package/lib/library/SystemLibraryPlugin.js +12 -8
- package/lib/library/UmdLibraryPlugin.js +62 -25
- package/lib/loaders/LoaderRunner.js +47 -6
- package/lib/loaders/loadLoader.js +8 -4
- package/lib/logging/createConsoleLogger.js +7 -4
- package/lib/node/CommonJsChunkLoadingPlugin.js +36 -22
- package/lib/node/NodeEnvironmentPlugin.js +17 -3
- package/lib/node/NodeSourcePlugin.js +1 -1
- package/lib/node/NodeTargetPlugin.js +4 -3
- package/lib/node/NodeTemplatePlugin.js +1 -1
- package/lib/node/NodeWatchFileSystem.js +70 -9
- package/lib/node/ReadFileChunkLoadingRuntimeModule.js +35 -38
- package/lib/node/ReadFileCompileAsyncWasmPlugin.js +65 -19
- package/lib/node/ReadFileCompileWasmPlugin.js +28 -16
- package/lib/node/RequireChunkLoadingRuntimeModule.js +35 -38
- package/lib/node/nodeConsole.js +7 -3
- package/lib/optimize/AggressiveMergingPlugin.js +2 -2
- package/lib/optimize/AggressiveSplittingPlugin.js +9 -6
- package/lib/optimize/ConcatenatedModule.js +1030 -476
- package/lib/optimize/ConstExportsPlugin.js +16 -7
- package/lib/optimize/EnsureChunkConditionsPlugin.js +3 -3
- package/lib/optimize/FlagIncludedChunksPlugin.js +3 -4
- package/lib/optimize/InlineExports.js +130 -5
- package/lib/optimize/InnerGraph.js +28 -12
- package/lib/optimize/InnerGraphPlugin.js +23 -18
- package/lib/optimize/LimitChunkCountPlugin.js +7 -3
- package/lib/optimize/MangleExportsPlugin.js +7 -8
- package/lib/optimize/MergeDuplicateChunksPlugin.js +7 -3
- package/lib/optimize/MinChunkSizePlugin.js +7 -3
- package/lib/optimize/ModuleConcatenationPlugin.js +51 -35
- package/lib/optimize/RealContentHashPlugin.js +121 -41
- package/lib/optimize/RemoveEmptyChunksPlugin.js +2 -2
- package/lib/optimize/RemoveParentModulesPlugin.js +4 -4
- package/lib/optimize/RuntimeChunkPlugin.js +2 -2
- package/lib/optimize/SideEffectsFlagPlugin.js +262 -39
- package/lib/optimize/SplitChunksPlugin.js +86 -24
- package/lib/performance/AssetsOverSizeLimitWarning.js +10 -2
- package/lib/performance/AsyncChunkWaterfallsPlugin.js +136 -0
- package/lib/performance/BroadContextsPlugin.js +142 -0
- package/lib/performance/CacheEffectivenessPlugin.js +125 -0
- package/lib/performance/ConflictingResourceHintsPlugin.js +99 -0
- package/lib/performance/DuplicateModulesPlugin.js +93 -0
- package/lib/performance/DuplicatePackagesPlugin.js +119 -0
- package/lib/performance/DuplicatePackagesWarning.js +84 -0
- package/lib/performance/DynamicExportsPlugin.js +120 -0
- package/lib/performance/EmbeddedSourceMapsPlugin.js +71 -0
- package/lib/performance/EntrypointOverlapPlugin.js +122 -0
- package/lib/performance/EntrypointsOverSizeLimitWarning.js +1 -1
- package/lib/performance/EvalUsagePlugin.js +115 -0
- package/lib/performance/HotspotsPlugin.js +296 -0
- package/lib/performance/InlinedAssetsPlugin.js +99 -0
- package/lib/performance/LargeModulesPlugin.js +126 -0
- package/lib/performance/LegacyJavascriptPlugin.js +139 -0
- package/lib/performance/MissingSideEffectsPlugin.js +138 -0
- package/lib/performance/MixedExportsPlugin.js +136 -0
- package/lib/performance/OsDependentRuleWarningPlugin.js +178 -0
- package/lib/performance/PureAnnotationsPlugin.js +219 -0
- package/lib/performance/RedundantDynamicImportsPlugin.js +225 -0
- package/lib/performance/RuntimeInLargeChunkWarning.js +27 -0
- package/lib/performance/ScopeHoistingBailoutsPlugin.js +164 -0
- package/lib/performance/SizeLimitsPlugin.js +139 -7
- package/lib/performance/SplitChunksCappedPlugin.js +99 -0
- package/lib/performance/TinyChunksPlugin.js +128 -0
- package/lib/performance/TopLevelThisPlugin.js +208 -0
- package/lib/performance/UnsplitVendorsPlugin.js +112 -0
- package/lib/performance/UnusedAliasesPlugin.js +253 -0
- package/lib/performance/UnusedDefinesPlugin.js +87 -0
- package/lib/performance/UnusedExternalsPlugin.js +110 -0
- package/lib/performance/UnusedReexportsPlugin.js +159 -0
- package/lib/performance/UnusedRuleWarningPlugin.js +105 -0
- package/lib/performance/getModuleSize.js +22 -0
- package/lib/performance/getSourceModules.js +22 -0
- package/lib/performance/hasOnlyUnusedExports.js +40 -0
- package/lib/prefetch/ChunkPrefetchFunctionRuntimeModule.js +24 -10
- package/lib/prefetch/ChunkPrefetchPreloadPlugin.js +63 -46
- package/lib/prefetch/ChunkPrefetchStartupRuntimeModule.js +2 -3
- package/lib/prefetch/ChunkPrefetchTriggerRuntimeModule.js +2 -2
- package/lib/prefetch/ChunkPreloadTriggerRuntimeModule.js +2 -2
- package/lib/prefetch/ResourceHintPlugin.js +295 -79
- package/lib/prefetch/ResourceHintRuntimeModule.js +1 -21
- package/lib/prefetch/StartupAssetHintRuntimeModule.js +10 -133
- package/lib/prefetch/parseResourceHintOptions.js +31 -4
- package/lib/rules/BasicEffectRulePlugin.js +2 -2
- package/lib/rules/BasicMatcherRulePlugin.js +8 -4
- package/lib/rules/GlobMatcherRulePlugin.js +68 -0
- package/lib/rules/ObjectMatcherRulePlugin.js +12 -5
- package/lib/rules/RuleSetCompiler.js +146 -12
- package/lib/rules/UseEffectRulePlugin.js +18 -11
- package/lib/runtime/AsyncModuleGeneratorRuntimeModule.js +11 -1
- package/lib/runtime/AsyncModuleRuntimeModule.js +6 -2
- package/lib/runtime/AutoPublicPathRuntimeModule.js +15 -20
- package/lib/runtime/BaseUriRuntimeModule.js +33 -7
- package/lib/runtime/ChunkNameRuntimeModule.js +10 -0
- package/lib/runtime/CompatGetDefaultExportRuntimeModule.js +11 -1
- package/lib/runtime/CompatRuntimeModule.js +5 -3
- package/lib/runtime/ConcatenationWrapRuntimeModule.js +90 -0
- package/lib/runtime/ConstructRequireRuntimeModule.js +52 -0
- package/lib/runtime/CreateFakeNamespaceObjectRuntimeModule.js +8 -6
- package/lib/runtime/CreateScriptRuntimeModule.js +11 -1
- package/lib/runtime/CreateScriptUrlRuntimeModule.js +11 -1
- package/lib/runtime/DefinePropertyGettersRuntimeModule.js +56 -38
- package/lib/runtime/EnsureChunkRuntimeModule.js +18 -2
- package/lib/runtime/GetChunkFilenameRuntimeModule.js +62 -37
- package/lib/runtime/GetFullHashRuntimeModule.js +12 -2
- package/lib/runtime/GetMainFilenameRuntimeModule.js +12 -2
- package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +2 -2
- package/lib/runtime/GetWorkletBootstrapRuntimeModule.js +16 -3
- package/lib/runtime/GlobalRuntimeModule.js +18 -0
- package/lib/runtime/HasOwnPropertyRuntimeModule.js +12 -2
- package/lib/runtime/LoadScriptRuntimeModule.js +2 -2
- package/lib/runtime/MakeDeferredNamespaceObjectRuntime.js +34 -7
- package/lib/runtime/MakeNamespaceObjectRuntimeModule.js +22 -6
- package/lib/runtime/NonceRuntimeModule.js +10 -0
- package/lib/runtime/OnChunksLoadedRuntimeModule.js +5 -3
- package/lib/runtime/PublicPathRuntimeModule.js +12 -2
- package/lib/runtime/RelativeUrlRuntimeModule.js +11 -1
- package/lib/runtime/RuntimeIdRuntimeModule.js +12 -2
- package/lib/runtime/SetAnonymousDefaultNameRuntimeModule.js +11 -1
- package/lib/runtime/StartupChunkDependenciesPlugin.js +18 -9
- package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +3 -3
- package/lib/runtime/StartupEntrypointRuntimeModule.js +21 -4
- package/lib/runtime/SystemContextRuntimeModule.js +10 -0
- package/lib/runtime/ToBinaryRuntimeModule.js +1 -1
- package/lib/runtime/WorkerRuntimeModule.js +11 -1
- package/lib/runtime/baseUri.js +63 -0
- package/lib/schemes/DataUriPlugin.js +1 -1
- package/lib/schemes/FileUriPlugin.js +1 -1
- package/lib/schemes/HttpUriPlugin.js +46 -20
- package/lib/schemes/VirtualUrlPlugin.js +13 -7
- package/lib/serialization/AggregateErrorSerializer.js +1 -1
- package/lib/serialization/BinaryMiddleware.js +4 -4
- package/lib/serialization/ErrorObjectSerializer.js +1 -1
- package/lib/serialization/FileMiddleware.js +22 -9
- package/lib/serialization/ObjectMiddleware.js +139 -114
- package/lib/serialization/PlainObjectSerializer.js +19 -16
- package/lib/sharing/ConsumeSharedModule.js +30 -21
- package/lib/sharing/ConsumeSharedPlugin.js +18 -10
- package/lib/sharing/ConsumeSharedRuntimeModule.js +6 -9
- package/lib/sharing/ProvideSharedModule.js +25 -16
- package/lib/sharing/ProvideSharedModuleFactory.js +7 -3
- package/lib/sharing/ProvideSharedPlugin.js +8 -4
- package/lib/sharing/SharePlugin.js +17 -5
- package/lib/sharing/ShareRuntimeModule.js +4 -4
- package/lib/sharing/resolveMatchedConfigs.js +9 -6
- package/lib/sharing/utils.js +1 -3
- package/lib/stats/DefaultStatsFactoryPlugin.js +50 -29
- package/lib/stats/DefaultStatsPresetPlugin.js +17 -8
- package/lib/stats/DefaultStatsPrinterPlugin.js +36 -26
- package/lib/stats/StatsFactory.js +25 -26
- package/lib/stats/StatsPrinter.js +16 -12
- package/lib/typescript/TypeScriptPlugin.js +20 -24
- package/lib/url/URLParserPlugin.js +26 -13
- package/lib/util/ArrayQueue.js +3 -3
- package/lib/util/AsyncQueue.js +4 -3
- package/lib/util/Hash.js +5 -1
- package/lib/util/LazySet.js +35 -22
- package/lib/util/LocConverter.js +36 -13
- package/lib/util/SourceProcessor.js +1066 -24
- package/lib/util/StringXor.js +1 -1
- package/lib/util/URLAbsoluteSpecifier.js +3 -1
- package/lib/util/chainedImports.js +9 -5
- package/lib/util/cleverMerge.js +1 -1
- package/lib/util/comparators.js +45 -14
- package/lib/util/concatenate.js +203 -77
- package/lib/util/conventions.js +10 -2
- package/lib/util/createHash.js +2 -2
- package/lib/util/createHooksRegistry.js +8 -10
- package/lib/util/createMappings.js +25 -3
- package/lib/util/dataURL.js +225 -1
- package/lib/util/extractSourceMap.js +4 -3
- package/lib/util/findCaseMismatch.js +139 -0
- package/lib/util/formatLocation.js +1 -2
- package/lib/util/fs.js +22 -5
- package/lib/util/globUtils.js +298 -24
- package/lib/util/hash/BatchedHash.js +5 -1
- package/lib/util/hash/BulkUpdateHash.js +5 -1
- package/lib/util/hash/DebugHash.js +5 -1
- package/lib/util/hash/hash-digest.js +6 -2
- package/lib/util/identifier.js +4 -0
- package/lib/util/implicitTypeLoaderFallback.js +1 -1
- package/lib/util/internalSerializables.js +8 -0
- package/lib/util/lazyModule.js +56 -0
- package/lib/util/makeSerializable.js +7 -3
- package/lib/util/matchAlias.js +25 -0
- package/lib/util/mimeTypes.js +11 -5
- package/lib/util/nonNumericOnlyHash.js +4 -3
- package/lib/util/parseJson.js +5 -3
- package/lib/util/preloadModuleType.js +32 -0
- package/lib/util/registerExternalSerializer.js +7 -5
- package/lib/util/removeBOM.js +82 -1
- package/lib/util/runtime.js +2 -2
- package/lib/util/semver.js +1 -1
- package/lib/util/serialization.js +28 -28
- package/lib/util/source.js +2 -2
- package/lib/util/traverseDestructuringAssignmentProperties.js +6 -2
- package/lib/wasm/EnableWasmLoadingPlugin.js +10 -8
- package/lib/wasm/wasmModuleFilename.js +54 -0
- package/lib/wasm-async/AsyncWasmCompileRuntimeModule.js +43 -21
- package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +45 -21
- package/lib/wasm-async/AsyncWasmModule.js +3 -3
- package/lib/wasm-async/AsyncWebAssemblyGenerator.js +4 -5
- package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +57 -17
- package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +34 -18
- package/lib/wasm-async/AsyncWebAssemblyParser.js +9 -8
- package/lib/wasm-async/UniversalCompileAsyncWasmPlugin.js +29 -8
- package/lib/wasm-sync/SyncWasmModule.js +2 -2
- package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +18 -13
- package/lib/wasm-sync/WasmFinalizeExportsPlugin.js +4 -5
- package/lib/wasm-sync/WebAssemblyGenerator.js +18 -17
- package/lib/wasm-sync/WebAssemblyInInitialChunkError.js +4 -4
- package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +7 -7
- package/lib/wasm-sync/WebAssemblyModulesPlugin.js +24 -11
- package/lib/wasm-sync/WebAssemblyParser.js +4 -6
- package/lib/wasm-sync/WebAssemblyUtils.js +2 -2
- package/lib/web/FetchCompileAsyncWasmPlugin.js +105 -19
- package/lib/web/FetchCompileWasmPlugin.js +48 -16
- package/lib/web/JsonpChunkLoadingPlugin.js +47 -23
- package/lib/web/JsonpChunkLoadingRuntimeModule.js +50 -20
- package/lib/web/JsonpTemplatePlugin.js +2 -2
- package/lib/webpack.js +22 -11
- package/lib/webworker/ImportScriptsChunkLoadingPlugin.js +60 -26
- package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +30 -32
- package/lib/webworker/WebWorkerTemplatePlugin.js +1 -1
- package/module.d.ts +1 -0
- package/package.json +32 -25
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +667 -34
- package/schemas/plugins/HtmlParserOptions.check.js +1 -1
- package/schemas/plugins/container/ContainerPlugin.check.js +1 -1
- package/schemas/plugins/container/ContainerPlugin.json +10 -0
- package/schemas/plugins/container/ModuleFederationPlugin.check.js +1 -1
- package/schemas/plugins/container/ModuleFederationPlugin.json +10 -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 +3223 -465
- package/lib/runtime/CommonJsWrapRuntimeModule.js +0 -37
package/types.d.ts
CHANGED
|
@@ -88,7 +88,6 @@ import {
|
|
|
88
88
|
YieldExpression
|
|
89
89
|
} from "estree";
|
|
90
90
|
import {
|
|
91
|
-
IncomingMessage,
|
|
92
91
|
Server as ServerImportHttp,
|
|
93
92
|
ServerOptions as ServerOptionsImportHttp
|
|
94
93
|
} from "http";
|
|
@@ -356,6 +355,20 @@ declare interface AllCodeGenerationSchemas {
|
|
|
356
355
|
*/
|
|
357
356
|
"share-init": [{ shareScope: string; initStage: number; init: string }];
|
|
358
357
|
}
|
|
358
|
+
declare interface AnalyzableChunkUrls {
|
|
359
|
+
/**
|
|
360
|
+
* the urls that could be written, by chunk id
|
|
361
|
+
*/
|
|
362
|
+
urls: Map<ChunkId, string>;
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* false when some chunk kept the runtime form, whose
|
|
366
|
+
* ids the consumer then still resolves through the runtime name lookup
|
|
367
|
+
*/
|
|
368
|
+
complete: boolean;
|
|
369
|
+
}
|
|
370
|
+
type AnalyzableForm =
|
|
371
|
+
"import" | "url" | "url-runtime" | "url-inline" | "wasm" | "wasm-relative";
|
|
359
372
|
type AnyLoaderContext = NormalModuleLoaderContext<any> &
|
|
360
373
|
LoaderRunnerLoaderContext<any> &
|
|
361
374
|
LoaderPluginLoaderContext &
|
|
@@ -445,7 +458,7 @@ declare abstract class AssetGenerator extends Generator {
|
|
|
445
458
|
/**
|
|
446
459
|
* Generates data uri.
|
|
447
460
|
*/
|
|
448
|
-
generateDataUri(module: NormalModule): string;
|
|
461
|
+
generateDataUri(module: NormalModule, renderedSource?: Source): string;
|
|
449
462
|
|
|
450
463
|
/**
|
|
451
464
|
* Generates fallback output for the provided error condition.
|
|
@@ -685,7 +698,16 @@ declare interface AsyncWebAssemblyModulesPluginOptions {
|
|
|
685
698
|
*/
|
|
686
699
|
mangleImports?: boolean;
|
|
687
700
|
}
|
|
688
|
-
|
|
701
|
+
type AtRule = NodeSyntax & {
|
|
702
|
+
name: string;
|
|
703
|
+
nameStart: number;
|
|
704
|
+
nameEnd: number;
|
|
705
|
+
prelude: ComponentValue[];
|
|
706
|
+
declarations: null | DeclarationSyntax[];
|
|
707
|
+
childRules: null | RuleSyntax[];
|
|
708
|
+
blockStart: number;
|
|
709
|
+
blockEnd: number;
|
|
710
|
+
};
|
|
689
711
|
|
|
690
712
|
/**
|
|
691
713
|
* Records modules from one compilation and adds them back as prefetch
|
|
@@ -745,7 +767,7 @@ declare interface BannerPluginOptions {
|
|
|
745
767
|
/**
|
|
746
768
|
* Exclude all modules matching any of these conditions.
|
|
747
769
|
*/
|
|
748
|
-
exclude?: string | RegExp | ((str: string) => boolean) |
|
|
770
|
+
exclude?: string | RegExp | ((str: string) => boolean) | RuleAlias[];
|
|
749
771
|
|
|
750
772
|
/**
|
|
751
773
|
* If true, banner will be placed at the end of the output.
|
|
@@ -755,7 +777,7 @@ declare interface BannerPluginOptions {
|
|
|
755
777
|
/**
|
|
756
778
|
* Include all modules matching any of these conditions.
|
|
757
779
|
*/
|
|
758
|
-
include?: string | RegExp | ((str: string) => boolean) |
|
|
780
|
+
include?: string | RegExp | ((str: string) => boolean) | RuleAlias[];
|
|
759
781
|
|
|
760
782
|
/**
|
|
761
783
|
* If true, banner will not be wrapped in a comment.
|
|
@@ -770,7 +792,7 @@ declare interface BannerPluginOptions {
|
|
|
770
792
|
/**
|
|
771
793
|
* Include all modules that pass test assertion.
|
|
772
794
|
*/
|
|
773
|
-
test?: string | RegExp | ((str: string) => boolean) |
|
|
795
|
+
test?: string | RegExp | ((str: string) => boolean) | RuleAlias[];
|
|
774
796
|
}
|
|
775
797
|
declare interface BaseResolveRequest {
|
|
776
798
|
/**
|
|
@@ -1194,6 +1216,12 @@ declare abstract class BasicEvaluatedExpression {
|
|
|
1194
1216
|
): BasicEvaluatedExpression;
|
|
1195
1217
|
}
|
|
1196
1218
|
type BeforeContextResolveData = ContextResolveData & ContextOptions;
|
|
1219
|
+
declare interface BindCache<T> {
|
|
1220
|
+
(cache: object): BindCacheResultFn<T>;
|
|
1221
|
+
}
|
|
1222
|
+
declare interface BindCacheResultFn<T> {
|
|
1223
|
+
(value: string): T;
|
|
1224
|
+
}
|
|
1197
1225
|
declare interface Bootstrap {
|
|
1198
1226
|
header: string[];
|
|
1199
1227
|
beforeStartup: string[];
|
|
@@ -1557,6 +1585,32 @@ declare interface CallbackWebpackFunction_2<T, R = void> {
|
|
|
1557
1585
|
*/
|
|
1558
1586
|
(err: null | Error, result?: T): R;
|
|
1559
1587
|
}
|
|
1588
|
+
declare interface CappedSplit {
|
|
1589
|
+
/**
|
|
1590
|
+
* the cache group whose split was refused
|
|
1591
|
+
*/
|
|
1592
|
+
cacheGroup: string;
|
|
1593
|
+
|
|
1594
|
+
/**
|
|
1595
|
+
* the chunk it would have been taken out of
|
|
1596
|
+
*/
|
|
1597
|
+
chunk: Chunk;
|
|
1598
|
+
|
|
1599
|
+
/**
|
|
1600
|
+
* the option that refused it
|
|
1601
|
+
*/
|
|
1602
|
+
limit: "maxAsyncRequests" | "maxInitialRequests";
|
|
1603
|
+
|
|
1604
|
+
/**
|
|
1605
|
+
* the value that option had
|
|
1606
|
+
*/
|
|
1607
|
+
maxRequests: number;
|
|
1608
|
+
|
|
1609
|
+
/**
|
|
1610
|
+
* how many modules the split would have moved
|
|
1611
|
+
*/
|
|
1612
|
+
modules: number;
|
|
1613
|
+
}
|
|
1560
1614
|
type Cell<T> = undefined | T;
|
|
1561
1615
|
|
|
1562
1616
|
/**
|
|
@@ -1853,6 +1907,7 @@ declare class ChunkGraph {
|
|
|
1853
1907
|
*/
|
|
1854
1908
|
constructor(moduleGraph: ModuleGraph, hashFunction?: HashFunction);
|
|
1855
1909
|
moduleGraph: ModuleGraph;
|
|
1910
|
+
buildTimeExecution: boolean;
|
|
1856
1911
|
|
|
1857
1912
|
/**
|
|
1858
1913
|
* Connects chunk and module.
|
|
@@ -3363,6 +3418,27 @@ declare class Compilation {
|
|
|
3363
3418
|
[RenderManifestEntry[], RenderManifestOptions],
|
|
3364
3419
|
RenderManifestEntry[]
|
|
3365
3420
|
>;
|
|
3421
|
+
/**
|
|
3422
|
+
* Called with source written in one language that a module emits inside
|
|
3423
|
+
* another — CSS or HTML reaching the bundle as a JavaScript string
|
|
3424
|
+
* literal today — before it is embedded; return the (possibly
|
|
3425
|
+
* transformed) source, e.g. a minified one. `info.type` says which
|
|
3426
|
+
* language it is, so one tap serves every pair; no asset carries this
|
|
3427
|
+
* source, so an asset-level minimizer cannot reach it.
|
|
3428
|
+
* @since 5.110.0
|
|
3429
|
+
*/
|
|
3430
|
+
renderEmbeddedSource: AsyncSeriesWaterfallHook<
|
|
3431
|
+
[Source, EmbeddedSourceInfo],
|
|
3432
|
+
Source
|
|
3433
|
+
>;
|
|
3434
|
+
/**
|
|
3435
|
+
* Called while hashing a module that embeds such a source. Module hashes
|
|
3436
|
+
* are taken before code generation, so a `renderEmbeddedSource` tap must
|
|
3437
|
+
* write whatever it varies on into the hash, or the codegen cache
|
|
3438
|
+
* replays output from before its options changed.
|
|
3439
|
+
* @since 5.110.0
|
|
3440
|
+
*/
|
|
3441
|
+
embeddedSourceHash: SyncHook<[Module, Hash]>;
|
|
3366
3442
|
fullHash: SyncHook<[Hash]>;
|
|
3367
3443
|
chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
|
|
3368
3444
|
moduleAsset: SyncHook<[Module, string]>;
|
|
@@ -3446,6 +3522,7 @@ declare class Compilation {
|
|
|
3446
3522
|
assetsInfo: Map<string, AssetInfo>;
|
|
3447
3523
|
errors: Error[];
|
|
3448
3524
|
warnings: Error[];
|
|
3525
|
+
hints: Error[];
|
|
3449
3526
|
children: Compilation[];
|
|
3450
3527
|
logging: Map<string, LogEntry[]>;
|
|
3451
3528
|
dependencyFactories: Map<DependencyConstructor, ModuleFactory>;
|
|
@@ -3680,6 +3757,20 @@ declare class Compilation {
|
|
|
3680
3757
|
chunkGraphEntries?: Iterable<Chunk>;
|
|
3681
3758
|
}): void;
|
|
3682
3759
|
|
|
3760
|
+
/**
|
|
3761
|
+
* Queues a runtime module whose implementation is loaded on demand, for
|
|
3762
|
+
* `_attachPendingRuntimeModules` to await and build once the requirement pass
|
|
3763
|
+
* is over. `runtimeRequirementInTree` is a sync hook, so a tap cannot await
|
|
3764
|
+
* the load itself; anything the tap reads off the requirement set must be
|
|
3765
|
+
* captured before queueing, since `create` runs later.
|
|
3766
|
+
*/
|
|
3767
|
+
addLazyRuntimeModule(
|
|
3768
|
+
chunk: Chunk,
|
|
3769
|
+
load: () => Promise<any>,
|
|
3770
|
+
create: (loaded?: any) => RuntimeModule,
|
|
3771
|
+
chunkGraph?: ChunkGraph
|
|
3772
|
+
): void;
|
|
3773
|
+
|
|
3683
3774
|
/**
|
|
3684
3775
|
* Adds runtime module.
|
|
3685
3776
|
*/
|
|
@@ -4033,6 +4124,15 @@ declare interface CompiledAliasOptions {
|
|
|
4033
4124
|
*/
|
|
4034
4125
|
useBuckets: boolean;
|
|
4035
4126
|
}
|
|
4127
|
+
declare interface CompiledRule {
|
|
4128
|
+
path: string;
|
|
4129
|
+
raw: RuleSetRule;
|
|
4130
|
+
used: boolean;
|
|
4131
|
+
conditions: RuleCondition[];
|
|
4132
|
+
effects: (EffectUse | EffectBasic | ((effectData: EffectData) => Effect[]))[];
|
|
4133
|
+
rules?: CompiledRule[];
|
|
4134
|
+
oneOf?: CompiledRule[];
|
|
4135
|
+
}
|
|
4036
4136
|
declare class Compiler {
|
|
4037
4137
|
/**
|
|
4038
4138
|
* Creates an instance of Compiler.
|
|
@@ -4253,6 +4353,7 @@ declare class Compiler {
|
|
|
4253
4353
|
check?: (value: T) => boolean
|
|
4254
4354
|
): void;
|
|
4255
4355
|
}
|
|
4356
|
+
type ComponentValue = Token | FunctionNode | SimpleBlock;
|
|
4256
4357
|
declare class ConcatSource extends Source {
|
|
4257
4358
|
constructor(...args: ConcatSourceChild[]);
|
|
4258
4359
|
getChildren(): Source[];
|
|
@@ -4294,24 +4395,39 @@ type ConcatenatedModuleBuildInfo = KnownBuildInfo &
|
|
|
4294
4395
|
KnownConcatenatedModuleBuildInfo;
|
|
4295
4396
|
declare interface ConcatenatedModuleInfo {
|
|
4296
4397
|
type: "concatenated";
|
|
4297
|
-
module: Module;
|
|
4298
|
-
index: number;
|
|
4299
4398
|
|
|
4300
4399
|
/**
|
|
4301
|
-
*
|
|
4400
|
+
* the body renders inside the lazy CJS wrapper with real module/exports instead of being scope-hoisted into the shared scope
|
|
4401
|
+
*/
|
|
4402
|
+
wrapped: boolean;
|
|
4403
|
+
|
|
4404
|
+
/**
|
|
4405
|
+
* a wrapped body reached by an eager import edge, so its accessor is called at its own slot in evaluation order
|
|
4302
4406
|
*/
|
|
4303
|
-
|
|
4407
|
+
eager: boolean;
|
|
4408
|
+
module: Module;
|
|
4409
|
+
index: number;
|
|
4304
4410
|
ast?: Program;
|
|
4305
4411
|
internalSource?: Source;
|
|
4306
4412
|
source?: ReplaceSource;
|
|
4307
4413
|
chunkInitFragments?: InitFragment<ChunkRenderContextJavascriptModulesPlugin>[];
|
|
4308
4414
|
runtimeRequirements?: ReadonlySet<string>;
|
|
4309
4415
|
globalScope?: Scope;
|
|
4416
|
+
|
|
4417
|
+
/**
|
|
4418
|
+
* the module's free references
|
|
4419
|
+
*/
|
|
4420
|
+
unresolvedReferences?: Reference[];
|
|
4310
4421
|
moduleScope?: Scope;
|
|
4311
4422
|
internalNames: Map<string, string>;
|
|
4312
4423
|
exportMap?: Map<string, string>;
|
|
4313
4424
|
rawExportMap?: Map<string, string>;
|
|
4314
4425
|
namespaceExportSymbol?: string;
|
|
4426
|
+
|
|
4427
|
+
/**
|
|
4428
|
+
* name of the lazy wrapper accessor function (calling it evaluates the module and returns its exports)
|
|
4429
|
+
*/
|
|
4430
|
+
namespaceFnName?: string;
|
|
4315
4431
|
namespaceObjectName?: string;
|
|
4316
4432
|
|
|
4317
4433
|
/**
|
|
@@ -4400,6 +4516,24 @@ declare class ConcatenationScope {
|
|
|
4400
4516
|
*/
|
|
4401
4517
|
isModuleInScope(module: Module): boolean;
|
|
4402
4518
|
|
|
4519
|
+
/**
|
|
4520
|
+
* Whether an in-scope module's body renders inside the lazy wrapper.
|
|
4521
|
+
*/
|
|
4522
|
+
isModuleWrapped(module: Module): boolean;
|
|
4523
|
+
|
|
4524
|
+
/**
|
|
4525
|
+
* Marks a wrapped module as eagerly imported, so its accessor is called at its
|
|
4526
|
+
* own slot in evaluation order instead of from inside the importing body.
|
|
4527
|
+
*/
|
|
4528
|
+
registerEagerModule(module: Module): void;
|
|
4529
|
+
|
|
4530
|
+
/**
|
|
4531
|
+
* Whether the current module runs inside the lazy wrapper. Exports then live
|
|
4532
|
+
* on a real exports object, not hoisted bindings, so templates emit runtime
|
|
4533
|
+
* code.
|
|
4534
|
+
*/
|
|
4535
|
+
isWrapped(): boolean;
|
|
4536
|
+
|
|
4403
4537
|
/**
|
|
4404
4538
|
* Records the symbol that should be used when the current module exports a
|
|
4405
4539
|
* named binding.
|
|
@@ -4443,6 +4577,19 @@ declare class ConcatenationScope {
|
|
|
4443
4577
|
*/
|
|
4444
4578
|
static isModuleReference(name: string): boolean;
|
|
4445
4579
|
|
|
4580
|
+
/**
|
|
4581
|
+
* Checks whether an identifier buries a reference token without being one,
|
|
4582
|
+
* which nothing can resolve: it would reach the output as an undeclared global.
|
|
4583
|
+
*/
|
|
4584
|
+
static isLeakedModuleReference(name: string): boolean;
|
|
4585
|
+
|
|
4586
|
+
/**
|
|
4587
|
+
* Finds all encoded module references in a generated source. A match that
|
|
4588
|
+
* continues an identifier is reported as `leaked`: it is a token a wider
|
|
4589
|
+
* replacement swallowed, so substituting it would rewrite the middle of a name.
|
|
4590
|
+
*/
|
|
4591
|
+
static findModuleReferences(source: Source): ModuleReferenceMatch[];
|
|
4592
|
+
|
|
4446
4593
|
/**
|
|
4447
4594
|
* Parses an encoded module reference back into its module index and
|
|
4448
4595
|
* reference flags.
|
|
@@ -4539,7 +4686,8 @@ declare interface Configuration {
|
|
|
4539
4686
|
| string
|
|
4540
4687
|
| boolean
|
|
4541
4688
|
| string[]
|
|
4542
|
-
|
|
|
4689
|
+
| ExternalItemValueObject
|
|
4690
|
+
| ExternalItemValueWithOptions
|
|
4543
4691
|
) => void
|
|
4544
4692
|
) => void)
|
|
4545
4693
|
| ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>)
|
|
@@ -4775,7 +4923,10 @@ declare class ConstDependency extends NullDependency {
|
|
|
4775
4923
|
/**
|
|
4776
4924
|
* Returns true if the dependency can be concatenated (scope hoisting).
|
|
4777
4925
|
*/
|
|
4778
|
-
static canConcatenate(
|
|
4926
|
+
static canConcatenate(
|
|
4927
|
+
dependency: Dependency,
|
|
4928
|
+
concatenateCommonJsModules: boolean
|
|
4929
|
+
): boolean;
|
|
4779
4930
|
static TRANSITIVE: symbol;
|
|
4780
4931
|
static LAZY_UNTIL_LOCAL: "local";
|
|
4781
4932
|
static LAZY_UNTIL_ID: "id";
|
|
@@ -4959,6 +5110,12 @@ type ContextDependencyOptions = ContextOptions & { request: string };
|
|
|
4959
5110
|
declare abstract class ContextElementDependency extends ModuleDependency {
|
|
4960
5111
|
referencedExports?: null | string[][];
|
|
4961
5112
|
attributes?: ImportAttributes;
|
|
5113
|
+
|
|
5114
|
+
/**
|
|
5115
|
+
* The request as the user wrote it, e.g. `#configs/file.mjs` where `request`
|
|
5116
|
+
* is the `./file.mjs` relative to the resolved `#configs` directory.
|
|
5117
|
+
*/
|
|
5118
|
+
get originalRequest(): string;
|
|
4962
5119
|
}
|
|
4963
5120
|
declare class ContextExclusionPlugin {
|
|
4964
5121
|
/**
|
|
@@ -5029,6 +5186,10 @@ declare abstract class ContextModuleFactory extends ModuleFactory {
|
|
|
5029
5186
|
}
|
|
5030
5187
|
type ContextModuleOptions = ContextOptions & ContextModuleOptionsExtras;
|
|
5031
5188
|
declare interface ContextModuleOptionsExtras {
|
|
5189
|
+
/**
|
|
5190
|
+
* the request of the context as written by the user, before it was resolved
|
|
5191
|
+
*/
|
|
5192
|
+
request?: string;
|
|
5032
5193
|
resource: string | false | string[];
|
|
5033
5194
|
resourceQuery?: string;
|
|
5034
5195
|
resourceFragment?: string;
|
|
@@ -5140,89 +5301,7 @@ declare interface ContextTimestampAndHash {
|
|
|
5140
5301
|
symlinks?: Set<string>;
|
|
5141
5302
|
}
|
|
5142
5303
|
type ContextTypes = KnownContext & Record<any, any>;
|
|
5143
|
-
|
|
5144
|
-
declare interface CreateData {
|
|
5145
|
-
/**
|
|
5146
|
-
* an optional layer in which the module is
|
|
5147
|
-
*/
|
|
5148
|
-
layer?: string;
|
|
5149
|
-
|
|
5150
|
-
/**
|
|
5151
|
-
* module type. When deserializing, this is set to an empty string "".
|
|
5152
|
-
*/
|
|
5153
|
-
type: string;
|
|
5154
|
-
|
|
5155
|
-
/**
|
|
5156
|
-
* request string
|
|
5157
|
-
*/
|
|
5158
|
-
request: string;
|
|
5159
|
-
|
|
5160
|
-
/**
|
|
5161
|
-
* request intended by user (without loaders from config)
|
|
5162
|
-
*/
|
|
5163
|
-
userRequest: string;
|
|
5164
|
-
|
|
5165
|
-
/**
|
|
5166
|
-
* request without resolving
|
|
5167
|
-
*/
|
|
5168
|
-
rawRequest: string;
|
|
5169
|
-
|
|
5170
|
-
/**
|
|
5171
|
-
* list of loaders
|
|
5172
|
-
*/
|
|
5173
|
-
loaders: LoaderItem[];
|
|
5174
|
-
|
|
5175
|
-
/**
|
|
5176
|
-
* path + query of the real resource
|
|
5177
|
-
*/
|
|
5178
|
-
resource: string;
|
|
5179
|
-
|
|
5180
|
-
/**
|
|
5181
|
-
* resource resolve data
|
|
5182
|
-
*/
|
|
5183
|
-
resourceResolveData?: ResourceSchemeData & Partial<ResolveRequest>;
|
|
5184
|
-
|
|
5185
|
-
/**
|
|
5186
|
-
* context directory for resolving
|
|
5187
|
-
*/
|
|
5188
|
-
context: string;
|
|
5189
|
-
|
|
5190
|
-
/**
|
|
5191
|
-
* path + query of the matched resource (virtual)
|
|
5192
|
-
*/
|
|
5193
|
-
matchResource?: string;
|
|
5194
|
-
|
|
5195
|
-
/**
|
|
5196
|
-
* the parser used
|
|
5197
|
-
*/
|
|
5198
|
-
parser: ParserClass;
|
|
5199
|
-
|
|
5200
|
-
/**
|
|
5201
|
-
* the options of the parser used
|
|
5202
|
-
*/
|
|
5203
|
-
parserOptions?: ParserOptions;
|
|
5204
|
-
|
|
5205
|
-
/**
|
|
5206
|
-
* the generator used
|
|
5207
|
-
*/
|
|
5208
|
-
generator: Generator;
|
|
5209
|
-
|
|
5210
|
-
/**
|
|
5211
|
-
* the options of the generator used
|
|
5212
|
-
*/
|
|
5213
|
-
generatorOptions?: GeneratorOptions;
|
|
5214
|
-
|
|
5215
|
-
/**
|
|
5216
|
-
* options used for resolving requests from this module
|
|
5217
|
-
*/
|
|
5218
|
-
resolveOptions?: ResolveOptions;
|
|
5219
|
-
|
|
5220
|
-
/**
|
|
5221
|
-
* enable/disable extracting source map
|
|
5222
|
-
*/
|
|
5223
|
-
extractSourceMap: boolean;
|
|
5224
|
-
settings: ModuleSettings;
|
|
5225
|
-
}
|
|
5304
|
+
type CreateData = NormalModuleCreateData & { settings: ModuleSettings };
|
|
5226
5305
|
type CreateReadStreamFSImplementation = FSImplementation & {
|
|
5227
5306
|
read: (...args: any[]) => any;
|
|
5228
5307
|
};
|
|
@@ -5338,6 +5417,17 @@ declare interface CssData {
|
|
|
5338
5417
|
*/
|
|
5339
5418
|
exportLocs?: Map<string, { line: number; column: number }>;
|
|
5340
5419
|
}
|
|
5420
|
+
declare interface CssEnvironment {
|
|
5421
|
+
/**
|
|
5422
|
+
* the browserslist selection (`["chrome 100", "safari 15"]`), so vendor prefixes and every spelling a target has to be able to read are decided for exactly these browsers; absent leaves prefixes untouched and assumes every ability
|
|
5423
|
+
*/
|
|
5424
|
+
browsers?: string[];
|
|
5425
|
+
|
|
5426
|
+
/**
|
|
5427
|
+
* whether prefixes are written at all; false leaves them alone while the selection still decides which spellings a target reads
|
|
5428
|
+
*/
|
|
5429
|
+
vendorPrefixes?: boolean;
|
|
5430
|
+
}
|
|
5341
5431
|
declare abstract class CssGenerator extends Generator {
|
|
5342
5432
|
options: CssModuleGeneratorOptions;
|
|
5343
5433
|
|
|
@@ -5834,113 +5924,295 @@ declare interface CssParserOptions {
|
|
|
5834
5924
|
*/
|
|
5835
5925
|
urlHints?: UrlHintRule[];
|
|
5836
5926
|
}
|
|
5837
|
-
|
|
5838
|
-
declare interface DefaultHandlerOptions {
|
|
5839
|
-
progressBar?:
|
|
5840
|
-
| false
|
|
5841
|
-
| Required<{
|
|
5842
|
-
/**
|
|
5843
|
-
* Color used for the filled portion of the bar.
|
|
5844
|
-
*/
|
|
5845
|
-
color?: string;
|
|
5846
|
-
/**
|
|
5847
|
-
* Name shown before the progress bar.
|
|
5848
|
-
*/
|
|
5849
|
-
name?: string;
|
|
5850
|
-
/**
|
|
5851
|
-
* Width of the progress bar in characters. Default: 25.
|
|
5852
|
-
*/
|
|
5853
|
-
width?: number;
|
|
5854
|
-
}>;
|
|
5855
|
-
estimatedTime?: boolean;
|
|
5856
|
-
phaseTimings?: boolean;
|
|
5857
|
-
}
|
|
5858
|
-
type DefineConfigInput =
|
|
5859
|
-
| Configuration
|
|
5860
|
-
| MultiConfiguration
|
|
5861
|
-
| ((
|
|
5862
|
-
env: Record<string, any>,
|
|
5863
|
-
argv: Record<string, any>
|
|
5864
|
-
) => MaybePromise<Configuration | MultiConfiguration>)
|
|
5865
|
-
| ((
|
|
5866
|
-
env: Record<string, any>,
|
|
5867
|
-
argv: Record<string, any>
|
|
5868
|
-
) => MaybePromise<Configuration | MultiConfiguration>)[]
|
|
5869
|
-
| Promise<
|
|
5870
|
-
| Configuration
|
|
5871
|
-
| MultiConfiguration
|
|
5872
|
-
| ((
|
|
5873
|
-
env: Record<string, any>,
|
|
5874
|
-
argv: Record<string, any>
|
|
5875
|
-
) => MaybePromise<Configuration | MultiConfiguration>)
|
|
5876
|
-
| ((
|
|
5877
|
-
env: Record<string, any>,
|
|
5878
|
-
argv: Record<string, any>
|
|
5879
|
-
) => MaybePromise<Configuration | MultiConfiguration>)[]
|
|
5880
|
-
>;
|
|
5881
|
-
declare class DefinePlugin {
|
|
5927
|
+
declare interface CssPrintOptions {
|
|
5882
5928
|
/**
|
|
5883
|
-
*
|
|
5929
|
+
* what the target can read (the CSS entries of `output.environment`), so a spelling it would not understand is never reached for; only read while printing, and an absent entry means the modern spelling is available
|
|
5884
5930
|
*/
|
|
5885
|
-
|
|
5886
|
-
definitions: Definitions;
|
|
5931
|
+
environment?: CssEnvironment;
|
|
5887
5932
|
|
|
5888
5933
|
/**
|
|
5889
|
-
*
|
|
5934
|
+
* renders source this stylesheet embeds: the payload of a `url()` `data:` URL whose media type names a language webpack knows (SVG, CSS, HTML, JSON, JavaScript). Absent, a data URL is emitted exactly as written
|
|
5890
5935
|
*/
|
|
5891
|
-
|
|
5936
|
+
renderEmbeddedSource?: (
|
|
5937
|
+
source: string,
|
|
5938
|
+
info: { type: string; hostType: string }
|
|
5939
|
+
) => undefined | string;
|
|
5892
5940
|
|
|
5893
5941
|
/**
|
|
5894
|
-
*
|
|
5942
|
+
* rewrite a length into a shorter unit it is exactly equal in (`16px` -> `1pc`); off by default because it earns nothing once the asset is compressed, and only read while printing. A time is always rewritten
|
|
5895
5943
|
*/
|
|
5896
|
-
|
|
5897
|
-
|
|
5898
|
-
module: NormalModule;
|
|
5899
|
-
key: string;
|
|
5900
|
-
readonly version: ValueCacheVersion;
|
|
5901
|
-
}) => CodeValuePrimitive,
|
|
5902
|
-
options?: true | string[] | RuntimeValueOptions
|
|
5903
|
-
): RuntimeValue;
|
|
5904
|
-
static getCompilationHooks: (compilation: Compilation) => {
|
|
5905
|
-
/**
|
|
5906
|
-
* @since 5.104.0
|
|
5907
|
-
*/
|
|
5908
|
-
definitions: SyncWaterfallHook<
|
|
5909
|
-
[Record<string, CodeValue>],
|
|
5910
|
-
Record<string, CodeValue>
|
|
5911
|
-
>;
|
|
5912
|
-
};
|
|
5913
|
-
static VALUE_DEP_MAIN: "webpack/DefinePlugin_hash";
|
|
5914
|
-
static VALUE_DEP_PREFIX: "webpack/DefinePlugin ";
|
|
5915
|
-
static getMergedDefinitionNode: (
|
|
5916
|
-
compilation: Compilation,
|
|
5917
|
-
key: string
|
|
5918
|
-
) => MergedDefinitionNode;
|
|
5919
|
-
static getRuntimeRequirements: (code: string) => undefined | string[];
|
|
5920
|
-
static stringifyMergedDefinition: (
|
|
5921
|
-
compilation: Compilation,
|
|
5922
|
-
parser: JavascriptParser,
|
|
5923
|
-
node: MergedDefinitionNode,
|
|
5924
|
-
key: string,
|
|
5925
|
-
objKeys?: null | Set<string>
|
|
5926
|
-
) => string;
|
|
5927
|
-
static toPropertyKey: (key: string) => string;
|
|
5928
|
-
}
|
|
5929
|
-
declare interface Definitions {
|
|
5930
|
-
[index: string]: CodeValue;
|
|
5931
|
-
}
|
|
5932
|
-
declare class DelegatedPlugin {
|
|
5944
|
+
convertLengthUnits?: boolean;
|
|
5945
|
+
|
|
5933
5946
|
/**
|
|
5934
|
-
*
|
|
5947
|
+
* shorten a custom property's value the way any other value is shortened (`--x:#ffffff` -> `#fff`); off by default because `getPropertyValue()` hands that text back, and only read while printing. What it may rewrite is what any other value's tokens may be, a color in a substitution's fallback included — that being the property's value rather than the function's own argument
|
|
5935
5948
|
*/
|
|
5936
|
-
|
|
5937
|
-
options: Options;
|
|
5949
|
+
rewriteCustomProperties?: boolean;
|
|
5938
5950
|
|
|
5939
5951
|
/**
|
|
5940
|
-
*
|
|
5952
|
+
* collects what `renderEmbeddedSource` would be offered instead of offering it, for a caller whose renderer is asynchronous: the print leaves a marker for each and `finish` puts the answers in their place, so one parse serves both. Takes precedence over `renderEmbeddedSource`
|
|
5941
5953
|
*/
|
|
5942
|
-
|
|
5943
|
-
|
|
5954
|
+
deferEmbeddedSource?: DeferredEmbeddedSource[];
|
|
5955
|
+
|
|
5956
|
+
/**
|
|
5957
|
+
* which of the meaning-preserving rewrites the minifying print makes; each is on unless it is `false`
|
|
5958
|
+
*/
|
|
5959
|
+
transforms?: CssTransformOptions;
|
|
5960
|
+
}
|
|
5961
|
+
declare interface CssProcessOptions {
|
|
5962
|
+
/**
|
|
5963
|
+
* shared loc converter (default a fresh one over the input)
|
|
5964
|
+
*/
|
|
5965
|
+
locConverter?: LocConverter;
|
|
5966
|
+
|
|
5967
|
+
/**
|
|
5968
|
+
* walk into block bodies' nested rules (default true)
|
|
5969
|
+
*/
|
|
5970
|
+
recurseBlocks?: boolean;
|
|
5971
|
+
|
|
5972
|
+
/**
|
|
5973
|
+
* which top-level production to consume the source as (see `TOP_LEVEL_CONSUMERS`): `"stylesheet"` (default) or `"block-contents"` (a block's contents, e.g. an HTML `style` attribute)
|
|
5974
|
+
*/
|
|
5975
|
+
as?: "stylesheet" | "block-contents";
|
|
5976
|
+
|
|
5977
|
+
/**
|
|
5978
|
+
* what the grammar may leave un-materialized to go faster — safe only for parts nothing reads in the active parse; default skip nothing. Ignored while printing (`minimize`), which needs every node
|
|
5979
|
+
*/
|
|
5980
|
+
skip?: SkipOptions;
|
|
5981
|
+
|
|
5982
|
+
/**
|
|
5983
|
+
* print the safely-minified serialization (collapsed whitespace, dropped redundant separators, the `printer`'s value transforms) as `process` walks and return `{ code, map }` (default false = walk only, return `undefined`)
|
|
5984
|
+
*/
|
|
5985
|
+
minimize?: boolean;
|
|
5986
|
+
|
|
5987
|
+
/**
|
|
5988
|
+
* name of the input in the emitted source map (`sources[0]` / `file`); only read while printing
|
|
5989
|
+
*/
|
|
5990
|
+
source?: string;
|
|
5991
|
+
|
|
5992
|
+
/**
|
|
5993
|
+
* the input's contents for the map's `sourcesContent`; only read while printing
|
|
5994
|
+
*/
|
|
5995
|
+
content?: string;
|
|
5996
|
+
|
|
5997
|
+
/**
|
|
5998
|
+
* what the target can read (the CSS entries of `output.environment`), so a spelling it would not understand is never reached for; only read while printing, and an absent entry means the modern spelling is available
|
|
5999
|
+
*/
|
|
6000
|
+
environment?: CssEnvironment;
|
|
6001
|
+
|
|
6002
|
+
/**
|
|
6003
|
+
* rewrite a length into a shorter unit it is exactly equal in (`16px` -> `1pc`); off by default because it earns nothing once the asset is compressed, and only read while printing. A time is always rewritten
|
|
6004
|
+
*/
|
|
6005
|
+
convertLengthUnits?: boolean;
|
|
6006
|
+
|
|
6007
|
+
/**
|
|
6008
|
+
* shorten a custom property's value the way any other value is shortened (`--x:#ffffff` -> `#fff`); off by default because `getPropertyValue()` hands that text back, and only read while printing. What it may rewrite is what any other value's tokens may be, a color in a substitution's fallback included — that being the property's value rather than the function's own argument
|
|
6009
|
+
*/
|
|
6010
|
+
rewriteCustomProperties?: boolean;
|
|
6011
|
+
|
|
6012
|
+
/**
|
|
6013
|
+
* renders source this stylesheet embeds: the payload of a `url()` `data:` URL whose media type names a language webpack knows (SVG, CSS, HTML, JSON, JavaScript). Absent, a data URL is emitted exactly as written
|
|
6014
|
+
*/
|
|
6015
|
+
renderEmbeddedSource?: (
|
|
6016
|
+
source: string,
|
|
6017
|
+
info: { type: string; hostType: string }
|
|
6018
|
+
) => undefined | string;
|
|
6019
|
+
|
|
6020
|
+
/**
|
|
6021
|
+
* which of the meaning-preserving rewrites the minifying print makes; each is on unless it is `false`
|
|
6022
|
+
*/
|
|
6023
|
+
transforms?: CssTransformOptions;
|
|
6024
|
+
|
|
6025
|
+
/**
|
|
6026
|
+
* collects what `renderEmbeddedSource` would be offered instead of offering it, for a caller whose renderer is asynchronous: the print leaves a marker for each and `finish` puts the answers in their place, so one parse serves both. Takes precedence over `renderEmbeddedSource`
|
|
6027
|
+
*/
|
|
6028
|
+
deferEmbeddedSource?: DeferredEmbeddedSource[];
|
|
6029
|
+
}
|
|
6030
|
+
declare interface CssTransformOptions {
|
|
6031
|
+
/**
|
|
6032
|
+
* which comments survive: `"some"` (the default) the ones that carry something, `true` / `"all"` every one, `false` none, or the ones a pattern matches / a predicate accepts, over the comment's own text
|
|
6033
|
+
*/
|
|
6034
|
+
comments?: string | boolean | RegExp | ((comment: string) => boolean);
|
|
6035
|
+
|
|
6036
|
+
/**
|
|
6037
|
+
* write a family of longhands as the one shorthand that sets them
|
|
6038
|
+
*/
|
|
6039
|
+
mergeLonghands?: boolean;
|
|
6040
|
+
|
|
6041
|
+
/**
|
|
6042
|
+
* join rules that print the same block, at-rules that share a prelude, and a named `@layer` block a later sibling opens again
|
|
6043
|
+
*/
|
|
6044
|
+
mergeRules?: boolean;
|
|
6045
|
+
|
|
6046
|
+
/**
|
|
6047
|
+
* normalize a string's, `url()`'s, font family's and attribute value's quoting
|
|
6048
|
+
*/
|
|
6049
|
+
normalizeQuotes?: boolean;
|
|
6050
|
+
|
|
6051
|
+
/**
|
|
6052
|
+
* compute a call into the shorter call naming the same value (`calc()` and the math functions, transforms, gradients, easing functions, filters)
|
|
6053
|
+
*/
|
|
6054
|
+
reduceFunctions?: boolean;
|
|
6055
|
+
|
|
6056
|
+
/**
|
|
6057
|
+
* drop a rule or declaration nothing can read: an empty rule, and one an identical later one supersedes
|
|
6058
|
+
*/
|
|
6059
|
+
removeDeadRules?: boolean;
|
|
6060
|
+
|
|
6061
|
+
/**
|
|
6062
|
+
* write each color in the shortest spelling of the same value
|
|
6063
|
+
*/
|
|
6064
|
+
shortenColors?: boolean;
|
|
6065
|
+
|
|
6066
|
+
/**
|
|
6067
|
+
* write a media feature in its range spelling and collapse an `and` of two into the interval
|
|
6068
|
+
*/
|
|
6069
|
+
shortenMediaQueries?: boolean;
|
|
6070
|
+
|
|
6071
|
+
/**
|
|
6072
|
+
* write each number in its shortest equal spelling
|
|
6073
|
+
*/
|
|
6074
|
+
shortenNumbers?: boolean;
|
|
6075
|
+
|
|
6076
|
+
/**
|
|
6077
|
+
* rewrite a selector into a shorter equal one
|
|
6078
|
+
*/
|
|
6079
|
+
shortenSelectors?: boolean;
|
|
6080
|
+
|
|
6081
|
+
/**
|
|
6082
|
+
* write a value the shortest way its property's own grammar allows
|
|
6083
|
+
*/
|
|
6084
|
+
shortenValues?: boolean;
|
|
6085
|
+
}
|
|
6086
|
+
type DeclarationEstreeIndex =
|
|
6087
|
+
FunctionDeclaration | VariableDeclaration | ClassDeclaration;
|
|
6088
|
+
type DeclarationSyntax = NodeSyntax & {
|
|
6089
|
+
name: string;
|
|
6090
|
+
nameStart: number;
|
|
6091
|
+
nameEnd: number;
|
|
6092
|
+
value: ComponentValue[];
|
|
6093
|
+
important: boolean;
|
|
6094
|
+
};
|
|
6095
|
+
declare interface DecodedEntitiesWithMap {
|
|
6096
|
+
text: string;
|
|
6097
|
+
map?: number[];
|
|
6098
|
+
}
|
|
6099
|
+
declare interface DefaultHandlerOptions {
|
|
6100
|
+
progressBar?:
|
|
6101
|
+
| false
|
|
6102
|
+
| Required<{
|
|
6103
|
+
/**
|
|
6104
|
+
* Color used for the filled portion of the bar.
|
|
6105
|
+
*/
|
|
6106
|
+
color?: string;
|
|
6107
|
+
/**
|
|
6108
|
+
* Name shown before the progress bar.
|
|
6109
|
+
*/
|
|
6110
|
+
name?: string;
|
|
6111
|
+
/**
|
|
6112
|
+
* Width of the progress bar in characters. Default: 25.
|
|
6113
|
+
*/
|
|
6114
|
+
width?: number;
|
|
6115
|
+
}>;
|
|
6116
|
+
estimatedTime?: boolean;
|
|
6117
|
+
phaseTimings?: boolean;
|
|
6118
|
+
}
|
|
6119
|
+
type DeferredEmbeddedSource = DeferredWrite & {
|
|
6120
|
+
type: string;
|
|
6121
|
+
hostType: string;
|
|
6122
|
+
as?: string;
|
|
6123
|
+
};
|
|
6124
|
+
declare interface DeferredWrite {
|
|
6125
|
+
source: string;
|
|
6126
|
+
build: (answer?: string) => string;
|
|
6127
|
+
}
|
|
6128
|
+
type DefineConfigInput =
|
|
6129
|
+
| Configuration
|
|
6130
|
+
| MultiConfiguration
|
|
6131
|
+
| ((
|
|
6132
|
+
env: Record<string, any>,
|
|
6133
|
+
argv: Record<string, any>
|
|
6134
|
+
) => MaybePromise<Configuration | MultiConfiguration>)
|
|
6135
|
+
| ((
|
|
6136
|
+
env: Record<string, any>,
|
|
6137
|
+
argv: Record<string, any>
|
|
6138
|
+
) => MaybePromise<Configuration | MultiConfiguration>)[]
|
|
6139
|
+
| Promise<
|
|
6140
|
+
| Configuration
|
|
6141
|
+
| MultiConfiguration
|
|
6142
|
+
| ((
|
|
6143
|
+
env: Record<string, any>,
|
|
6144
|
+
argv: Record<string, any>
|
|
6145
|
+
) => MaybePromise<Configuration | MultiConfiguration>)
|
|
6146
|
+
| ((
|
|
6147
|
+
env: Record<string, any>,
|
|
6148
|
+
argv: Record<string, any>
|
|
6149
|
+
) => MaybePromise<Configuration | MultiConfiguration>)[]
|
|
6150
|
+
>;
|
|
6151
|
+
declare class DefinePlugin {
|
|
6152
|
+
/**
|
|
6153
|
+
* Create a new define plugin
|
|
6154
|
+
*/
|
|
6155
|
+
constructor(definitions: Definitions);
|
|
6156
|
+
definitions: Definitions;
|
|
6157
|
+
|
|
6158
|
+
/**
|
|
6159
|
+
* Applies the plugin by registering its hooks on the compiler.
|
|
6160
|
+
*/
|
|
6161
|
+
apply(compiler: Compiler): void;
|
|
6162
|
+
|
|
6163
|
+
/**
|
|
6164
|
+
* Returns runtime value.
|
|
6165
|
+
*/
|
|
6166
|
+
static runtimeValue(
|
|
6167
|
+
fn: (value: {
|
|
6168
|
+
module: NormalModule;
|
|
6169
|
+
key: string;
|
|
6170
|
+
readonly version: ValueCacheVersion;
|
|
6171
|
+
}) => CodeValuePrimitive,
|
|
6172
|
+
options?: true | string[] | RuntimeValueOptions
|
|
6173
|
+
): RuntimeValue;
|
|
6174
|
+
static getCompilationHooks: (compilation: Compilation) => {
|
|
6175
|
+
/**
|
|
6176
|
+
* @since 5.104.0
|
|
6177
|
+
*/
|
|
6178
|
+
definitions: SyncWaterfallHook<
|
|
6179
|
+
[Record<string, CodeValue>],
|
|
6180
|
+
Record<string, CodeValue>
|
|
6181
|
+
>;
|
|
6182
|
+
};
|
|
6183
|
+
static VALUE_DEP_MAIN: string;
|
|
6184
|
+
static VALUE_DEP_PREFIX: string;
|
|
6185
|
+
static getDeclaredKeys: (compilation: Compilation) => undefined | Set<string>;
|
|
6186
|
+
static getMergedDefinitionNode: (
|
|
6187
|
+
compilation: Compilation,
|
|
6188
|
+
key: string
|
|
6189
|
+
) => MergedDefinitionNode;
|
|
6190
|
+
static getRuntimeRequirements: (code: string) => undefined | string[];
|
|
6191
|
+
static markInternal: (plugin: DefinePlugin) => DefinePlugin;
|
|
6192
|
+
static stringifyMergedDefinition: (
|
|
6193
|
+
compilation: Compilation,
|
|
6194
|
+
parser: JavascriptParser,
|
|
6195
|
+
node: MergedDefinitionNode,
|
|
6196
|
+
key: string,
|
|
6197
|
+
objKeys?: null | Set<string>
|
|
6198
|
+
) => string;
|
|
6199
|
+
static toPropertyKey: (key: string) => string;
|
|
6200
|
+
}
|
|
6201
|
+
declare interface Definitions {
|
|
6202
|
+
[index: string]: CodeValue;
|
|
6203
|
+
}
|
|
6204
|
+
declare class DelegatedPlugin {
|
|
6205
|
+
/**
|
|
6206
|
+
* Creates an instance of DelegatedPlugin.
|
|
6207
|
+
*/
|
|
6208
|
+
constructor(options: Options);
|
|
6209
|
+
options: Options;
|
|
6210
|
+
|
|
6211
|
+
/**
|
|
6212
|
+
* Applies the plugin by registering its hooks on the compiler.
|
|
6213
|
+
*/
|
|
6214
|
+
apply(compiler: Compiler): void;
|
|
6215
|
+
}
|
|
5944
6216
|
|
|
5945
6217
|
/**
|
|
5946
6218
|
* DependenciesBlock is the base class for all Module classes in webpack. It describes a
|
|
@@ -5985,12 +6257,12 @@ declare abstract class DependenciesBlock {
|
|
|
5985
6257
|
/**
|
|
5986
6258
|
* Serializes this instance into the provided serializer context.
|
|
5987
6259
|
*/
|
|
5988
|
-
serialize(__0:
|
|
6260
|
+
serialize(__0: ObjectSerializerContextObjectMiddlewareObject_3): void;
|
|
5989
6261
|
|
|
5990
6262
|
/**
|
|
5991
6263
|
* Restores this instance from the provided deserializer context.
|
|
5992
6264
|
*/
|
|
5993
|
-
deserialize(__0:
|
|
6265
|
+
deserialize(__0: ObjectDeserializerContextObjectMiddlewareObject_2): void;
|
|
5994
6266
|
}
|
|
5995
6267
|
declare interface DependenciesBlockLike {
|
|
5996
6268
|
dependencies: Dependency[];
|
|
@@ -6010,6 +6282,13 @@ declare class Dependency {
|
|
|
6010
6282
|
*/
|
|
6011
6283
|
get category(): string;
|
|
6012
6284
|
|
|
6285
|
+
/**
|
|
6286
|
+
* Returns the source type this dependency reads from the module it references:
|
|
6287
|
+
* `javascript` for anything going through the module wrapper, `asset-url` for a
|
|
6288
|
+
* bare url embedded into non-javascript output (css, html, a manifest).
|
|
6289
|
+
*/
|
|
6290
|
+
get referencedSourceType(): string;
|
|
6291
|
+
|
|
6013
6292
|
/**
|
|
6014
6293
|
* Returns location.
|
|
6015
6294
|
*/
|
|
@@ -6140,17 +6419,17 @@ declare class Dependency {
|
|
|
6140
6419
|
/**
|
|
6141
6420
|
* Returns true if this dependency can be concatenated
|
|
6142
6421
|
*/
|
|
6143
|
-
canConcatenate(): boolean;
|
|
6422
|
+
canConcatenate(concatenateCommonJsModules: boolean): boolean;
|
|
6144
6423
|
|
|
6145
6424
|
/**
|
|
6146
6425
|
* Serializes this instance into the provided serializer context.
|
|
6147
6426
|
*/
|
|
6148
|
-
serialize(__0:
|
|
6427
|
+
serialize(__0: ObjectSerializerContextObjectMiddlewareObject_3): void;
|
|
6149
6428
|
|
|
6150
6429
|
/**
|
|
6151
6430
|
* Restores this instance from the provided deserializer context.
|
|
6152
6431
|
*/
|
|
6153
|
-
deserialize(__0:
|
|
6432
|
+
deserialize(__0: ObjectDeserializerContextObjectMiddlewareObject_2): void;
|
|
6154
6433
|
module: any;
|
|
6155
6434
|
get disconnect(): any;
|
|
6156
6435
|
|
|
@@ -6176,7 +6455,10 @@ declare class Dependency {
|
|
|
6176
6455
|
/**
|
|
6177
6456
|
* Returns true if the dependency can be concatenated (scope hoisting).
|
|
6178
6457
|
*/
|
|
6179
|
-
static canConcatenate(
|
|
6458
|
+
static canConcatenate(
|
|
6459
|
+
dependency: Dependency,
|
|
6460
|
+
concatenateCommonJsModules: boolean
|
|
6461
|
+
): boolean;
|
|
6180
6462
|
static TRANSITIVE: symbol;
|
|
6181
6463
|
static LAZY_UNTIL_LOCAL: "local";
|
|
6182
6464
|
static LAZY_UNTIL_ID: "id";
|
|
@@ -6751,6 +7033,7 @@ declare interface EffectData {
|
|
|
6751
7033
|
mimetype?: string;
|
|
6752
7034
|
dependency: string;
|
|
6753
7035
|
descriptionData?: JsonObjectTypes;
|
|
7036
|
+
descriptionRelativePath?: string;
|
|
6754
7037
|
compiler?: string;
|
|
6755
7038
|
issuer: string;
|
|
6756
7039
|
issuerLayer: string;
|
|
@@ -6766,9 +7049,6 @@ declare interface EffectUse {
|
|
|
6766
7049
|
}
|
|
6767
7050
|
type EffectUseType = "use" | "use-pre" | "use-post";
|
|
6768
7051
|
declare class ElectronTargetPlugin {
|
|
6769
|
-
/**
|
|
6770
|
-
* Creates an instance of ElectronTargetPlugin.
|
|
6771
|
-
*/
|
|
6772
7052
|
constructor(
|
|
6773
7053
|
context?: "preload" | "main" | "renderer",
|
|
6774
7054
|
type?:
|
|
@@ -6807,6 +7087,32 @@ declare class ElectronTargetPlugin {
|
|
|
6807
7087
|
*/
|
|
6808
7088
|
apply(compiler: Compiler): void;
|
|
6809
7089
|
}
|
|
7090
|
+
declare interface EmbeddedSourceInfo {
|
|
7091
|
+
/**
|
|
7092
|
+
* the embedded source's type, e.g. `"css"` / `"html"`
|
|
7093
|
+
*/
|
|
7094
|
+
type: string;
|
|
7095
|
+
|
|
7096
|
+
/**
|
|
7097
|
+
* the type of the source it is embedded in, e.g. `"javascript"`
|
|
7098
|
+
*/
|
|
7099
|
+
hostType: string;
|
|
7100
|
+
|
|
7101
|
+
/**
|
|
7102
|
+
* the module being generated
|
|
7103
|
+
*/
|
|
7104
|
+
module: Module;
|
|
7105
|
+
|
|
7106
|
+
/**
|
|
7107
|
+
* which of that language's productions this is, where more than one can be embedded — a `style=""` holds `"block-contents"`, an inline `<style>` a whole `"stylesheet"`. Absent where the language has only one
|
|
7108
|
+
*/
|
|
7109
|
+
as?: string;
|
|
7110
|
+
}
|
|
7111
|
+
declare interface EmbeddedSourceResult {
|
|
7112
|
+
code?: string;
|
|
7113
|
+
warnings?: (string | Error)[];
|
|
7114
|
+
errors?: (string | Error)[];
|
|
7115
|
+
}
|
|
6810
7116
|
|
|
6811
7117
|
/**
|
|
6812
7118
|
* No generator options are supported for this module type.
|
|
@@ -6984,9 +7290,9 @@ declare interface EntryDescription {
|
|
|
6984
7290
|
filename?: string | TemplatePathFn<PathDataChunk>;
|
|
6985
7291
|
|
|
6986
7292
|
/**
|
|
6987
|
-
* Generate an HTML file for this entrypoint with its JS and CSS output chunks injected.
|
|
7293
|
+
* Generate an HTML file for this entrypoint with its JS and CSS output chunks injected. An object overrides `output.html` option by option for this entry; `inline` is resolved once per generated page and can only be set on `output.html`.
|
|
6988
7294
|
*/
|
|
6989
|
-
html?: boolean;
|
|
7295
|
+
html?: boolean | OutputHtmlOptions;
|
|
6990
7296
|
|
|
6991
7297
|
/**
|
|
6992
7298
|
* Module(s) that are loaded upon startup.
|
|
@@ -7054,9 +7360,9 @@ declare interface EntryDescriptionNormalized {
|
|
|
7054
7360
|
filename?: string | TemplatePathFn<PathDataChunk>;
|
|
7055
7361
|
|
|
7056
7362
|
/**
|
|
7057
|
-
* Generate an HTML file for this entrypoint with its JS and CSS output chunks injected.
|
|
7363
|
+
* Generate an HTML file for this entrypoint with its JS and CSS output chunks injected. An object overrides `output.html` option by option for this entry; `inline` is resolved once per generated page and can only be set on `output.html`.
|
|
7058
7364
|
*/
|
|
7059
|
-
html?: boolean;
|
|
7365
|
+
html?: boolean | OutputHtmlOptions;
|
|
7060
7366
|
|
|
7061
7367
|
/**
|
|
7062
7368
|
* Module(s) that are loaded upon startup. The last one is exported.
|
|
@@ -7244,6 +7550,13 @@ declare interface Environment {
|
|
|
7244
7550
|
*/
|
|
7245
7551
|
const?: boolean;
|
|
7246
7552
|
|
|
7553
|
+
/**
|
|
7554
|
+
* The environment supports deferred module evaluation ('import defer * as ns from "..."', 'import.defer("...")').
|
|
7555
|
+
* @since 5.110.0
|
|
7556
|
+
* @experimental
|
|
7557
|
+
*/
|
|
7558
|
+
deferImport?: boolean;
|
|
7559
|
+
|
|
7247
7560
|
/**
|
|
7248
7561
|
* The environment supports destructuring ('{ a, b } = obj').
|
|
7249
7562
|
*/
|
|
@@ -7331,6 +7644,13 @@ declare interface Environment {
|
|
|
7331
7644
|
*/
|
|
7332
7645
|
optionalChaining?: boolean;
|
|
7333
7646
|
|
|
7647
|
+
/**
|
|
7648
|
+
* The environment supports source phase imports ('import source m from "..."', 'import.source("...")').
|
|
7649
|
+
* @since 5.110.0
|
|
7650
|
+
* @experimental
|
|
7651
|
+
*/
|
|
7652
|
+
sourceImport?: boolean;
|
|
7653
|
+
|
|
7334
7654
|
/**
|
|
7335
7655
|
* The environment supports spread and rest in array/object literals and calls ('{ ...obj }', 'fn(...args)').
|
|
7336
7656
|
*/
|
|
@@ -7819,6 +8139,12 @@ declare abstract class ExportInfo {
|
|
|
7819
8139
|
resolveTargetFilter?: (target: TargetItemWithConnection) => boolean
|
|
7820
8140
|
): undefined | TargetItemWithConnection;
|
|
7821
8141
|
|
|
8142
|
+
/**
|
|
8143
|
+
* Returns whether resolving the target leads back to this export, which
|
|
8144
|
+
* `getTarget` cannot express as it reports a cycle as "no target".
|
|
8145
|
+
*/
|
|
8146
|
+
hasCircularTarget(moduleGraph: ModuleGraph): boolean;
|
|
8147
|
+
|
|
7822
8148
|
/**
|
|
7823
8149
|
* Move the target forward as long resolveTargetFilter is fulfilled
|
|
7824
8150
|
*/
|
|
@@ -7858,6 +8184,7 @@ declare abstract class ExportMode {
|
|
|
7858
8184
|
items: null | NormalReexportItem[];
|
|
7859
8185
|
name: null | string;
|
|
7860
8186
|
partialNamespaceExportInfo: null | ExportInfo;
|
|
8187
|
+
circular: boolean;
|
|
7861
8188
|
ignored: null | Set<string>;
|
|
7862
8189
|
hidden?: null | Set<string>;
|
|
7863
8190
|
userRequest: null | string;
|
|
@@ -7978,7 +8305,7 @@ declare abstract class ExportsInfo {
|
|
|
7978
8305
|
/**
|
|
7979
8306
|
* Gets read only export info.
|
|
7980
8307
|
*/
|
|
7981
|
-
getReadOnlyExportInfo(name: string):
|
|
8308
|
+
getReadOnlyExportInfo(name: string): any;
|
|
7982
8309
|
|
|
7983
8310
|
/**
|
|
7984
8311
|
* Gets read only export info recursive.
|
|
@@ -8218,7 +8545,8 @@ type ExternalItem =
|
|
|
8218
8545
|
| string
|
|
8219
8546
|
| boolean
|
|
8220
8547
|
| string[]
|
|
8221
|
-
|
|
|
8548
|
+
| ExternalItemValueObject
|
|
8549
|
+
| ExternalItemValueWithOptions
|
|
8222
8550
|
) => void
|
|
8223
8551
|
) => void)
|
|
8224
8552
|
| ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>);
|
|
@@ -8231,7 +8559,8 @@ type ExternalItemFunction =
|
|
|
8231
8559
|
| string
|
|
8232
8560
|
| boolean
|
|
8233
8561
|
| string[]
|
|
8234
|
-
|
|
|
8562
|
+
| ExternalItemValueObject
|
|
8563
|
+
| ExternalItemValueWithOptions
|
|
8235
8564
|
) => void
|
|
8236
8565
|
) => void)
|
|
8237
8566
|
| ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>);
|
|
@@ -8272,6 +8601,11 @@ declare interface ExternalItemFunctionData {
|
|
|
8272
8601
|
* the request as written by the user in the require/import expression/statement
|
|
8273
8602
|
*/
|
|
8274
8603
|
request: string;
|
|
8604
|
+
|
|
8605
|
+
/**
|
|
8606
|
+
* same as `request`, except for an element of a context module (a request containing an expression), where it is the request as written by the user instead of the one relative to the resolved context directory
|
|
8607
|
+
*/
|
|
8608
|
+
originalRequest: string;
|
|
8275
8609
|
}
|
|
8276
8610
|
|
|
8277
8611
|
/**
|
|
@@ -8296,7 +8630,10 @@ type ExternalItemValue =
|
|
|
8296
8630
|
| string
|
|
8297
8631
|
| boolean
|
|
8298
8632
|
| string[]
|
|
8299
|
-
|
|
|
8633
|
+
| ExternalItemValueObject
|
|
8634
|
+
| ExternalItemValueWithOptions;
|
|
8635
|
+
type ExternalItemValueObject = ExternalItemValueObjectKnown &
|
|
8636
|
+
ExternalItemValueObjectUnknown;
|
|
8300
8637
|
|
|
8301
8638
|
/**
|
|
8302
8639
|
* The target of the external with a type, optionally with an 'interop' hint describing how its exports interoperate with ES module imports.
|
|
@@ -8315,6 +8652,25 @@ declare interface ExternalItemValueObjectKnown {
|
|
|
8315
8652
|
declare interface ExternalItemValueObjectUnknown {
|
|
8316
8653
|
[index: string]: string | string[];
|
|
8317
8654
|
}
|
|
8655
|
+
type ExternalItemValueTarget =
|
|
8656
|
+
string | boolean | string[] | ExternalItemValueObject;
|
|
8657
|
+
|
|
8658
|
+
/**
|
|
8659
|
+
* The target of the external together with options describing how webpack should treat it.
|
|
8660
|
+
* @since 5.110.0
|
|
8661
|
+
*/
|
|
8662
|
+
declare interface ExternalItemValueWithOptions {
|
|
8663
|
+
/**
|
|
8664
|
+
* The target of the external.
|
|
8665
|
+
*/
|
|
8666
|
+
external: ExternalItemValueTarget;
|
|
8667
|
+
|
|
8668
|
+
/**
|
|
8669
|
+
* Whether importing the external has side effects (like the `sideEffects` flag in a package.json). `false` allows webpack to drop the external when none of its exports are used. Defaults to `true`, as webpack can't analyze an external.
|
|
8670
|
+
* @since 5.110.0
|
|
8671
|
+
*/
|
|
8672
|
+
sideEffects?: boolean;
|
|
8673
|
+
}
|
|
8318
8674
|
declare class ExternalModule extends Module {
|
|
8319
8675
|
/**
|
|
8320
8676
|
* Creates an instance of ExternalModule.
|
|
@@ -8325,7 +8681,8 @@ declare class ExternalModule extends Module {
|
|
|
8325
8681
|
userRequest: string,
|
|
8326
8682
|
dependencyMeta?:
|
|
8327
8683
|
ImportDependencyMeta | CssImportDependencyMeta | AssetDependencyMeta,
|
|
8328
|
-
interop?: "default" | "esModule"
|
|
8684
|
+
interop?: "default" | "esModule",
|
|
8685
|
+
sideEffects?: boolean
|
|
8329
8686
|
);
|
|
8330
8687
|
request: ExternalModuleRequest;
|
|
8331
8688
|
externalType: ExternalsType;
|
|
@@ -8333,6 +8690,7 @@ declare class ExternalModule extends Module {
|
|
|
8333
8690
|
dependencyMeta?:
|
|
8334
8691
|
ImportDependencyMeta | CssImportDependencyMeta | AssetDependencyMeta;
|
|
8335
8692
|
interop?: "default" | "esModule";
|
|
8693
|
+
sideEffects?: boolean;
|
|
8336
8694
|
|
|
8337
8695
|
/**
|
|
8338
8696
|
* restore unsafe cache data
|
|
@@ -8341,6 +8699,7 @@ declare class ExternalModule extends Module {
|
|
|
8341
8699
|
unsafeCacheData: UnsafeCacheData,
|
|
8342
8700
|
normalModuleFactory: NormalModuleFactory
|
|
8343
8701
|
): void;
|
|
8702
|
+
canBeWrappedInConcatenation(): boolean;
|
|
8344
8703
|
static getCompilationHooks: (compilation: Compilation) => {
|
|
8345
8704
|
/**
|
|
8346
8705
|
* @since 5.106.0
|
|
@@ -8364,6 +8723,16 @@ type ExternalModuleBuildInfo = KnownBuildInfo &
|
|
|
8364
8723
|
KnownExternalModuleBuildInfo;
|
|
8365
8724
|
declare interface ExternalModuleInfo {
|
|
8366
8725
|
type: "external";
|
|
8726
|
+
|
|
8727
|
+
/**
|
|
8728
|
+
* the module's `require()` call is deferred behind an accessor instead of running at its own slot; unlike a wrapped concatenated member there is no body and no CJS wrapper, so any external may be wrapped
|
|
8729
|
+
*/
|
|
8730
|
+
wrapped: boolean;
|
|
8731
|
+
|
|
8732
|
+
/**
|
|
8733
|
+
* a wrapped module reached by an eager import edge, so its accessor is called at its own slot in evaluation order
|
|
8734
|
+
*/
|
|
8735
|
+
eager: boolean;
|
|
8367
8736
|
module: Module;
|
|
8368
8737
|
runtimeCondition?: string | boolean | SortableSet<string>;
|
|
8369
8738
|
nonDeferAccess: boolean;
|
|
@@ -8374,6 +8743,11 @@ declare interface ExternalModuleInfo {
|
|
|
8374
8743
|
*/
|
|
8375
8744
|
name?: string;
|
|
8376
8745
|
|
|
8746
|
+
/**
|
|
8747
|
+
* lazy module accessor
|
|
8748
|
+
*/
|
|
8749
|
+
namespaceFnName?: string;
|
|
8750
|
+
|
|
8377
8751
|
/**
|
|
8378
8752
|
* decoupled namespace object that keeps original export names when the exports are mangled
|
|
8379
8753
|
*/
|
|
@@ -8454,7 +8828,8 @@ type Externals =
|
|
|
8454
8828
|
| string
|
|
8455
8829
|
| boolean
|
|
8456
8830
|
| string[]
|
|
8457
|
-
|
|
|
8831
|
+
| ExternalItemValueObject
|
|
8832
|
+
| ExternalItemValueWithOptions
|
|
8458
8833
|
) => void
|
|
8459
8834
|
) => void)
|
|
8460
8835
|
| ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>)
|
|
@@ -8571,6 +8946,18 @@ declare interface ExternalsPresets {
|
|
|
8571
8946
|
*/
|
|
8572
8947
|
node?: boolean;
|
|
8573
8948
|
|
|
8949
|
+
/**
|
|
8950
|
+
* Treat installed packages (requests resolving into a 'node_modules' directory) as external and load them via require()/import at runtime instead of bundling them (useful for server-side rendering builds).
|
|
8951
|
+
*/
|
|
8952
|
+
nodeModules?:
|
|
8953
|
+
| boolean
|
|
8954
|
+
| {
|
|
8955
|
+
/**
|
|
8956
|
+
* Keep these requests bundled instead of externalizing them.
|
|
8957
|
+
*/
|
|
8958
|
+
allowlist?: (string | RegExp | ((request: string) => boolean))[];
|
|
8959
|
+
};
|
|
8960
|
+
|
|
8574
8961
|
/**
|
|
8575
8962
|
* Treat NW.js legacy nw.gui module as external and load it via require() when used.
|
|
8576
8963
|
*/
|
|
@@ -9000,6 +9387,12 @@ declare interface Flags {
|
|
|
9000
9387
|
declare interface FullHashChunkModuleHashes {
|
|
9001
9388
|
[index: string]: string;
|
|
9002
9389
|
}
|
|
9390
|
+
type FunctionNode = NodeSyntax & {
|
|
9391
|
+
name: string;
|
|
9392
|
+
nameStart: number;
|
|
9393
|
+
nameEnd: number;
|
|
9394
|
+
value: ComponentValue[];
|
|
9395
|
+
};
|
|
9003
9396
|
declare interface GenerateContext {
|
|
9004
9397
|
/**
|
|
9005
9398
|
* mapping from dependencies to templates
|
|
@@ -9105,6 +9498,14 @@ declare class Generator {
|
|
|
9105
9498
|
static byType(map: {
|
|
9106
9499
|
[index: string]: undefined | Generator;
|
|
9107
9500
|
}): ByTypeGenerator;
|
|
9501
|
+
|
|
9502
|
+
/**
|
|
9503
|
+
* Returns the statement a module that failed to build throws when executed.
|
|
9504
|
+
*/
|
|
9505
|
+
static throwBuildErrorCode(
|
|
9506
|
+
error: Error,
|
|
9507
|
+
parseErrorConstructor?: string
|
|
9508
|
+
): string;
|
|
9108
9509
|
}
|
|
9109
9510
|
declare interface GeneratorOptions {
|
|
9110
9511
|
[index: string]: any;
|
|
@@ -9486,7 +9887,10 @@ declare class HarmonyImportDependency extends ModuleDependency {
|
|
|
9486
9887
|
/**
|
|
9487
9888
|
* Returns true if the dependency can be concatenated (scope hoisting).
|
|
9488
9889
|
*/
|
|
9489
|
-
static canConcatenate(
|
|
9890
|
+
static canConcatenate(
|
|
9891
|
+
dependency: Dependency,
|
|
9892
|
+
concatenateCommonJsModules: boolean
|
|
9893
|
+
): boolean;
|
|
9490
9894
|
static TRANSITIVE: symbol;
|
|
9491
9895
|
static LAZY_UNTIL_LOCAL: "local";
|
|
9492
9896
|
static LAZY_UNTIL_ID: "id";
|
|
@@ -9504,6 +9908,9 @@ declare class HarmonyImportDependencyTemplate extends DependencyTemplate {
|
|
|
9504
9908
|
referencedModule: Module
|
|
9505
9909
|
): undefined | string | boolean | SortableSet<string>;
|
|
9506
9910
|
}
|
|
9911
|
+
declare abstract class HarmonyImportSideEffectDependency extends HarmonyImportDependency {
|
|
9912
|
+
unusedSpecifiers?: UnusedSpecifiers;
|
|
9913
|
+
}
|
|
9507
9914
|
declare interface HarmonySettings {
|
|
9508
9915
|
ids: string[];
|
|
9509
9916
|
source: string;
|
|
@@ -9512,6 +9919,16 @@ declare interface HarmonySettings {
|
|
|
9512
9919
|
await: boolean;
|
|
9513
9920
|
attributes?: ImportAttributes;
|
|
9514
9921
|
phase: ImportPhaseType;
|
|
9922
|
+
|
|
9923
|
+
/**
|
|
9924
|
+
* whether the binding is referenced anywhere
|
|
9925
|
+
*/
|
|
9926
|
+
used: boolean;
|
|
9927
|
+
|
|
9928
|
+
/**
|
|
9929
|
+
* the statement's own dependency
|
|
9930
|
+
*/
|
|
9931
|
+
dependency?: HarmonyImportSideEffectDependency;
|
|
9515
9932
|
}
|
|
9516
9933
|
declare abstract class HarmonyStarExportsList {
|
|
9517
9934
|
dependencies: HarmonyExportImportedSpecifierDependency[];
|
|
@@ -9619,7 +10036,7 @@ type Head<T extends ReadonlyArray<any>> = T extends readonly [infer H, ...any[]]
|
|
|
9619
10036
|
? H
|
|
9620
10037
|
: T extends readonly []
|
|
9621
10038
|
? any
|
|
9622
|
-
: T extends (infer E)[]
|
|
10039
|
+
: T extends readonly (infer E)[]
|
|
9623
10040
|
? E
|
|
9624
10041
|
: never;
|
|
9625
10042
|
|
|
@@ -9651,6 +10068,46 @@ declare interface HotModuleReplacementPluginLoaderContext {
|
|
|
9651
10068
|
declare class HotUpdateChunk extends Chunk {
|
|
9652
10069
|
constructor();
|
|
9653
10070
|
}
|
|
10071
|
+
declare interface HtmlAstSkip {
|
|
10072
|
+
/**
|
|
10073
|
+
* drop every `Text` node. Raw-text element bodies (`<script>`/`<style>`/…) aren't emitted either — their content span is recorded as the element's `contentEnd` (see `RAW_TEXT_ELEMENTS`) so a consumer can read `[tagEnd, contentEnd]` by offset. For consumers that read text by offset (e.g. `HtmlParser`), never the html5lib serializer.
|
|
10074
|
+
*/
|
|
10075
|
+
text?: boolean;
|
|
10076
|
+
|
|
10077
|
+
/**
|
|
10078
|
+
* drop comment nodes entirely. Not for consumers that read comments (e.g. webpack magic comments).
|
|
10079
|
+
*/
|
|
10080
|
+
comments?: boolean;
|
|
10081
|
+
|
|
10082
|
+
/**
|
|
10083
|
+
* drop the doctype node; quirks-mode detection is unaffected.
|
|
10084
|
+
*/
|
|
10085
|
+
doctype?: boolean;
|
|
10086
|
+
}
|
|
10087
|
+
declare interface HtmlAttribute {
|
|
10088
|
+
/**
|
|
10089
|
+
* lowercased (and, in foreign content, adjusted) attribute name
|
|
10090
|
+
*/
|
|
10091
|
+
name: string;
|
|
10092
|
+
value: string;
|
|
10093
|
+
|
|
10094
|
+
/**
|
|
10095
|
+
* name used by the html5lib tree serializer (foreign-namespaced)
|
|
10096
|
+
*/
|
|
10097
|
+
serializedName?: string;
|
|
10098
|
+
|
|
10099
|
+
/**
|
|
10100
|
+
* source offset, or -1 on adoption-agency clones
|
|
10101
|
+
*/
|
|
10102
|
+
nameStart: number;
|
|
10103
|
+
nameEnd: number;
|
|
10104
|
+
|
|
10105
|
+
/**
|
|
10106
|
+
* source offset, or -1 when valueless / on clones
|
|
10107
|
+
*/
|
|
10108
|
+
valueStart: number;
|
|
10109
|
+
valueEnd: number;
|
|
10110
|
+
}
|
|
9654
10111
|
declare interface HtmlEmittedContext {
|
|
9655
10112
|
outputName: string;
|
|
9656
10113
|
}
|
|
@@ -9836,6 +10293,17 @@ declare interface HtmlMutableTag {
|
|
|
9836
10293
|
*/
|
|
9837
10294
|
remove?: boolean;
|
|
9838
10295
|
}
|
|
10296
|
+
declare interface HtmlParseOptions {
|
|
10297
|
+
/**
|
|
10298
|
+
* context element name for fragment parsing (e.g. `td`, `svg path`); omit for a full document
|
|
10299
|
+
*/
|
|
10300
|
+
fragmentContext?: string;
|
|
10301
|
+
|
|
10302
|
+
/**
|
|
10303
|
+
* node kinds to omit from the AST (see `HtmlAstSkip`); omit to build the full tree
|
|
10304
|
+
*/
|
|
10305
|
+
skip?: HtmlAstSkip;
|
|
10306
|
+
}
|
|
9839
10307
|
declare abstract class HtmlParser extends ParserClass {
|
|
9840
10308
|
magicCommentContext: ContextImport;
|
|
9841
10309
|
template?: (source: string, context: HtmlTemplateContext) => string;
|
|
@@ -9913,6 +10381,126 @@ declare interface HtmlParserOptions {
|
|
|
9913
10381
|
*/
|
|
9914
10382
|
urlHints?: UrlHintRule[];
|
|
9915
10383
|
}
|
|
10384
|
+
type HtmlPrintOptions = Pick<
|
|
10385
|
+
CssProcessOptions,
|
|
10386
|
+
"environment" | "convertLengthUnits" | "rewriteCustomProperties"
|
|
10387
|
+
> & {
|
|
10388
|
+
cssTransforms?: CssTransformOptions;
|
|
10389
|
+
transforms?: HtmlTransformOptions;
|
|
10390
|
+
collapseWhitespace?: boolean | "all" | "conservative" | "smart";
|
|
10391
|
+
mergeStyles?: boolean;
|
|
10392
|
+
removeEmptyAttributes?: boolean;
|
|
10393
|
+
removeEmptyElements?: boolean;
|
|
10394
|
+
removeRedundantAttributes?: boolean | "all" | "smart";
|
|
10395
|
+
sortAttributes?: boolean;
|
|
10396
|
+
sortTokenLists?: boolean;
|
|
10397
|
+
removeImpliedTags?: boolean | "all" | "smart";
|
|
10398
|
+
renderEmbeddedSource?: (
|
|
10399
|
+
source: string,
|
|
10400
|
+
info: { type: string; hostType: string; as?: string }
|
|
10401
|
+
) => undefined | string;
|
|
10402
|
+
deferEmbeddedSource?: DeferredEmbeddedSource[];
|
|
10403
|
+
deferSrcdoc?: boolean;
|
|
10404
|
+
};
|
|
10405
|
+
declare interface HtmlProcessOptions {
|
|
10406
|
+
/**
|
|
10407
|
+
* context element tag name for fragment parsing (see `parseHtml`); the HTML analog of the CSS parser's `as` parse-mode option
|
|
10408
|
+
*/
|
|
10409
|
+
fragmentContext?: string;
|
|
10410
|
+
|
|
10411
|
+
/**
|
|
10412
|
+
* node kinds to omit from the AST for speed/memory (see `HtmlAstSkip`)
|
|
10413
|
+
*/
|
|
10414
|
+
skip?: HtmlAstSkip;
|
|
10415
|
+
|
|
10416
|
+
/**
|
|
10417
|
+
* print the safely-minified serialization (nodes rebuilt from source, inert comments dropped, opening-tag whitespace collapsed) as `process` walks, and return it (default false = walk only, return `""`)
|
|
10418
|
+
*/
|
|
10419
|
+
minimize?: boolean;
|
|
10420
|
+
|
|
10421
|
+
/**
|
|
10422
|
+
* CSS's, not HTML's: handed to the CSS minifier that runs over an inline `<style>` and every `style=""`, so the inline copy of a declaration agrees with the `.css` asset
|
|
10423
|
+
*/
|
|
10424
|
+
environment?: CssEnvironment;
|
|
10425
|
+
|
|
10426
|
+
/**
|
|
10427
|
+
* CSS's too, handed over with `environment` (see `HtmlPrintOptions`)
|
|
10428
|
+
*/
|
|
10429
|
+
convertLengthUnits?: boolean;
|
|
10430
|
+
|
|
10431
|
+
/**
|
|
10432
|
+
* CSS's too, handed over with `environment` (see `HtmlPrintOptions`)
|
|
10433
|
+
*/
|
|
10434
|
+
rewriteCustomProperties?: boolean;
|
|
10435
|
+
|
|
10436
|
+
/**
|
|
10437
|
+
* CSS's per-transform switches too, handed over with `environment` (see `HtmlPrintOptions`)
|
|
10438
|
+
*/
|
|
10439
|
+
cssTransforms?: CssTransformOptions;
|
|
10440
|
+
|
|
10441
|
+
/**
|
|
10442
|
+
* which of the meaning-preserving rewrites the minifying print makes; each is on unless it is `false`
|
|
10443
|
+
*/
|
|
10444
|
+
transforms?: HtmlTransformOptions;
|
|
10445
|
+
|
|
10446
|
+
/**
|
|
10447
|
+
* collapse each run of whitespace in text to a single space, except where an ancestor renders it verbatim; `"smart"` also drops what sits against a block edge and `"all"` drops every edge (default false)
|
|
10448
|
+
*/
|
|
10449
|
+
collapseWhitespace?: boolean | "all" | "conservative" | "smart";
|
|
10450
|
+
|
|
10451
|
+
/**
|
|
10452
|
+
* drop an attribute whose empty value leaves it in the state its absence gives (default false)
|
|
10453
|
+
*/
|
|
10454
|
+
removeEmptyAttributes?: boolean;
|
|
10455
|
+
|
|
10456
|
+
/**
|
|
10457
|
+
* drop an element with no children and no attributes, unless its bare form is meaningful (default false)
|
|
10458
|
+
*/
|
|
10459
|
+
removeEmptyElements?: boolean;
|
|
10460
|
+
|
|
10461
|
+
/**
|
|
10462
|
+
* print a run of adjacent `<style>` elements as one sheet, which removes elements (default false)
|
|
10463
|
+
*/
|
|
10464
|
+
mergeStyles?: boolean;
|
|
10465
|
+
|
|
10466
|
+
/**
|
|
10467
|
+
* print an element's attributes commonest name first, ties by name, which nothing in HTML reads (default false)
|
|
10468
|
+
*/
|
|
10469
|
+
sortAttributes?: boolean;
|
|
10470
|
+
|
|
10471
|
+
/**
|
|
10472
|
+
* print every token list the DOM reads as a set (`class`, `rel`, `part`, …) in token order (default false)
|
|
10473
|
+
*/
|
|
10474
|
+
sortTokenLists?: boolean;
|
|
10475
|
+
|
|
10476
|
+
/**
|
|
10477
|
+
* drop an attribute whose value is the element's own default; `true` is `"smart"`, and `"all"` also drops the spec defaults a selector can match (default false)
|
|
10478
|
+
*/
|
|
10479
|
+
removeRedundantAttributes?: boolean | "all" | "smart";
|
|
10480
|
+
|
|
10481
|
+
/**
|
|
10482
|
+
* how much of the `<html>` / `<head>` / `<body>` shell §13.1.2.4 lets the parser imply may be left out: `"smart"` leaves out only the `<html>` start tag, `true` (or `"all"`) all six, `false` none (default `"smart"`)
|
|
10483
|
+
*/
|
|
10484
|
+
removeImpliedTags?: boolean | "all" | "smart";
|
|
10485
|
+
|
|
10486
|
+
/**
|
|
10487
|
+
* whether an `<iframe srcdoc>` is among what `deferEmbeddedSource` collects (default true); false for a caller that minifies them itself, which keeps the attribute on the normal path and its shorter delimiter
|
|
10488
|
+
*/
|
|
10489
|
+
deferSrcdoc?: boolean;
|
|
10490
|
+
|
|
10491
|
+
/**
|
|
10492
|
+
* collects what `renderEmbeddedSource` would be offered instead of offering it, for a caller whose renderer is asynchronous: the print leaves a marker for each and `finish` puts the answers in their place, so one parse serves both. A `style=""` stays with the built-in CSS minifier, whose text this print reads back to decide how the attribute is written. Takes precedence over `renderEmbeddedSource`
|
|
10493
|
+
*/
|
|
10494
|
+
deferEmbeddedSource?: DeferredEmbeddedSource[];
|
|
10495
|
+
|
|
10496
|
+
/**
|
|
10497
|
+
* renders each nested body this document embeds — an inline `<style>`, every `style=""` (handed over as a whole stylesheet, SVG's and MathML's included), a `<script>` holding JSON or JavaScript, an `<svg>` subtree, and the document an `<iframe srcdoc>` holds (decoded, and written back escaped). Replaces the built-in CSS and JSON minifiers wherever it answers, and returning anything but text falls back to them; it is the only way inline JavaScript, SVG and a nested document are reached at all
|
|
10498
|
+
*/
|
|
10499
|
+
renderEmbeddedSource?: (
|
|
10500
|
+
source: string,
|
|
10501
|
+
info: { type: string; hostType: string; as?: string }
|
|
10502
|
+
) => undefined | string;
|
|
10503
|
+
}
|
|
9916
10504
|
declare interface HtmlResourceHintHtmlEntryDependency {
|
|
9917
10505
|
/**
|
|
9918
10506
|
* hint relationship
|
|
@@ -10089,9 +10677,122 @@ declare interface HtmlTemplateContext {
|
|
|
10089
10677
|
*/
|
|
10090
10678
|
emitError: (error: string | Error) => void;
|
|
10091
10679
|
}
|
|
10680
|
+
declare interface HtmlTokenCallbacks {
|
|
10681
|
+
openTag?: (
|
|
10682
|
+
input: string,
|
|
10683
|
+
start: number,
|
|
10684
|
+
end: number,
|
|
10685
|
+
nameStart: number,
|
|
10686
|
+
nameEnd: number,
|
|
10687
|
+
selfClosing: boolean
|
|
10688
|
+
) => number;
|
|
10689
|
+
closeTag?: (
|
|
10690
|
+
input: string,
|
|
10691
|
+
start: number,
|
|
10692
|
+
end: number,
|
|
10693
|
+
nameStart: number,
|
|
10694
|
+
nameEnd: number
|
|
10695
|
+
) => number;
|
|
10696
|
+
text?: (input: string, start: number, end: number) => number;
|
|
10697
|
+
attribute?: (
|
|
10698
|
+
input: string,
|
|
10699
|
+
nameStart: number,
|
|
10700
|
+
nameEnd: number,
|
|
10701
|
+
valueStart: number,
|
|
10702
|
+
valueEnd: number,
|
|
10703
|
+
quoteType: number
|
|
10704
|
+
) => number;
|
|
10705
|
+
comment?: (
|
|
10706
|
+
input: string,
|
|
10707
|
+
start: number,
|
|
10708
|
+
end: number,
|
|
10709
|
+
dataStart: number,
|
|
10710
|
+
dataEnd: number
|
|
10711
|
+
) => number;
|
|
10712
|
+
doctype?: (
|
|
10713
|
+
input: string,
|
|
10714
|
+
start: number,
|
|
10715
|
+
end: number,
|
|
10716
|
+
nameStart: number,
|
|
10717
|
+
nameEnd: number,
|
|
10718
|
+
publicStart: number,
|
|
10719
|
+
publicEnd: number,
|
|
10720
|
+
systemStart: number,
|
|
10721
|
+
systemEnd: number,
|
|
10722
|
+
forceQuirks: boolean
|
|
10723
|
+
) => number;
|
|
10724
|
+
parseError?: (
|
|
10725
|
+
input: string,
|
|
10726
|
+
code: string,
|
|
10727
|
+
start: number,
|
|
10728
|
+
end: number,
|
|
10729
|
+
severity: ParseErrorSeverity
|
|
10730
|
+
) => void;
|
|
10731
|
+
|
|
10732
|
+
/**
|
|
10733
|
+
* returns true when the adjusted current node is in a foreign (SVG/MathML) namespace, which is where a `<![CDATA[` opens a CDATA section
|
|
10734
|
+
*/
|
|
10735
|
+
isForeign?: () => boolean;
|
|
10736
|
+
|
|
10737
|
+
/**
|
|
10738
|
+
* returns true when the tree builder will not run the algorithm that switches the tokenizer for this start tag, so it stays in the data state
|
|
10739
|
+
*/
|
|
10740
|
+
vetoesContentMode?: (name: string) => boolean;
|
|
10741
|
+
|
|
10742
|
+
/**
|
|
10743
|
+
* context element tag name for fragment parsing; seeds the initial content mode
|
|
10744
|
+
*/
|
|
10745
|
+
fragmentContext?: string;
|
|
10746
|
+
}
|
|
10092
10747
|
declare interface HtmlTransformHtmlContext {
|
|
10093
10748
|
outputName: string;
|
|
10094
10749
|
}
|
|
10750
|
+
declare interface HtmlTransformOptions {
|
|
10751
|
+
/**
|
|
10752
|
+
* write a boolean attribute spelled with its own name (`disabled="disabled"`) as the bare name
|
|
10753
|
+
*/
|
|
10754
|
+
collapseBooleanAttributes?: boolean;
|
|
10755
|
+
|
|
10756
|
+
/**
|
|
10757
|
+
* which comments survive: `"some"` (the default) the ones that carry something, `true` / `"all"` every one, `false` none, or the ones a pattern matches / a predicate accepts, over the comment's own text. A comment a parser or a server reads is kept whatever this says
|
|
10758
|
+
*/
|
|
10759
|
+
comments?: string | boolean | RegExp | ((comment: string) => boolean);
|
|
10760
|
+
|
|
10761
|
+
/**
|
|
10762
|
+
* strip the whitespace between a JSON `<script>`'s tokens
|
|
10763
|
+
*/
|
|
10764
|
+
minifyJson?: boolean;
|
|
10765
|
+
|
|
10766
|
+
/**
|
|
10767
|
+
* run the CSS minifier over an inline `<style>` and every `style=""`
|
|
10768
|
+
*/
|
|
10769
|
+
minifyStyles?: boolean;
|
|
10770
|
+
|
|
10771
|
+
/**
|
|
10772
|
+
* drop or re-pick an attribute value's quotes
|
|
10773
|
+
*/
|
|
10774
|
+
normalizeAttributeQuotes?: boolean;
|
|
10775
|
+
|
|
10776
|
+
/**
|
|
10777
|
+
* fold an enumerated value to the keyword it names
|
|
10778
|
+
*/
|
|
10779
|
+
normalizeEnumeratedAttributes?: boolean;
|
|
10780
|
+
|
|
10781
|
+
/**
|
|
10782
|
+
* normalize a space-, comma- or descriptor-separated list value (`class`, `rel`, `srcset`, `sizes`, the viewport `content`)
|
|
10783
|
+
*/
|
|
10784
|
+
normalizeListAttributes?: boolean;
|
|
10785
|
+
|
|
10786
|
+
/**
|
|
10787
|
+
* write an integer attribute the one way its rules read it
|
|
10788
|
+
*/
|
|
10789
|
+
normalizeNumericAttributes?: boolean;
|
|
10790
|
+
|
|
10791
|
+
/**
|
|
10792
|
+
* leave out an optional tag other than the `<html>` / `<head>` / `<body>` shell, which is `removeImpliedTags`
|
|
10793
|
+
*/
|
|
10794
|
+
removeOptionalTags?: boolean;
|
|
10795
|
+
}
|
|
10095
10796
|
declare interface HtmlTransformTagsContext {
|
|
10096
10797
|
outputName: string;
|
|
10097
10798
|
html: string;
|
|
@@ -10707,12 +11408,12 @@ declare class InitFragment<GenerateContext> {
|
|
|
10707
11408
|
/**
|
|
10708
11409
|
* Serializes this instance into the provided serializer context.
|
|
10709
11410
|
*/
|
|
10710
|
-
serialize(context:
|
|
11411
|
+
serialize(context: ObjectSerializerContextObjectMiddlewareObject_3): void;
|
|
10711
11412
|
|
|
10712
11413
|
/**
|
|
10713
11414
|
* Restores this instance from the provided deserializer context.
|
|
10714
11415
|
*/
|
|
10715
|
-
deserialize(context:
|
|
11416
|
+
deserialize(context: ObjectDeserializerContextObjectMiddlewareObject_2): void;
|
|
10716
11417
|
|
|
10717
11418
|
/**
|
|
10718
11419
|
* Adds the provided source to the init fragment.
|
|
@@ -10740,8 +11441,8 @@ declare abstract class InlinedValue {
|
|
|
10740
11441
|
value?: null | string | number | boolean;
|
|
10741
11442
|
renderLiteral(): string;
|
|
10742
11443
|
render(comment: string): string;
|
|
10743
|
-
serialize(__0:
|
|
10744
|
-
deserialize(__0:
|
|
11444
|
+
serialize(__0: ObjectSerializerContextObjectMiddlewareObject_3): void;
|
|
11445
|
+
deserialize(__0: ObjectDeserializerContextObjectMiddlewareObject_2): void;
|
|
10745
11446
|
}
|
|
10746
11447
|
type InlinedValueKind = "string" | "number" | "boolean" | "undefined" | "null";
|
|
10747
11448
|
declare interface InnerGraphUtils {
|
|
@@ -11014,6 +11715,15 @@ declare class JavascriptModulesPlugin {
|
|
|
11014
11715
|
[Module, Partial<RenderBootstrapContext>],
|
|
11015
11716
|
string | void
|
|
11016
11717
|
>;
|
|
11718
|
+
/**
|
|
11719
|
+
* Offers a module's rendered export-definition call to a consumer that can place
|
|
11720
|
+
* it better — a library whose entry exports the same bindings natively takes it
|
|
11721
|
+
* over and emits it only where the module is wrapped. Return true to take it.
|
|
11722
|
+
*/
|
|
11723
|
+
onDemandExportsGeneration: SyncBailHook<
|
|
11724
|
+
[Module, RuntimeSpec, string, boolean],
|
|
11725
|
+
boolean | void
|
|
11726
|
+
>;
|
|
11017
11727
|
/**
|
|
11018
11728
|
* @since 5.22.0
|
|
11019
11729
|
*/
|
|
@@ -11094,6 +11804,15 @@ declare class JavascriptModulesPlugin {
|
|
|
11094
11804
|
[Module, Partial<RenderBootstrapContext>],
|
|
11095
11805
|
string | void
|
|
11096
11806
|
>;
|
|
11807
|
+
/**
|
|
11808
|
+
* Offers a module's rendered export-definition call to a consumer that can place
|
|
11809
|
+
* it better — a library whose entry exports the same bindings natively takes it
|
|
11810
|
+
* over and emits it only where the module is wrapped. Return true to take it.
|
|
11811
|
+
*/
|
|
11812
|
+
onDemandExportsGeneration: SyncBailHook<
|
|
11813
|
+
[Module, RuntimeSpec, string, boolean],
|
|
11814
|
+
boolean | void
|
|
11815
|
+
>;
|
|
11097
11816
|
/**
|
|
11098
11817
|
* @since 5.22.0
|
|
11099
11818
|
*/
|
|
@@ -11174,6 +11893,15 @@ declare class JavascriptModulesPlugin {
|
|
|
11174
11893
|
[Module, Partial<RenderBootstrapContext>],
|
|
11175
11894
|
string | void
|
|
11176
11895
|
>;
|
|
11896
|
+
/**
|
|
11897
|
+
* Offers a module's rendered export-definition call to a consumer that can place
|
|
11898
|
+
* it better — a library whose entry exports the same bindings natively takes it
|
|
11899
|
+
* over and emits it only where the module is wrapped. Return true to take it.
|
|
11900
|
+
*/
|
|
11901
|
+
onDemandExportsGeneration: SyncBailHook<
|
|
11902
|
+
[Module, RuntimeSpec, string, boolean],
|
|
11903
|
+
boolean | void
|
|
11904
|
+
>;
|
|
11177
11905
|
/**
|
|
11178
11906
|
* @since 5.22.0
|
|
11179
11907
|
*/
|
|
@@ -11256,6 +11984,15 @@ declare class JavascriptModulesPlugin {
|
|
|
11256
11984
|
[Module, Partial<RenderBootstrapContext>],
|
|
11257
11985
|
string | void
|
|
11258
11986
|
>;
|
|
11987
|
+
/**
|
|
11988
|
+
* Offers a module's rendered export-definition call to a consumer that can place
|
|
11989
|
+
* it better — a library whose entry exports the same bindings natively takes it
|
|
11990
|
+
* over and emits it only where the module is wrapped. Return true to take it.
|
|
11991
|
+
*/
|
|
11992
|
+
onDemandExportsGeneration: SyncBailHook<
|
|
11993
|
+
[Module, RuntimeSpec, string, boolean],
|
|
11994
|
+
boolean | void
|
|
11995
|
+
>;
|
|
11259
11996
|
/**
|
|
11260
11997
|
* @since 5.22.0
|
|
11261
11998
|
*/
|
|
@@ -11336,6 +12073,15 @@ declare class JavascriptModulesPlugin {
|
|
|
11336
12073
|
[Module, Partial<RenderBootstrapContext>],
|
|
11337
12074
|
string | void
|
|
11338
12075
|
>;
|
|
12076
|
+
/**
|
|
12077
|
+
* Offers a module's rendered export-definition call to a consumer that can place
|
|
12078
|
+
* it better — a library whose entry exports the same bindings natively takes it
|
|
12079
|
+
* over and emits it only where the module is wrapped. Return true to take it.
|
|
12080
|
+
*/
|
|
12081
|
+
onDemandExportsGeneration: SyncBailHook<
|
|
12082
|
+
[Module, RuntimeSpec, string, boolean],
|
|
12083
|
+
boolean | void
|
|
12084
|
+
>;
|
|
11339
12085
|
/**
|
|
11340
12086
|
* @since 5.22.0
|
|
11341
12087
|
*/
|
|
@@ -11416,6 +12162,15 @@ declare class JavascriptModulesPlugin {
|
|
|
11416
12162
|
[Module, Partial<RenderBootstrapContext>],
|
|
11417
12163
|
string | void
|
|
11418
12164
|
>;
|
|
12165
|
+
/**
|
|
12166
|
+
* Offers a module's rendered export-definition call to a consumer that can place
|
|
12167
|
+
* it better — a library whose entry exports the same bindings natively takes it
|
|
12168
|
+
* over and emits it only where the module is wrapped. Return true to take it.
|
|
12169
|
+
*/
|
|
12170
|
+
onDemandExportsGeneration: SyncBailHook<
|
|
12171
|
+
[Module, RuntimeSpec, string, boolean],
|
|
12172
|
+
boolean | void
|
|
12173
|
+
>;
|
|
11419
12174
|
/**
|
|
11420
12175
|
* @since 5.22.0
|
|
11421
12176
|
*/
|
|
@@ -11495,6 +12250,15 @@ declare class JavascriptModulesPlugin {
|
|
|
11495
12250
|
[Module, Partial<RenderBootstrapContext>],
|
|
11496
12251
|
string | void
|
|
11497
12252
|
>;
|
|
12253
|
+
/**
|
|
12254
|
+
* Offers a module's rendered export-definition call to a consumer that can place
|
|
12255
|
+
* it better — a library whose entry exports the same bindings natively takes it
|
|
12256
|
+
* over and emits it only where the module is wrapped. Return true to take it.
|
|
12257
|
+
*/
|
|
12258
|
+
onDemandExportsGeneration: SyncBailHook<
|
|
12259
|
+
[Module, RuntimeSpec, string, boolean],
|
|
12260
|
+
boolean | void
|
|
12261
|
+
>;
|
|
11498
12262
|
/**
|
|
11499
12263
|
* @since 5.22.0
|
|
11500
12264
|
*/
|
|
@@ -11527,7 +12291,10 @@ declare class JavascriptParser extends ParserClass {
|
|
|
11527
12291
|
constructor(
|
|
11528
12292
|
sourceType?: "module" | "auto" | "script",
|
|
11529
12293
|
options?: {
|
|
11530
|
-
parse?: (
|
|
12294
|
+
parse?: (
|
|
12295
|
+
code: string,
|
|
12296
|
+
options: ParseOptionsJavascriptParser
|
|
12297
|
+
) => ParseResult;
|
|
11531
12298
|
typescript?: boolean;
|
|
11532
12299
|
importPhases?: boolean;
|
|
11533
12300
|
strictModeViolations?: false | "error" | "warn";
|
|
@@ -11879,7 +12646,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
11879
12646
|
| ExportAllDeclaration
|
|
11880
12647
|
| ExportDefaultDeclaration
|
|
11881
12648
|
),
|
|
11882
|
-
|
|
12649
|
+
DeclarationEstreeIndex
|
|
11883
12650
|
],
|
|
11884
12651
|
boolean | void
|
|
11885
12652
|
>;
|
|
@@ -12007,6 +12774,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12007
12774
|
| ThisExpression
|
|
12008
12775
|
| UpdateExpression
|
|
12009
12776
|
| YieldExpression
|
|
12777
|
+
| VariableDeclaration
|
|
12010
12778
|
| ForOfStatement
|
|
12011
12779
|
],
|
|
12012
12780
|
boolean | void
|
|
@@ -12073,7 +12841,10 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12073
12841
|
}>;
|
|
12074
12842
|
sourceType: "module" | "auto" | "script";
|
|
12075
12843
|
options: {
|
|
12076
|
-
parse?: (
|
|
12844
|
+
parse?: (
|
|
12845
|
+
code: string,
|
|
12846
|
+
options: ParseOptionsJavascriptParser
|
|
12847
|
+
) => ParseResult;
|
|
12077
12848
|
typescript?: boolean;
|
|
12078
12849
|
importPhases?: boolean;
|
|
12079
12850
|
strictModeViolations?: false | "error" | "warn";
|
|
@@ -12654,7 +13425,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12654
13425
|
* Processes the provided declaration.
|
|
12655
13426
|
*/
|
|
12656
13427
|
enterDeclaration(
|
|
12657
|
-
declaration:
|
|
13428
|
+
declaration: DeclarationEstreeIndex,
|
|
12658
13429
|
onIdent: (ident: string, identifier: Identifier) => void
|
|
12659
13430
|
): void;
|
|
12660
13431
|
|
|
@@ -13379,6 +14150,18 @@ declare class JavascriptParser extends ParserClass {
|
|
|
13379
14150
|
*/
|
|
13380
14151
|
getComments(range: [number, number]): CommentJavascriptParser[];
|
|
13381
14152
|
|
|
14153
|
+
/**
|
|
14154
|
+
* Reports whether `identifier` may occur as a word in the source text of
|
|
14155
|
+
* `range`. A conservative pre-filter for expensive AST scans: `false` means
|
|
14156
|
+
* it certainly does not occur, while a match inside a comment or a string
|
|
14157
|
+
* yields `true`. Also `true` when no source text is available (preparsed
|
|
14158
|
+
* AST), so callers must stay correct without the filter.
|
|
14159
|
+
*/
|
|
14160
|
+
sourceMayContainIdentifier(
|
|
14161
|
+
range: [number, number],
|
|
14162
|
+
identifier: string
|
|
14163
|
+
): boolean;
|
|
14164
|
+
|
|
13382
14165
|
/**
|
|
13383
14166
|
* Checks whether this javascript parser is asi position.
|
|
13384
14167
|
*/
|
|
@@ -13671,9 +14454,9 @@ declare class JavascriptParser extends ParserClass {
|
|
|
13671
14454
|
static extend(
|
|
13672
14455
|
...plugins: ((BaseParser: typeof ParserImport) => typeof ParserImport)[]
|
|
13673
14456
|
): typeof JavascriptParser;
|
|
13674
|
-
static ALLOWED_MEMBER_TYPES_ALL:
|
|
13675
|
-
static ALLOWED_MEMBER_TYPES_CALL_EXPRESSION:
|
|
13676
|
-
static ALLOWED_MEMBER_TYPES_EXPRESSION:
|
|
14457
|
+
static ALLOWED_MEMBER_TYPES_ALL: number;
|
|
14458
|
+
static ALLOWED_MEMBER_TYPES_CALL_EXPRESSION: number;
|
|
14459
|
+
static ALLOWED_MEMBER_TYPES_EXPRESSION: number;
|
|
13677
14460
|
static VariableInfo: typeof VariableInfo;
|
|
13678
14461
|
static VariableInfoFlags: Readonly<{
|
|
13679
14462
|
Evaluated: 0;
|
|
@@ -13825,7 +14608,7 @@ declare interface JavascriptParserOptions {
|
|
|
13825
14608
|
/**
|
|
13826
14609
|
* Function to parser source code.
|
|
13827
14610
|
*/
|
|
13828
|
-
parse?: (code: string, options:
|
|
14611
|
+
parse?: (code: string, options: ParseOptionsJavascriptParser) => ParseResult;
|
|
13829
14612
|
|
|
13830
14613
|
/**
|
|
13831
14614
|
* Mark the listed top-level function names for pure-function-based tree shaking.
|
|
@@ -14201,7 +14984,22 @@ declare interface KnownBuildInfo {
|
|
|
14201
14984
|
isCircular?: boolean;
|
|
14202
14985
|
|
|
14203
14986
|
/**
|
|
14204
|
-
*
|
|
14987
|
+
* true when the module calls `eval` directly
|
|
14988
|
+
*/
|
|
14989
|
+
usesEval?: boolean;
|
|
14990
|
+
|
|
14991
|
+
/**
|
|
14992
|
+
* how many `#__PURE__` annotations sit where the parser does not read them
|
|
14993
|
+
*/
|
|
14994
|
+
ineffectivePureAnnotations?: number;
|
|
14995
|
+
|
|
14996
|
+
/**
|
|
14997
|
+
* how many times the module reads `this` at its top level
|
|
14998
|
+
*/
|
|
14999
|
+
topLevelThis?: number;
|
|
15000
|
+
|
|
15001
|
+
/**
|
|
15002
|
+
* module uses top-level `for await…of` or `await using`, which can't be lowered to a generator
|
|
14205
15003
|
*/
|
|
14206
15004
|
usesTopLevelAwaitForOf?: boolean;
|
|
14207
15005
|
}
|
|
@@ -14220,6 +15018,11 @@ declare interface KnownBuildMeta {
|
|
|
14220
15018
|
* using in ModuleLibraryPlugin
|
|
14221
15019
|
*/
|
|
14222
15020
|
exportsSourceByRuntime?: Map<string, string>;
|
|
15021
|
+
|
|
15022
|
+
/**
|
|
15023
|
+
* export definitions `ModuleLibraryPlugin` took over, re-emitted only where the module is wrapped
|
|
15024
|
+
*/
|
|
15025
|
+
exportsBindingSourceByRuntime?: Map<string, string>;
|
|
14223
15026
|
}
|
|
14224
15027
|
declare interface KnownConcatenatedModuleBuildInfo {
|
|
14225
15028
|
fileDependencies?: LazySet<string>;
|
|
@@ -14320,6 +15123,11 @@ declare interface KnownJavascriptModuleBuildInfo {
|
|
|
14320
15123
|
*/
|
|
14321
15124
|
needCreateRequire?: boolean;
|
|
14322
15125
|
|
|
15126
|
+
/**
|
|
15127
|
+
* module reassigns `__webpack_public_path__` at runtime, using in APIPlugin
|
|
15128
|
+
*/
|
|
15129
|
+
usingPublicPathOverride?: boolean;
|
|
15130
|
+
|
|
14323
15131
|
/**
|
|
14324
15132
|
* names of locally declared functions known to be free of side effects
|
|
14325
15133
|
*/
|
|
@@ -14329,6 +15137,11 @@ declare interface KnownJavascriptModuleBuildInfo {
|
|
|
14329
15137
|
* whether this module was parsed with `optimization.inlineExports` enabled (gates inlining of its exports)
|
|
14330
15138
|
*/
|
|
14331
15139
|
inlineExports?: boolean;
|
|
15140
|
+
|
|
15141
|
+
/**
|
|
15142
|
+
* module scope holds a `using`/`await using` declaration, so its resources must be disposed when the module finished evaluating
|
|
15143
|
+
*/
|
|
15144
|
+
usesTopLevelUsingDeclaration?: boolean;
|
|
14332
15145
|
}
|
|
14333
15146
|
declare interface KnownJavascriptModuleBuildMeta {
|
|
14334
15147
|
strictHarmonyModule?: boolean;
|
|
@@ -14525,6 +15338,8 @@ declare interface KnownStatsCompilation {
|
|
|
14525
15338
|
errorsCount?: number;
|
|
14526
15339
|
warnings?: StatsError[];
|
|
14527
15340
|
warningsCount?: number;
|
|
15341
|
+
hints?: StatsError[];
|
|
15342
|
+
hintsCount?: number;
|
|
14528
15343
|
children?: StatsCompilation[];
|
|
14529
15344
|
logging?: Record<string, StatsLogging>;
|
|
14530
15345
|
filteredWarningDetailsCount?: number;
|
|
@@ -14854,8 +15669,8 @@ declare interface LazyCompilationDefaultBackendOptions {
|
|
|
14854
15669
|
* Specifies how to create the server handling the EventSource requests.
|
|
14855
15670
|
*/
|
|
14856
15671
|
server?:
|
|
14857
|
-
| ServerOptionsImportHttps
|
|
14858
|
-
| ServerOptionsImportHttp
|
|
15672
|
+
| ServerOptionsImportHttps
|
|
15673
|
+
| ServerOptionsImportHttp
|
|
14859
15674
|
| (() => ServerLazyCompilationBackend);
|
|
14860
15675
|
}
|
|
14861
15676
|
|
|
@@ -14978,7 +15793,7 @@ declare class LazySet<T> {
|
|
|
14978
15793
|
* serialization stream.
|
|
14979
15794
|
*/
|
|
14980
15795
|
serialize(
|
|
14981
|
-
__0:
|
|
15796
|
+
__0: ObjectSerializerContextObjectMiddlewareObject_3<(number | T)[]>
|
|
14982
15797
|
): void;
|
|
14983
15798
|
|
|
14984
15799
|
/**
|
|
@@ -14990,7 +15805,7 @@ declare class LazySet<T> {
|
|
|
14990
15805
|
* Restores a `LazySet` from serialized item data.
|
|
14991
15806
|
*/
|
|
14992
15807
|
static deserialize<T>(
|
|
14993
|
-
__0:
|
|
15808
|
+
__0: ObjectDeserializerContextObjectMiddlewareObject_2<(number | T)[]>
|
|
14994
15809
|
): LazySet<T>;
|
|
14995
15810
|
}
|
|
14996
15811
|
declare interface LibIdentOptions {
|
|
@@ -15129,6 +15944,11 @@ declare interface LibraryOptions {
|
|
|
15129
15944
|
*/
|
|
15130
15945
|
type: string;
|
|
15131
15946
|
|
|
15947
|
+
/**
|
|
15948
|
+
* Add a branch to the UMD wrapper for an AMD-style loader exposing `define` on a container object, given as a dot-separated path, after the `define.amd` branch.
|
|
15949
|
+
*/
|
|
15950
|
+
umdAmdContainer?: string;
|
|
15951
|
+
|
|
15132
15952
|
/**
|
|
15133
15953
|
* If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.
|
|
15134
15954
|
*/
|
|
@@ -15487,6 +16307,16 @@ declare class LoaderTargetPlugin {
|
|
|
15487
16307
|
*/
|
|
15488
16308
|
apply(compiler: Compiler): void;
|
|
15489
16309
|
}
|
|
16310
|
+
declare abstract class LocConverter {
|
|
16311
|
+
line: number;
|
|
16312
|
+
column: number;
|
|
16313
|
+
pos: number;
|
|
16314
|
+
|
|
16315
|
+
/**
|
|
16316
|
+
* Returns location converter.
|
|
16317
|
+
*/
|
|
16318
|
+
get(pos: number): LocConverter;
|
|
16319
|
+
}
|
|
15490
16320
|
declare abstract class LocalModule {
|
|
15491
16321
|
name: string;
|
|
15492
16322
|
idx: number;
|
|
@@ -15501,12 +16331,12 @@ declare abstract class LocalModule {
|
|
|
15501
16331
|
/**
|
|
15502
16332
|
* Serializes this instance into the provided serializer context.
|
|
15503
16333
|
*/
|
|
15504
|
-
serialize(context:
|
|
16334
|
+
serialize(context: ObjectSerializerContextObjectMiddlewareObject_1): void;
|
|
15505
16335
|
|
|
15506
16336
|
/**
|
|
15507
16337
|
* Restores this instance from the provided deserializer context.
|
|
15508
16338
|
*/
|
|
15509
|
-
deserialize(context:
|
|
16339
|
+
deserialize(context: ObjectDeserializerContextObjectMiddlewareObject_3): void;
|
|
15510
16340
|
}
|
|
15511
16341
|
declare interface LogEntry {
|
|
15512
16342
|
type:
|
|
@@ -15679,6 +16509,9 @@ declare abstract class MainTemplate {
|
|
|
15679
16509
|
get requireFn(): "__webpack_require__";
|
|
15680
16510
|
get outputOptions(): Output;
|
|
15681
16511
|
}
|
|
16512
|
+
declare interface MakeCacheableResult<T> {
|
|
16513
|
+
(value: string, cache?: object): T;
|
|
16514
|
+
}
|
|
15682
16515
|
declare interface MakeDirectoryOptions {
|
|
15683
16516
|
recursive?: boolean;
|
|
15684
16517
|
mode?: string | number;
|
|
@@ -16411,6 +17244,8 @@ declare class ModuleConcatenationPlugin {
|
|
|
16411
17244
|
* Applies the plugin by registering its hooks on the compiler.
|
|
16412
17245
|
*/
|
|
16413
17246
|
apply(compiler: Compiler): void;
|
|
17247
|
+
static BAILOUT_PREFIX: string;
|
|
17248
|
+
static REJECTED_PREFIX: string;
|
|
16414
17249
|
}
|
|
16415
17250
|
declare class ModuleDependency extends Dependency {
|
|
16416
17251
|
/**
|
|
@@ -16446,7 +17281,10 @@ declare class ModuleDependency extends Dependency {
|
|
|
16446
17281
|
/**
|
|
16447
17282
|
* Returns true if the dependency can be concatenated (scope hoisting).
|
|
16448
17283
|
*/
|
|
16449
|
-
static canConcatenate(
|
|
17284
|
+
static canConcatenate(
|
|
17285
|
+
dependency: Dependency,
|
|
17286
|
+
concatenateCommonJsModules: boolean
|
|
17287
|
+
): boolean;
|
|
16450
17288
|
static TRANSITIVE: symbol;
|
|
16451
17289
|
static LAZY_UNTIL_LOCAL: "local";
|
|
16452
17290
|
static LAZY_UNTIL_ID: "id";
|
|
@@ -17372,6 +18210,12 @@ declare abstract class ModuleProfile {
|
|
|
17372
18210
|
*/
|
|
17373
18211
|
mergeInto(realProfile: ModuleProfile): void;
|
|
17374
18212
|
}
|
|
18213
|
+
declare interface ModuleReferenceMatch {
|
|
18214
|
+
start: number;
|
|
18215
|
+
end: number;
|
|
18216
|
+
name: string;
|
|
18217
|
+
leaked: boolean;
|
|
18218
|
+
}
|
|
17375
18219
|
declare interface ModuleReferenceOptions {
|
|
17376
18220
|
/**
|
|
17377
18221
|
* the properties or exports selected from the referenced module
|
|
@@ -17398,6 +18242,11 @@ declare interface ModuleReferenceOptions {
|
|
|
17398
18242
|
*/
|
|
17399
18243
|
mangleableNamespace: boolean;
|
|
17400
18244
|
|
|
18245
|
+
/**
|
|
18246
|
+
* true, when the reference resolves to the module's own exports value with plain property access, skipping ESM interop (how `require()` and a wrapped module's side-effect init see it)
|
|
18247
|
+
*/
|
|
18248
|
+
moduleExportsAccess: boolean;
|
|
18249
|
+
|
|
17401
18250
|
/**
|
|
17402
18251
|
* if the position is ASI safe or unknown
|
|
17403
18252
|
*/
|
|
@@ -17577,10 +18426,11 @@ declare class MultiCompiler {
|
|
|
17577
18426
|
options: MultiCompilerOptions
|
|
17578
18427
|
);
|
|
17579
18428
|
hooks: Readonly<{
|
|
17580
|
-
done: SyncHook<[MultiStats]>;
|
|
18429
|
+
done: SyncHook<[MultiStats, Compiler[]]>;
|
|
17581
18430
|
invalid: MultiHook<SyncHook<[null | string, number]>>;
|
|
17582
18431
|
run: MultiHook<AsyncSeriesHook<[Compiler]>>;
|
|
17583
18432
|
watchClose: SyncHook<[]>;
|
|
18433
|
+
shutdown: MultiHook<AsyncSeriesHook<[]>>;
|
|
17584
18434
|
watchRun: MultiHook<AsyncSeriesHook<[Compiler]>>;
|
|
17585
18435
|
infrastructureLog: MultiHook<
|
|
17586
18436
|
SyncBailHook<[string, string, undefined | any[]], true | void>
|
|
@@ -17733,6 +18583,42 @@ declare abstract class MultiWatching {
|
|
|
17733
18583
|
*/
|
|
17734
18584
|
close(callback: (err: null | Error, result?: void) => void): void;
|
|
17735
18585
|
}
|
|
18586
|
+
declare interface MutableToken {
|
|
18587
|
+
/**
|
|
18588
|
+
* one of the `TT_*` constants
|
|
18589
|
+
*/
|
|
18590
|
+
type: number;
|
|
18591
|
+
|
|
18592
|
+
/**
|
|
18593
|
+
* byte offset of the token's first code point
|
|
18594
|
+
*/
|
|
18595
|
+
start: number;
|
|
18596
|
+
|
|
18597
|
+
/**
|
|
18598
|
+
* byte offset just past the token's last code point
|
|
18599
|
+
*/
|
|
18600
|
+
end: number;
|
|
18601
|
+
|
|
18602
|
+
/**
|
|
18603
|
+
* hash tokens: starts an ident sequence
|
|
18604
|
+
*/
|
|
18605
|
+
isId: boolean;
|
|
18606
|
+
|
|
18607
|
+
/**
|
|
18608
|
+
* url tokens: first content code point
|
|
18609
|
+
*/
|
|
18610
|
+
contentStart: number;
|
|
18611
|
+
|
|
18612
|
+
/**
|
|
18613
|
+
* url tokens: just past the last content code point
|
|
18614
|
+
*/
|
|
18615
|
+
contentEnd: number;
|
|
18616
|
+
|
|
18617
|
+
/**
|
|
18618
|
+
* dimension tokens: first unit-ident code point
|
|
18619
|
+
*/
|
|
18620
|
+
unitStart: number;
|
|
18621
|
+
}
|
|
17736
18622
|
declare class NamedChunkIdsPlugin {
|
|
17737
18623
|
/**
|
|
17738
18624
|
* Creates an instance of NamedChunkIdsPlugin.
|
|
@@ -17911,6 +18797,9 @@ declare interface NodeOptions {
|
|
|
17911
18797
|
*/
|
|
17912
18798
|
global?: boolean | "warn";
|
|
17913
18799
|
}
|
|
18800
|
+
declare interface NodePrinter<TPath, TNode, TPrintOptions = object> {
|
|
18801
|
+
(path: TPath, writer: PrintContext<TPath, TNode, TPrintOptions>): string;
|
|
18802
|
+
}
|
|
17914
18803
|
declare class NodeSourcePlugin {
|
|
17915
18804
|
constructor();
|
|
17916
18805
|
|
|
@@ -17919,6 +18808,45 @@ declare class NodeSourcePlugin {
|
|
|
17919
18808
|
*/
|
|
17920
18809
|
apply(compiler: Compiler): void;
|
|
17921
18810
|
}
|
|
18811
|
+
declare interface NodeSyntax {
|
|
18812
|
+
/**
|
|
18813
|
+
* node-type discriminator
|
|
18814
|
+
*/
|
|
18815
|
+
type: number;
|
|
18816
|
+
|
|
18817
|
+
/**
|
|
18818
|
+
* byte offset of the node's first code point
|
|
18819
|
+
*/
|
|
18820
|
+
start: number;
|
|
18821
|
+
|
|
18822
|
+
/**
|
|
18823
|
+
* byte offset just past the node's last code point
|
|
18824
|
+
*/
|
|
18825
|
+
end: number;
|
|
18826
|
+
|
|
18827
|
+
/**
|
|
18828
|
+
* the `[start, end)` byte range
|
|
18829
|
+
*/
|
|
18830
|
+
range: [number, number];
|
|
18831
|
+
|
|
18832
|
+
/**
|
|
18833
|
+
* source location (1-based line, 0-based column)
|
|
18834
|
+
*/
|
|
18835
|
+
loc: {
|
|
18836
|
+
start: { line: number; column: number };
|
|
18837
|
+
end: { line: number; column: number };
|
|
18838
|
+
};
|
|
18839
|
+
|
|
18840
|
+
/**
|
|
18841
|
+
* source slice for this node
|
|
18842
|
+
*/
|
|
18843
|
+
toString: () => string;
|
|
18844
|
+
|
|
18845
|
+
/**
|
|
18846
|
+
* name with CSS escapes resolved (name-bearing nodes only)
|
|
18847
|
+
*/
|
|
18848
|
+
unescapedName: string;
|
|
18849
|
+
}
|
|
17922
18850
|
declare class NodeTargetPlugin {
|
|
17923
18851
|
/**
|
|
17924
18852
|
* Creates an instance of NodeTargetPlugin.
|
|
@@ -17952,7 +18880,7 @@ declare interface NodeTemplatePluginOptions {
|
|
|
17952
18880
|
type NodeWebpackOptions = false | NodeOptions;
|
|
17953
18881
|
type NonNullable<T> = T & {};
|
|
17954
18882
|
declare class NormalModule extends Module {
|
|
17955
|
-
constructor(__0:
|
|
18883
|
+
constructor(__0: NormalModuleCreateData<string>);
|
|
17956
18884
|
request: string;
|
|
17957
18885
|
userRequest: string;
|
|
17958
18886
|
rawRequest: string;
|
|
@@ -18058,7 +18986,7 @@ declare class NormalModule extends Module {
|
|
|
18058
18986
|
needBuild: AsyncSeriesBailHook<[NormalModule, NeedBuildContext], boolean>;
|
|
18059
18987
|
};
|
|
18060
18988
|
static deserialize(
|
|
18061
|
-
context:
|
|
18989
|
+
context: ObjectDeserializerContextObjectMiddlewareObject_2
|
|
18062
18990
|
): NormalModule;
|
|
18063
18991
|
|
|
18064
18992
|
/**
|
|
@@ -18070,9 +18998,7 @@ declare class NormalModule extends Module {
|
|
|
18070
18998
|
type NormalModuleBuildInfo = KnownBuildInfo &
|
|
18071
18999
|
Record<string, any> &
|
|
18072
19000
|
KnownNormalModuleBuildInfo;
|
|
18073
|
-
declare interface
|
|
18074
|
-
T extends string = string
|
|
18075
|
-
> {
|
|
19001
|
+
declare interface NormalModuleCreateData<T extends string = string> {
|
|
18076
19002
|
/**
|
|
18077
19003
|
* an optional layer in which the module is
|
|
18078
19004
|
*/
|
|
@@ -18135,8 +19061,8 @@ declare interface NormalModuleCreateDataNormalModuleObject_1<
|
|
|
18135
19061
|
Record<"asset/resource", AssetParser> &
|
|
18136
19062
|
Record<"asset/source", AssetSourceParser> &
|
|
18137
19063
|
Record<"asset/bytes", AssetBytesParser> &
|
|
18138
|
-
Record<"webassembly/async",
|
|
18139
|
-
Record<"webassembly/sync",
|
|
19064
|
+
Record<"webassembly/async", WebAssemblyParserAsyncWebAssemblyParser> &
|
|
19065
|
+
Record<"webassembly/sync", WebAssemblyParserClass> &
|
|
18140
19066
|
Record<"css", CssParser> &
|
|
18141
19067
|
Record<"css/auto", CssParser> &
|
|
18142
19068
|
Record<"css/module", CssParser> &
|
|
@@ -18234,6 +19160,10 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
|
18234
19160
|
afterResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
|
|
18235
19161
|
createModule: AsyncSeriesBailHook<[CreateData, ResolveData], void | Module>;
|
|
18236
19162
|
module: SyncWaterfallHook<[Module, CreateData, ResolveData], Module>;
|
|
19163
|
+
/**
|
|
19164
|
+
* @since 5.110.0
|
|
19165
|
+
*/
|
|
19166
|
+
prepareModuleType: HookMap<AsyncSeriesHook<[]>>;
|
|
18237
19167
|
createParser: TypedHookMap<
|
|
18238
19168
|
Record<
|
|
18239
19169
|
"javascript/auto",
|
|
@@ -18267,11 +19197,14 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
|
18267
19197
|
> &
|
|
18268
19198
|
Record<
|
|
18269
19199
|
"webassembly/async",
|
|
18270
|
-
SyncBailHook<
|
|
19200
|
+
SyncBailHook<
|
|
19201
|
+
[EmptyParserOptions],
|
|
19202
|
+
WebAssemblyParserAsyncWebAssemblyParser
|
|
19203
|
+
>
|
|
18271
19204
|
> &
|
|
18272
19205
|
Record<
|
|
18273
19206
|
"webassembly/sync",
|
|
18274
|
-
SyncBailHook<[EmptyParserOptions],
|
|
19207
|
+
SyncBailHook<[EmptyParserOptions], WebAssemblyParserClass>
|
|
18275
19208
|
> &
|
|
18276
19209
|
Record<"css", SyncBailHook<[CssParserOptions], CssParser>> &
|
|
18277
19210
|
Record<"css/auto", SyncBailHook<[CssModuleParserOptions], CssParser>> &
|
|
@@ -18319,11 +19252,14 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
|
18319
19252
|
> &
|
|
18320
19253
|
Record<
|
|
18321
19254
|
"webassembly/async",
|
|
18322
|
-
SyncBailHook<
|
|
19255
|
+
SyncBailHook<
|
|
19256
|
+
[WebAssemblyParserAsyncWebAssemblyParser, EmptyParserOptions],
|
|
19257
|
+
void
|
|
19258
|
+
>
|
|
18323
19259
|
> &
|
|
18324
19260
|
Record<
|
|
18325
19261
|
"webassembly/sync",
|
|
18326
|
-
SyncBailHook<[
|
|
19262
|
+
SyncBailHook<[WebAssemblyParserClass, EmptyParserOptions], void>
|
|
18327
19263
|
> &
|
|
18328
19264
|
Record<"css", SyncBailHook<[CssParser, CssParserOptions], void>> &
|
|
18329
19265
|
Record<
|
|
@@ -18518,8 +19454,8 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
|
18518
19454
|
Record<"asset/resource", AssetParser> &
|
|
18519
19455
|
Record<"asset/source", AssetSourceParser> &
|
|
18520
19456
|
Record<"asset/bytes", AssetBytesParser> &
|
|
18521
|
-
Record<"webassembly/async",
|
|
18522
|
-
Record<"webassembly/sync",
|
|
19457
|
+
Record<"webassembly/async", WebAssemblyParserAsyncWebAssemblyParser> &
|
|
19458
|
+
Record<"webassembly/sync", WebAssemblyParserClass> &
|
|
18523
19459
|
Record<"css", CssParser> &
|
|
18524
19460
|
Record<"css/auto", CssParser> &
|
|
18525
19461
|
Record<"css/module", CssParser> &
|
|
@@ -18542,8 +19478,8 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
|
18542
19478
|
Record<"asset/resource", AssetParser> &
|
|
18543
19479
|
Record<"asset/source", AssetSourceParser> &
|
|
18544
19480
|
Record<"asset/bytes", AssetBytesParser> &
|
|
18545
|
-
Record<"webassembly/async",
|
|
18546
|
-
Record<"webassembly/sync",
|
|
19481
|
+
Record<"webassembly/async", WebAssemblyParserAsyncWebAssemblyParser> &
|
|
19482
|
+
Record<"webassembly/sync", WebAssemblyParserClass> &
|
|
18547
19483
|
Record<"css", CssParser> &
|
|
18548
19484
|
Record<"css/auto", CssParser> &
|
|
18549
19485
|
Record<"css/module", CssParser> &
|
|
@@ -18813,7 +19749,10 @@ declare class NullDependency extends Dependency {
|
|
|
18813
19749
|
/**
|
|
18814
19750
|
* Returns true if the dependency can be concatenated (scope hoisting).
|
|
18815
19751
|
*/
|
|
18816
|
-
static canConcatenate(
|
|
19752
|
+
static canConcatenate(
|
|
19753
|
+
dependency: Dependency,
|
|
19754
|
+
concatenateCommonJsModules: boolean
|
|
19755
|
+
): boolean;
|
|
18817
19756
|
static TRANSITIVE: symbol;
|
|
18818
19757
|
static LAZY_UNTIL_LOCAL: "local";
|
|
18819
19758
|
static LAZY_UNTIL_ID: "id";
|
|
@@ -18826,18 +19765,9 @@ declare class NullDependencyTemplate extends DependencyTemplate {
|
|
|
18826
19765
|
declare interface ObjectConfiguration {
|
|
18827
19766
|
[index: string]: any;
|
|
18828
19767
|
}
|
|
18829
|
-
|
|
18830
|
-
/**
|
|
18831
|
-
* Updates set size using the provided set.
|
|
18832
|
-
*/
|
|
18833
|
-
declare interface ObjectDeserializerContextObjectMiddlewareObject_1 {
|
|
18834
|
-
read: () => string;
|
|
18835
|
-
rest: ObjectDeserializerContextObjectMiddlewareObject_3<[number, boolean]>;
|
|
18836
|
-
setCircularReference: (value: ReferenceableItem) => void;
|
|
18837
|
-
}
|
|
18838
|
-
declare namespace ObjectDeserializerContextObjectMiddlewareObject_2 {
|
|
19768
|
+
declare namespace ObjectDeserializerContextObjectMiddlewareObject_1 {
|
|
18839
19769
|
export let read: () => any;
|
|
18840
|
-
export let rest:
|
|
19770
|
+
export let rest: ObjectDeserializerContextObjectMiddlewareObject_2<
|
|
18841
19771
|
ReadonlyArray<any>
|
|
18842
19772
|
>;
|
|
18843
19773
|
export let setCircularReference: (value: ReferenceableItem) => void;
|
|
@@ -18846,20 +19776,20 @@ declare namespace ObjectDeserializerContextObjectMiddlewareObject_2 {
|
|
|
18846
19776
|
/**
|
|
18847
19777
|
* Updates set size using the provided set.
|
|
18848
19778
|
*/
|
|
18849
|
-
declare interface
|
|
19779
|
+
declare interface ObjectDeserializerContextObjectMiddlewareObject_2<
|
|
18850
19780
|
T extends ReadonlyArray<any> = ReadonlyArray<any>
|
|
18851
19781
|
> {
|
|
18852
19782
|
read: () => Head<T>;
|
|
18853
|
-
rest:
|
|
19783
|
+
rest: ObjectDeserializerContextObjectMiddlewareObject_2<Tail<T>>;
|
|
18854
19784
|
setCircularReference: (value: ReferenceableItem) => void;
|
|
18855
19785
|
}
|
|
18856
19786
|
|
|
18857
19787
|
/**
|
|
18858
19788
|
* Updates set size using the provided set.
|
|
18859
19789
|
*/
|
|
18860
|
-
declare interface
|
|
18861
|
-
read: () =>
|
|
18862
|
-
rest:
|
|
19790
|
+
declare interface ObjectDeserializerContextObjectMiddlewareObject_3 {
|
|
19791
|
+
read: () => string;
|
|
19792
|
+
rest: ObjectDeserializerContextObjectMiddlewareObject_2<[number, boolean]>;
|
|
18863
19793
|
setCircularReference: (value: ReferenceableItem) => void;
|
|
18864
19794
|
}
|
|
18865
19795
|
|
|
@@ -18908,10 +19838,10 @@ declare interface ObjectEncodingOptionsTypes {
|
|
|
18908
19838
|
declare interface ObjectSerializer {
|
|
18909
19839
|
serialize: (
|
|
18910
19840
|
value: any,
|
|
18911
|
-
context:
|
|
19841
|
+
context: ObjectSerializerContextObjectMiddlewareObject_3<any>
|
|
18912
19842
|
) => void;
|
|
18913
19843
|
deserialize: (
|
|
18914
|
-
context:
|
|
19844
|
+
context: ObjectDeserializerContextObjectMiddlewareObject_2<any>
|
|
18915
19845
|
) => any;
|
|
18916
19846
|
}
|
|
18917
19847
|
|
|
@@ -18919,28 +19849,9 @@ declare interface ObjectSerializer {
|
|
|
18919
19849
|
* Updates set size using the provided set.
|
|
18920
19850
|
*/
|
|
18921
19851
|
declare interface ObjectSerializerContextObjectMiddlewareObject_1 {
|
|
18922
|
-
write: (
|
|
18923
|
-
value: RestoreProvidedDataExports[]
|
|
18924
|
-
) => ObjectSerializerContextObjectMiddlewareObject_4<
|
|
18925
|
-
[undefined | null | boolean, undefined | boolean, boolean]
|
|
18926
|
-
>;
|
|
18927
|
-
setCircularReference: (value: ReferenceableItem) => void;
|
|
18928
|
-
snapshot: () => ObjectSerializerSnapshot;
|
|
18929
|
-
rollback: (snapshot: ObjectSerializerSnapshot) => void;
|
|
18930
|
-
writeLazy?: (item?: any) => void;
|
|
18931
|
-
writeSeparate?: (
|
|
18932
|
-
item: any,
|
|
18933
|
-
obj?: LazyOptions
|
|
18934
|
-
) => LazyFunction<any, any, any, LazyOptions>;
|
|
18935
|
-
}
|
|
18936
|
-
|
|
18937
|
-
/**
|
|
18938
|
-
* Updates set size using the provided set.
|
|
18939
|
-
*/
|
|
18940
|
-
declare interface ObjectSerializerContextObjectMiddlewareObject_2 {
|
|
18941
19852
|
write: (
|
|
18942
19853
|
value: string
|
|
18943
|
-
) =>
|
|
19854
|
+
) => ObjectSerializerContextObjectMiddlewareObject_3<[number, boolean]>;
|
|
18944
19855
|
setCircularReference: (value: ReferenceableItem) => void;
|
|
18945
19856
|
snapshot: () => ObjectSerializerSnapshot;
|
|
18946
19857
|
rollback: (snapshot: ObjectSerializerSnapshot) => void;
|
|
@@ -18950,10 +19861,10 @@ declare interface ObjectSerializerContextObjectMiddlewareObject_2 {
|
|
|
18950
19861
|
obj?: LazyOptions
|
|
18951
19862
|
) => LazyFunction<any, any, any, LazyOptions>;
|
|
18952
19863
|
}
|
|
18953
|
-
declare namespace
|
|
19864
|
+
declare namespace ObjectSerializerContextObjectMiddlewareObject_2 {
|
|
18954
19865
|
export let write: (
|
|
18955
19866
|
value?: any
|
|
18956
|
-
) =>
|
|
19867
|
+
) => ObjectSerializerContextObjectMiddlewareObject_3<ReadonlyArray<any>>;
|
|
18957
19868
|
export let setCircularReference: (value: ReferenceableItem) => void;
|
|
18958
19869
|
export let snapshot: () => ObjectSerializerSnapshot;
|
|
18959
19870
|
export let rollback: (snapshot: ObjectSerializerSnapshot) => void;
|
|
@@ -18969,12 +19880,12 @@ declare namespace ObjectSerializerContextObjectMiddlewareObject_3 {
|
|
|
18969
19880
|
/**
|
|
18970
19881
|
* Updates set size using the provided set.
|
|
18971
19882
|
*/
|
|
18972
|
-
declare interface
|
|
19883
|
+
declare interface ObjectSerializerContextObjectMiddlewareObject_3<
|
|
18973
19884
|
T extends ReadonlyArray<any> = ReadonlyArray<any>
|
|
18974
19885
|
> {
|
|
18975
19886
|
write: (
|
|
18976
19887
|
value: Head<T>
|
|
18977
|
-
) =>
|
|
19888
|
+
) => ObjectSerializerContextObjectMiddlewareObject_3<Tail<T>>;
|
|
18978
19889
|
setCircularReference: (value: ReferenceableItem) => void;
|
|
18979
19890
|
snapshot: () => ObjectSerializerSnapshot;
|
|
18980
19891
|
rollback: (snapshot: ObjectSerializerSnapshot) => void;
|
|
@@ -18988,10 +19899,12 @@ declare interface ObjectSerializerContextObjectMiddlewareObject_4<
|
|
|
18988
19899
|
/**
|
|
18989
19900
|
* Updates set size using the provided set.
|
|
18990
19901
|
*/
|
|
18991
|
-
declare interface
|
|
19902
|
+
declare interface ObjectSerializerContextObjectMiddlewareObject_4 {
|
|
18992
19903
|
write: (
|
|
18993
|
-
value
|
|
18994
|
-
) =>
|
|
19904
|
+
value: RestoreProvidedDataExports[]
|
|
19905
|
+
) => ObjectSerializerContextObjectMiddlewareObject_3<
|
|
19906
|
+
[undefined | null | boolean, undefined | boolean, boolean]
|
|
19907
|
+
>;
|
|
18995
19908
|
setCircularReference: (value: ReferenceableItem) => void;
|
|
18996
19909
|
snapshot: () => ObjectSerializerSnapshot;
|
|
18997
19910
|
rollback: (snapshot: ObjectSerializerSnapshot) => void;
|
|
@@ -19131,9 +20044,14 @@ declare interface Optimization {
|
|
|
19131
20044
|
mergeDuplicateChunks?: boolean;
|
|
19132
20045
|
|
|
19133
20046
|
/**
|
|
19134
|
-
* Enable minimizing the output. Uses optimization.minimizer.
|
|
20047
|
+
* Enable minimizing the output. Uses optimization.minimizer. An options object implies 'true' and sets optimization.minimizeOptions.
|
|
19135
20048
|
*/
|
|
19136
|
-
minimize?: boolean;
|
|
20049
|
+
minimize?: boolean | OptimizationMinimizeOptions;
|
|
20050
|
+
|
|
20051
|
+
/**
|
|
20052
|
+
* Enable minimizing the output, configured per asset type. An absent type is minimized with the defaults; `false` disables minimizing it.
|
|
20053
|
+
*/
|
|
20054
|
+
minimizeOptions?: OptimizationMinimizeOptions;
|
|
19137
20055
|
|
|
19138
20056
|
/**
|
|
19139
20057
|
* Minimizer(s) to use for minimizing the output.
|
|
@@ -19220,6 +20138,245 @@ declare interface Optimization {
|
|
|
19220
20138
|
usedExports?: boolean | "global";
|
|
19221
20139
|
}
|
|
19222
20140
|
|
|
20141
|
+
/**
|
|
20142
|
+
* What the CSS minimizer does. Applies wherever it runs: on `.css` assets and on the inline `<style>` / `style=""` the HTML minimizer hands it. Every transform that keeps the stylesheet's meaning is on by default and may be turned off on its own, so a document a rewrite breaks can be minimized without it while the rest still applies; the two that change what the CSSOM hands back (`convertLengthUnits`, `rewriteCustomProperties`) are off until asked for.
|
|
20143
|
+
* @since 5.110.0
|
|
20144
|
+
*/
|
|
20145
|
+
declare interface OptimizationMinimizeCss {
|
|
20146
|
+
/**
|
|
20147
|
+
* Which comments survive. `"some"`, the default, keeps a `/*!` banner and a comment annotated `@license` or `@preserve`; `true` (or `"all"`) keeps every comment and `false` keeps none; a string is read as a regular expression source, and it, a `RegExp` or a `(comment) => boolean` predicate is asked about each comment's own text and keeps the ones it accepts — standing in for the default rule rather than beside it, as terser's `format.comments` does, so a pattern that names nothing else drops the ones `"some"` would have kept. A `/*#` source-map pragma is a link rather than a comment, so `"some"` and `"all"` keep it; `false`, a pattern or a predicate decides it like any other. A predicate is handed to the minimizer's worker pool as source, so it must not close over anything.
|
|
20148
|
+
* @since 5.110.0
|
|
20149
|
+
*/
|
|
20150
|
+
comments?: string | boolean | RegExp | ((comment: string) => boolean);
|
|
20151
|
+
|
|
20152
|
+
/**
|
|
20153
|
+
* Rewrite a length into a shorter unit it is exactly equal in (`16px` -> `1pc`). Off by default: the authored unit is lost, and once the asset is compressed the rewrite rarely earns anything.
|
|
20154
|
+
* @since 5.110.0
|
|
20155
|
+
*/
|
|
20156
|
+
convertLengthUnits?: boolean;
|
|
20157
|
+
|
|
20158
|
+
/**
|
|
20159
|
+
* Write a family of longhands as the one shorthand that sets them — four sides or corners, the two a pair shorthand sets, or the slots of an order-free one — even where unrelated declarations stand between them. On by default.
|
|
20160
|
+
* @since 5.110.0
|
|
20161
|
+
*/
|
|
20162
|
+
mergeLonghands?: boolean;
|
|
20163
|
+
|
|
20164
|
+
/**
|
|
20165
|
+
* Join rules nothing stands between: adjacent rules that print the same block become one selector list, at-rules that share a prelude become one rule, and a named `@layer` block a later sibling opens again is folded into the first. On by default.
|
|
20166
|
+
* @since 5.110.0
|
|
20167
|
+
*/
|
|
20168
|
+
mergeRules?: boolean;
|
|
20169
|
+
|
|
20170
|
+
/**
|
|
20171
|
+
* Normalize quoting: a string takes whichever quote needs fewer escapes, a `url()` and an attribute selector's value drop theirs where the content is still one token, and a font family whose name is a run of identifiers is written unquoted. On by default.
|
|
20172
|
+
* @since 5.110.0
|
|
20173
|
+
*/
|
|
20174
|
+
normalizeQuotes?: boolean;
|
|
20175
|
+
|
|
20176
|
+
/**
|
|
20177
|
+
* Compute a call into the shorter call naming the same value: `calc()` and every math function over constants, a transform naming one axis or an identity, a gradient's default direction and its implied stops, an easing function that has a keyword, and a filter function given the amount an omitted argument already means. On by default.
|
|
20178
|
+
* @since 5.110.0
|
|
20179
|
+
*/
|
|
20180
|
+
reduceFunctions?: boolean;
|
|
20181
|
+
|
|
20182
|
+
/**
|
|
20183
|
+
* Drop a rule or declaration nothing can read: a rule whose block ends up empty, a declaration an identical later one in the same block makes dead, and a rule an identical later sibling makes dead. On by default. Joining rules that are not dead is `mergeRules`.
|
|
20184
|
+
* @since 5.110.0
|
|
20185
|
+
*/
|
|
20186
|
+
removeDeadRules?: boolean;
|
|
20187
|
+
|
|
20188
|
+
/**
|
|
20189
|
+
* Shorten the values of custom properties (`--x: #ffffff` -> `#fff`, `--y: 0.5rem` -> `.5rem`), which are otherwise written back exactly as authored. Off by default: `getComputedStyle().getPropertyValue()` hands this text back, so a rewritten value is a different CSSOM — the one place a declaration's authored text survives. What it may rewrite is exactly what any other value's tokens may be, a color in a substitution's fallback included — that fallback being the property's value rather than the function's own argument.
|
|
20190
|
+
* @since 5.110.0
|
|
20191
|
+
*/
|
|
20192
|
+
rewriteCustomProperties?: boolean;
|
|
20193
|
+
|
|
20194
|
+
/**
|
|
20195
|
+
* Write each color in the shortest spelling of the same value: `#ffffff` -> `#fff`, `rgb(1 2 3)` -> `#010203`, a named color where the property takes no identifier of the author's own, and every polar and Lab function the target agrees with hex on. On by default.
|
|
20196
|
+
* @since 5.110.0
|
|
20197
|
+
*/
|
|
20198
|
+
shortenColors?: boolean;
|
|
20199
|
+
|
|
20200
|
+
/**
|
|
20201
|
+
* Write a media feature in its range spelling where the target reads one (`(min-width:100px)` -> `(width>=100px)`), and collapse an `and` of two one-sided ranges into the interval it describes. On by default.
|
|
20202
|
+
* @since 5.110.0
|
|
20203
|
+
*/
|
|
20204
|
+
shortenMediaQueries?: boolean;
|
|
20205
|
+
|
|
20206
|
+
/**
|
|
20207
|
+
* Write each number in its shortest equal spelling — dropping a leading zero, a trailing fraction and a `+`, rounding to the six significant digits a stylesheet can observe, dropping the unit a zero does not need, and writing an alpha and a ratio the one way its grammar spells them. On by default.
|
|
20208
|
+
* @since 5.110.0
|
|
20209
|
+
*/
|
|
20210
|
+
shortenNumbers?: boolean;
|
|
20211
|
+
|
|
20212
|
+
/**
|
|
20213
|
+
* Rewrite a selector into an equal one: a selector list deduplicated and ordered, a CSS2 pseudo-element's second colon dropped, the universal a compound already implies dropped, an `An+B` written the shortest way its microsyntax allows, and a `from` / `100%` keyframe selector written as the shorter of the pair. On by default.
|
|
20214
|
+
* @since 5.110.0
|
|
20215
|
+
*/
|
|
20216
|
+
shortenSelectors?: boolean;
|
|
20217
|
+
|
|
20218
|
+
/**
|
|
20219
|
+
* Write a value the shortest way its property's own grammar allows: a `{1,4}` box or corner notation collapsed, a slot holding its own initial dropped, and `flex` / `font-weight` / `display` / `transition` / `<position>` / `<repeat-style>` written the short way. On by default. Merging separate longhand declarations is `mergeLonghands`.
|
|
20220
|
+
* @since 5.110.0
|
|
20221
|
+
*/
|
|
20222
|
+
shortenValues?: boolean;
|
|
20223
|
+
|
|
20224
|
+
/**
|
|
20225
|
+
* Maintain vendor prefixes for the `browserslist` target: add the `-webkit-` / `-moz-` / `-ms-` spelling of a property, at-rule or pseudo-selector that a selected browser still needs, and drop one none of them does. On by default, and only in effect for a `browserslist` target — any other target names no browsers to prefix for. A browserslist name no compat dataset covers (`op_mini`, `and_uc`, `and_qq`, `baidu`, `kaios`, `bb`) is skipped, and a selection of nothing but those prefixes for no one.
|
|
20226
|
+
* @since 5.110.0
|
|
20227
|
+
*/
|
|
20228
|
+
vendorPrefixes?: boolean;
|
|
20229
|
+
}
|
|
20230
|
+
|
|
20231
|
+
/**
|
|
20232
|
+
* What the HTML minimizer does. Every transform that keeps the document's DOM is on by default and may be turned off on its own, so a page a rewrite breaks can be minimized without it while the rest still applies; the ones that change what a script or a selector reads back are off until asked for.
|
|
20233
|
+
* @since 5.110.0
|
|
20234
|
+
*/
|
|
20235
|
+
declare interface OptimizationMinimizeHtml {
|
|
20236
|
+
/**
|
|
20237
|
+
* Write a boolean attribute spelled with its own name (`disabled="disabled"`) as the bare name the spec canonicalizes it to. On by default.
|
|
20238
|
+
* @since 5.110.0
|
|
20239
|
+
*/
|
|
20240
|
+
collapseBooleanAttributes?: boolean;
|
|
20241
|
+
|
|
20242
|
+
/**
|
|
20243
|
+
* Collapse each run of whitespace in text to a single space. Left alone inside `pre`, `textarea` and `listing`, where whitespace renders verbatim. `true` (or `"conservative"`) never removes whitespace entirely — dropping it would join two inline elements that render apart. `"smart"` also drops the whitespace that sits against a block element's edge, where no line box reaches it. `"all"` drops the whitespace at every text node's edges, which does change how adjacent inline elements render.
|
|
20244
|
+
* @since 5.110.0
|
|
20245
|
+
*/
|
|
20246
|
+
collapseWhitespace?: boolean | "all" | "conservative" | "smart";
|
|
20247
|
+
|
|
20248
|
+
/**
|
|
20249
|
+
* Which comments survive. `"some"`, the default, keeps nothing: every comment an HTML parser reads is inert; `true` (or `"all"`) keeps every comment and `false` keeps none; a string is read as a regular expression source, and it, a `RegExp` or a `(comment) => boolean` predicate is asked about each comment's own text and keeps the ones it accepts — standing in for the default rule rather than beside it, as terser's `format.comments` does, so a pattern that names nothing else drops the ones `"some"` would have kept. A downlevel conditional comment, a server-side include and a `<?…?>` template directive are code rather than comments and stay whatever this says. A predicate is handed to the minimizer's worker pool as source, so it must not close over anything.
|
|
20250
|
+
* @since 5.110.0
|
|
20251
|
+
*/
|
|
20252
|
+
comments?: string | boolean | RegExp | ((comment: string) => boolean);
|
|
20253
|
+
|
|
20254
|
+
/**
|
|
20255
|
+
* Print a run of adjacent `<style>` elements as one sheet. Off by default: it removes elements, so `document.styleSheets`, a `style:nth-child()` selector and `querySelectorAll("style").length` all read a different document. A sheet the CSS minifier does not accept is never folded — appending to one that may be unterminated would make the next sheet part of its last rule — and neither is one led by `@import` / `@charset` / `@namespace`, which apply only at the top of a sheet.
|
|
20256
|
+
* @since 5.110.0
|
|
20257
|
+
*/
|
|
20258
|
+
mergeStyles?: boolean;
|
|
20259
|
+
|
|
20260
|
+
/**
|
|
20261
|
+
* Minify the markup inside a downlevel-hidden conditional comment (`<!--[if IE]> … <![endif]-->`). Off by default: the body is minified on its own, so a context-sensitive decision inside it — which end tags are optional, where a table cell may sit — is taken as though it started a document rather than where the comment sits. Only browsers older than IE10 read these at all.
|
|
20262
|
+
* @since 5.110.0
|
|
20263
|
+
*/
|
|
20264
|
+
minifyConditionalComments?: boolean;
|
|
20265
|
+
|
|
20266
|
+
/**
|
|
20267
|
+
* Strip the whitespace between the tokens of a `<script>` whose type is a JSON MIME type. Every literal is copied byte for byte, so no number is rounded and no escape rewritten. On by default.
|
|
20268
|
+
* @since 5.110.0
|
|
20269
|
+
*/
|
|
20270
|
+
minifyJson?: boolean;
|
|
20271
|
+
|
|
20272
|
+
/**
|
|
20273
|
+
* Minify the document held in an `<iframe srcdoc>` attribute. Off by default: the body is a whole document of its own (its base URL is `about:srcdoc`), so minifying it is safe, but the attribute is readable from script and a consumer comparing `iframe.srcdoc` byte for byte would see it change.
|
|
20274
|
+
* @since 5.110.0
|
|
20275
|
+
*/
|
|
20276
|
+
minifySrcdoc?: boolean;
|
|
20277
|
+
|
|
20278
|
+
/**
|
|
20279
|
+
* Run the CSS minimizer over an inline `<style>` element and every `style=""` attribute, with the options `optimization.minimize.css` names. On by default.
|
|
20280
|
+
* @since 5.110.0
|
|
20281
|
+
*/
|
|
20282
|
+
minifyStyles?: boolean;
|
|
20283
|
+
|
|
20284
|
+
/**
|
|
20285
|
+
* Write an attribute value with whichever delimiters cost least — bare where the grammar allows it, else under the quote that needs fewer character references. On by default: the DOM reads the same value either way.
|
|
20286
|
+
* @since 5.110.0
|
|
20287
|
+
*/
|
|
20288
|
+
normalizeAttributeQuotes?: boolean;
|
|
20289
|
+
|
|
20290
|
+
/**
|
|
20291
|
+
* Fold an enumerated attribute's value to the keyword it names (`type="TEXT"` -> `type=text`), which the DOM matches ASCII case-insensitively. A value the spec does not enumerate is left as written. On by default.
|
|
20292
|
+
* @since 5.110.0
|
|
20293
|
+
*/
|
|
20294
|
+
normalizeEnumeratedAttributes?: boolean;
|
|
20295
|
+
|
|
20296
|
+
/**
|
|
20297
|
+
* Normalize a list-shaped attribute value: a space-separated token list (`class`, `rel`, `part`, …), a comma-separated one (`accept`, `sizes`, …), a `srcset` and the viewport `<meta content>`. On by default. Reordering a token list is `sortTokenLists`, which is separate and off by default.
|
|
20298
|
+
* @since 5.110.0
|
|
20299
|
+
*/
|
|
20300
|
+
normalizeListAttributes?: boolean;
|
|
20301
|
+
|
|
20302
|
+
/**
|
|
20303
|
+
* Write an integer attribute (`tabindex`, `colspan`, `width`, …) the one way its own rules read it — leading whitespace, a `+` and leading zeros all go. On by default.
|
|
20304
|
+
* @since 5.110.0
|
|
20305
|
+
*/
|
|
20306
|
+
normalizeNumericAttributes?: boolean;
|
|
20307
|
+
|
|
20308
|
+
/**
|
|
20309
|
+
* Drop an attribute whose empty or all-whitespace value leaves it in the state its absence gives: the globals `class`, `id`, `style`, `dir`, `accesskey`, `itemprop`, `itemref`, `itemtype` and `part`, and every attribute reflecting a token list on the elements the spec defines it for — `rel` on `<a>`, `<area>`, `<form>` and `<link>`, `ping` on `<a>` and `<area>`, `headers` on `<td>` and `<th>`, `blocking` on `<link>`, `<script>` and `<style>`, `sizes` on `<link>`, `for` on `<output>` — where an empty list is no tokens. Anywhere else that spelling is an author attribute whose meaning is a script's, so `<x-foo rel="">` and `<label for="">` keep it. Off by default: an attribute selector matches on presence, so `[class]` stops matching. Never dropped: `title` and `lang`, whose empty value means what absence does not; `sandbox`, whose empty list is the most restrictive state an `<iframe>` has; and an event handler, whose empty body still compiles to a function where absence reads null.
|
|
20310
|
+
* @since 5.110.0
|
|
20311
|
+
*/
|
|
20312
|
+
removeEmptyAttributes?: boolean;
|
|
20313
|
+
|
|
20314
|
+
/**
|
|
20315
|
+
* Drop an element that has no children and no attributes. Kept anyway when its bare form is still doing a job (`canvas`, `slot`, `template`, `textarea`, `progress`, `meter`, `output`, `dialog`, and the table structure), when it is a void element, or when it is foreign content. Off by default: CSS can give an empty element a size or a `::before`, and the minifier cannot see the stylesheet. Emptiness is read off the output rather than the source, so a run of nested empties goes together and an element left empty only by a dropped comment or by whitespace `collapseWhitespace` deletes goes with them.
|
|
20316
|
+
* @since 5.110.0
|
|
20317
|
+
*/
|
|
20318
|
+
removeEmptyElements?: boolean;
|
|
20319
|
+
|
|
20320
|
+
/**
|
|
20321
|
+
* How much of the `<html>` / `<head>` / `<body>` shell §13.1.2.4 lets the parser imply may be left out. Every other optional tag goes unconditionally — nothing can observe that — but these six are what a consumer reading the page with a regexp rather than a parser looks for. `"smart"`, the default, leaves out the one such a reader never matches: the `<html>` start tag, which is omittable only when it carries no attribute at all, so the `<html lang=en>` anyone greps for keeps its tag anyway. `</html>` stays with it, since a truncation check reads a page as complete by finding one. `true` (or `"all"`) leaves out all six, which is where a crawler matching on `<body>` stops finding one; `false` leaves out none. A tag also stays wherever the spec keeps it: an attribute to carry, a comment minifying does not drop, whitespace opening the element, or a `meta` / `noscript` / `link` / `script` / `style` / `template` element opening the body.
|
|
20322
|
+
* @since 5.110.0
|
|
20323
|
+
*/
|
|
20324
|
+
removeImpliedTags?: boolean | "all" | "smart";
|
|
20325
|
+
|
|
20326
|
+
/**
|
|
20327
|
+
* Leave out a tag §13.1.2.4 lets the parser imply, other than the `<html>` / `<head>` / `<body>` shell, which `removeImpliedTags` decides on its own. On by default: nothing can observe the difference, the tree parses the same either way. A tag still stays wherever the spec keeps it — a comment or whitespace behind it, or a following element the insertion mode does not close it through.
|
|
20328
|
+
* @since 5.110.0
|
|
20329
|
+
*/
|
|
20330
|
+
removeOptionalTags?: boolean;
|
|
20331
|
+
|
|
20332
|
+
/**
|
|
20333
|
+
* Drop an attribute whose value is the one the element already defaults to. Off by default: an attribute a page no longer carries is one `getAttribute` and every attribute selector read differently, whichever tier dropped it. `true` (or `"smart"`) drops only markers on elements that render nothing — `<script type=text/javascript>`, `<script language=javascript>`, `<script charset=utf-8>`, `<style type=text/css>`, `<link type=text/css>`, `<link media=all>` — so no rule that styles the page stops applying, which is what `@swc/html` does by default. `"all"` also drops spec defaults such as `<input type=text>` and `<form method=get>`, which reaches further still: an attribute selector matches the content attribute, not the reflected default, so `input[type=text]` stops matching.
|
|
20334
|
+
* @since 5.110.0
|
|
20335
|
+
*/
|
|
20336
|
+
removeRedundantAttributes?: boolean | "all" | "smart";
|
|
20337
|
+
|
|
20338
|
+
/**
|
|
20339
|
+
* Print an element's attributes in a fixed order: the document's commonest attribute names first, ties by name. Nothing in HTML reads attribute order, so this only makes the same markup compress better across pages — the run of attributes two elements share becomes the same run of bytes. Off by default: a script reading `element.attributes` back, or a snapshot of the emitted HTML, sees the new order.
|
|
20340
|
+
* @since 5.110.0
|
|
20341
|
+
*/
|
|
20342
|
+
sortAttributes?: boolean;
|
|
20343
|
+
|
|
20344
|
+
/**
|
|
20345
|
+
* Print every space-separated token list the DOM reads as a set — `class`, `rel`, `part`, `sandbox`, `blocking`, `itemprop` / `itemref` / `itemtype`, `<output for>` and `<link sizes>` — in token order. Nothing matching those reads order, so this only makes the same markup compress better across pages. Off by default: a script reading `className` or `rel` back sees the new order. The lists the DOM does not read as a set are left alone whatever this says — `ping` is the order its requests go out in and `accesskey` the order its keys are tried.
|
|
20346
|
+
* @since 5.110.0
|
|
20347
|
+
*/
|
|
20348
|
+
sortTokenLists?: boolean;
|
|
20349
|
+
}
|
|
20350
|
+
|
|
20351
|
+
/**
|
|
20352
|
+
* Options handed as-is to the JavaScript minimizer (terser-compatible). Defaults to `{ compress: { passes: 2 } }`.
|
|
20353
|
+
* @since 5.110.0
|
|
20354
|
+
*/
|
|
20355
|
+
declare interface OptimizationMinimizeJavascript {
|
|
20356
|
+
[index: string]: any;
|
|
20357
|
+
}
|
|
20358
|
+
|
|
20359
|
+
/**
|
|
20360
|
+
* Enable minimizing the output, configured per asset type. An absent type is minimized with the defaults; `false` disables minimizing it.
|
|
20361
|
+
* @since 5.110.0
|
|
20362
|
+
*/
|
|
20363
|
+
declare interface OptimizationMinimizeOptions {
|
|
20364
|
+
/**
|
|
20365
|
+
* Minimize CSS assets: `false` disables it, an object configures what the built-in minimizer may do beyond the transforms that always apply.
|
|
20366
|
+
*/
|
|
20367
|
+
css?: false | OptimizationMinimizeCss;
|
|
20368
|
+
|
|
20369
|
+
/**
|
|
20370
|
+
* Minimize HTML assets: `false` disables it, an object configures what the built-in minimizer may do beyond the transforms that always apply.
|
|
20371
|
+
*/
|
|
20372
|
+
html?: false | OptimizationMinimizeHtml;
|
|
20373
|
+
|
|
20374
|
+
/**
|
|
20375
|
+
* Minimize JavaScript assets: `false` disables it, an object is handed as-is to the JavaScript minimizer.
|
|
20376
|
+
*/
|
|
20377
|
+
javascript?: false | OptimizationMinimizeJavascript;
|
|
20378
|
+
}
|
|
20379
|
+
|
|
19223
20380
|
/**
|
|
19224
20381
|
* Enables/Disables integrated optimizations.
|
|
19225
20382
|
*/
|
|
@@ -19285,6 +20442,12 @@ declare interface OptimizationNormalized {
|
|
|
19285
20442
|
*/
|
|
19286
20443
|
minimize?: boolean;
|
|
19287
20444
|
|
|
20445
|
+
/**
|
|
20446
|
+
* Enable minimizing the output, configured per asset type. An absent type is minimized with the defaults; `false` disables minimizing it.
|
|
20447
|
+
* @since 5.110.0
|
|
20448
|
+
*/
|
|
20449
|
+
minimizeOptions?: OptimizationMinimizeOptions;
|
|
20450
|
+
|
|
19288
20451
|
/**
|
|
19289
20452
|
* Minimizer(s) to use for minimizing the output.
|
|
19290
20453
|
*/
|
|
@@ -19412,6 +20575,7 @@ type OptimizationNormalizedWithDefaults = OptimizationNormalized & {
|
|
|
19412
20575
|
portableRecords: NonNullable<undefined | boolean>;
|
|
19413
20576
|
realContentHash: NonNullable<undefined | boolean>;
|
|
19414
20577
|
minimize: NonNullable<undefined | boolean>;
|
|
20578
|
+
minimizeOptions: OptimizationMinimizeOptions;
|
|
19415
20579
|
minimizer: (
|
|
19416
20580
|
| ((this: Compiler, compiler: Compiler) => void)
|
|
19417
20581
|
| WebpackPluginInstance
|
|
@@ -20656,7 +21820,8 @@ type OutputNormalizedWithDefaults = OutputNormalized & {
|
|
|
20656
21820
|
declare interface ParameterizedComparator<TArg extends object, T> {
|
|
20657
21821
|
(tArg: TArg): Comparator<T>;
|
|
20658
21822
|
}
|
|
20659
|
-
|
|
21823
|
+
type ParseErrorSeverity = "error" | "warning";
|
|
21824
|
+
declare interface ParseOptionsJavascriptParser {
|
|
20660
21825
|
sourceType: "module" | "script";
|
|
20661
21826
|
ecmaVersion: ecmaVersion;
|
|
20662
21827
|
locations?: boolean;
|
|
@@ -20685,6 +21850,12 @@ declare interface ParseOptions {
|
|
|
20685
21850
|
*/
|
|
20686
21851
|
moduleFallback?: boolean;
|
|
20687
21852
|
}
|
|
21853
|
+
declare interface ParseOptionsSyntax {
|
|
21854
|
+
/**
|
|
21855
|
+
* optional comment-token callback; the public `parse*` entry points use it to build the `TokenStream` so the outer parser's comment tracker still sees magic comments inside the consumed range
|
|
21856
|
+
*/
|
|
21857
|
+
comment?: (input: string, start: number, end: number) => number;
|
|
21858
|
+
}
|
|
20688
21859
|
declare interface ParseResult {
|
|
20689
21860
|
ast: Program;
|
|
20690
21861
|
comments: CommentJavascriptParser[];
|
|
@@ -20923,29 +22094,215 @@ type Pattern =
|
|
|
20923
22094
|
| RestElement
|
|
20924
22095
|
| AssignmentPattern;
|
|
20925
22096
|
|
|
20926
|
-
/**
|
|
20927
|
-
* Configuration object for web performance recommendations.
|
|
20928
|
-
*/
|
|
20929
|
-
declare interface PerformanceOptions {
|
|
22097
|
+
/**
|
|
22098
|
+
* Configuration object for web performance recommendations.
|
|
22099
|
+
*/
|
|
22100
|
+
declare interface PerformanceOptions {
|
|
22101
|
+
/**
|
|
22102
|
+
* Fallback value for the performance checks that are not set individually (has precedence over local webpack defaults). Does not apply to 'hints', 'maxAssetSize' or 'maxEntrypointSize'.
|
|
22103
|
+
* @since 5.110.0
|
|
22104
|
+
*/
|
|
22105
|
+
all?: boolean;
|
|
22106
|
+
|
|
22107
|
+
/**
|
|
22108
|
+
* Filter function to select assets that are checked.
|
|
22109
|
+
*/
|
|
22110
|
+
assetFilter?: (name: string, source: Source, assetInfo: AssetInfo) => boolean;
|
|
22111
|
+
|
|
22112
|
+
/**
|
|
22113
|
+
* Report chains of 'import()' calls where each chunk can only be requested once the one before it has arrived, so the levels cost round trips in series (requires 'hints' to be enabled).
|
|
22114
|
+
* @since 5.110.0
|
|
22115
|
+
*/
|
|
22116
|
+
asyncChunkWaterfalls?: boolean;
|
|
22117
|
+
|
|
22118
|
+
/**
|
|
22119
|
+
* Report 'require.context' calls with no filter, which bundle every file under a directory (requires 'hints' to be enabled).
|
|
22120
|
+
* @since 5.110.0
|
|
22121
|
+
*/
|
|
22122
|
+
broadContexts?: boolean;
|
|
22123
|
+
|
|
22124
|
+
/**
|
|
22125
|
+
* Report how much of the module graph the cache reused, and the modules that can never be reused (requires 'hints' to be enabled).
|
|
22126
|
+
* @since 5.110.0
|
|
22127
|
+
*/
|
|
22128
|
+
cacheEffectiveness?: boolean;
|
|
22129
|
+
|
|
22130
|
+
/**
|
|
22131
|
+
* Report groups of modules that import each other synchronously (requires 'hints' to be enabled).
|
|
22132
|
+
* @since 5.110.0
|
|
22133
|
+
*/
|
|
22134
|
+
circularDependencies?: boolean;
|
|
22135
|
+
|
|
22136
|
+
/**
|
|
22137
|
+
* Report chunks asked for as both prefetch and preload from the same place, where the two directives contradict each other.
|
|
22138
|
+
* @since 5.110.0
|
|
22139
|
+
*/
|
|
22140
|
+
conflictingResourceHints?: boolean;
|
|
22141
|
+
|
|
22142
|
+
/**
|
|
22143
|
+
* Report modules emitted into more than one chunk, and the bytes the extra copies cost (requires 'hints' to be enabled).
|
|
22144
|
+
* @since 5.110.0
|
|
22145
|
+
*/
|
|
22146
|
+
duplicateModules?: boolean;
|
|
22147
|
+
|
|
22148
|
+
/**
|
|
22149
|
+
* Report packages which are included more than once, in different versions or as multiple copies of the same version (requires 'hints' to be enabled).
|
|
22150
|
+
* @since 5.110.0
|
|
22151
|
+
*/
|
|
22152
|
+
duplicatePackages?: boolean;
|
|
22153
|
+
|
|
22154
|
+
/**
|
|
22155
|
+
* Report modules whose exports cannot be read statically, which stops anything importing them from being tree-shaken (requires 'hints' to be enabled).
|
|
22156
|
+
* @since 5.110.0
|
|
22157
|
+
*/
|
|
22158
|
+
dynamicExports?: boolean;
|
|
22159
|
+
|
|
22160
|
+
/**
|
|
22161
|
+
* Report a production build whose 'devtool' writes the source map into the JavaScript, so everyone loading the page downloads it (requires 'hints' to be enabled).
|
|
22162
|
+
* @since 5.110.0
|
|
22163
|
+
*/
|
|
22164
|
+
embeddedSourceMaps?: boolean;
|
|
22165
|
+
|
|
22166
|
+
/**
|
|
22167
|
+
* Report modules shipped by more than one entrypoint, which every page that loads them downloads again (requires 'hints' to be enabled).
|
|
22168
|
+
* @since 5.110.0
|
|
22169
|
+
*/
|
|
22170
|
+
entrypointOverlap?: boolean;
|
|
22171
|
+
|
|
22172
|
+
/**
|
|
22173
|
+
* Report modules that call 'eval' directly, which stops minification, scope hoisting and tree shaking (requires 'hints' to be enabled).
|
|
22174
|
+
* @since 5.110.0
|
|
22175
|
+
*/
|
|
22176
|
+
evalUsage?: boolean;
|
|
22177
|
+
|
|
22178
|
+
/**
|
|
22179
|
+
* Sets the format of the hints: warnings, errors, stats-only or nothing at all.
|
|
22180
|
+
*/
|
|
22181
|
+
hints?: false | "error" | "stats" | "warning";
|
|
22182
|
+
|
|
22183
|
+
/**
|
|
22184
|
+
* Report the loaders, plugins and hooks that hold the main thread, timing each one's own code rather than what it waited for (requires 'hints' to be enabled).
|
|
22185
|
+
* @since 5.110.0
|
|
22186
|
+
*/
|
|
22187
|
+
hotspots?: boolean;
|
|
22188
|
+
|
|
22189
|
+
/**
|
|
22190
|
+
* Report assets inlined as data urls that are large enough for the base64 cost and the lost caching to outweigh the request they save (requires 'hints' to be enabled).
|
|
22191
|
+
* @since 5.110.0
|
|
22192
|
+
*/
|
|
22193
|
+
inlinedAssets?: boolean;
|
|
22194
|
+
|
|
22195
|
+
/**
|
|
22196
|
+
* Report a single module that makes up most of the chunk it is in (requires 'hints' to be enabled).
|
|
22197
|
+
* @since 5.110.0
|
|
22198
|
+
*/
|
|
22199
|
+
largeModules?: boolean;
|
|
22200
|
+
|
|
22201
|
+
/**
|
|
22202
|
+
* Report polyfill packages that emulate language features the target already supports natively (requires 'hints' to be enabled).
|
|
22203
|
+
* @since 5.110.0
|
|
22204
|
+
*/
|
|
22205
|
+
legacyJavascript?: boolean;
|
|
22206
|
+
|
|
22207
|
+
/**
|
|
22208
|
+
* File size limit (in bytes) when exceeded, that webpack will provide performance hints.
|
|
22209
|
+
*/
|
|
22210
|
+
maxAssetSize?: number;
|
|
22211
|
+
|
|
22212
|
+
/**
|
|
22213
|
+
* Total size of an entry point (in bytes).
|
|
22214
|
+
*/
|
|
22215
|
+
maxEntrypointSize?: number;
|
|
22216
|
+
|
|
22217
|
+
/**
|
|
22218
|
+
* Report packages that keep unused code in the bundle because their package.json does not declare 'sideEffects' (requires 'hints' to be enabled).
|
|
22219
|
+
* @since 5.110.0
|
|
22220
|
+
*/
|
|
22221
|
+
missingSideEffects?: boolean;
|
|
22222
|
+
|
|
22223
|
+
/**
|
|
22224
|
+
* Report an entry that exports a default beside named exports for a CommonJS library, where a consumer receives the namespace object (requires 'hints' to be enabled).
|
|
22225
|
+
* @since 5.110.0
|
|
22226
|
+
*/
|
|
22227
|
+
mixedExports?: boolean;
|
|
22228
|
+
|
|
22229
|
+
/**
|
|
22230
|
+
* Report conditions in 'module.rules' that hardcode a path separator, so they only match on one operating system.
|
|
22231
|
+
* @since 5.110.0
|
|
22232
|
+
*/
|
|
22233
|
+
osDependentRules?: boolean;
|
|
22234
|
+
|
|
22235
|
+
/**
|
|
22236
|
+
* Report '/*#__PURE__* /' annotations that sit somewhere the parser does not read them (requires 'hints' to be enabled).
|
|
22237
|
+
* @since 5.110.0
|
|
22238
|
+
*/
|
|
22239
|
+
pureAnnotations?: boolean;
|
|
22240
|
+
|
|
22241
|
+
/**
|
|
22242
|
+
* Report 'import()' calls whose module is already loaded where the call runs, so they defer nothing (requires 'hints' to be enabled).
|
|
22243
|
+
* @since 5.110.0
|
|
22244
|
+
*/
|
|
22245
|
+
redundantDynamicImports?: boolean;
|
|
22246
|
+
|
|
22247
|
+
/**
|
|
22248
|
+
* Report modules that could not be merged into their importer's scope, and why (requires 'hints' to be enabled).
|
|
22249
|
+
* @since 5.110.0
|
|
22250
|
+
*/
|
|
22251
|
+
scopeHoistingBailouts?: boolean;
|
|
22252
|
+
|
|
20930
22253
|
/**
|
|
20931
|
-
*
|
|
22254
|
+
* Report splits 'optimization.splitChunks' refused because 'maxInitialRequests' or 'maxAsyncRequests' was already reached (requires 'hints' to be enabled).
|
|
22255
|
+
* @since 5.110.0
|
|
20932
22256
|
*/
|
|
20933
|
-
|
|
22257
|
+
splitChunksCapped?: boolean;
|
|
20934
22258
|
|
|
20935
22259
|
/**
|
|
20936
|
-
*
|
|
22260
|
+
* Report chunks loaded on demand that carry less than 'optimization.splitChunks.minSize' (requires 'hints' to be enabled).
|
|
22261
|
+
* @since 5.110.0
|
|
20937
22262
|
*/
|
|
20938
|
-
|
|
22263
|
+
tinyChunks?: boolean;
|
|
20939
22264
|
|
|
20940
22265
|
/**
|
|
20941
|
-
*
|
|
22266
|
+
* Report modules that read 'this' at the top level of an ES module, where it is 'undefined' rather than the module object or the global one (requires 'hints' to be enabled).
|
|
22267
|
+
* @since 5.110.0
|
|
20942
22268
|
*/
|
|
20943
|
-
|
|
22269
|
+
topLevelThis?: boolean;
|
|
20944
22270
|
|
|
20945
22271
|
/**
|
|
20946
|
-
*
|
|
22272
|
+
* Report initial chunks that mix 'node_modules' code with application code, so every application change re-downloads the dependencies too (requires 'hints' to be enabled).
|
|
22273
|
+
* @since 5.110.0
|
|
20947
22274
|
*/
|
|
20948
|
-
|
|
22275
|
+
unsplitVendors?: boolean;
|
|
22276
|
+
|
|
22277
|
+
/**
|
|
22278
|
+
* Report 'resolve.alias' entries that no request matched.
|
|
22279
|
+
* @since 5.110.0
|
|
22280
|
+
*/
|
|
22281
|
+
unusedAliases?: boolean;
|
|
22282
|
+
|
|
22283
|
+
/**
|
|
22284
|
+
* Report keys defined by 'DefinePlugin' that no module ever referenced, which cost a parser hook per module and invalidate the build when their value changes.
|
|
22285
|
+
* @since 5.110.0
|
|
22286
|
+
*/
|
|
22287
|
+
unusedDefines?: boolean;
|
|
22288
|
+
|
|
22289
|
+
/**
|
|
22290
|
+
* Report requests listed in 'externals' that no module ever imported, which usually means the request is misspelled and the real one got bundled instead.
|
|
22291
|
+
* @since 5.110.0
|
|
22292
|
+
*/
|
|
22293
|
+
unusedExternals?: boolean;
|
|
22294
|
+
|
|
22295
|
+
/**
|
|
22296
|
+
* Report modules bundled although nothing uses what they export, pulled in by a re-export (requires 'hints' to be enabled).
|
|
22297
|
+
* @since 5.110.0
|
|
22298
|
+
*/
|
|
22299
|
+
unusedReexports?: boolean;
|
|
22300
|
+
|
|
22301
|
+
/**
|
|
22302
|
+
* Report rules in 'module.rules' that never matched a module, which cost condition evaluation on every build. Note that plugins may add rules too, so a reported rule is not necessarily one you wrote.
|
|
22303
|
+
* @since 5.110.0
|
|
22304
|
+
*/
|
|
22305
|
+
unusedRules?: boolean;
|
|
20949
22306
|
}
|
|
20950
22307
|
declare interface PitchLoaderDefinitionFunction<
|
|
20951
22308
|
OptionsType = {},
|
|
@@ -21086,6 +22443,224 @@ declare class PrefixSource extends Source {
|
|
|
21086
22443
|
declare interface PreparsedAst {
|
|
21087
22444
|
[index: string]: any;
|
|
21088
22445
|
}
|
|
22446
|
+
|
|
22447
|
+
/**
|
|
22448
|
+
* The per-node output store handed to a language node printer as its `writer`. It
|
|
22449
|
+
* carries the print `options` (today just `mode`) and one map: a finished node ->
|
|
22450
|
+
* its printed text. A printer *returns* its text (`printNode` stores it) and reads
|
|
22451
|
+
* a child's with `get`, so a parent composes its own text from its children's —
|
|
22452
|
+
* the map is what makes that composition (and the CSS value transforms built on
|
|
22453
|
+
* it) possible. `take` flushes a finished top-level node into the output and drops
|
|
22454
|
+
* the map, so a streaming grammar never holds more than one top-level subtree.
|
|
22455
|
+
*/
|
|
22456
|
+
declare class PrintContext<TPath, TNode, TPrintOptions = object> {
|
|
22457
|
+
constructor(
|
|
22458
|
+
options: PrintOptions & TPrintOptions,
|
|
22459
|
+
printer: NodePrinter<TPath, TNode, TPrintOptions>
|
|
22460
|
+
);
|
|
22461
|
+
options: PrintOptions & TPrintOptions;
|
|
22462
|
+
mapWanted: boolean;
|
|
22463
|
+
|
|
22464
|
+
/**
|
|
22465
|
+
* Hold `text` back as the opener of a node being printed in pieces. Nothing
|
|
22466
|
+
* reaches the output until {@link flushPending}, so {@link dropPending} can
|
|
22467
|
+
* still take it back if the node turns out to be empty.
|
|
22468
|
+
*/
|
|
22469
|
+
pushPending(text: string): number;
|
|
22470
|
+
|
|
22471
|
+
/**
|
|
22472
|
+
* Rewrite a held-back opener — an opener whose text depends on what turns out
|
|
22473
|
+
* to follow it can only be settled once something does.
|
|
22474
|
+
*/
|
|
22475
|
+
setPending(depth: number, text: string): void;
|
|
22476
|
+
|
|
22477
|
+
/**
|
|
22478
|
+
* Emit every held-back opener, outermost first — something inside the
|
|
22479
|
+
* innermost one has content, so all of them do.
|
|
22480
|
+
*/
|
|
22481
|
+
flushPending(): void;
|
|
22482
|
+
|
|
22483
|
+
/**
|
|
22484
|
+
* Anchor the outermost held-back opener, applied when it is flushed. Openers
|
|
22485
|
+
* are flushed together, so only the outermost carries one.
|
|
22486
|
+
*/
|
|
22487
|
+
anchorPending(srcOffset?: number, srcLine?: number, srcCol?: number): void;
|
|
22488
|
+
isPending(depth: number): boolean;
|
|
22489
|
+
|
|
22490
|
+
/**
|
|
22491
|
+
* Drop the innermost held-back opener — its node printed to nothing.
|
|
22492
|
+
*/
|
|
22493
|
+
dropPending(): void;
|
|
22494
|
+
|
|
22495
|
+
/**
|
|
22496
|
+
* Close off what has been emitted so far and return the index the next piece
|
|
22497
|
+
* will take. Cutting is the point: a caller bounding a later edit by this
|
|
22498
|
+
* (see {@link dropTrailing}) must not be able to reach output from before it,
|
|
22499
|
+
* which a mark taken while the tail was still open would sit in the middle of.
|
|
22500
|
+
*/
|
|
22501
|
+
markCut(): number;
|
|
22502
|
+
|
|
22503
|
+
/**
|
|
22504
|
+
* Append a piece of a node that is being printed in pieces. Nothing takes it
|
|
22505
|
+
* back, so it only extends the output.
|
|
22506
|
+
*/
|
|
22507
|
+
emitStreamed(text: string): void;
|
|
22508
|
+
|
|
22509
|
+
/**
|
|
22510
|
+
* Forget every node's printed text. A node printed in pieces does this once
|
|
22511
|
+
* each child is emitted, so the store never holds more than one of them —
|
|
22512
|
+
* which is also what keeps a recycled node id from reading as an earlier
|
|
22513
|
+
* node's text.
|
|
22514
|
+
*/
|
|
22515
|
+
dropStore(): void;
|
|
22516
|
+
|
|
22517
|
+
/**
|
|
22518
|
+
* Drop trailing `charCode`s from the end of the output at or after `from` —
|
|
22519
|
+
* the separator the piece before a terminator no longer needs. Walks back over
|
|
22520
|
+
* pieces emptied by {@link retract}, so it sees what the output reads as.
|
|
22521
|
+
*/
|
|
22522
|
+
dropTrailing(from: number, charCode: number): void;
|
|
22523
|
+
|
|
22524
|
+
/**
|
|
22525
|
+
* Run the node printer for `node` and store what it returns (the grammar calls
|
|
22526
|
+
* this once the node's visitors and children are done). `path` is on `node`.
|
|
22527
|
+
*/
|
|
22528
|
+
printNode(node: TNode, path: TPath): void;
|
|
22529
|
+
|
|
22530
|
+
/**
|
|
22531
|
+
* Print one node and hand its text straight back — for a node inside one being
|
|
22532
|
+
* printed in pieces, whose text is emitted as it is printed, so the store
|
|
22533
|
+
* would only ever be written and read once.
|
|
22534
|
+
*/
|
|
22535
|
+
printPiece(path: TPath): string;
|
|
22536
|
+
get(node: TNode): string;
|
|
22537
|
+
|
|
22538
|
+
/**
|
|
22539
|
+
* Append `text` as a piece of its own, so {@link retract} can still take it
|
|
22540
|
+
* back once a later sibling turns out to override it. Cuts the accumulating
|
|
22541
|
+
* tail off in front of it, so it is for the text that may actually be taken
|
|
22542
|
+
* back and not for output at large.
|
|
22543
|
+
*/
|
|
22544
|
+
emitRetractable(text: string): number;
|
|
22545
|
+
|
|
22546
|
+
/**
|
|
22547
|
+
* Take back an already-emitted piece — the printer has since found that a
|
|
22548
|
+
* later one overrides it. Pieces after it keep their place. A piece emitted by
|
|
22549
|
+
* {@link takeRetractable} takes the mapping anchored to it back as well; any
|
|
22550
|
+
* other anchor into the piece would be left pointing at what follows it, so
|
|
22551
|
+
* this must not be used on one (see {@link take}).
|
|
22552
|
+
*/
|
|
22553
|
+
retract(index: number): void;
|
|
22554
|
+
|
|
22555
|
+
/**
|
|
22556
|
+
* Fold `text` into an already-emitted piece, in front of the character it ends
|
|
22557
|
+
* with — a later sibling whose body belongs inside that piece, as a repeated
|
|
22558
|
+
* named `@layer` block's does. Mappings are piece-relative and this only grows
|
|
22559
|
+
* the piece past everything already anchored in it, so they keep their
|
|
22560
|
+
* positions; the folded text carries none of its own.
|
|
22561
|
+
*/
|
|
22562
|
+
foldIntoRetractable(index: number, text: string): void;
|
|
22563
|
+
|
|
22564
|
+
/**
|
|
22565
|
+
* Write an already-emitted piece again, shorter — a rule inside it a later
|
|
22566
|
+
* copy makes dead. Mappings anchored in the piece keep the offsets they were
|
|
22567
|
+
* given, so one inside what was cut names what now follows it.
|
|
22568
|
+
*/
|
|
22569
|
+
rewriteRetractable(index: number, text: string): void;
|
|
22570
|
+
|
|
22571
|
+
/**
|
|
22572
|
+
* {@link take} for a top-level node a later sibling may still make dead — the
|
|
22573
|
+
* unprefixed twin of a vendor-prefixed rule, which can stand anywhere after
|
|
22574
|
+
* it. The node is emitted as a piece of its own, with its mapping recorded
|
|
22575
|
+
* against that piece, so {@link retract} takes both back.
|
|
22576
|
+
*/
|
|
22577
|
+
takeRetractable(
|
|
22578
|
+
node: TNode,
|
|
22579
|
+
srcOffset?: number,
|
|
22580
|
+
srcLine?: number,
|
|
22581
|
+
srcCol?: number,
|
|
22582
|
+
text?: string
|
|
22583
|
+
): number;
|
|
22584
|
+
|
|
22585
|
+
/**
|
|
22586
|
+
* Emit one finished top-level node: first any kept comments that precede it,
|
|
22587
|
+
* then a source mapping anchoring its output start to `[srcLine, srcCol]`, then
|
|
22588
|
+
* its text — and drop the per-node store so the next top-level node starts
|
|
22589
|
+
* clean. `srcOffset` / `srcLine` / `srcCol` are the node's source position; a
|
|
22590
|
+
* grammar that doesn't map positions (e.g. HTML) omits them (no comments, no
|
|
22591
|
+
* mapping — the map ends up empty).
|
|
22592
|
+
*/
|
|
22593
|
+
take(
|
|
22594
|
+
node?: TNode,
|
|
22595
|
+
srcOffset?: number,
|
|
22596
|
+
srcLine?: number,
|
|
22597
|
+
srcCol?: number,
|
|
22598
|
+
text?: string
|
|
22599
|
+
): void;
|
|
22600
|
+
|
|
22601
|
+
/**
|
|
22602
|
+
* Tie whatever is emitted next to a source position: flush the kept comments
|
|
22603
|
+
* that precede it, then record the mapping. Split out of {@link take} for a
|
|
22604
|
+
* node printed in pieces, whose first piece is emitted well after the printer
|
|
22605
|
+
* for it began.
|
|
22606
|
+
*/
|
|
22607
|
+
anchor(srcOffset?: number, srcLine?: number, srcCol?: number): void;
|
|
22608
|
+
|
|
22609
|
+
/**
|
|
22610
|
+
* Whether a kept literal is queued to land before `pos`. A printer folding two
|
|
22611
|
+
* top-level nodes together asks first: the literal belongs between them, so
|
|
22612
|
+
* the fold would move it past what it was written above.
|
|
22613
|
+
*/
|
|
22614
|
+
hasInsertBefore(pos: number): boolean;
|
|
22615
|
+
|
|
22616
|
+
/**
|
|
22617
|
+
* Emit the kept literals landing before `pos`. A printer holding a node back
|
|
22618
|
+
* calls this at hold time, so what was written above it is still emitted
|
|
22619
|
+
* above it — and {@link hasInsertBefore} then answers about the gap to the
|
|
22620
|
+
* next node rather than the whole span since the last node taken.
|
|
22621
|
+
*/
|
|
22622
|
+
flushInsertsBefore(pos: number): void;
|
|
22623
|
+
|
|
22624
|
+
/**
|
|
22625
|
+
* Queue a literal to carry through to the output at source offset `pos` — a
|
|
22626
|
+
* comment the printer chose to keep (e.g. a `/*!` license banner). Calls
|
|
22627
|
+
* arrive in source order; each lands just before the first top-level node
|
|
22628
|
+
* starting after `pos` (or at the end, via {@link result}).
|
|
22629
|
+
*/
|
|
22630
|
+
insert(pos: number, text: string): void;
|
|
22631
|
+
|
|
22632
|
+
/**
|
|
22633
|
+
* Take the queued inserts sitting in `[start, end)` — a printer that writes
|
|
22634
|
+
* that source range out itself places them, so the writer must not flush
|
|
22635
|
+
* them ahead of the next top-level node as well.
|
|
22636
|
+
*/
|
|
22637
|
+
takeInserts(start: number, end: number): string;
|
|
22638
|
+
sourceMap(options: SourceMapOptions): SourceMap;
|
|
22639
|
+
|
|
22640
|
+
/**
|
|
22641
|
+
* Stand the text `resolve` gives back in place of every deferred write left
|
|
22642
|
+
* in the output, and move the mappings that follow one in the same piece by
|
|
22643
|
+
* what its text changed in length. Runs before {@link result} and
|
|
22644
|
+
* {@link sourceMap}, so both read the substituted output rather than
|
|
22645
|
+
* correcting for it.
|
|
22646
|
+
* The marker is `NUL id NUL`. A NUL mostly cannot reach printed output on its
|
|
22647
|
+
* own account — both preprocessors turn one into U+FFFD — but an RCDATA
|
|
22648
|
+
* element and an attribute value keep the one they were written with, so a
|
|
22649
|
+
* pair of them is read as a write only where what stands between spells an id
|
|
22650
|
+
* this answers for. Anything else is the source's own text and is left alone.
|
|
22651
|
+
*/
|
|
22652
|
+
substitute(resolve: (id: number) => undefined | string, infix: string): void;
|
|
22653
|
+
|
|
22654
|
+
/**
|
|
22655
|
+
* Throw away everything printed and stand `text` in its place. For the one
|
|
22656
|
+
* caller that can only tell its output is wrong once it has all of it.
|
|
22657
|
+
*/
|
|
22658
|
+
replaceAll(text: string): void;
|
|
22659
|
+
result(): string;
|
|
22660
|
+
}
|
|
22661
|
+
declare interface PrintOptions {
|
|
22662
|
+
mode: "minify" | "beautify";
|
|
22663
|
+
}
|
|
21089
22664
|
declare interface PrintedElement {
|
|
21090
22665
|
element: string;
|
|
21091
22666
|
content?: string;
|
|
@@ -21359,6 +22934,13 @@ declare interface ProvidesObject {
|
|
|
21359
22934
|
}
|
|
21360
22935
|
type PureCondition =
|
|
21361
22936
|
boolean | ((compilation: Compilation, module: Module) => boolean);
|
|
22937
|
+
type QualifiedRule = NodeSyntax & {
|
|
22938
|
+
prelude: ComponentValue[];
|
|
22939
|
+
declarations: null | DeclarationSyntax[];
|
|
22940
|
+
childRules: null | RuleSyntax[];
|
|
22941
|
+
blockStart: number;
|
|
22942
|
+
blockEnd: number;
|
|
22943
|
+
};
|
|
21362
22944
|
declare interface RawChunkGroupOptions {
|
|
21363
22945
|
preloadOrder?: number;
|
|
21364
22946
|
prefetchOrder?: number;
|
|
@@ -21945,10 +23527,7 @@ declare interface ReaddirTypes {
|
|
|
21945
23527
|
withFileTypes: true;
|
|
21946
23528
|
recursive?: boolean;
|
|
21947
23529
|
},
|
|
21948
|
-
callback: (
|
|
21949
|
-
err: null | NodeJS.ErrnoException,
|
|
21950
|
-
files?: DirentTypes<string>[]
|
|
21951
|
-
) => void
|
|
23530
|
+
callback: (err: null | NodeJS.ErrnoException, files?: DirentTypes[]) => void
|
|
21952
23531
|
): void;
|
|
21953
23532
|
(
|
|
21954
23533
|
path: PathLikeTypes,
|
|
@@ -22115,92 +23694,14 @@ type RecursiveArrayOrRecord<T> =
|
|
|
22115
23694
|
| RecursiveArrayOrRecord<T>[]
|
|
22116
23695
|
| T;
|
|
22117
23696
|
declare interface RecursiveNonNullable<T> {}
|
|
22118
|
-
|
|
23697
|
+
|
|
23698
|
+
/**
|
|
23699
|
+
* One identifier occurrence that refers to a binding.
|
|
23700
|
+
*/
|
|
23701
|
+
declare abstract class Reference {
|
|
22119
23702
|
identifier: Identifier;
|
|
22120
23703
|
from: Scope;
|
|
22121
|
-
resolved
|
|
22122
|
-
writeExpr:
|
|
22123
|
-
| null
|
|
22124
|
-
| Program
|
|
22125
|
-
| ImportDeclaration
|
|
22126
|
-
| ExportNamedDeclaration
|
|
22127
|
-
| ExportAllDeclaration
|
|
22128
|
-
| ImportExpressionImport
|
|
22129
|
-
| UnaryExpression
|
|
22130
|
-
| ArrayExpression
|
|
22131
|
-
| ArrowFunctionExpression
|
|
22132
|
-
| AssignmentExpression
|
|
22133
|
-
| AwaitExpression
|
|
22134
|
-
| BinaryExpression
|
|
22135
|
-
| SimpleCallExpression
|
|
22136
|
-
| NewExpression
|
|
22137
|
-
| ChainExpression
|
|
22138
|
-
| ClassExpression
|
|
22139
|
-
| ConditionalExpression
|
|
22140
|
-
| FunctionExpression
|
|
22141
|
-
| Identifier
|
|
22142
|
-
| SimpleLiteral
|
|
22143
|
-
| RegExpLiteral
|
|
22144
|
-
| BigIntLiteral
|
|
22145
|
-
| LogicalExpression
|
|
22146
|
-
| MemberExpression
|
|
22147
|
-
| MetaProperty
|
|
22148
|
-
| ObjectExpression
|
|
22149
|
-
| SequenceExpression
|
|
22150
|
-
| TaggedTemplateExpression
|
|
22151
|
-
| TemplateLiteral
|
|
22152
|
-
| ThisExpression
|
|
22153
|
-
| UpdateExpression
|
|
22154
|
-
| YieldExpression
|
|
22155
|
-
| SpreadElement
|
|
22156
|
-
| PrivateIdentifier
|
|
22157
|
-
| Super
|
|
22158
|
-
| FunctionDeclaration
|
|
22159
|
-
| VariableDeclaration
|
|
22160
|
-
| ClassDeclaration
|
|
22161
|
-
| ExpressionStatement
|
|
22162
|
-
| BlockStatement
|
|
22163
|
-
| StaticBlock
|
|
22164
|
-
| EmptyStatement
|
|
22165
|
-
| DebuggerStatement
|
|
22166
|
-
| WithStatement
|
|
22167
|
-
| ReturnStatement
|
|
22168
|
-
| LabeledStatement
|
|
22169
|
-
| BreakStatement
|
|
22170
|
-
| ContinueStatement
|
|
22171
|
-
| IfStatement
|
|
22172
|
-
| SwitchStatement
|
|
22173
|
-
| ThrowStatement
|
|
22174
|
-
| TryStatement
|
|
22175
|
-
| WhileStatement
|
|
22176
|
-
| DoWhileStatement
|
|
22177
|
-
| ForStatement
|
|
22178
|
-
| ForInStatement
|
|
22179
|
-
| ForOfStatement
|
|
22180
|
-
| ExportDefaultDeclaration
|
|
22181
|
-
| MethodDefinition
|
|
22182
|
-
| PropertyDefinition
|
|
22183
|
-
| VariableDeclarator
|
|
22184
|
-
| AssignmentProperty
|
|
22185
|
-
| Property
|
|
22186
|
-
| CatchClause
|
|
22187
|
-
| ClassBody
|
|
22188
|
-
| ImportSpecifier
|
|
22189
|
-
| ImportDefaultSpecifier
|
|
22190
|
-
| ImportNamespaceSpecifier
|
|
22191
|
-
| ExportSpecifier
|
|
22192
|
-
| ObjectPattern
|
|
22193
|
-
| ArrayPattern
|
|
22194
|
-
| RestElement
|
|
22195
|
-
| AssignmentPattern
|
|
22196
|
-
| SwitchCase
|
|
22197
|
-
| TemplateElement;
|
|
22198
|
-
init: boolean;
|
|
22199
|
-
isWrite: () => boolean;
|
|
22200
|
-
isRead: () => boolean;
|
|
22201
|
-
isWriteOnly: () => boolean;
|
|
22202
|
-
isReadOnly: () => boolean;
|
|
22203
|
-
isReadWrite: () => boolean;
|
|
23704
|
+
resolved?: Variable;
|
|
22204
23705
|
}
|
|
22205
23706
|
type ReferenceableItem = string | object;
|
|
22206
23707
|
declare interface ReferencedExport {
|
|
@@ -23220,6 +24721,11 @@ declare interface ResourceDataWithData {
|
|
|
23220
24721
|
* @since 5.109.0
|
|
23221
24722
|
*/
|
|
23222
24723
|
declare interface ResourceHintsOptions {
|
|
24724
|
+
/**
|
|
24725
|
+
* Skip the runtime-injected `<link rel="prefetch">` for a chunk that is already preloaded or prefetched in the document (avoids a duplicate request in some browsers such as Chrome).
|
|
24726
|
+
*/
|
|
24727
|
+
dedupe?: boolean;
|
|
24728
|
+
|
|
23223
24729
|
/**
|
|
23224
24730
|
* Initial dependency-graph chunk hints. `true` auto-emits `<link rel="modulepreload">` (ESM output) or `<link rel="preload" as="script">` (classic) for each of the entry's initial dependency chunks; `"prefetch"` uses `<link rel="prefetch">`; `"preload"` is an alias of `true`; `false` disables chunk hints (URL-asset hints from magic comments / `urlHints` still fire); `"none"` is a hard off switch (no `<link>` anywhere, empty stats / manifest); an array of `HtmlResourceHint` descriptors replaces the auto set; a function receives the auto `defaultHints` plus context (`entryName`, `entrypoint`, `hostType: "html" | "js"`, `compilation`) and returns the final list (replaces the removed `resolveDependencies` hook).
|
|
23225
24731
|
* @since 5.109.0
|
|
@@ -23290,7 +24796,7 @@ declare abstract class RestoreProvidedData {
|
|
|
23290
24796
|
/**
|
|
23291
24797
|
* Serializes this instance into the provided serializer context.
|
|
23292
24798
|
*/
|
|
23293
|
-
serialize(context:
|
|
24799
|
+
serialize(context: ObjectSerializerContextObjectMiddlewareObject_4): void;
|
|
23294
24800
|
}
|
|
23295
24801
|
declare interface RestoreProvidedDataExports {
|
|
23296
24802
|
name: string;
|
|
@@ -23301,7 +24807,28 @@ declare interface RestoreProvidedDataExports {
|
|
|
23301
24807
|
pureProvide?: boolean;
|
|
23302
24808
|
exportsInfo?: RestoreProvidedData;
|
|
23303
24809
|
}
|
|
23304
|
-
type
|
|
24810
|
+
type RuleAlias = string | RegExp | ((str: string) => boolean);
|
|
24811
|
+
declare interface RuleCondition {
|
|
24812
|
+
property: string | string[];
|
|
24813
|
+
matchWhenEmpty: boolean;
|
|
24814
|
+
fn: (
|
|
24815
|
+
value: EffectData[
|
|
24816
|
+
| "compiler"
|
|
24817
|
+
| "dependency"
|
|
24818
|
+
| "resource"
|
|
24819
|
+
| "scheme"
|
|
24820
|
+
| "realResource"
|
|
24821
|
+
| "resourceQuery"
|
|
24822
|
+
| "resourceFragment"
|
|
24823
|
+
| "attributes"
|
|
24824
|
+
| "mimetype"
|
|
24825
|
+
| "descriptionData"
|
|
24826
|
+
| "descriptionRelativePath"
|
|
24827
|
+
| "issuer"
|
|
24828
|
+
| "issuerLayer"
|
|
24829
|
+
| "phase"]
|
|
24830
|
+
) => boolean;
|
|
24831
|
+
}
|
|
23305
24832
|
declare interface RuleSet {
|
|
23306
24833
|
/**
|
|
23307
24834
|
* map of references in the rule set (may grow over time)
|
|
@@ -23312,6 +24839,11 @@ declare interface RuleSet {
|
|
|
23312
24839
|
* execute the rule set
|
|
23313
24840
|
*/
|
|
23314
24841
|
exec: (effectData: EffectData) => Effect[];
|
|
24842
|
+
|
|
24843
|
+
/**
|
|
24844
|
+
* the rules that never matched, outermost first
|
|
24845
|
+
*/
|
|
24846
|
+
unusedRules: () => CompiledRule[];
|
|
23315
24847
|
}
|
|
23316
24848
|
type RuleSetCondition =
|
|
23317
24849
|
| string
|
|
@@ -23334,7 +24866,7 @@ type RuleSetConditionOrConditions =
|
|
|
23334
24866
|
type RuleSetLoaderOptions = string | { [index: string]: any };
|
|
23335
24867
|
|
|
23336
24868
|
/**
|
|
23337
|
-
* Logic operators used in a condition matcher.
|
|
24869
|
+
* Logic operators and glob patterns used in a condition matcher.
|
|
23338
24870
|
*/
|
|
23339
24871
|
declare interface RuleSetLogicalConditions {
|
|
23340
24872
|
/**
|
|
@@ -23342,6 +24874,12 @@ declare interface RuleSetLogicalConditions {
|
|
|
23342
24874
|
*/
|
|
23343
24875
|
and?: RuleSetCondition[];
|
|
23344
24876
|
|
|
24877
|
+
/**
|
|
24878
|
+
* Match glob patterns against the value, `!` in front of a pattern excludes it. Path separators are normalized to `/` on every OS, and a relative pattern matches at any depth.
|
|
24879
|
+
* @since 5.110.0
|
|
24880
|
+
*/
|
|
24881
|
+
glob?: string | string[];
|
|
24882
|
+
|
|
23345
24883
|
/**
|
|
23346
24884
|
* Logical NOT.
|
|
23347
24885
|
*/
|
|
@@ -23359,7 +24897,7 @@ declare interface RuleSetLogicalConditions {
|
|
|
23359
24897
|
}
|
|
23360
24898
|
|
|
23361
24899
|
/**
|
|
23362
|
-
* Logic operators used in a condition matcher.
|
|
24900
|
+
* Logic operators and glob patterns used in a condition matcher.
|
|
23363
24901
|
*/
|
|
23364
24902
|
declare interface RuleSetLogicalConditionsAbsolute {
|
|
23365
24903
|
/**
|
|
@@ -23367,6 +24905,12 @@ declare interface RuleSetLogicalConditionsAbsolute {
|
|
|
23367
24905
|
*/
|
|
23368
24906
|
and?: RuleSetConditionAbsolute[];
|
|
23369
24907
|
|
|
24908
|
+
/**
|
|
24909
|
+
* Match glob patterns against the value, `!` in front of a pattern excludes it. Path separators are normalized to `/` on every OS, and a relative pattern matches at any depth.
|
|
24910
|
+
* @since 5.110.0
|
|
24911
|
+
*/
|
|
24912
|
+
glob?: string | string[];
|
|
24913
|
+
|
|
23370
24914
|
/**
|
|
23371
24915
|
* Logical NOT.
|
|
23372
24916
|
*/
|
|
@@ -23417,6 +24961,17 @@ declare interface RuleSetRule {
|
|
|
23417
24961
|
*/
|
|
23418
24962
|
descriptionData?: { [index: string]: RuleSetConditionOrConditions };
|
|
23419
24963
|
|
|
24964
|
+
/**
|
|
24965
|
+
* Match the path of the module relative to the directory of the description file (usually package.json), i.e. './lib/button.js'. Always uses forward slashes.
|
|
24966
|
+
* @since 5.110.0
|
|
24967
|
+
*/
|
|
24968
|
+
descriptionRelativePath?:
|
|
24969
|
+
| string
|
|
24970
|
+
| RegExp
|
|
24971
|
+
| ((value: string) => boolean)
|
|
24972
|
+
| RuleSetLogicalConditions
|
|
24973
|
+
| RuleSetCondition[];
|
|
24974
|
+
|
|
23420
24975
|
/**
|
|
23421
24976
|
* Enforce this rule as pre or post step.
|
|
23422
24977
|
*/
|
|
@@ -23442,6 +24997,12 @@ declare interface RuleSetRule {
|
|
|
23442
24997
|
*/
|
|
23443
24998
|
generator?: { [index: string]: any };
|
|
23444
24999
|
|
|
25000
|
+
/**
|
|
25001
|
+
* Match the module resource against glob patterns, `!` in front of a pattern excludes it. Combines with `test`, `include` and `exclude`.
|
|
25002
|
+
* @since 5.110.0
|
|
25003
|
+
*/
|
|
25004
|
+
glob?: string | string[];
|
|
25005
|
+
|
|
23445
25006
|
/**
|
|
23446
25007
|
* Shortcut for resource.include.
|
|
23447
25008
|
*/
|
|
@@ -23740,6 +25301,7 @@ type RuleSetUseItem =
|
|
|
23740
25301
|
*/
|
|
23741
25302
|
options?: string | { [index: string]: any };
|
|
23742
25303
|
};
|
|
25304
|
+
type RuleSyntax = AtRule | QualifiedRule;
|
|
23743
25305
|
declare class RuntimeChunkPlugin {
|
|
23744
25306
|
/**
|
|
23745
25307
|
* Creates an instance of RuntimeChunkPlugin.
|
|
@@ -23789,6 +25351,8 @@ declare class RuntimeModule extends Module {
|
|
|
23789
25351
|
|
|
23790
25352
|
/**
|
|
23791
25353
|
* Returns true, if the runtime module should get it's own scope.
|
|
25354
|
+
* When false, `generate()` must emit complete statements ending with `;`
|
|
25355
|
+
* so a following runtime IIFE is not parsed as a call (ASI).
|
|
23792
25356
|
*/
|
|
23793
25357
|
shouldIsolate(): boolean;
|
|
23794
25358
|
|
|
@@ -23906,6 +25470,12 @@ declare abstract class RuntimeTemplate {
|
|
|
23906
25470
|
globalObject: string;
|
|
23907
25471
|
contentHashReplacement: string;
|
|
23908
25472
|
isIIFE(): boolean;
|
|
25473
|
+
|
|
25474
|
+
/**
|
|
25475
|
+
* Whether the global object expression reads the `this` binding, which only
|
|
25476
|
+
* refers to the global object outside of strict mode.
|
|
25477
|
+
*/
|
|
25478
|
+
globalObjectUsesThis(): boolean;
|
|
23909
25479
|
isModule(): boolean;
|
|
23910
25480
|
isNeutralPlatform(): boolean;
|
|
23911
25481
|
|
|
@@ -23923,28 +25493,103 @@ declare abstract class RuntimeTemplate {
|
|
|
23923
25493
|
|
|
23924
25494
|
/**
|
|
23925
25495
|
* Expression for the global registry that collects CSS server-side when there
|
|
23926
|
-
* is no DOM (SSR).
|
|
23927
|
-
* style/chunk identifier and namespaced by `output.uniqueName`.
|
|
25496
|
+
* is no DOM (SSR). Read it with `__webpack_css_server_styles__`; it is keyed
|
|
25497
|
+
* by the style/chunk identifier and namespaced by `output.uniqueName`.
|
|
25498
|
+
* Targets without `globalThis` go through the `__webpack_require__.g`
|
|
25499
|
+
* polyfill, so consumers must also require `RuntimeGlobals.global`.
|
|
25500
|
+
*/
|
|
25501
|
+
cssServerStyleRegistry(): string;
|
|
25502
|
+
supportsConst(): boolean;
|
|
25503
|
+
supportsLet(): boolean;
|
|
25504
|
+
supportsMethodShorthand(): boolean;
|
|
25505
|
+
supportsLogicalAssignment(): boolean;
|
|
25506
|
+
supportsArrowFunction(): boolean;
|
|
25507
|
+
supportsAsyncFunction(): boolean;
|
|
25508
|
+
supportsGenerator(): boolean;
|
|
25509
|
+
supportsOptionalChaining(): boolean;
|
|
25510
|
+
supportsSpread(): boolean;
|
|
25511
|
+
supportsObjectHasOwn(): boolean;
|
|
25512
|
+
supportsSymbol(): boolean;
|
|
25513
|
+
supportsForOf(): boolean;
|
|
25514
|
+
supportsDestructuring(): boolean;
|
|
25515
|
+
supportsBigIntLiteral(): boolean;
|
|
25516
|
+
supportsDynamicImport(): boolean;
|
|
25517
|
+
supportsEcmaScriptModuleSyntax(): boolean;
|
|
25518
|
+
supportsDeferImport(): boolean;
|
|
25519
|
+
supportsSourceImport(): boolean;
|
|
25520
|
+
supportsModulePreload(): boolean;
|
|
25521
|
+
|
|
25522
|
+
/**
|
|
25523
|
+
* Whether a reference a foreign bundler can follow without running webpack's runtime
|
|
25524
|
+
* may be emitted — the one question every caller asks, in the form it is asking for:
|
|
25525
|
+
* - `"import"` — a literal `import("./chunk.js")` in place of `ensureChunk(id)`
|
|
25526
|
+
* - `"url"` — a literal `new URL(<file>, import.meta.url)`
|
|
25527
|
+
* - `"url-runtime"` — the same, written into a runtime module rather than a module
|
|
25528
|
+
* - `"url-inline"` — whether such a reference names the file at the call site
|
|
25529
|
+
* - `"wasm"` — the same, fully baked for a wasm binary the runtime would name
|
|
25530
|
+
* - `"wasm-relative"` — a wasm path built at runtime under an `import.meta.url` base
|
|
25531
|
+
* `"url-inline"` differs from `"url"` only in taking the `.p + <file>` fallback as
|
|
25532
|
+
* an answer too — both name the file where it is used rather than through the
|
|
25533
|
+
* asset's javascript wrapper, which is what decides whether that wrapper is emitted.
|
|
25534
|
+
* A name code generation cannot settle may still be baked, through a stand-in the
|
|
25535
|
+
* deferred pass fills in. Not covered here, because only the reference can tell: a
|
|
25536
|
+
* chunk with no id, and one this compilation emits no javascript for.
|
|
25537
|
+
*/
|
|
25538
|
+
supportsAnalyzable(
|
|
25539
|
+
form: AnalyzableForm,
|
|
25540
|
+
chunkGraph?: ChunkGraph,
|
|
25541
|
+
module?: Module,
|
|
25542
|
+
runtime?: RuntimeSpec
|
|
25543
|
+
): boolean;
|
|
25544
|
+
|
|
25545
|
+
/**
|
|
25546
|
+
* Builds the analyzable `new URL(specifier, import.meta.url)` expression the ESM
|
|
25547
|
+
* wasm/asset loader backends use to reference an emitted binary relative to the
|
|
25548
|
+
* current module (via `output.importMetaName`) instead of the runtime public-path
|
|
25549
|
+
* global — the form other bundlers and webpack itself can statically follow.
|
|
25550
|
+
*/
|
|
25551
|
+
importMetaUrl(specifier: string): string;
|
|
25552
|
+
|
|
25553
|
+
/**
|
|
25554
|
+
* Whether a baked asset url resolves against the entry `baseUri` at all. A public
|
|
25555
|
+
* path that reaches the same place from any base never reads `.b` — and `auto`
|
|
25556
|
+
* resolves to an absolute url too — while output with no baked form has nothing to
|
|
25557
|
+
* resolve. Where this is false, what `baseUri` is set to cannot reach the generated
|
|
25558
|
+
* code, so it must not reach the module hash either: `URLDependency.updateHash`
|
|
25559
|
+
* asks this before contributing one.
|
|
25560
|
+
*/
|
|
25561
|
+
analyzableUrlReadsBaseUri(): boolean;
|
|
25562
|
+
|
|
25563
|
+
/**
|
|
25564
|
+
* Static literal specifier (already quoted) for the `new URL(<here>, import.meta.url)`
|
|
25565
|
+
* an asset reference bakes to, or `null` to keep the runtime form. Unlike a wasm
|
|
25566
|
+
* binary, the runtime resolves an asset url against `__webpack_require__.b` — the
|
|
25567
|
+
* output root, or an entry `baseUri` where one is set — so that base is settled here
|
|
25568
|
+
* before the rest of the name is.
|
|
25569
|
+
*/
|
|
25570
|
+
getAnalyzableAssetUrl(
|
|
25571
|
+
module: Module,
|
|
25572
|
+
chunkGraph: ChunkGraph,
|
|
25573
|
+
filename: string,
|
|
25574
|
+
runtime: RuntimeSpec
|
|
25575
|
+
): null | string;
|
|
25576
|
+
|
|
25577
|
+
/**
|
|
25578
|
+
* The `baseUri` the entries this code runs under agree on, which replaces the output
|
|
25579
|
+
* root an asset url resolves against. Asked per runtime, because that is what the
|
|
25580
|
+
* module is generated for: two entries with different bases each get their own
|
|
25581
|
+
* source. `undefined` when none of them sets one, `null` when they disagree — an
|
|
25582
|
+
* entry that omits it disagrees with one that sets it.
|
|
25583
|
+
*/
|
|
25584
|
+
entryBaseUri(runtime: RuntimeSpec): undefined | null | string;
|
|
25585
|
+
|
|
25586
|
+
/**
|
|
25587
|
+
* `output.publicPath` as the constant it will be, for code that would otherwise read
|
|
25588
|
+
* `__webpack_require__.p` for a value that never changes. `undefined` when only the
|
|
25589
|
+
* hash could say, or when a runtime reassigns `__webpack_public_path__` — then the
|
|
25590
|
+
* global is the only thing that knows.
|
|
23928
25591
|
*/
|
|
23929
|
-
|
|
23930
|
-
supportsConst(): boolean;
|
|
23931
|
-
supportsLet(): boolean;
|
|
23932
|
-
supportsMethodShorthand(): boolean;
|
|
23933
|
-
supportsLogicalAssignment(): boolean;
|
|
23934
|
-
supportsArrowFunction(): boolean;
|
|
23935
|
-
supportsAsyncFunction(): boolean;
|
|
23936
|
-
supportsGenerator(): boolean;
|
|
23937
|
-
supportsOptionalChaining(): boolean;
|
|
23938
|
-
supportsSpread(): boolean;
|
|
23939
|
-
supportsObjectHasOwn(): boolean;
|
|
23940
|
-
supportsSymbol(): boolean;
|
|
23941
|
-
supportsForOf(): boolean;
|
|
23942
|
-
supportsDestructuring(): boolean;
|
|
23943
|
-
supportsBigIntLiteral(): boolean;
|
|
23944
|
-
supportsDynamicImport(): boolean;
|
|
23945
|
-
supportsEcmaScriptModuleSyntax(): boolean;
|
|
23946
|
-
supportsModulePreload(): boolean;
|
|
23947
|
-
supportsAnalyzableEsm(): boolean;
|
|
25592
|
+
constantPublicPath(): undefined | string;
|
|
23948
25593
|
supportTemplateLiteral(): boolean;
|
|
23949
25594
|
supportNodePrefixForCoreModules(): boolean;
|
|
23950
25595
|
|
|
@@ -24000,6 +25645,12 @@ declare abstract class RuntimeTemplate {
|
|
|
24000
25645
|
*/
|
|
24001
25646
|
getBuiltinModule(request: string, access?: string): string;
|
|
24002
25647
|
|
|
25648
|
+
/**
|
|
25649
|
+
* Renders a `then` callback calling `fn` with `args`. An arrow keeps the `this`
|
|
25650
|
+
* a method call gives; the bound form is shorter without arrows.
|
|
25651
|
+
*/
|
|
25652
|
+
deferredCall(fn: string, args: string): string;
|
|
25653
|
+
|
|
24003
25654
|
/**
|
|
24004
25655
|
* Renders an object-literal method, using method shorthand when supported
|
|
24005
25656
|
* and falling back to a `prop: function/arrow` property otherwise.
|
|
@@ -24458,6 +26109,84 @@ declare abstract class RuntimeTemplate {
|
|
|
24458
26109
|
originModule?: Module;
|
|
24459
26110
|
}): string;
|
|
24460
26111
|
|
|
26112
|
+
/**
|
|
26113
|
+
* For ESM module output, load a single statically-named chunk through the
|
|
26114
|
+
* `analyzableChunkImport` helper — a literal `import("./chunk.js")` other bundlers
|
|
26115
|
+
* and webpack itself can follow, wrapped to keep `ensureChunk` timing and deduplication.
|
|
26116
|
+
* Returns `null` to fall back to the runtime `ensureChunk` form.
|
|
26117
|
+
*/
|
|
26118
|
+
analyzableChunkImport(
|
|
26119
|
+
chunk: Chunk,
|
|
26120
|
+
comment: string,
|
|
26121
|
+
runtimeRequirements: Set<string>,
|
|
26122
|
+
originModule: undefined | Module,
|
|
26123
|
+
chunkGraph: ChunkGraph
|
|
26124
|
+
): null | string;
|
|
26125
|
+
|
|
26126
|
+
/**
|
|
26127
|
+
* The `../` path from a chunk's own asset back to the output root. Hashes are
|
|
26128
|
+
* neutralized first: a runtime module is generated once to be hashed, before any
|
|
26129
|
+
* hash exists, so resolving one there throws — and `RuntimeModule.updateHash`
|
|
26130
|
+
* swallows that, pinning the module's hash to the message.
|
|
26131
|
+
*/
|
|
26132
|
+
chunkRootOutputDir(chunk: Chunk, enforceRelative: boolean): string;
|
|
26133
|
+
|
|
26134
|
+
/**
|
|
26135
|
+
* Static literal specifier (already quoted) for the `new URL(<here>, import.meta.url)`
|
|
26136
|
+
* a worker or worklet entry chunk bakes to, or `null` to keep the runtime form. The
|
|
26137
|
+
* gate and the build are asked together so every call site agrees on both — the
|
|
26138
|
+
* `new Worker(...)` emit, and the resource hint `ResourceHintPlugin` spells for it.
|
|
26139
|
+
*/
|
|
26140
|
+
getAnalyzableWorkerUrl(
|
|
26141
|
+
overridePublicPath: undefined | string,
|
|
26142
|
+
chunk: Chunk,
|
|
26143
|
+
module: Module,
|
|
26144
|
+
chunkGraph: ChunkGraph,
|
|
26145
|
+
runtimeRequirements: Set<string>
|
|
26146
|
+
): null | string;
|
|
26147
|
+
|
|
26148
|
+
/**
|
|
26149
|
+
* Static `new URL(<file>, import.meta.url)` for every stylesheet a runtime can load,
|
|
26150
|
+
* keyed by chunk id — one that cannot be named leaves the map incomplete, and its
|
|
26151
|
+
* id keeps the runtime `publicPath + getChunkCssFilename(id)` form. Both the runtime module reading them
|
|
26152
|
+
* and the plugin declaring what it needs ask this, so the two always agree. The
|
|
26153
|
+
* runtime hands an absolute url string to `link.href`, and so does this — the browser
|
|
26154
|
+
* resolves the element against the document, which is not where the chunk sits, and
|
|
26155
|
+
* the loader reads the url as text either way. Nothing is written out for a runtime
|
|
26156
|
+
* that also carries the hot handler; see below.
|
|
26157
|
+
*/
|
|
26158
|
+
analyzableCssChunkUrls(
|
|
26159
|
+
runtimeChunk: Chunk,
|
|
26160
|
+
chunkGraph: ChunkGraph,
|
|
26161
|
+
runtimeRequirements: ReadonlySet<string>,
|
|
26162
|
+
consumingModule?: Module
|
|
26163
|
+
): null | AnalyzableChunkUrls;
|
|
26164
|
+
|
|
26165
|
+
/**
|
|
26166
|
+
* Static `new URL(<file>, import.meta.url).href` for every javascript chunk a
|
|
26167
|
+
* runtime can hint at with `<link rel="prefetch"/"modulepreload">`, keyed by chunk
|
|
26168
|
+
* id — one that cannot be named leaves the map incomplete, and its id keeps the
|
|
26169
|
+
* runtime `publicPath + getChunkScriptFilename(id)` form. Both the runtime module reading
|
|
26170
|
+
* them and the plugin declaring what it needs ask this, so the two always agree.
|
|
26171
|
+
*/
|
|
26172
|
+
analyzableChunkScriptUrls(
|
|
26173
|
+
runtimeChunk: Chunk,
|
|
26174
|
+
chunkGraph: ChunkGraph,
|
|
26175
|
+
runtimeRequirements: ReadonlySet<string>,
|
|
26176
|
+
consumingModule?: Module
|
|
26177
|
+
): null | AnalyzableChunkUrls;
|
|
26178
|
+
|
|
26179
|
+
/**
|
|
26180
|
+
* Static `new URL(<file>, import.meta.url)` for the binary emitted for an async wasm
|
|
26181
|
+
* module. Only called when `supportsAnalyzable("wasm")` holds.
|
|
26182
|
+
*/
|
|
26183
|
+
getAnalyzableWasmUrl(
|
|
26184
|
+
module: Module,
|
|
26185
|
+
chunkGraph: ChunkGraph,
|
|
26186
|
+
runtime: RuntimeSpec,
|
|
26187
|
+
runtimeRequirements: Set<string>
|
|
26188
|
+
): string;
|
|
26189
|
+
|
|
24461
26190
|
/**
|
|
24462
26191
|
* Async module factory.
|
|
24463
26192
|
*/
|
|
@@ -24478,6 +26207,10 @@ declare abstract class RuntimeTemplate {
|
|
|
24478
26207
|
* request string used originally
|
|
24479
26208
|
*/
|
|
24480
26209
|
request?: string;
|
|
26210
|
+
/**
|
|
26211
|
+
* the module the factory is emitted into
|
|
26212
|
+
*/
|
|
26213
|
+
originModule?: Module;
|
|
24481
26214
|
}): string;
|
|
24482
26215
|
|
|
24483
26216
|
/**
|
|
@@ -24542,32 +26275,28 @@ declare interface RuntimeValueOptions {
|
|
|
24542
26275
|
buildDependencies?: string[];
|
|
24543
26276
|
version?: string | (() => string);
|
|
24544
26277
|
}
|
|
24545
|
-
|
|
24546
|
-
|
|
24547
|
-
|
|
24548
|
-
|
|
24549
|
-
|
|
24550
|
-
|
|
24551
|
-
|
|
24552
|
-
|
|
24553
|
-
| "class-field-initializer"
|
|
24554
|
-
| "class-static-block"
|
|
24555
|
-
| "for"
|
|
24556
|
-
| "function-expression-name"
|
|
24557
|
-
| "switch"
|
|
24558
|
-
| "with"
|
|
24559
|
-
| "TDZ";
|
|
24560
|
-
isStrict: boolean;
|
|
26278
|
+
|
|
26279
|
+
/**
|
|
26280
|
+
* A lexical scope. One shape for every kind, so the property loads in the
|
|
26281
|
+
* resolution loop stay monomorphic.
|
|
26282
|
+
*/
|
|
26283
|
+
declare abstract class Scope {
|
|
26284
|
+
type: ScopeType;
|
|
26285
|
+
block: NodeEstreeIndex;
|
|
24561
26286
|
upper: null | Scope;
|
|
24562
26287
|
childScopes: Scope[];
|
|
24563
|
-
variableScope: Scope;
|
|
24564
|
-
block: NodeEstreeIndex;
|
|
24565
26288
|
variables: Variable[];
|
|
24566
|
-
|
|
24567
|
-
|
|
24568
|
-
|
|
24569
|
-
|
|
24570
|
-
|
|
26289
|
+
variableScope: Scope;
|
|
26290
|
+
|
|
26291
|
+
/**
|
|
26292
|
+
* For a function scope with parameters, the offset where its body
|
|
26293
|
+
* starts; `-1` for every other scope. Separates the two regions that
|
|
26294
|
+
* share this scope, so a reference in the parameter list can be kept
|
|
26295
|
+
* from resolving to a binding declared in the body — see
|
|
26296
|
+
* `isHiddenBodyBinding`.
|
|
26297
|
+
*/
|
|
26298
|
+
paramBoundary: number;
|
|
26299
|
+
getBinding(name: string): undefined | Variable;
|
|
24571
26300
|
}
|
|
24572
26301
|
|
|
24573
26302
|
/**
|
|
@@ -24585,6 +26314,19 @@ declare interface ScopeInfo {
|
|
|
24585
26314
|
isAsmJs: boolean;
|
|
24586
26315
|
terminated?: 1 | 2;
|
|
24587
26316
|
}
|
|
26317
|
+
type ScopeType =
|
|
26318
|
+
| "function"
|
|
26319
|
+
| "module"
|
|
26320
|
+
| "global"
|
|
26321
|
+
| "function-expression-name"
|
|
26322
|
+
| "block"
|
|
26323
|
+
| "switch"
|
|
26324
|
+
| "catch"
|
|
26325
|
+
| "with"
|
|
26326
|
+
| "for"
|
|
26327
|
+
| "class"
|
|
26328
|
+
| "class-field-initializer"
|
|
26329
|
+
| "class-static-block";
|
|
24588
26330
|
declare interface Selector<A, B> {
|
|
24589
26331
|
(input: A): undefined | null | B;
|
|
24590
26332
|
}
|
|
@@ -24638,9 +26380,7 @@ declare abstract class SerializerMiddleware<
|
|
|
24638
26380
|
context: Context
|
|
24639
26381
|
): DeserializedType | Promise<DeserializedType>;
|
|
24640
26382
|
}
|
|
24641
|
-
type ServerLazyCompilationBackend =
|
|
24642
|
-
| ServerImportHttp<typeof IncomingMessage>
|
|
24643
|
-
| ServerImportHttps<typeof IncomingMessage>;
|
|
26383
|
+
type ServerLazyCompilationBackend = ServerImportHttp | ServerImportHttps;
|
|
24644
26384
|
declare interface SetIterator<T> extends IteratorObject<T, undefined> {
|
|
24645
26385
|
[Symbol.iterator](): SetIterator<T>;
|
|
24646
26386
|
[Symbol.dispose](): void;
|
|
@@ -24750,10 +26490,31 @@ declare class SideEffectsFlagPlugin {
|
|
|
24750
26490
|
): undefined | boolean;
|
|
24751
26491
|
}
|
|
24752
26492
|
type SideEffectsFlagValue = undefined | string | boolean | string[];
|
|
26493
|
+
type SimpleBlock = NodeSyntax & {
|
|
26494
|
+
token: SimpleBlockToken;
|
|
26495
|
+
value: ComponentValue[];
|
|
26496
|
+
};
|
|
26497
|
+
type SimpleBlockToken = "[" | "(" | "{";
|
|
24753
26498
|
type SimpleType = "string" | "number" | "boolean";
|
|
24754
26499
|
declare class SizeOnlySource extends Source {
|
|
24755
26500
|
constructor(size: number);
|
|
24756
26501
|
}
|
|
26502
|
+
declare interface SkipOptions {
|
|
26503
|
+
/**
|
|
26504
|
+
* component-value node types to drop from declaration value / function-arg lists (indexed by `NodeType`, 1 = skip; build with `buildSkipSet`)
|
|
26505
|
+
*/
|
|
26506
|
+
types?: Uint8Array;
|
|
26507
|
+
|
|
26508
|
+
/**
|
|
26509
|
+
* drop qualified-rule (selector) preludes — the rule and its block are still produced (default false)
|
|
26510
|
+
*/
|
|
26511
|
+
selectorPrelude?: boolean;
|
|
26512
|
+
|
|
26513
|
+
/**
|
|
26514
|
+
* drop at-rule preludes — the at-rule and its block are still produced (default false)
|
|
26515
|
+
*/
|
|
26516
|
+
atRulePrelude?: boolean;
|
|
26517
|
+
}
|
|
24757
26518
|
declare abstract class Snapshot {
|
|
24758
26519
|
startTime?: number;
|
|
24759
26520
|
fileTimestamps?: Map<string, null | FileSystemInfoEntry>;
|
|
@@ -24864,12 +26625,12 @@ declare abstract class Snapshot {
|
|
|
24864
26625
|
/**
|
|
24865
26626
|
* Serializes this instance into the provided serializer context.
|
|
24866
26627
|
*/
|
|
24867
|
-
serialize(__0:
|
|
26628
|
+
serialize(__0: ObjectSerializerContextObjectMiddlewareObject_3): void;
|
|
24868
26629
|
|
|
24869
26630
|
/**
|
|
24870
26631
|
* Restores this instance from the provided deserializer context.
|
|
24871
26632
|
*/
|
|
24872
|
-
deserialize(__0:
|
|
26633
|
+
deserialize(__0: ObjectDeserializerContextObjectMiddlewareObject_2): void;
|
|
24873
26634
|
|
|
24874
26635
|
/**
|
|
24875
26636
|
* Gets file iterable.
|
|
@@ -25144,6 +26905,14 @@ declare interface SourceLike {
|
|
|
25144
26905
|
*/
|
|
25145
26906
|
clearCache?: (options?: ClearCacheOptions, visited?: WeakSet<Source>) => void;
|
|
25146
26907
|
}
|
|
26908
|
+
declare interface SourceMap {
|
|
26909
|
+
version: 3;
|
|
26910
|
+
file: string;
|
|
26911
|
+
sources: string[];
|
|
26912
|
+
sourcesContent?: string[];
|
|
26913
|
+
names: string[];
|
|
26914
|
+
mappings: string;
|
|
26915
|
+
}
|
|
25147
26916
|
declare class SourceMapDevToolPlugin {
|
|
25148
26917
|
/**
|
|
25149
26918
|
* Creates an instance of SourceMapDevToolPlugin.
|
|
@@ -25180,7 +26949,7 @@ declare interface SourceMapDevToolPluginOptions {
|
|
|
25180
26949
|
/**
|
|
25181
26950
|
* Exclude modules that match the given value from source map generation.
|
|
25182
26951
|
*/
|
|
25183
|
-
exclude?: string | RegExp | ((str: string) => boolean) |
|
|
26952
|
+
exclude?: string | RegExp | ((str: string) => boolean) | RuleAlias[];
|
|
25184
26953
|
|
|
25185
26954
|
/**
|
|
25186
26955
|
* Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap used only if 'moduleFilenameTemplate' would result in a conflict.
|
|
@@ -25201,12 +26970,12 @@ declare interface SourceMapDevToolPluginOptions {
|
|
|
25201
26970
|
/**
|
|
25202
26971
|
* Decide whether to ignore source files that match the specified value in the SourceMap.
|
|
25203
26972
|
*/
|
|
25204
|
-
ignoreList?: string | RegExp | ((str: string) => boolean) |
|
|
26973
|
+
ignoreList?: string | RegExp | ((str: string) => boolean) | RuleAlias[];
|
|
25205
26974
|
|
|
25206
26975
|
/**
|
|
25207
26976
|
* Include source maps for module paths that match the given value.
|
|
25208
26977
|
*/
|
|
25209
|
-
include?: string | RegExp | ((str: string) => boolean) |
|
|
26978
|
+
include?: string | RegExp | ((str: string) => boolean) | RuleAlias[];
|
|
25210
26979
|
|
|
25211
26980
|
/**
|
|
25212
26981
|
* Indicates whether SourceMaps from loaders should be used (defaults to true).
|
|
@@ -25242,7 +27011,11 @@ declare interface SourceMapDevToolPluginOptions {
|
|
|
25242
27011
|
/**
|
|
25243
27012
|
* Include source maps for modules based on their extension (defaults to .js and .css).
|
|
25244
27013
|
*/
|
|
25245
|
-
test?: string | RegExp | ((str: string) => boolean) |
|
|
27014
|
+
test?: string | RegExp | ((str: string) => boolean) | RuleAlias[];
|
|
27015
|
+
}
|
|
27016
|
+
declare interface SourceMapOptions {
|
|
27017
|
+
source: string;
|
|
27018
|
+
content?: string;
|
|
25246
27019
|
}
|
|
25247
27020
|
declare class SourceMapSource extends Source {
|
|
25248
27021
|
constructor(
|
|
@@ -25284,6 +27057,240 @@ declare interface SourcePosition {
|
|
|
25284
27057
|
line: number;
|
|
25285
27058
|
column?: number;
|
|
25286
27059
|
}
|
|
27060
|
+
|
|
27061
|
+
/**
|
|
27062
|
+
* Visitor coordinator: owns the visitor registry and drives a language
|
|
27063
|
+
* `grammar` over the source. Language-agnostic — each syntax (CSS, HTML, …)
|
|
27064
|
+
* binds its own grammar, node-type enum and (optionally) node printer.
|
|
27065
|
+
* Babel-style usage:
|
|
27066
|
+
* ```
|
|
27067
|
+
* processor.use({ [NodeType.X]: (path) => {}, [NodeType.Y]: { enter, exit } });
|
|
27068
|
+
* processor.process(source);
|
|
27069
|
+
* ```
|
|
27070
|
+
*/
|
|
27071
|
+
declare abstract class SourceProcessorClass<
|
|
27072
|
+
TPath,
|
|
27073
|
+
TNode,
|
|
27074
|
+
TProcessOptions = object,
|
|
27075
|
+
TPrintOptions = object
|
|
27076
|
+
> {
|
|
27077
|
+
/**
|
|
27078
|
+
* Register a Babel-style visitor map; calls accumulate per node type.
|
|
27079
|
+
* A bucket is a function (= `{ enter }`) or `{ enter?, exit? }`.
|
|
27080
|
+
*/
|
|
27081
|
+
use(
|
|
27082
|
+
map: VisitorMap<TPath>
|
|
27083
|
+
): SourceProcessorClass<TPath, TNode, TProcessOptions, TPrintOptions>;
|
|
27084
|
+
|
|
27085
|
+
/**
|
|
27086
|
+
* Parse `input` once and fire the visitors in source order. Asking for output
|
|
27087
|
+
* — `mode`, the one thing that names it — makes the same walk print, given a
|
|
27088
|
+
* printer supplied at construction: a
|
|
27089
|
+
* {@link PrintContext} is created, each node's printer fires into it as the node
|
|
27090
|
+
* finishes, and the result is returned as `{ code, map }`: the serialized output
|
|
27091
|
+
* and, for a caller that named its input with `source` / `content`, the
|
|
27092
|
+
* input->output source map — `map` is `undefined` without one. Asking for
|
|
27093
|
+
* none of it only walks and returns `undefined`. A single parse — printing
|
|
27094
|
+
* never re-parses; all configuration is per-call.
|
|
27095
|
+
*/
|
|
27096
|
+
process(
|
|
27097
|
+
input: string,
|
|
27098
|
+
options: TProcessOptions & { mode: "minify" | "beautify" } & {
|
|
27099
|
+
source: string;
|
|
27100
|
+
content?: string;
|
|
27101
|
+
}
|
|
27102
|
+
): { code: string; map: SourceMap };
|
|
27103
|
+
process(
|
|
27104
|
+
input: string,
|
|
27105
|
+
options: TProcessOptions & { mode: "minify" | "beautify" }
|
|
27106
|
+
): { code: string; map: undefined };
|
|
27107
|
+
process(input: string, options?: TProcessOptions): undefined;
|
|
27108
|
+
|
|
27109
|
+
/**
|
|
27110
|
+
* {@link process}, for a caller whose renderer answers asynchronously. Code
|
|
27111
|
+
* generation is synchronous — a printer returns its node's text, it cannot
|
|
27112
|
+
* await one — so the walk leaves a marker where each answer goes, they are
|
|
27113
|
+
* asked for together, and {@link PrintContext.substitute} stands each in its
|
|
27114
|
+
* place before the output and its map are built. One parse either way, and
|
|
27115
|
+
* the async boundary stays at the top rather than on every node.
|
|
27116
|
+
* This is the shape `process` itself takes once it is async: how the answers
|
|
27117
|
+
* are waited for is this method's business, so nothing above it changes.
|
|
27118
|
+
*/
|
|
27119
|
+
processAsync(
|
|
27120
|
+
input: string,
|
|
27121
|
+
options: Omit<TProcessOptions, "renderEmbeddedSource"> & {
|
|
27122
|
+
mode: "minify" | "beautify";
|
|
27123
|
+
} & {
|
|
27124
|
+
source?: string;
|
|
27125
|
+
content?: string;
|
|
27126
|
+
renderEmbeddedSource?: (
|
|
27127
|
+
source: string,
|
|
27128
|
+
hole?: any
|
|
27129
|
+
) => undefined | string | Promise<undefined | string>;
|
|
27130
|
+
}
|
|
27131
|
+
): Promise<{ code: string; map?: SourceMap }>;
|
|
27132
|
+
}
|
|
27133
|
+
|
|
27134
|
+
/**
|
|
27135
|
+
* The generic visitor coordinator (`util/SourceProcessor`) bound to the HTML
|
|
27136
|
+
* `grammar`. Babel-style usage:
|
|
27137
|
+
* ```
|
|
27138
|
+
* new SourceProcessor().use({ [NodeType.Element]: (path) => {}, [NodeType.Comment]: { enter, exit } }).process(source, { skip });
|
|
27139
|
+
* ```
|
|
27140
|
+
* @experimental exposed as `webpack.html.syntax.SourceProcessor`; unstable API
|
|
27141
|
+
*/
|
|
27142
|
+
declare class SourceProcessorSyntaxClass_1 extends SourceProcessorClass<
|
|
27143
|
+
{
|
|
27144
|
+
get node(): number;
|
|
27145
|
+
get parent(): null | number;
|
|
27146
|
+
/**
|
|
27147
|
+
* Stop the walk descending into the current node (enter only).
|
|
27148
|
+
*/
|
|
27149
|
+
skipChildren(): void;
|
|
27150
|
+
type(n?: number): number;
|
|
27151
|
+
start(n?: number): number;
|
|
27152
|
+
end(n?: number): number;
|
|
27153
|
+
/**
|
|
27154
|
+
* Raw source slice `[start, end)` — valid only during the walk (the printer's
|
|
27155
|
+
* window), before `parseHtml` releases `_htmlSource`.
|
|
27156
|
+
*/
|
|
27157
|
+
source(n?: number): string;
|
|
27158
|
+
sourceSpanAt(from: number, to: number): string;
|
|
27159
|
+
tagName(n?: number): string;
|
|
27160
|
+
namespace(n?: number): number;
|
|
27161
|
+
selfClosing(n?: number): boolean;
|
|
27162
|
+
attributes(n?: number): HtmlAttribute[];
|
|
27163
|
+
attributeCount(n?: number): number;
|
|
27164
|
+
/**
|
|
27165
|
+
* The i-th attribute of an element, as an id for the `attribute*` reads.
|
|
27166
|
+
*/
|
|
27167
|
+
attributeAt(i: number, n?: number): number;
|
|
27168
|
+
/**
|
|
27169
|
+
* Linear lookup by (lowercased) name.
|
|
27170
|
+
*/
|
|
27171
|
+
findAttribute(name: string, n?: number): number;
|
|
27172
|
+
attributeName(a: number): string;
|
|
27173
|
+
attributeValue(a: number): string;
|
|
27174
|
+
attributeNameStart(a: number): number;
|
|
27175
|
+
attributeNameEnd(a: number): number;
|
|
27176
|
+
attributeValueStart(a: number): number;
|
|
27177
|
+
attributeValueEnd(a: number): number;
|
|
27178
|
+
tagEnd(n?: number): number;
|
|
27179
|
+
nameEnd(n?: number): number;
|
|
27180
|
+
/**
|
|
27181
|
+
* Whether the source wrote this element's end tag rather than the parser
|
|
27182
|
+
* popping it for an implied close. Read back off the range instead of marked
|
|
27183
|
+
* during the parse: an element's end spans the token that closed it, so its
|
|
27184
|
+
* own end tag is the last thing in it — and only the few elements around a
|
|
27185
|
+
* region printed from source ever ask.
|
|
27186
|
+
*/
|
|
27187
|
+
sourceClosed(n?: number): boolean;
|
|
27188
|
+
openTag(n?: number): string;
|
|
27189
|
+
/**
|
|
27190
|
+
* An element's end tag, generated as `</name>` from the opening tag's own name
|
|
27191
|
+
* (exact source casing, correct for foreign camelCase elements). Generated, not
|
|
27192
|
+
* sliced: element `end` offsets don't span the end tag, and an omitted optional
|
|
27193
|
+
* end tag (`<li>`, `<p>`, …) still serializes to the same DOM. `""` when the
|
|
27194
|
+
* parser inserted the element, as {@link openTag } does — it has no name in the
|
|
27195
|
+
* source to echo, and slicing one would spell `</>`.
|
|
27196
|
+
*/
|
|
27197
|
+
closeTag(n?: number): string;
|
|
27198
|
+
contentEnd(n?: number): number;
|
|
27199
|
+
templateContent(n?: number): number;
|
|
27200
|
+
data(n?: number): string;
|
|
27201
|
+
piTarget(n?: number): string;
|
|
27202
|
+
doctypeName(n?: number): string;
|
|
27203
|
+
doctypePublicId(_n?: number): null | string;
|
|
27204
|
+
doctypeSystemId(_n?: number): null | string;
|
|
27205
|
+
firstChild(n?: number): number;
|
|
27206
|
+
nextSibling(n?: number): number;
|
|
27207
|
+
parentOf(n?: number): number;
|
|
27208
|
+
children(n?: number): number[];
|
|
27209
|
+
},
|
|
27210
|
+
number,
|
|
27211
|
+
HtmlProcessOptions
|
|
27212
|
+
> {
|
|
27213
|
+
constructor();
|
|
27214
|
+
static PrintContext: typeof PrintContext;
|
|
27215
|
+
static declineDeferredWrites: (
|
|
27216
|
+
text: string,
|
|
27217
|
+
writes: DeferredWrite[]
|
|
27218
|
+
) => string;
|
|
27219
|
+
static deferredWrite: (id: number) => string;
|
|
27220
|
+
}
|
|
27221
|
+
|
|
27222
|
+
/**
|
|
27223
|
+
* The generic visitor coordinator (`util/SourceProcessor`) bound to the CSS
|
|
27224
|
+
* `grammar`. All configuration is per `process` call. `process(src, { minimize:
|
|
27225
|
+
* true })` returns `{ code, map }` — the safely-minified serialization (built by
|
|
27226
|
+
* the same walk that fires visitors) and its source map; without `minimize` it
|
|
27227
|
+
* just walks and returns `undefined`. Babel-style usage:
|
|
27228
|
+
* ```
|
|
27229
|
+
* new SourceProcessor().use({ [NodeType.AtRule]: (path) => {} }).process(source, { skip });
|
|
27230
|
+
* ```
|
|
27231
|
+
* @experimental exposed as `webpack.css.syntax.SourceProcessor`; unstable API
|
|
27232
|
+
*/
|
|
27233
|
+
declare class SourceProcessorSyntaxClass_2 extends SourceProcessorClass<
|
|
27234
|
+
{
|
|
27235
|
+
get node(): NodeSyntax;
|
|
27236
|
+
get parent(): null | NodeSyntax;
|
|
27237
|
+
get index(): number;
|
|
27238
|
+
/**
|
|
27239
|
+
* Stop the walk descending into the current node (enter only).
|
|
27240
|
+
*/
|
|
27241
|
+
skipChildren(): void;
|
|
27242
|
+
inValue(): boolean;
|
|
27243
|
+
type(n?: NodeSyntax): number;
|
|
27244
|
+
start(n?: NodeSyntax): number;
|
|
27245
|
+
end(n?: NodeSyntax): number;
|
|
27246
|
+
range(n?: NodeSyntax): [number, number];
|
|
27247
|
+
loc(n?: NodeSyntax): {
|
|
27248
|
+
start: { line: number; column: number };
|
|
27249
|
+
end: { line: number; column: number };
|
|
27250
|
+
};
|
|
27251
|
+
source(n?: NodeSyntax): string;
|
|
27252
|
+
value(n?: NodeSyntax): string;
|
|
27253
|
+
unescaped(n?: NodeSyntax): string;
|
|
27254
|
+
typeFlag(n?: NodeSyntax): string;
|
|
27255
|
+
contentStart(n?: NodeSyntax): number;
|
|
27256
|
+
contentEnd(n?: NodeSyntax): number;
|
|
27257
|
+
name(n?: NodeSyntax): string;
|
|
27258
|
+
nameStart(n?: NodeSyntax): number;
|
|
27259
|
+
nameEnd(n?: NodeSyntax): number;
|
|
27260
|
+
unescapedName(n?: NodeSyntax): string;
|
|
27261
|
+
children(n?: NodeSyntax): ComponentValue[];
|
|
27262
|
+
prelude(n?: NodeSyntax): ComponentValue[];
|
|
27263
|
+
childCount(n?: NodeSyntax): number;
|
|
27264
|
+
childAt(n: NodeSyntax, i: number): ComponentValue;
|
|
27265
|
+
/**
|
|
27266
|
+
* A block big enough to stream hands its children to the visitors as each one
|
|
27267
|
+
* finishes rather than collecting them, so both lists read as an empty block
|
|
27268
|
+
* on it — `null`, which means no block at all, is still only for the `@…;`
|
|
27269
|
+
* forms. Read a block's children from the walk, not from here.
|
|
27270
|
+
*/
|
|
27271
|
+
declarations(n?: NodeSyntax): null | DeclarationSyntax[];
|
|
27272
|
+
/**
|
|
27273
|
+
* Reads as an empty block on a streamed rule; see {@link declarations }.
|
|
27274
|
+
*/
|
|
27275
|
+
childRules(n?: NodeSyntax): null | RuleSyntax[];
|
|
27276
|
+
blockStart(n?: NodeSyntax): number;
|
|
27277
|
+
blockEnd(n?: NodeSyntax): number;
|
|
27278
|
+
important(n?: NodeSyntax): boolean;
|
|
27279
|
+
blockToken(n?: NodeSyntax): SimpleBlockToken;
|
|
27280
|
+
setEnd(n: NodeSyntax, v: number): void;
|
|
27281
|
+
setBlockEnd(n: NodeSyntax, v: number): void;
|
|
27282
|
+
},
|
|
27283
|
+
NodeSyntax,
|
|
27284
|
+
CssProcessOptions
|
|
27285
|
+
> {
|
|
27286
|
+
constructor();
|
|
27287
|
+
static PrintContext: typeof PrintContext;
|
|
27288
|
+
static declineDeferredWrites: (
|
|
27289
|
+
text: string,
|
|
27290
|
+
writes: DeferredWrite[]
|
|
27291
|
+
) => string;
|
|
27292
|
+
static deferredWrite: (id: number) => string;
|
|
27293
|
+
}
|
|
25287
27294
|
declare interface SourceTable {
|
|
25288
27295
|
[index: string]: SourceBucket;
|
|
25289
27296
|
}
|
|
@@ -25354,6 +27361,9 @@ declare class SplitChunksPlugin {
|
|
|
25354
27361
|
* Applies the plugin by registering its hooks on the compiler.
|
|
25355
27362
|
*/
|
|
25356
27363
|
apply(compiler: Compiler): void;
|
|
27364
|
+
static getCappedSplits: (
|
|
27365
|
+
compilation: Compilation
|
|
27366
|
+
) => undefined | CappedSplit[];
|
|
25357
27367
|
}
|
|
25358
27368
|
declare interface SplitChunksSizes {
|
|
25359
27369
|
[index: string]: number;
|
|
@@ -25509,7 +27519,7 @@ declare abstract class StackedMap<K, V> {
|
|
|
25509
27519
|
*/
|
|
25510
27520
|
declare interface StarListDeserializerContext {
|
|
25511
27521
|
read: () => HarmonyExportImportedSpecifierDependency[];
|
|
25512
|
-
rest:
|
|
27522
|
+
rest: ObjectDeserializerContextObjectMiddlewareObject_2<[]>;
|
|
25513
27523
|
setCircularReference: (value: ReferenceableItem) => void;
|
|
25514
27524
|
}
|
|
25515
27525
|
|
|
@@ -25519,7 +27529,7 @@ declare interface StarListDeserializerContext {
|
|
|
25519
27529
|
declare interface StarListSerializerContext {
|
|
25520
27530
|
write: (
|
|
25521
27531
|
value: HarmonyExportImportedSpecifierDependency[]
|
|
25522
|
-
) =>
|
|
27532
|
+
) => ObjectSerializerContextObjectMiddlewareObject_3<[]>;
|
|
25523
27533
|
setCircularReference: (value: ReferenceableItem) => void;
|
|
25524
27534
|
snapshot: () => ObjectSerializerSnapshot;
|
|
25525
27535
|
rollback: (snapshot: ObjectSerializerSnapshot) => void;
|
|
@@ -26210,6 +28220,18 @@ declare interface StatsOptions {
|
|
|
26210
28220
|
*/
|
|
26211
28221
|
hash?: boolean;
|
|
26212
28222
|
|
|
28223
|
+
/**
|
|
28224
|
+
* Add performance hints reported with 'performance.hints: "stats"'.
|
|
28225
|
+
* @since 5.110.0
|
|
28226
|
+
*/
|
|
28227
|
+
hints?: boolean;
|
|
28228
|
+
|
|
28229
|
+
/**
|
|
28230
|
+
* Add the number of performance hints.
|
|
28231
|
+
* @since 5.110.0
|
|
28232
|
+
*/
|
|
28233
|
+
hintsCount?: boolean;
|
|
28234
|
+
|
|
26213
28235
|
/**
|
|
26214
28236
|
* Add ids.
|
|
26215
28237
|
*/
|
|
@@ -26457,6 +28479,7 @@ declare interface StreamOptions {
|
|
|
26457
28479
|
declare interface Stringable {
|
|
26458
28480
|
toString: () => string;
|
|
26459
28481
|
}
|
|
28482
|
+
type Stylesheet = NodeSyntax & { rules: RuleSyntax[] };
|
|
26460
28483
|
type Supports = undefined | string;
|
|
26461
28484
|
declare class SyncModuleIdsPlugin {
|
|
26462
28485
|
/**
|
|
@@ -26621,6 +28644,95 @@ declare interface TimestampAndHash {
|
|
|
26621
28644
|
timestamp?: number;
|
|
26622
28645
|
hash: string;
|
|
26623
28646
|
}
|
|
28647
|
+
type Token = NodeSyntax & {
|
|
28648
|
+
value: string;
|
|
28649
|
+
unescaped: string;
|
|
28650
|
+
numericValue: number;
|
|
28651
|
+
typeFlag: "number" | "id" | "integer" | "unrestricted";
|
|
28652
|
+
sign: "" | "+" | "-";
|
|
28653
|
+
unit: string;
|
|
28654
|
+
contentStart: number;
|
|
28655
|
+
contentEnd: number;
|
|
28656
|
+
};
|
|
28657
|
+
|
|
28658
|
+
/**
|
|
28659
|
+
* Position-based view over the lexer — webpack's stand-in for the spec's
|
|
28660
|
+
* "normalize into a token stream" (CSS Syntax §9). It unifies the lexer and the
|
|
28661
|
+
* stream in one class: the `readToken` primitive lexes one token (the CSS
|
|
28662
|
+
* tokenizer), and the spec token-stream operations `next` / `consume` /
|
|
28663
|
+
* `discard` / `mark` / `restoreMark` / `discardMark` drive it from a byte
|
|
28664
|
+
* cursor. `parse*` entry points wrap a source string in one of these and every
|
|
28665
|
+
* `consume*` algorithm reads tokens from it.
|
|
28666
|
+
* No token buffer is kept: the cursor is a byte offset and the only state is
|
|
28667
|
+
* the next token (lazily tokenized once and cached until consumed). The
|
|
28668
|
+
* declaration-vs-qualified-rule backtracking in `consumeABlocksContents`
|
|
28669
|
+
* rewinds by `mark`ing / `restoreMark`ing that byte offset, which simply
|
|
28670
|
+
* re-tokenizes the rewound span — comment tokens are filtered here and fire
|
|
28671
|
+
* `onComment` once each, tracked by a monotonic high-water mark so a
|
|
28672
|
+
* re-tokenized span never re-fires them.
|
|
28673
|
+
* `SourceProcessor` is handed this class (not an instance) and threads it to
|
|
28674
|
+
* the grammar, so a different language can drive the same visitor machinery by
|
|
28675
|
+
* swapping the tokenizer — the per-token `readToken` primitive — for its own.
|
|
28676
|
+
*/
|
|
28677
|
+
declare class TokenStream {
|
|
28678
|
+
constructor(
|
|
28679
|
+
input: string,
|
|
28680
|
+
pos?: number,
|
|
28681
|
+
locConverter?: LocConverter,
|
|
28682
|
+
onComment?: (input: string, start: number, end: number) => number
|
|
28683
|
+
);
|
|
28684
|
+
input: string;
|
|
28685
|
+
locConverter: LocConverter;
|
|
28686
|
+
|
|
28687
|
+
/**
|
|
28688
|
+
* The next token (CSS Syntax §3 "next token") — the upcoming token without
|
|
28689
|
+
* consuming it; the `<eof-token>` once the source is exhausted. This is the
|
|
28690
|
+
* token the consume algorithms dispatch on (the spec's "process"). Tokenized
|
|
28691
|
+
* from `_pos` on first use and cached until consumed; comment tokens are
|
|
28692
|
+
* skipped here, firing `onComment` once each.
|
|
28693
|
+
*/
|
|
28694
|
+
next(): MutableToken;
|
|
28695
|
+
|
|
28696
|
+
/**
|
|
28697
|
+
* Consume a token (CSS Syntax §3 "consume a token") — return the next token
|
|
28698
|
+
* and advance the cursor past it. The returned token is valid until the next
|
|
28699
|
+
* `next` re-tokenizes (the reused instance is not cleared by advancing).
|
|
28700
|
+
*/
|
|
28701
|
+
consume(): MutableToken;
|
|
28702
|
+
|
|
28703
|
+
/**
|
|
28704
|
+
* Discard a token (CSS Syntax §3 "discard a token") — advance the cursor past
|
|
28705
|
+
* the next token without returning it.
|
|
28706
|
+
*/
|
|
28707
|
+
discard(): void;
|
|
28708
|
+
|
|
28709
|
+
/**
|
|
28710
|
+
* Advance past the already-peeked next token, skipping the redundant `next()`
|
|
28711
|
+
* re-check `consume` / `discard` pay. Precondition: the caller has just called
|
|
28712
|
+
* `next()` (so `_tok` is the cached next token and `_hasNext` is true) and that
|
|
28713
|
+
* token is not the `<eof-token>` — the hot "peek, decide, advance" sites where
|
|
28714
|
+
* both always hold. Callers that can't guarantee a non-EOF cached token use
|
|
28715
|
+
* `consume` / `discard` instead.
|
|
28716
|
+
*/
|
|
28717
|
+
advance(): void;
|
|
28718
|
+
|
|
28719
|
+
/**
|
|
28720
|
+
* Mark (CSS Syntax §3 "mark") — push the current cursor position.
|
|
28721
|
+
*/
|
|
28722
|
+
mark(): void;
|
|
28723
|
+
|
|
28724
|
+
/**
|
|
28725
|
+
* Restore a mark (CSS Syntax §3 "restore a mark") — pop the last mark and
|
|
28726
|
+
* rewind the cursor to it. The rewound span is re-tokenized on the next read;
|
|
28727
|
+
* already-fired comments are not re-fired (`_commentHigh`).
|
|
28728
|
+
*/
|
|
28729
|
+
restoreMark(): void;
|
|
28730
|
+
|
|
28731
|
+
/**
|
|
28732
|
+
* Discard a mark (CSS Syntax §3 "discard a mark") — pop without rewinding.
|
|
28733
|
+
*/
|
|
28734
|
+
discardMark(): void;
|
|
28735
|
+
}
|
|
26624
28736
|
declare class TopLevelSymbol {
|
|
26625
28737
|
/**
|
|
26626
28738
|
* Creates an instance of TopLevelSymbol.
|
|
@@ -26715,6 +28827,10 @@ declare interface TsconfigPathsMap {
|
|
|
26715
28827
|
declare const UNDEFINED_MARKER: unique symbol;
|
|
26716
28828
|
declare interface URL_url extends URL {}
|
|
26717
28829
|
type UnsafeCacheData = KnownUnsafeCacheData & Record<string, any>;
|
|
28830
|
+
declare interface UnusedSpecifiers {
|
|
28831
|
+
exportPresenceMode: ExportPresenceMode;
|
|
28832
|
+
specifiers: [string[], string][];
|
|
28833
|
+
}
|
|
26718
28834
|
declare interface UpdateHashContextDependency {
|
|
26719
28835
|
chunkGraph: ChunkGraph;
|
|
26720
28836
|
runtime: RuntimeSpec;
|
|
@@ -26829,12 +28945,15 @@ type ValueCacheVersion = string | Set<string>;
|
|
|
26829
28945
|
declare interface Values {
|
|
26830
28946
|
[index: string]: Value[];
|
|
26831
28947
|
}
|
|
26832
|
-
|
|
28948
|
+
|
|
28949
|
+
/**
|
|
28950
|
+
* A binding: one name declared in one scope.
|
|
28951
|
+
*/
|
|
28952
|
+
declare abstract class Variable {
|
|
26833
28953
|
name: string;
|
|
26834
|
-
scope: Scope;
|
|
26835
28954
|
identifiers: Identifier[];
|
|
26836
28955
|
references: Reference[];
|
|
26837
|
-
|
|
28956
|
+
scope: Scope;
|
|
26838
28957
|
}
|
|
26839
28958
|
declare class VariableInfo {
|
|
26840
28959
|
/**
|
|
@@ -26947,6 +29066,14 @@ declare class VirtualUrlPlugin {
|
|
|
26947
29066
|
getCacheVersion(version: string | true | (() => string)): undefined | string;
|
|
26948
29067
|
static DEFAULT_SCHEME: string;
|
|
26949
29068
|
}
|
|
29069
|
+
type VisitorBucket<TPath> =
|
|
29070
|
+
VisitorFn<TPath> | { enter?: VisitorFn<TPath>; exit?: VisitorFn<TPath> };
|
|
29071
|
+
declare interface VisitorFn<TPath> {
|
|
29072
|
+
(path: TPath): void;
|
|
29073
|
+
}
|
|
29074
|
+
declare interface VisitorMap<TPath> {
|
|
29075
|
+
[index: number]: VisitorBucket<TPath>;
|
|
29076
|
+
}
|
|
26950
29077
|
type WarningFilterItemTypes =
|
|
26951
29078
|
string | RegExp | ((warning: StatsError, warningString: string) => boolean);
|
|
26952
29079
|
|
|
@@ -27211,7 +29338,8 @@ declare abstract class WeakTupleMap<K extends any[], V> {
|
|
|
27211
29338
|
*/
|
|
27212
29339
|
clear(): void;
|
|
27213
29340
|
}
|
|
27214
|
-
declare abstract class
|
|
29341
|
+
declare abstract class WebAssemblyParserAsyncWebAssemblyParser extends ParserClass {}
|
|
29342
|
+
declare abstract class WebAssemblyParserClass extends ParserClass {}
|
|
27215
29343
|
declare interface WebAssemblyRenderContext {
|
|
27216
29344
|
/**
|
|
27217
29345
|
* the chunk
|
|
@@ -27267,12 +29395,12 @@ declare class WebpackError extends Error {
|
|
|
27267
29395
|
/**
|
|
27268
29396
|
* Serializes this instance into the provided serializer context.
|
|
27269
29397
|
*/
|
|
27270
|
-
serialize(__0:
|
|
29398
|
+
serialize(__0: ObjectSerializerContextObjectMiddlewareObject_3): void;
|
|
27271
29399
|
|
|
27272
29400
|
/**
|
|
27273
29401
|
* Restores this instance from the provided deserializer context.
|
|
27274
29402
|
*/
|
|
27275
|
-
deserialize(__0:
|
|
29403
|
+
deserialize(__0: ObjectDeserializerContextObjectMiddlewareObject_2): void;
|
|
27276
29404
|
|
|
27277
29405
|
/**
|
|
27278
29406
|
* Creates a `.stack` property on `targetObject`, which when accessed returns
|
|
@@ -27744,6 +29872,7 @@ declare interface WebpackRequire {
|
|
|
27744
29872
|
(id: string): any;
|
|
27745
29873
|
i?: ((options: ExecuteOptions) => void)[];
|
|
27746
29874
|
c?: Record<string, ExecuteModuleObject>;
|
|
29875
|
+
p?: string;
|
|
27747
29876
|
}
|
|
27748
29877
|
declare interface WithId {
|
|
27749
29878
|
id: string | number;
|
|
@@ -27792,6 +29921,31 @@ type WriteStreamOptions = StreamOptions & {
|
|
|
27792
29921
|
fs?: null | CreateWriteStreamFSImplementation;
|
|
27793
29922
|
flush?: boolean;
|
|
27794
29923
|
};
|
|
29924
|
+
declare interface _functionSyntax {
|
|
29925
|
+
/**
|
|
29926
|
+
* Decode HTML character references in a string. Handles all numeric
|
|
29927
|
+
* references (with WHATWG remap of 0x00, surrogates, out-of-range, and the
|
|
29928
|
+
* C1 Windows-1252 table) and the full WHATWG named character references
|
|
29929
|
+
* table. Unknown or malformed references are left as literal text.
|
|
29930
|
+
* When `isAttribute` is `true`, applies the WHATWG
|
|
29931
|
+
* "consumed-as-part-of-an-attribute" rule: a named reference without a
|
|
29932
|
+
* trailing `;` whose next character is `=` or ASCII alphanumeric is left
|
|
29933
|
+
* undecoded, so e.g. `&=foo` stays literal in an attribute value but
|
|
29934
|
+
* decodes to `&=foo` in text.
|
|
29935
|
+
* With `withMap` the result also carries a boundary map from the decoded
|
|
29936
|
+
* string back to raw offsets, so spans computed on the decoded text (e.g.
|
|
29937
|
+
* srcset candidate URLs) can be translated to source ranges. `map[i]` is the
|
|
29938
|
+
* raw offset of decoded boundary `i` (`0..text.length`); boundaries inside a
|
|
29939
|
+
* reference's decoded text map to the reference start. `map` is `undefined`
|
|
29940
|
+
* when nothing was decoded (then `text === str`).
|
|
29941
|
+
*/
|
|
29942
|
+
(str: string, isAttribute?: boolean): string;
|
|
29943
|
+
(
|
|
29944
|
+
str: string,
|
|
29945
|
+
isAttribute: undefined | boolean,
|
|
29946
|
+
withMap: true
|
|
29947
|
+
): DecodedEntitiesWithMap;
|
|
29948
|
+
}
|
|
27795
29949
|
|
|
27796
29950
|
/**
|
|
27797
29951
|
* Returns compiler or MultiCompiler.
|
|
@@ -27923,6 +30077,8 @@ declare namespace exports {
|
|
|
27923
30077
|
) => null | Problem[];
|
|
27924
30078
|
}
|
|
27925
30079
|
export namespace ModuleFilenameHelpers {
|
|
30080
|
+
export let DEFAULT_MODULE_FILENAME_TEMPLATE: string;
|
|
30081
|
+
export let DEFAULT_FALLBACK_MODULE_FILENAME_TEMPLATE: string;
|
|
27926
30082
|
export let ALL_LOADERS_RESOURCE: string;
|
|
27927
30083
|
export let REGEXP_ALL_LOADERS_RESOURCE: RegExp;
|
|
27928
30084
|
export let LOADERS_RESOURCE: string;
|
|
@@ -27986,9 +30142,10 @@ declare namespace exports {
|
|
|
27986
30142
|
export let baseURI: "__webpack_require__.b";
|
|
27987
30143
|
export let chunkCallback: "webpackChunk";
|
|
27988
30144
|
export let chunkName: "__webpack_require__.cn";
|
|
27989
|
-
export let commonJsWrap: "__webpack_require__.cjs";
|
|
27990
30145
|
export let compatGetDefaultExport: "__webpack_require__.n";
|
|
27991
30146
|
export let compileWasm: "__webpack_require__.vs";
|
|
30147
|
+
export let concatenationWrap: "__webpack_require__.cw";
|
|
30148
|
+
export let constructRequire: "__webpack_require__.cr";
|
|
27992
30149
|
export let createFakeNamespaceObject: "__webpack_require__.t";
|
|
27993
30150
|
export let createScript: "__webpack_require__.ts";
|
|
27994
30151
|
export let createScriptUrl: "__webpack_require__.tu";
|
|
@@ -27997,11 +30154,11 @@ declare namespace exports {
|
|
|
27997
30154
|
export let deferredModuleAsyncTransitiveDependencies: "__webpack_require__.zT";
|
|
27998
30155
|
export let deferredModuleAsyncTransitiveDependenciesSymbol: "__webpack_require__.zS";
|
|
27999
30156
|
export let definePropertyGetters: "__webpack_require__.d";
|
|
30157
|
+
export let definePropertyGettersFromArray: "__webpack_require__.d (array)";
|
|
28000
30158
|
export let ensureChunk: "__webpack_require__.e";
|
|
28001
30159
|
export let ensureChunkHandlers: "__webpack_require__.f";
|
|
28002
30160
|
export let ensureChunkIncludeEntries: "__webpack_require__.f (include entries)";
|
|
28003
30161
|
export let entryModuleId: "__webpack_require__.s";
|
|
28004
|
-
export let esmId: "__webpack_esm_id__";
|
|
28005
30162
|
export let esmIds: "__webpack_esm_ids__";
|
|
28006
30163
|
export let esmModules: "__webpack_esm_modules__";
|
|
28007
30164
|
export let esmRuntime: "__webpack_esm_runtime__";
|
|
@@ -28011,6 +30168,7 @@ declare namespace exports {
|
|
|
28011
30168
|
export let getChunkScriptFilename: "__webpack_require__.u";
|
|
28012
30169
|
export let getChunkUpdateCssFilename: "__webpack_require__.hk";
|
|
28013
30170
|
export let getChunkUpdateScriptFilename: "__webpack_require__.hu";
|
|
30171
|
+
export let getCssServerStyles: "__webpack_require__.cs";
|
|
28014
30172
|
export let getFullHash: "__webpack_require__.h";
|
|
28015
30173
|
export let getTrustedTypesPolicy: "__webpack_require__.tt";
|
|
28016
30174
|
export let getUpdateManifestFilename: "__webpack_require__.hmrF";
|
|
@@ -28184,9 +30342,607 @@ declare namespace exports {
|
|
|
28184
30342
|
export { AsyncWebAssemblyModulesPlugin, EnableWasmLoadingPlugin };
|
|
28185
30343
|
}
|
|
28186
30344
|
export namespace css {
|
|
30345
|
+
export namespace syntax {
|
|
30346
|
+
export let A: {
|
|
30347
|
+
get node(): NodeSyntax;
|
|
30348
|
+
get parent(): null | NodeSyntax;
|
|
30349
|
+
get index(): number;
|
|
30350
|
+
/**
|
|
30351
|
+
* Stop the walk descending into the current node (enter only).
|
|
30352
|
+
*/
|
|
30353
|
+
skipChildren(): void;
|
|
30354
|
+
inValue(): boolean;
|
|
30355
|
+
type(n?: NodeSyntax): number;
|
|
30356
|
+
start(n?: NodeSyntax): number;
|
|
30357
|
+
end(n?: NodeSyntax): number;
|
|
30358
|
+
range(n?: NodeSyntax): [number, number];
|
|
30359
|
+
loc(n?: NodeSyntax): {
|
|
30360
|
+
start: { line: number; column: number };
|
|
30361
|
+
end: { line: number; column: number };
|
|
30362
|
+
};
|
|
30363
|
+
source(n?: NodeSyntax): string;
|
|
30364
|
+
value(n?: NodeSyntax): string;
|
|
30365
|
+
unescaped(n?: NodeSyntax): string;
|
|
30366
|
+
typeFlag(n?: NodeSyntax): string;
|
|
30367
|
+
contentStart(n?: NodeSyntax): number;
|
|
30368
|
+
contentEnd(n?: NodeSyntax): number;
|
|
30369
|
+
name(n?: NodeSyntax): string;
|
|
30370
|
+
nameStart(n?: NodeSyntax): number;
|
|
30371
|
+
nameEnd(n?: NodeSyntax): number;
|
|
30372
|
+
unescapedName(n?: NodeSyntax): string;
|
|
30373
|
+
children(n?: NodeSyntax): ComponentValue[];
|
|
30374
|
+
prelude(n?: NodeSyntax): ComponentValue[];
|
|
30375
|
+
childCount(n?: NodeSyntax): number;
|
|
30376
|
+
childAt(n: NodeSyntax, i: number): ComponentValue;
|
|
30377
|
+
/**
|
|
30378
|
+
* A block big enough to stream hands its children to the visitors as each one
|
|
30379
|
+
* finishes rather than collecting them, so both lists read as an empty block
|
|
30380
|
+
* on it — `null`, which means no block at all, is still only for the `@…;`
|
|
30381
|
+
* forms. Read a block's children from the walk, not from here.
|
|
30382
|
+
*/
|
|
30383
|
+
declarations(n?: NodeSyntax): null | DeclarationSyntax[];
|
|
30384
|
+
/**
|
|
30385
|
+
* Reads as an empty block on a streamed rule; see {@link declarations }.
|
|
30386
|
+
*/
|
|
30387
|
+
childRules(n?: NodeSyntax): null | RuleSyntax[];
|
|
30388
|
+
blockStart(n?: NodeSyntax): number;
|
|
30389
|
+
blockEnd(n?: NodeSyntax): number;
|
|
30390
|
+
important(n?: NodeSyntax): boolean;
|
|
30391
|
+
blockToken(n?: NodeSyntax): SimpleBlockToken;
|
|
30392
|
+
setEnd(n: NodeSyntax, v: number): void;
|
|
30393
|
+
setBlockEnd(n: NodeSyntax, v: number): void;
|
|
30394
|
+
};
|
|
30395
|
+
export let EMBEDDED_LANGUAGES: string[];
|
|
30396
|
+
export namespace NodeType {
|
|
30397
|
+
export let Ident: number;
|
|
30398
|
+
export let Function: number;
|
|
30399
|
+
export let AtKeyword: number;
|
|
30400
|
+
export let Hash: number;
|
|
30401
|
+
export let String: number;
|
|
30402
|
+
export let BadString: number;
|
|
30403
|
+
export let Url: number;
|
|
30404
|
+
export let BadUrl: number;
|
|
30405
|
+
export let Delim: number;
|
|
30406
|
+
export let Number: number;
|
|
30407
|
+
export let Percentage: number;
|
|
30408
|
+
export let Dimension: number;
|
|
30409
|
+
export let Whitespace: number;
|
|
30410
|
+
export let Colon: number;
|
|
30411
|
+
export let Semicolon: number;
|
|
30412
|
+
export let Comma: number;
|
|
30413
|
+
export let RightParenthesis: number;
|
|
30414
|
+
export let RightSquareBracket: number;
|
|
30415
|
+
export let RightCurlyBracket: number;
|
|
30416
|
+
export let CDO: number;
|
|
30417
|
+
export let CDC: number;
|
|
30418
|
+
export let SimpleBlock: number;
|
|
30419
|
+
export let Declaration: number;
|
|
30420
|
+
export let AtRule: number;
|
|
30421
|
+
export let QualifiedRule: number;
|
|
30422
|
+
export let Stylesheet: number;
|
|
30423
|
+
export let Comment: number;
|
|
30424
|
+
export let Raw: number;
|
|
30425
|
+
}
|
|
30426
|
+
export let TT_AT_KEYWORD: 16;
|
|
30427
|
+
export let TT_BAD_STRING_TOKEN: 4;
|
|
30428
|
+
export let TT_BAD_URL_TOKEN: 19;
|
|
30429
|
+
export let TT_CDC: 25;
|
|
30430
|
+
export let TT_CDO: 24;
|
|
30431
|
+
export let TT_COLON: 14;
|
|
30432
|
+
export let TT_COMMA: 13;
|
|
30433
|
+
export let TT_COMMENT: 1;
|
|
30434
|
+
export let TT_DELIM: 6;
|
|
30435
|
+
export let TT_DIMENSION: 23;
|
|
30436
|
+
export let TT_EOF: 26;
|
|
30437
|
+
export let TT_FUNCTION: 17;
|
|
30438
|
+
export let TT_HASH: 5;
|
|
30439
|
+
export let TT_IDENTIFIER: 20;
|
|
30440
|
+
export let TT_LEFT_CURLY_BRACKET: 9;
|
|
30441
|
+
export let TT_LEFT_PARENTHESIS: 7;
|
|
30442
|
+
export let TT_LEFT_SQUARE_BRACKET: 8;
|
|
30443
|
+
export let TT_NUMBER: 21;
|
|
30444
|
+
export let TT_PERCENTAGE: 22;
|
|
30445
|
+
export let TT_RIGHT_CURLY_BRACKET: 12;
|
|
30446
|
+
export let TT_RIGHT_PARENTHESIS: 10;
|
|
30447
|
+
export let TT_RIGHT_SQUARE_BRACKET: 11;
|
|
30448
|
+
export let TT_SEMICOLON: 15;
|
|
30449
|
+
export let TT_STRING: 3;
|
|
30450
|
+
export let TT_URL: 18;
|
|
30451
|
+
export let TT_WHITESPACE: 2;
|
|
30452
|
+
export let askEmbeddedRenderer: (
|
|
30453
|
+
render: (
|
|
30454
|
+
source: string,
|
|
30455
|
+
info: { type: string; hostType: string; as?: string }
|
|
30456
|
+
) =>
|
|
30457
|
+
| undefined
|
|
30458
|
+
| string
|
|
30459
|
+
| EmbeddedSourceResult
|
|
30460
|
+
| Promise<undefined | string | EmbeddedSourceResult>,
|
|
30461
|
+
hole: { source: string; type: string; hostType: string; as?: string },
|
|
30462
|
+
reported: EmbeddedSourceResult[]
|
|
30463
|
+
) => Promise<undefined | string | EmbeddedSourceResult>;
|
|
30464
|
+
export let buildSkipSet: (nodeTypes: number[]) => Uint8Array;
|
|
30465
|
+
export let collectEmbeddedDiagnostics: (
|
|
30466
|
+
reported: {
|
|
30467
|
+
warnings?: (string | Error)[];
|
|
30468
|
+
errors?: (string | Error)[];
|
|
30469
|
+
}[]
|
|
30470
|
+
) => { warnings?: (string | Error)[]; errors?: (string | Error)[] };
|
|
30471
|
+
export let embeddedText: (
|
|
30472
|
+
answer?: string | { code?: string }
|
|
30473
|
+
) => undefined | string;
|
|
30474
|
+
export let equalsLowerCase: (s: string, lit: string) => boolean;
|
|
30475
|
+
export let escapeIdentifier: MakeCacheableResult<string> & {
|
|
30476
|
+
bindCache: BindCache<string>;
|
|
30477
|
+
};
|
|
30478
|
+
export let isDashedIdentifier: (identifier: string) => boolean;
|
|
30479
|
+
export let isWhitespace: (cc: number) => boolean;
|
|
30480
|
+
export let normalizeUrl: (str: string, isString: boolean) => string;
|
|
30481
|
+
export let parseABlocksContents: (
|
|
30482
|
+
input: string | TokenStream,
|
|
30483
|
+
pos?: number,
|
|
30484
|
+
options?: ParseOptionsSyntax
|
|
30485
|
+
) => { decls: DeclarationSyntax[]; rules: RuleSyntax[] };
|
|
30486
|
+
export let parseACommaSeparatedListOfComponentValues: (
|
|
30487
|
+
input: string | TokenStream,
|
|
30488
|
+
pos?: number,
|
|
30489
|
+
options?: ParseOptionsSyntax
|
|
30490
|
+
) => ComponentValue[][];
|
|
30491
|
+
export let parseAComponentValue: (
|
|
30492
|
+
input: string | TokenStream,
|
|
30493
|
+
pos?: number,
|
|
30494
|
+
options?: ParseOptionsSyntax
|
|
30495
|
+
) => undefined | Token | FunctionNode | SimpleBlock;
|
|
30496
|
+
export let parseADeclaration: (
|
|
30497
|
+
input: string | TokenStream,
|
|
30498
|
+
pos?: number,
|
|
30499
|
+
options?: ParseOptionsSyntax
|
|
30500
|
+
) => undefined | DeclarationSyntax;
|
|
30501
|
+
export let parseAListOfComponentValues: (
|
|
30502
|
+
input: string | TokenStream,
|
|
30503
|
+
pos?: number,
|
|
30504
|
+
options?: ParseOptionsSyntax
|
|
30505
|
+
) => ComponentValue[];
|
|
30506
|
+
export let parseARule: (
|
|
30507
|
+
input: string | TokenStream,
|
|
30508
|
+
pos?: number,
|
|
30509
|
+
options?: ParseOptionsSyntax
|
|
30510
|
+
) => undefined | AtRule | QualifiedRule;
|
|
30511
|
+
export let parseAStylesheet: (
|
|
30512
|
+
input: string | TokenStream,
|
|
30513
|
+
pos?: number,
|
|
30514
|
+
options?: ParseOptionsSyntax
|
|
30515
|
+
) => Stylesheet;
|
|
30516
|
+
export let parseAStylesheetsContents: (
|
|
30517
|
+
input: string | TokenStream,
|
|
30518
|
+
pos?: number,
|
|
30519
|
+
options?: ParseOptionsSyntax
|
|
30520
|
+
) => RuleSyntax[];
|
|
30521
|
+
export let pickTransforms: (
|
|
30522
|
+
options: object
|
|
30523
|
+
) => undefined | CssTransformOptions;
|
|
30524
|
+
export let printer: (
|
|
30525
|
+
path: {
|
|
30526
|
+
get node(): NodeSyntax;
|
|
30527
|
+
get parent(): null | NodeSyntax;
|
|
30528
|
+
get index(): number;
|
|
30529
|
+
/**
|
|
30530
|
+
* Stop the walk descending into the current node (enter only).
|
|
30531
|
+
*/
|
|
30532
|
+
skipChildren(): void;
|
|
30533
|
+
inValue(): boolean;
|
|
30534
|
+
type(n?: NodeSyntax): number;
|
|
30535
|
+
start(n?: NodeSyntax): number;
|
|
30536
|
+
end(n?: NodeSyntax): number;
|
|
30537
|
+
range(n?: NodeSyntax): [number, number];
|
|
30538
|
+
loc(n?: NodeSyntax): {
|
|
30539
|
+
start: { line: number; column: number };
|
|
30540
|
+
end: { line: number; column: number };
|
|
30541
|
+
};
|
|
30542
|
+
source(n?: NodeSyntax): string;
|
|
30543
|
+
value(n?: NodeSyntax): string;
|
|
30544
|
+
unescaped(n?: NodeSyntax): string;
|
|
30545
|
+
typeFlag(n?: NodeSyntax): string;
|
|
30546
|
+
contentStart(n?: NodeSyntax): number;
|
|
30547
|
+
contentEnd(n?: NodeSyntax): number;
|
|
30548
|
+
name(n?: NodeSyntax): string;
|
|
30549
|
+
nameStart(n?: NodeSyntax): number;
|
|
30550
|
+
nameEnd(n?: NodeSyntax): number;
|
|
30551
|
+
unescapedName(n?: NodeSyntax): string;
|
|
30552
|
+
children(n?: NodeSyntax): ComponentValue[];
|
|
30553
|
+
prelude(n?: NodeSyntax): ComponentValue[];
|
|
30554
|
+
childCount(n?: NodeSyntax): number;
|
|
30555
|
+
childAt(n: NodeSyntax, i: number): ComponentValue;
|
|
30556
|
+
/**
|
|
30557
|
+
* A block big enough to stream hands its children to the visitors as each one
|
|
30558
|
+
* finishes rather than collecting them, so both lists read as an empty block
|
|
30559
|
+
* on it — `null`, which means no block at all, is still only for the `@…;`
|
|
30560
|
+
* forms. Read a block's children from the walk, not from here.
|
|
30561
|
+
*/
|
|
30562
|
+
declarations(n?: NodeSyntax): null | DeclarationSyntax[];
|
|
30563
|
+
/**
|
|
30564
|
+
* Reads as an empty block on a streamed rule; see {@link declarations }.
|
|
30565
|
+
*/
|
|
30566
|
+
childRules(n?: NodeSyntax): null | RuleSyntax[];
|
|
30567
|
+
blockStart(n?: NodeSyntax): number;
|
|
30568
|
+
blockEnd(n?: NodeSyntax): number;
|
|
30569
|
+
important(n?: NodeSyntax): boolean;
|
|
30570
|
+
blockToken(n?: NodeSyntax): SimpleBlockToken;
|
|
30571
|
+
setEnd(n: NodeSyntax, v: number): void;
|
|
30572
|
+
setBlockEnd(n: NodeSyntax, v: number): void;
|
|
30573
|
+
},
|
|
30574
|
+
writer: PrintContext<
|
|
30575
|
+
{
|
|
30576
|
+
get node(): NodeSyntax;
|
|
30577
|
+
get parent(): null | NodeSyntax;
|
|
30578
|
+
get index(): number;
|
|
30579
|
+
/**
|
|
30580
|
+
* Stop the walk descending into the current node (enter only).
|
|
30581
|
+
*/
|
|
30582
|
+
skipChildren(): void;
|
|
30583
|
+
inValue(): boolean;
|
|
30584
|
+
type(n?: NodeSyntax): number;
|
|
30585
|
+
start(n?: NodeSyntax): number;
|
|
30586
|
+
end(n?: NodeSyntax): number;
|
|
30587
|
+
range(n?: NodeSyntax): [number, number];
|
|
30588
|
+
loc(n?: NodeSyntax): {
|
|
30589
|
+
start: { line: number; column: number };
|
|
30590
|
+
end: { line: number; column: number };
|
|
30591
|
+
};
|
|
30592
|
+
source(n?: NodeSyntax): string;
|
|
30593
|
+
value(n?: NodeSyntax): string;
|
|
30594
|
+
unescaped(n?: NodeSyntax): string;
|
|
30595
|
+
typeFlag(n?: NodeSyntax): string;
|
|
30596
|
+
contentStart(n?: NodeSyntax): number;
|
|
30597
|
+
contentEnd(n?: NodeSyntax): number;
|
|
30598
|
+
name(n?: NodeSyntax): string;
|
|
30599
|
+
nameStart(n?: NodeSyntax): number;
|
|
30600
|
+
nameEnd(n?: NodeSyntax): number;
|
|
30601
|
+
unescapedName(n?: NodeSyntax): string;
|
|
30602
|
+
children(n?: NodeSyntax): ComponentValue[];
|
|
30603
|
+
prelude(n?: NodeSyntax): ComponentValue[];
|
|
30604
|
+
childCount(n?: NodeSyntax): number;
|
|
30605
|
+
childAt(n: NodeSyntax, i: number): ComponentValue;
|
|
30606
|
+
/**
|
|
30607
|
+
* A block big enough to stream hands its children to the visitors as each one
|
|
30608
|
+
* finishes rather than collecting them, so both lists read as an empty block
|
|
30609
|
+
* on it — `null`, which means no block at all, is still only for the `@…;`
|
|
30610
|
+
* forms. Read a block's children from the walk, not from here.
|
|
30611
|
+
*/
|
|
30612
|
+
declarations(n?: NodeSyntax): null | DeclarationSyntax[];
|
|
30613
|
+
/**
|
|
30614
|
+
* Reads as an empty block on a streamed rule; see {@link declarations }.
|
|
30615
|
+
*/
|
|
30616
|
+
childRules(n?: NodeSyntax): null | RuleSyntax[];
|
|
30617
|
+
blockStart(n?: NodeSyntax): number;
|
|
30618
|
+
blockEnd(n?: NodeSyntax): number;
|
|
30619
|
+
important(n?: NodeSyntax): boolean;
|
|
30620
|
+
blockToken(n?: NodeSyntax): SimpleBlockToken;
|
|
30621
|
+
setEnd(n: NodeSyntax, v: number): void;
|
|
30622
|
+
setBlockEnd(n: NodeSyntax, v: number): void;
|
|
30623
|
+
},
|
|
30624
|
+
NodeSyntax,
|
|
30625
|
+
CssPrintOptions
|
|
30626
|
+
>
|
|
30627
|
+
) => string;
|
|
30628
|
+
export let rangeEquals: (
|
|
30629
|
+
input: string,
|
|
30630
|
+
start: number,
|
|
30631
|
+
end: number,
|
|
30632
|
+
lit: string
|
|
30633
|
+
) => boolean;
|
|
30634
|
+
export let rangeEqualsLowerCase: (
|
|
30635
|
+
input: string,
|
|
30636
|
+
start: number,
|
|
30637
|
+
end: number,
|
|
30638
|
+
lit: string
|
|
30639
|
+
) => boolean;
|
|
30640
|
+
export let readToken: (
|
|
30641
|
+
input: string,
|
|
30642
|
+
pos: number,
|
|
30643
|
+
out: MutableToken
|
|
30644
|
+
) => undefined | MutableToken;
|
|
30645
|
+
export let skipEscape: (input: string, pos: number) => number;
|
|
30646
|
+
export let toLowerCaseIfNeeded: (s: string) => string;
|
|
30647
|
+
export let unescapeIdentifier: MakeCacheableResult<string> & {
|
|
30648
|
+
bindCache: BindCache<string>;
|
|
30649
|
+
};
|
|
30650
|
+
export { SourceProcessorSyntaxClass_2 as SourceProcessor, TokenStream };
|
|
30651
|
+
}
|
|
28187
30652
|
export { CssModulesPlugin };
|
|
28188
30653
|
}
|
|
28189
30654
|
export namespace html {
|
|
30655
|
+
export namespace syntax {
|
|
30656
|
+
export let A: {
|
|
30657
|
+
get node(): number;
|
|
30658
|
+
get parent(): null | number;
|
|
30659
|
+
/**
|
|
30660
|
+
* Stop the walk descending into the current node (enter only).
|
|
30661
|
+
*/
|
|
30662
|
+
skipChildren(): void;
|
|
30663
|
+
type(n?: number): number;
|
|
30664
|
+
start(n?: number): number;
|
|
30665
|
+
end(n?: number): number;
|
|
30666
|
+
/**
|
|
30667
|
+
* Raw source slice `[start, end)` — valid only during the walk (the printer's
|
|
30668
|
+
* window), before `parseHtml` releases `_htmlSource`.
|
|
30669
|
+
*/
|
|
30670
|
+
source(n?: number): string;
|
|
30671
|
+
sourceSpanAt(from: number, to: number): string;
|
|
30672
|
+
tagName(n?: number): string;
|
|
30673
|
+
namespace(n?: number): number;
|
|
30674
|
+
selfClosing(n?: number): boolean;
|
|
30675
|
+
attributes(n?: number): HtmlAttribute[];
|
|
30676
|
+
attributeCount(n?: number): number;
|
|
30677
|
+
/**
|
|
30678
|
+
* The i-th attribute of an element, as an id for the `attribute*` reads.
|
|
30679
|
+
*/
|
|
30680
|
+
attributeAt(i: number, n?: number): number;
|
|
30681
|
+
/**
|
|
30682
|
+
* Linear lookup by (lowercased) name.
|
|
30683
|
+
*/
|
|
30684
|
+
findAttribute(name: string, n?: number): number;
|
|
30685
|
+
attributeName(a: number): string;
|
|
30686
|
+
attributeValue(a: number): string;
|
|
30687
|
+
attributeNameStart(a: number): number;
|
|
30688
|
+
attributeNameEnd(a: number): number;
|
|
30689
|
+
attributeValueStart(a: number): number;
|
|
30690
|
+
attributeValueEnd(a: number): number;
|
|
30691
|
+
tagEnd(n?: number): number;
|
|
30692
|
+
nameEnd(n?: number): number;
|
|
30693
|
+
/**
|
|
30694
|
+
* Whether the source wrote this element's end tag rather than the parser
|
|
30695
|
+
* popping it for an implied close. Read back off the range instead of marked
|
|
30696
|
+
* during the parse: an element's end spans the token that closed it, so its
|
|
30697
|
+
* own end tag is the last thing in it — and only the few elements around a
|
|
30698
|
+
* region printed from source ever ask.
|
|
30699
|
+
*/
|
|
30700
|
+
sourceClosed(n?: number): boolean;
|
|
30701
|
+
openTag(n?: number): string;
|
|
30702
|
+
/**
|
|
30703
|
+
* An element's end tag, generated as `</name>` from the opening tag's own name
|
|
30704
|
+
* (exact source casing, correct for foreign camelCase elements). Generated, not
|
|
30705
|
+
* sliced: element `end` offsets don't span the end tag, and an omitted optional
|
|
30706
|
+
* end tag (`<li>`, `<p>`, …) still serializes to the same DOM. `""` when the
|
|
30707
|
+
* parser inserted the element, as {@link openTag } does — it has no name in the
|
|
30708
|
+
* source to echo, and slicing one would spell `</>`.
|
|
30709
|
+
*/
|
|
30710
|
+
closeTag(n?: number): string;
|
|
30711
|
+
contentEnd(n?: number): number;
|
|
30712
|
+
templateContent(n?: number): number;
|
|
30713
|
+
data(n?: number): string;
|
|
30714
|
+
piTarget(n?: number): string;
|
|
30715
|
+
doctypeName(n?: number): string;
|
|
30716
|
+
doctypePublicId(_n?: number): null | string;
|
|
30717
|
+
doctypeSystemId(_n?: number): null | string;
|
|
30718
|
+
firstChild(n?: number): number;
|
|
30719
|
+
nextSibling(n?: number): number;
|
|
30720
|
+
parentOf(n?: number): number;
|
|
30721
|
+
children(n?: number): number[];
|
|
30722
|
+
};
|
|
30723
|
+
export let EMBEDDED_LANGUAGES: string[];
|
|
30724
|
+
export let NS_HTML: 0;
|
|
30725
|
+
export let NS_MATHML: 1;
|
|
30726
|
+
export let NS_SVG: 2;
|
|
30727
|
+
export namespace NodeType {
|
|
30728
|
+
export let Document: 1;
|
|
30729
|
+
export let DocumentFragment: 2;
|
|
30730
|
+
export let Element: 3;
|
|
30731
|
+
export let Text: 4;
|
|
30732
|
+
export let Comment: 5;
|
|
30733
|
+
export let Doctype: 6;
|
|
30734
|
+
export let ProcessingInstruction: 7;
|
|
30735
|
+
}
|
|
30736
|
+
export let QUOTE_DOUBLE: 1;
|
|
30737
|
+
export let QUOTE_NONE: 0;
|
|
30738
|
+
export let QUOTE_SINGLE: 2;
|
|
30739
|
+
export let SVG_TAG_ADJUST: Record<string, string>;
|
|
30740
|
+
export let askEmbeddedRenderer: (
|
|
30741
|
+
render: (
|
|
30742
|
+
source: string,
|
|
30743
|
+
info: { type: string; hostType: string; as?: string }
|
|
30744
|
+
) =>
|
|
30745
|
+
| undefined
|
|
30746
|
+
| string
|
|
30747
|
+
| EmbeddedSourceResult
|
|
30748
|
+
| Promise<undefined | string | EmbeddedSourceResult>,
|
|
30749
|
+
hole: { source: string; type: string; hostType: string; as?: string },
|
|
30750
|
+
reported: EmbeddedSourceResult[]
|
|
30751
|
+
) => Promise<undefined | string | EmbeddedSourceResult>;
|
|
30752
|
+
export let baseTag: (
|
|
30753
|
+
base:
|
|
30754
|
+
| string
|
|
30755
|
+
| {
|
|
30756
|
+
/**
|
|
30757
|
+
* Value for the `href` attribute of the `<base>` element.
|
|
30758
|
+
*/
|
|
30759
|
+
href: string;
|
|
30760
|
+
/**
|
|
30761
|
+
* Value for the `target` attribute of the `<base>` element (e.g. `"_blank"`).
|
|
30762
|
+
*/
|
|
30763
|
+
target?: string;
|
|
30764
|
+
}
|
|
30765
|
+
) => string;
|
|
30766
|
+
export let buildHeadTags: (opts: OutputHtmlOptions) => string;
|
|
30767
|
+
export let collectEmbeddedDiagnostics: (
|
|
30768
|
+
reported: {
|
|
30769
|
+
warnings?: (string | Error)[];
|
|
30770
|
+
errors?: (string | Error)[];
|
|
30771
|
+
}[]
|
|
30772
|
+
) => { warnings?: (string | Error)[]; errors?: (string | Error)[] };
|
|
30773
|
+
export let decodeEntities: _functionSyntax;
|
|
30774
|
+
export let embeddedText: (
|
|
30775
|
+
answer?: string | { code?: string }
|
|
30776
|
+
) => undefined | string;
|
|
30777
|
+
export let escapeAttribute: (
|
|
30778
|
+
s: string,
|
|
30779
|
+
delimiter?: number,
|
|
30780
|
+
minimal?: boolean
|
|
30781
|
+
) => string;
|
|
30782
|
+
export let escapeText: (s: string) => string;
|
|
30783
|
+
export let isAsciiWhitespace: (cc: number) => boolean;
|
|
30784
|
+
export let metaTag: (name: string, content: string) => string;
|
|
30785
|
+
export let parseCssUrls: (input: string) => [string, number, number][];
|
|
30786
|
+
export let parseHtml: (
|
|
30787
|
+
input: string,
|
|
30788
|
+
pos?: number,
|
|
30789
|
+
options?: HtmlParseOptions
|
|
30790
|
+
) => number;
|
|
30791
|
+
export let parseMsapplicationTask: (
|
|
30792
|
+
input: string
|
|
30793
|
+
) => [string, number, number][];
|
|
30794
|
+
export let parseSrc: (input: string) => [string, number, number][];
|
|
30795
|
+
export let parseSrcset: (input: string) => [string, number, number][];
|
|
30796
|
+
export let pickTransforms: (
|
|
30797
|
+
options: object
|
|
30798
|
+
) => undefined | HtmlTransformOptions;
|
|
30799
|
+
export let printer: (
|
|
30800
|
+
path: {
|
|
30801
|
+
get node(): number;
|
|
30802
|
+
get parent(): null | number;
|
|
30803
|
+
/**
|
|
30804
|
+
* Stop the walk descending into the current node (enter only).
|
|
30805
|
+
*/
|
|
30806
|
+
skipChildren(): void;
|
|
30807
|
+
type(n?: number): number;
|
|
30808
|
+
start(n?: number): number;
|
|
30809
|
+
end(n?: number): number;
|
|
30810
|
+
/**
|
|
30811
|
+
* Raw source slice `[start, end)` — valid only during the walk (the printer's
|
|
30812
|
+
* window), before `parseHtml` releases `_htmlSource`.
|
|
30813
|
+
*/
|
|
30814
|
+
source(n?: number): string;
|
|
30815
|
+
sourceSpanAt(from: number, to: number): string;
|
|
30816
|
+
tagName(n?: number): string;
|
|
30817
|
+
namespace(n?: number): number;
|
|
30818
|
+
selfClosing(n?: number): boolean;
|
|
30819
|
+
attributes(n?: number): HtmlAttribute[];
|
|
30820
|
+
attributeCount(n?: number): number;
|
|
30821
|
+
/**
|
|
30822
|
+
* The i-th attribute of an element, as an id for the `attribute*` reads.
|
|
30823
|
+
*/
|
|
30824
|
+
attributeAt(i: number, n?: number): number;
|
|
30825
|
+
/**
|
|
30826
|
+
* Linear lookup by (lowercased) name.
|
|
30827
|
+
*/
|
|
30828
|
+
findAttribute(name: string, n?: number): number;
|
|
30829
|
+
attributeName(a: number): string;
|
|
30830
|
+
attributeValue(a: number): string;
|
|
30831
|
+
attributeNameStart(a: number): number;
|
|
30832
|
+
attributeNameEnd(a: number): number;
|
|
30833
|
+
attributeValueStart(a: number): number;
|
|
30834
|
+
attributeValueEnd(a: number): number;
|
|
30835
|
+
tagEnd(n?: number): number;
|
|
30836
|
+
nameEnd(n?: number): number;
|
|
30837
|
+
/**
|
|
30838
|
+
* Whether the source wrote this element's end tag rather than the parser
|
|
30839
|
+
* popping it for an implied close. Read back off the range instead of marked
|
|
30840
|
+
* during the parse: an element's end spans the token that closed it, so its
|
|
30841
|
+
* own end tag is the last thing in it — and only the few elements around a
|
|
30842
|
+
* region printed from source ever ask.
|
|
30843
|
+
*/
|
|
30844
|
+
sourceClosed(n?: number): boolean;
|
|
30845
|
+
openTag(n?: number): string;
|
|
30846
|
+
/**
|
|
30847
|
+
* An element's end tag, generated as `</name>` from the opening tag's own name
|
|
30848
|
+
* (exact source casing, correct for foreign camelCase elements). Generated, not
|
|
30849
|
+
* sliced: element `end` offsets don't span the end tag, and an omitted optional
|
|
30850
|
+
* end tag (`<li>`, `<p>`, …) still serializes to the same DOM. `""` when the
|
|
30851
|
+
* parser inserted the element, as {@link openTag } does — it has no name in the
|
|
30852
|
+
* source to echo, and slicing one would spell `</>`.
|
|
30853
|
+
*/
|
|
30854
|
+
closeTag(n?: number): string;
|
|
30855
|
+
contentEnd(n?: number): number;
|
|
30856
|
+
templateContent(n?: number): number;
|
|
30857
|
+
data(n?: number): string;
|
|
30858
|
+
piTarget(n?: number): string;
|
|
30859
|
+
doctypeName(n?: number): string;
|
|
30860
|
+
doctypePublicId(_n?: number): null | string;
|
|
30861
|
+
doctypeSystemId(_n?: number): null | string;
|
|
30862
|
+
firstChild(n?: number): number;
|
|
30863
|
+
nextSibling(n?: number): number;
|
|
30864
|
+
parentOf(n?: number): number;
|
|
30865
|
+
children(n?: number): number[];
|
|
30866
|
+
},
|
|
30867
|
+
writer: PrintContext<
|
|
30868
|
+
{
|
|
30869
|
+
get node(): number;
|
|
30870
|
+
get parent(): null | number;
|
|
30871
|
+
/**
|
|
30872
|
+
* Stop the walk descending into the current node (enter only).
|
|
30873
|
+
*/
|
|
30874
|
+
skipChildren(): void;
|
|
30875
|
+
type(n?: number): number;
|
|
30876
|
+
start(n?: number): number;
|
|
30877
|
+
end(n?: number): number;
|
|
30878
|
+
/**
|
|
30879
|
+
* Raw source slice `[start, end)` — valid only during the walk (the printer's
|
|
30880
|
+
* window), before `parseHtml` releases `_htmlSource`.
|
|
30881
|
+
*/
|
|
30882
|
+
source(n?: number): string;
|
|
30883
|
+
sourceSpanAt(from: number, to: number): string;
|
|
30884
|
+
tagName(n?: number): string;
|
|
30885
|
+
namespace(n?: number): number;
|
|
30886
|
+
selfClosing(n?: number): boolean;
|
|
30887
|
+
attributes(n?: number): HtmlAttribute[];
|
|
30888
|
+
attributeCount(n?: number): number;
|
|
30889
|
+
/**
|
|
30890
|
+
* The i-th attribute of an element, as an id for the `attribute*` reads.
|
|
30891
|
+
*/
|
|
30892
|
+
attributeAt(i: number, n?: number): number;
|
|
30893
|
+
/**
|
|
30894
|
+
* Linear lookup by (lowercased) name.
|
|
30895
|
+
*/
|
|
30896
|
+
findAttribute(name: string, n?: number): number;
|
|
30897
|
+
attributeName(a: number): string;
|
|
30898
|
+
attributeValue(a: number): string;
|
|
30899
|
+
attributeNameStart(a: number): number;
|
|
30900
|
+
attributeNameEnd(a: number): number;
|
|
30901
|
+
attributeValueStart(a: number): number;
|
|
30902
|
+
attributeValueEnd(a: number): number;
|
|
30903
|
+
tagEnd(n?: number): number;
|
|
30904
|
+
nameEnd(n?: number): number;
|
|
30905
|
+
/**
|
|
30906
|
+
* Whether the source wrote this element's end tag rather than the parser
|
|
30907
|
+
* popping it for an implied close. Read back off the range instead of marked
|
|
30908
|
+
* during the parse: an element's end spans the token that closed it, so its
|
|
30909
|
+
* own end tag is the last thing in it — and only the few elements around a
|
|
30910
|
+
* region printed from source ever ask.
|
|
30911
|
+
*/
|
|
30912
|
+
sourceClosed(n?: number): boolean;
|
|
30913
|
+
openTag(n?: number): string;
|
|
30914
|
+
/**
|
|
30915
|
+
* An element's end tag, generated as `</name>` from the opening tag's own name
|
|
30916
|
+
* (exact source casing, correct for foreign camelCase elements). Generated, not
|
|
30917
|
+
* sliced: element `end` offsets don't span the end tag, and an omitted optional
|
|
30918
|
+
* end tag (`<li>`, `<p>`, …) still serializes to the same DOM. `""` when the
|
|
30919
|
+
* parser inserted the element, as {@link openTag } does — it has no name in the
|
|
30920
|
+
* source to echo, and slicing one would spell `</>`.
|
|
30921
|
+
*/
|
|
30922
|
+
closeTag(n?: number): string;
|
|
30923
|
+
contentEnd(n?: number): number;
|
|
30924
|
+
templateContent(n?: number): number;
|
|
30925
|
+
data(n?: number): string;
|
|
30926
|
+
piTarget(n?: number): string;
|
|
30927
|
+
doctypeName(n?: number): string;
|
|
30928
|
+
doctypePublicId(_n?: number): null | string;
|
|
30929
|
+
doctypeSystemId(_n?: number): null | string;
|
|
30930
|
+
firstChild(n?: number): number;
|
|
30931
|
+
nextSibling(n?: number): number;
|
|
30932
|
+
parentOf(n?: number): number;
|
|
30933
|
+
children(n?: number): number[];
|
|
30934
|
+
},
|
|
30935
|
+
number,
|
|
30936
|
+
HtmlPrintOptions
|
|
30937
|
+
>
|
|
30938
|
+
) => string;
|
|
30939
|
+
export let tokenize: (
|
|
30940
|
+
input: string,
|
|
30941
|
+
pos?: number,
|
|
30942
|
+
callbacks?: HtmlTokenCallbacks
|
|
30943
|
+
) => number;
|
|
30944
|
+
export { SourceProcessorSyntaxClass_1 as SourceProcessor };
|
|
30945
|
+
}
|
|
28190
30946
|
export { HtmlModulesPlugin };
|
|
28191
30947
|
}
|
|
28192
30948
|
export namespace library {
|
|
@@ -28233,6 +30989,7 @@ declare namespace exports {
|
|
|
28233
30989
|
export let compareChunksNatural: (
|
|
28234
30990
|
chunkGraph: ChunkGraph
|
|
28235
30991
|
) => Comparator<Chunk>;
|
|
30992
|
+
export let compareErrors: Comparator<Error>;
|
|
28236
30993
|
export let compareIds: (
|
|
28237
30994
|
a: string | number,
|
|
28238
30995
|
b: string | number
|
|
@@ -28449,7 +31206,8 @@ declare namespace exports {
|
|
|
28449
31206
|
| string
|
|
28450
31207
|
| boolean
|
|
28451
31208
|
| string[]
|
|
28452
|
-
|
|
|
31209
|
+
| ExternalItemValueObject
|
|
31210
|
+
| ExternalItemValueWithOptions
|
|
28453
31211
|
) => void
|
|
28454
31212
|
) => void;
|
|
28455
31213
|
export type ExternalItemFunctionDataGetResolve = (
|
|
@@ -28486,9 +31244,9 @@ declare namespace exports {
|
|
|
28486
31244
|
argv: Record<string, any>
|
|
28487
31245
|
) => MaybePromise<Configuration | MultiConfiguration>;
|
|
28488
31246
|
export type ObjectSerializerContext =
|
|
28489
|
-
typeof
|
|
31247
|
+
typeof ObjectSerializerContextObjectMiddlewareObject_2;
|
|
28490
31248
|
export type ObjectDeserializerContext =
|
|
28491
|
-
typeof
|
|
31249
|
+
typeof ObjectDeserializerContextObjectMiddlewareObject_1;
|
|
28492
31250
|
export {
|
|
28493
31251
|
AutomaticPrefetchPlugin,
|
|
28494
31252
|
AsyncDependenciesBlock,
|