webpack 5.109.2 → 5.110.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 +2 -0
- 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 +26 -17
- 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 +117 -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 +50 -13
- 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 +101 -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 +27 -68
- package/lib/FlagAllModulesAsUsedPlugin.js +2 -3
- package/lib/FlagDependencyExportsPlugin.js +76 -19
- package/lib/FlagDependencyUsagePlugin.js +32 -47
- package/lib/FlagEntryExportAsUsedPlugin.js +1 -1
- package/lib/Generator.js +19 -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 +138 -82
- 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 +332 -169
- package/lib/RuntimeTemplate.js +2792 -352
- 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 +11 -7
- package/lib/asset/AssetBytesParser.js +2 -4
- package/lib/asset/AssetGenerator.js +187 -92
- 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 +59 -10
- 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 +2 -2
- 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 +255 -79
- package/lib/config/defineConfig.js +10 -2
- package/lib/config/getClaimedAssetTypes.js +65 -0
- package/lib/config/normalization.js +36 -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 +170 -40
- package/lib/css/CssInjectStyleRuntimeModule.js +7 -5
- package/lib/css/CssLoadingRuntimeModule.js +57 -24
- package/lib/css/CssModule.js +10 -7
- package/lib/css/CssModulesPlugin.js +168 -88
- 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 +5324 -0
- package/lib/css/syntax.js +9579 -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 +156 -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 +4 -4
- 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 +13 -10
- package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +78 -12
- package/lib/dependencies/HarmonyExportExpressionDependency.js +23 -18
- package/lib/dependencies/HarmonyExportHeaderDependency.js +7 -7
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +143 -63
- 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 +27 -19
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +31 -24
- package/lib/dependencies/HarmonyImportGuard.js +20 -30
- package/lib/dependencies/HarmonyImportSideEffectDependency.js +38 -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 +37 -29
- 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 +2 -2
- package/lib/dependencies/ImportDependency.js +24 -20
- 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 +49 -35
- 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 +51 -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 +46 -28
- package/lib/dependencies/WorkerDependency.js +28 -22
- package/lib/dependencies/WorkletDependency.js +15 -14
- package/lib/dependencies/getFunctionExpression.js +8 -4
- 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/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/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 +89 -51
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +155 -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 +276 -76
- package/lib/html/HtmlModule.js +7 -3
- package/lib/html/HtmlModulesPlugin.js +282 -162
- 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 +5557 -1155
- 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 +64 -164
- package/lib/javascript/JavascriptModule.js +9 -3
- package/lib/javascript/JavascriptModulesPlugin.js +98 -113
- 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 +37 -15
- 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 +14 -1
- 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 +72 -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 +985 -470
- package/lib/optimize/ConstExportsPlugin.js +11 -7
- package/lib/optimize/EnsureChunkConditionsPlugin.js +3 -3
- package/lib/optimize/FlagIncludedChunksPlugin.js +3 -4
- package/lib/optimize/InlineExports.js +9 -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 +10 -6
- 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 -78
- 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 +1 -1
- 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 +23 -6
- 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 +24 -15
- 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 +7 -7
- package/lib/serialization/ObjectMiddleware.js +11 -6
- 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 +12 -14
- package/lib/url/URLParserPlugin.js +26 -13
- 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 +1050 -24
- package/lib/util/StringXor.js +1 -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 +5 -1
- package/lib/util/createHash.js +2 -2
- package/lib/util/createHooksRegistry.js +8 -10
- 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 +6 -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/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 +41 -21
- package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +43 -21
- package/lib/wasm-async/AsyncWasmModule.js +3 -3
- package/lib/wasm-async/AsyncWebAssemblyGenerator.js +4 -5
- package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +54 -16
- package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +34 -18
- package/lib/wasm-async/AsyncWebAssemblyParser.js +9 -8
- package/lib/wasm-async/UniversalCompileAsyncWasmPlugin.js +34 -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 +4 -6
- 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 +101 -19
- package/lib/web/FetchCompileWasmPlugin.js +46 -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 +22 -15
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +670 -36
- 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 +3138 -456
- 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,8 @@ declare interface AllCodeGenerationSchemas {
|
|
|
356
355
|
*/
|
|
357
356
|
"share-init": [{ shareScope: string; initStage: number; init: string }];
|
|
358
357
|
}
|
|
358
|
+
type AnalyzableForm =
|
|
359
|
+
"import" | "url" | "url-runtime" | "url-inline" | "wasm" | "wasm-relative";
|
|
359
360
|
type AnyLoaderContext = NormalModuleLoaderContext<any> &
|
|
360
361
|
LoaderRunnerLoaderContext<any> &
|
|
361
362
|
LoaderPluginLoaderContext &
|
|
@@ -445,7 +446,7 @@ declare abstract class AssetGenerator extends Generator {
|
|
|
445
446
|
/**
|
|
446
447
|
* Generates data uri.
|
|
447
448
|
*/
|
|
448
|
-
generateDataUri(module: NormalModule): string;
|
|
449
|
+
generateDataUri(module: NormalModule, renderedSource?: Source): string;
|
|
449
450
|
|
|
450
451
|
/**
|
|
451
452
|
* Generates fallback output for the provided error condition.
|
|
@@ -685,7 +686,16 @@ declare interface AsyncWebAssemblyModulesPluginOptions {
|
|
|
685
686
|
*/
|
|
686
687
|
mangleImports?: boolean;
|
|
687
688
|
}
|
|
688
|
-
|
|
689
|
+
type AtRule = NodeSyntax & {
|
|
690
|
+
name: string;
|
|
691
|
+
nameStart: number;
|
|
692
|
+
nameEnd: number;
|
|
693
|
+
prelude: ComponentValue[];
|
|
694
|
+
declarations: null | DeclarationSyntax[];
|
|
695
|
+
childRules: null | RuleSyntax[];
|
|
696
|
+
blockStart: number;
|
|
697
|
+
blockEnd: number;
|
|
698
|
+
};
|
|
689
699
|
|
|
690
700
|
/**
|
|
691
701
|
* Records modules from one compilation and adds them back as prefetch
|
|
@@ -745,7 +755,7 @@ declare interface BannerPluginOptions {
|
|
|
745
755
|
/**
|
|
746
756
|
* Exclude all modules matching any of these conditions.
|
|
747
757
|
*/
|
|
748
|
-
exclude?: string | RegExp | ((str: string) => boolean) |
|
|
758
|
+
exclude?: string | RegExp | ((str: string) => boolean) | RuleAlias[];
|
|
749
759
|
|
|
750
760
|
/**
|
|
751
761
|
* If true, banner will be placed at the end of the output.
|
|
@@ -755,7 +765,7 @@ declare interface BannerPluginOptions {
|
|
|
755
765
|
/**
|
|
756
766
|
* Include all modules matching any of these conditions.
|
|
757
767
|
*/
|
|
758
|
-
include?: string | RegExp | ((str: string) => boolean) |
|
|
768
|
+
include?: string | RegExp | ((str: string) => boolean) | RuleAlias[];
|
|
759
769
|
|
|
760
770
|
/**
|
|
761
771
|
* If true, banner will not be wrapped in a comment.
|
|
@@ -770,7 +780,7 @@ declare interface BannerPluginOptions {
|
|
|
770
780
|
/**
|
|
771
781
|
* Include all modules that pass test assertion.
|
|
772
782
|
*/
|
|
773
|
-
test?: string | RegExp | ((str: string) => boolean) |
|
|
783
|
+
test?: string | RegExp | ((str: string) => boolean) | RuleAlias[];
|
|
774
784
|
}
|
|
775
785
|
declare interface BaseResolveRequest {
|
|
776
786
|
/**
|
|
@@ -1194,6 +1204,12 @@ declare abstract class BasicEvaluatedExpression {
|
|
|
1194
1204
|
): BasicEvaluatedExpression;
|
|
1195
1205
|
}
|
|
1196
1206
|
type BeforeContextResolveData = ContextResolveData & ContextOptions;
|
|
1207
|
+
declare interface BindCache<T> {
|
|
1208
|
+
(cache: object): BindCacheResultFn<T>;
|
|
1209
|
+
}
|
|
1210
|
+
declare interface BindCacheResultFn<T> {
|
|
1211
|
+
(value: string): T;
|
|
1212
|
+
}
|
|
1197
1213
|
declare interface Bootstrap {
|
|
1198
1214
|
header: string[];
|
|
1199
1215
|
beforeStartup: string[];
|
|
@@ -1557,6 +1573,32 @@ declare interface CallbackWebpackFunction_2<T, R = void> {
|
|
|
1557
1573
|
*/
|
|
1558
1574
|
(err: null | Error, result?: T): R;
|
|
1559
1575
|
}
|
|
1576
|
+
declare interface CappedSplit {
|
|
1577
|
+
/**
|
|
1578
|
+
* the cache group whose split was refused
|
|
1579
|
+
*/
|
|
1580
|
+
cacheGroup: string;
|
|
1581
|
+
|
|
1582
|
+
/**
|
|
1583
|
+
* the chunk it would have been taken out of
|
|
1584
|
+
*/
|
|
1585
|
+
chunk: Chunk;
|
|
1586
|
+
|
|
1587
|
+
/**
|
|
1588
|
+
* the option that refused it
|
|
1589
|
+
*/
|
|
1590
|
+
limit: "maxAsyncRequests" | "maxInitialRequests";
|
|
1591
|
+
|
|
1592
|
+
/**
|
|
1593
|
+
* the value that option had
|
|
1594
|
+
*/
|
|
1595
|
+
maxRequests: number;
|
|
1596
|
+
|
|
1597
|
+
/**
|
|
1598
|
+
* how many modules the split would have moved
|
|
1599
|
+
*/
|
|
1600
|
+
modules: number;
|
|
1601
|
+
}
|
|
1560
1602
|
type Cell<T> = undefined | T;
|
|
1561
1603
|
|
|
1562
1604
|
/**
|
|
@@ -1853,6 +1895,7 @@ declare class ChunkGraph {
|
|
|
1853
1895
|
*/
|
|
1854
1896
|
constructor(moduleGraph: ModuleGraph, hashFunction?: HashFunction);
|
|
1855
1897
|
moduleGraph: ModuleGraph;
|
|
1898
|
+
buildTimeExecution: boolean;
|
|
1856
1899
|
|
|
1857
1900
|
/**
|
|
1858
1901
|
* Connects chunk and module.
|
|
@@ -3363,6 +3406,27 @@ declare class Compilation {
|
|
|
3363
3406
|
[RenderManifestEntry[], RenderManifestOptions],
|
|
3364
3407
|
RenderManifestEntry[]
|
|
3365
3408
|
>;
|
|
3409
|
+
/**
|
|
3410
|
+
* Called with source written in one language that a module emits inside
|
|
3411
|
+
* another — CSS or HTML reaching the bundle as a JavaScript string
|
|
3412
|
+
* literal today — before it is embedded; return the (possibly
|
|
3413
|
+
* transformed) source, e.g. a minified one. `info.type` says which
|
|
3414
|
+
* language it is, so one tap serves every pair; no asset carries this
|
|
3415
|
+
* source, so an asset-level minimizer cannot reach it.
|
|
3416
|
+
* @since 5.110.0
|
|
3417
|
+
*/
|
|
3418
|
+
renderEmbeddedSource: AsyncSeriesWaterfallHook<
|
|
3419
|
+
[Source, EmbeddedSourceInfo],
|
|
3420
|
+
Source
|
|
3421
|
+
>;
|
|
3422
|
+
/**
|
|
3423
|
+
* Called while hashing a module that embeds such a source. Module hashes
|
|
3424
|
+
* are taken before code generation, so a `renderEmbeddedSource` tap must
|
|
3425
|
+
* write whatever it varies on into the hash, or the codegen cache
|
|
3426
|
+
* replays output from before its options changed.
|
|
3427
|
+
* @since 5.110.0
|
|
3428
|
+
*/
|
|
3429
|
+
embeddedSourceHash: SyncHook<[Module, Hash]>;
|
|
3366
3430
|
fullHash: SyncHook<[Hash]>;
|
|
3367
3431
|
chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
|
|
3368
3432
|
moduleAsset: SyncHook<[Module, string]>;
|
|
@@ -3446,6 +3510,7 @@ declare class Compilation {
|
|
|
3446
3510
|
assetsInfo: Map<string, AssetInfo>;
|
|
3447
3511
|
errors: Error[];
|
|
3448
3512
|
warnings: Error[];
|
|
3513
|
+
hints: Error[];
|
|
3449
3514
|
children: Compilation[];
|
|
3450
3515
|
logging: Map<string, LogEntry[]>;
|
|
3451
3516
|
dependencyFactories: Map<DependencyConstructor, ModuleFactory>;
|
|
@@ -3680,6 +3745,20 @@ declare class Compilation {
|
|
|
3680
3745
|
chunkGraphEntries?: Iterable<Chunk>;
|
|
3681
3746
|
}): void;
|
|
3682
3747
|
|
|
3748
|
+
/**
|
|
3749
|
+
* Queues a runtime module whose implementation is loaded on demand, for
|
|
3750
|
+
* `_attachPendingRuntimeModules` to await and build once the requirement pass
|
|
3751
|
+
* is over. `runtimeRequirementInTree` is a sync hook, so a tap cannot await
|
|
3752
|
+
* the load itself; anything the tap reads off the requirement set must be
|
|
3753
|
+
* captured before queueing, since `create` runs later.
|
|
3754
|
+
*/
|
|
3755
|
+
addLazyRuntimeModule(
|
|
3756
|
+
chunk: Chunk,
|
|
3757
|
+
load: () => Promise<any>,
|
|
3758
|
+
create: (loaded?: any) => RuntimeModule,
|
|
3759
|
+
chunkGraph?: ChunkGraph
|
|
3760
|
+
): void;
|
|
3761
|
+
|
|
3683
3762
|
/**
|
|
3684
3763
|
* Adds runtime module.
|
|
3685
3764
|
*/
|
|
@@ -4033,6 +4112,15 @@ declare interface CompiledAliasOptions {
|
|
|
4033
4112
|
*/
|
|
4034
4113
|
useBuckets: boolean;
|
|
4035
4114
|
}
|
|
4115
|
+
declare interface CompiledRule {
|
|
4116
|
+
path: string;
|
|
4117
|
+
raw: RuleSetRule;
|
|
4118
|
+
used: boolean;
|
|
4119
|
+
conditions: RuleCondition[];
|
|
4120
|
+
effects: (EffectUse | EffectBasic | ((effectData: EffectData) => Effect[]))[];
|
|
4121
|
+
rules?: CompiledRule[];
|
|
4122
|
+
oneOf?: CompiledRule[];
|
|
4123
|
+
}
|
|
4036
4124
|
declare class Compiler {
|
|
4037
4125
|
/**
|
|
4038
4126
|
* Creates an instance of Compiler.
|
|
@@ -4253,6 +4341,7 @@ declare class Compiler {
|
|
|
4253
4341
|
check?: (value: T) => boolean
|
|
4254
4342
|
): void;
|
|
4255
4343
|
}
|
|
4344
|
+
type ComponentValue = Token | FunctionNode | SimpleBlock;
|
|
4256
4345
|
declare class ConcatSource extends Source {
|
|
4257
4346
|
constructor(...args: ConcatSourceChild[]);
|
|
4258
4347
|
getChildren(): Source[];
|
|
@@ -4294,24 +4383,39 @@ type ConcatenatedModuleBuildInfo = KnownBuildInfo &
|
|
|
4294
4383
|
KnownConcatenatedModuleBuildInfo;
|
|
4295
4384
|
declare interface ConcatenatedModuleInfo {
|
|
4296
4385
|
type: "concatenated";
|
|
4297
|
-
module: Module;
|
|
4298
|
-
index: number;
|
|
4299
4386
|
|
|
4300
4387
|
/**
|
|
4301
|
-
*
|
|
4388
|
+
* the body renders inside the lazy CJS wrapper with real module/exports instead of being scope-hoisted into the shared scope
|
|
4389
|
+
*/
|
|
4390
|
+
wrapped: boolean;
|
|
4391
|
+
|
|
4392
|
+
/**
|
|
4393
|
+
* a wrapped body reached by an eager import edge, so its accessor is called at its own slot in evaluation order
|
|
4302
4394
|
*/
|
|
4303
|
-
|
|
4395
|
+
eager: boolean;
|
|
4396
|
+
module: Module;
|
|
4397
|
+
index: number;
|
|
4304
4398
|
ast?: Program;
|
|
4305
4399
|
internalSource?: Source;
|
|
4306
4400
|
source?: ReplaceSource;
|
|
4307
4401
|
chunkInitFragments?: InitFragment<ChunkRenderContextJavascriptModulesPlugin>[];
|
|
4308
4402
|
runtimeRequirements?: ReadonlySet<string>;
|
|
4309
4403
|
globalScope?: Scope;
|
|
4404
|
+
|
|
4405
|
+
/**
|
|
4406
|
+
* the module's free references
|
|
4407
|
+
*/
|
|
4408
|
+
unresolvedReferences?: Reference[];
|
|
4310
4409
|
moduleScope?: Scope;
|
|
4311
4410
|
internalNames: Map<string, string>;
|
|
4312
4411
|
exportMap?: Map<string, string>;
|
|
4313
4412
|
rawExportMap?: Map<string, string>;
|
|
4314
4413
|
namespaceExportSymbol?: string;
|
|
4414
|
+
|
|
4415
|
+
/**
|
|
4416
|
+
* name of the lazy wrapper accessor function (calling it evaluates the module and returns its exports)
|
|
4417
|
+
*/
|
|
4418
|
+
namespaceFnName?: string;
|
|
4315
4419
|
namespaceObjectName?: string;
|
|
4316
4420
|
|
|
4317
4421
|
/**
|
|
@@ -4400,6 +4504,36 @@ declare class ConcatenationScope {
|
|
|
4400
4504
|
*/
|
|
4401
4505
|
isModuleInScope(module: Module): boolean;
|
|
4402
4506
|
|
|
4507
|
+
/**
|
|
4508
|
+
* Whether an in-scope module's body renders inside the lazy wrapper.
|
|
4509
|
+
*/
|
|
4510
|
+
isModuleWrapped(module: Module): boolean;
|
|
4511
|
+
|
|
4512
|
+
/**
|
|
4513
|
+
* Marks a wrapped module as eagerly imported, so its accessor is called at its
|
|
4514
|
+
* own slot in evaluation order instead of from inside the importing body.
|
|
4515
|
+
*/
|
|
4516
|
+
registerEagerModule(module: Module): void;
|
|
4517
|
+
|
|
4518
|
+
/**
|
|
4519
|
+
* Whether the current module runs inside the lazy wrapper. Exports then live
|
|
4520
|
+
* on a real exports object, not hoisted bindings, so templates emit runtime
|
|
4521
|
+
* code.
|
|
4522
|
+
*/
|
|
4523
|
+
isWrapped(): boolean;
|
|
4524
|
+
|
|
4525
|
+
/**
|
|
4526
|
+
* Records a `require(...)` call that was replaced as a whole by a
|
|
4527
|
+
* concatenation reference, so nothing else rewrites a range inside it.
|
|
4528
|
+
*/
|
|
4529
|
+
registerReplacedRequire(range: [number, number]): void;
|
|
4530
|
+
|
|
4531
|
+
/**
|
|
4532
|
+
* Checks whether an offset sits inside an already-replaced `require(...)` call.
|
|
4533
|
+
* Containment, not exact match: `new require(...)` is replaced from `new`.
|
|
4534
|
+
*/
|
|
4535
|
+
isInsideReplacedRequire(start: number): boolean;
|
|
4536
|
+
|
|
4403
4537
|
/**
|
|
4404
4538
|
* Records the symbol that should be used when the current module exports a
|
|
4405
4539
|
* named binding.
|
|
@@ -4443,6 +4577,11 @@ declare class ConcatenationScope {
|
|
|
4443
4577
|
*/
|
|
4444
4578
|
static isModuleReference(name: string): boolean;
|
|
4445
4579
|
|
|
4580
|
+
/**
|
|
4581
|
+
* Finds all encoded module references in a generated source.
|
|
4582
|
+
*/
|
|
4583
|
+
static findModuleReferences(source: Source): ModuleReferenceMatch[];
|
|
4584
|
+
|
|
4446
4585
|
/**
|
|
4447
4586
|
* Parses an encoded module reference back into its module index and
|
|
4448
4587
|
* reference flags.
|
|
@@ -4539,7 +4678,8 @@ declare interface Configuration {
|
|
|
4539
4678
|
| string
|
|
4540
4679
|
| boolean
|
|
4541
4680
|
| string[]
|
|
4542
|
-
|
|
|
4681
|
+
| ExternalItemValueObject
|
|
4682
|
+
| ExternalItemValueWithOptions
|
|
4543
4683
|
) => void
|
|
4544
4684
|
) => void)
|
|
4545
4685
|
| ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>)
|
|
@@ -4775,7 +4915,10 @@ declare class ConstDependency extends NullDependency {
|
|
|
4775
4915
|
/**
|
|
4776
4916
|
* Returns true if the dependency can be concatenated (scope hoisting).
|
|
4777
4917
|
*/
|
|
4778
|
-
static canConcatenate(
|
|
4918
|
+
static canConcatenate(
|
|
4919
|
+
dependency: Dependency,
|
|
4920
|
+
concatenateCommonJsModules: boolean
|
|
4921
|
+
): boolean;
|
|
4779
4922
|
static TRANSITIVE: symbol;
|
|
4780
4923
|
static LAZY_UNTIL_LOCAL: "local";
|
|
4781
4924
|
static LAZY_UNTIL_ID: "id";
|
|
@@ -4959,6 +5102,12 @@ type ContextDependencyOptions = ContextOptions & { request: string };
|
|
|
4959
5102
|
declare abstract class ContextElementDependency extends ModuleDependency {
|
|
4960
5103
|
referencedExports?: null | string[][];
|
|
4961
5104
|
attributes?: ImportAttributes;
|
|
5105
|
+
|
|
5106
|
+
/**
|
|
5107
|
+
* The request as the user wrote it, e.g. `#configs/file.mjs` where `request`
|
|
5108
|
+
* is the `./file.mjs` relative to the resolved `#configs` directory.
|
|
5109
|
+
*/
|
|
5110
|
+
get originalRequest(): string;
|
|
4962
5111
|
}
|
|
4963
5112
|
declare class ContextExclusionPlugin {
|
|
4964
5113
|
/**
|
|
@@ -5029,6 +5178,10 @@ declare abstract class ContextModuleFactory extends ModuleFactory {
|
|
|
5029
5178
|
}
|
|
5030
5179
|
type ContextModuleOptions = ContextOptions & ContextModuleOptionsExtras;
|
|
5031
5180
|
declare interface ContextModuleOptionsExtras {
|
|
5181
|
+
/**
|
|
5182
|
+
* the request of the context as written by the user, before it was resolved
|
|
5183
|
+
*/
|
|
5184
|
+
request?: string;
|
|
5032
5185
|
resource: string | false | string[];
|
|
5033
5186
|
resourceQuery?: string;
|
|
5034
5187
|
resourceFragment?: string;
|
|
@@ -5140,89 +5293,7 @@ declare interface ContextTimestampAndHash {
|
|
|
5140
5293
|
symlinks?: Set<string>;
|
|
5141
5294
|
}
|
|
5142
5295
|
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
|
-
}
|
|
5296
|
+
type CreateData = NormalModuleCreateData & { settings: ModuleSettings };
|
|
5226
5297
|
type CreateReadStreamFSImplementation = FSImplementation & {
|
|
5227
5298
|
read: (...args: any[]) => any;
|
|
5228
5299
|
};
|
|
@@ -5338,6 +5409,17 @@ declare interface CssData {
|
|
|
5338
5409
|
*/
|
|
5339
5410
|
exportLocs?: Map<string, { line: number; column: number }>;
|
|
5340
5411
|
}
|
|
5412
|
+
declare interface CssEnvironment {
|
|
5413
|
+
/**
|
|
5414
|
+
* 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
|
|
5415
|
+
*/
|
|
5416
|
+
browsers?: string[];
|
|
5417
|
+
|
|
5418
|
+
/**
|
|
5419
|
+
* whether prefixes are written at all; false leaves them alone while the selection still decides which spellings a target reads
|
|
5420
|
+
*/
|
|
5421
|
+
vendorPrefixes?: boolean;
|
|
5422
|
+
}
|
|
5341
5423
|
declare abstract class CssGenerator extends Generator {
|
|
5342
5424
|
options: CssModuleGeneratorOptions;
|
|
5343
5425
|
|
|
@@ -5834,117 +5916,298 @@ declare interface CssParserOptions {
|
|
|
5834
5916
|
*/
|
|
5835
5917
|
urlHints?: UrlHintRule[];
|
|
5836
5918
|
}
|
|
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 {
|
|
5919
|
+
declare interface CssPrintOptions {
|
|
5882
5920
|
/**
|
|
5883
|
-
*
|
|
5921
|
+
* 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
5922
|
*/
|
|
5885
|
-
|
|
5886
|
-
definitions: Definitions;
|
|
5923
|
+
environment?: CssEnvironment;
|
|
5887
5924
|
|
|
5888
5925
|
/**
|
|
5889
|
-
*
|
|
5926
|
+
* 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
5927
|
*/
|
|
5891
|
-
|
|
5928
|
+
renderEmbeddedSource?: (
|
|
5929
|
+
source: string,
|
|
5930
|
+
info: { type: string; hostType: string }
|
|
5931
|
+
) => undefined | string;
|
|
5892
5932
|
|
|
5893
5933
|
/**
|
|
5894
|
-
*
|
|
5934
|
+
* 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
5935
|
*/
|
|
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 {
|
|
5936
|
+
convertLengthUnits?: boolean;
|
|
5937
|
+
|
|
5933
5938
|
/**
|
|
5934
|
-
*
|
|
5939
|
+
* 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
5940
|
*/
|
|
5936
|
-
|
|
5937
|
-
options: Options;
|
|
5941
|
+
rewriteCustomProperties?: boolean;
|
|
5938
5942
|
|
|
5939
5943
|
/**
|
|
5940
|
-
*
|
|
5944
|
+
* 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
5945
|
*/
|
|
5942
|
-
|
|
5943
|
-
}
|
|
5946
|
+
deferEmbeddedSource?: DeferredEmbeddedSource[];
|
|
5944
5947
|
|
|
5945
|
-
/**
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
+
/**
|
|
5949
|
+
* which of the meaning-preserving rewrites the minifying print makes; each is on unless it is `false`
|
|
5950
|
+
*/
|
|
5951
|
+
transforms?: CssTransformOptions;
|
|
5952
|
+
}
|
|
5953
|
+
declare interface CssProcessOptions {
|
|
5954
|
+
/**
|
|
5955
|
+
* shared loc converter (default a fresh one over the input)
|
|
5956
|
+
*/
|
|
5957
|
+
locConverter?: LocConverter;
|
|
5958
|
+
|
|
5959
|
+
/**
|
|
5960
|
+
* walk into block bodies' nested rules (default true)
|
|
5961
|
+
*/
|
|
5962
|
+
recurseBlocks?: boolean;
|
|
5963
|
+
|
|
5964
|
+
/**
|
|
5965
|
+
* 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)
|
|
5966
|
+
*/
|
|
5967
|
+
as?: "stylesheet" | "block-contents";
|
|
5968
|
+
|
|
5969
|
+
/**
|
|
5970
|
+
* 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
|
|
5971
|
+
*/
|
|
5972
|
+
skip?: SkipOptions;
|
|
5973
|
+
|
|
5974
|
+
/**
|
|
5975
|
+
* 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`)
|
|
5976
|
+
*/
|
|
5977
|
+
minimize?: boolean;
|
|
5978
|
+
|
|
5979
|
+
/**
|
|
5980
|
+
* name of the input in the emitted source map (`sources[0]` / `file`); only read while printing
|
|
5981
|
+
*/
|
|
5982
|
+
source?: string;
|
|
5983
|
+
|
|
5984
|
+
/**
|
|
5985
|
+
* the input's contents for the map's `sourcesContent`; only read while printing
|
|
5986
|
+
*/
|
|
5987
|
+
content?: string;
|
|
5988
|
+
|
|
5989
|
+
/**
|
|
5990
|
+
* 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
|
|
5991
|
+
*/
|
|
5992
|
+
environment?: CssEnvironment;
|
|
5993
|
+
|
|
5994
|
+
/**
|
|
5995
|
+
* 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
|
|
5996
|
+
*/
|
|
5997
|
+
convertLengthUnits?: boolean;
|
|
5998
|
+
|
|
5999
|
+
/**
|
|
6000
|
+
* shorten a custom property's value the way any other value is shortened (`--x:#ffffff` -> `#fff`); off by default because `getPropertyValue()` hands that text back, and only read while printing. What it may rewrite is what any other value's tokens may be, a color in a substitution's fallback included — that being the property's value rather than the function's own argument
|
|
6001
|
+
*/
|
|
6002
|
+
rewriteCustomProperties?: boolean;
|
|
6003
|
+
|
|
6004
|
+
/**
|
|
6005
|
+
* 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
|
|
6006
|
+
*/
|
|
6007
|
+
renderEmbeddedSource?: (
|
|
6008
|
+
source: string,
|
|
6009
|
+
info: { type: string; hostType: string }
|
|
6010
|
+
) => undefined | string;
|
|
6011
|
+
|
|
6012
|
+
/**
|
|
6013
|
+
* which of the meaning-preserving rewrites the minifying print makes; each is on unless it is `false`
|
|
6014
|
+
*/
|
|
6015
|
+
transforms?: CssTransformOptions;
|
|
6016
|
+
|
|
6017
|
+
/**
|
|
6018
|
+
* 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`
|
|
6019
|
+
*/
|
|
6020
|
+
deferEmbeddedSource?: DeferredEmbeddedSource[];
|
|
6021
|
+
}
|
|
6022
|
+
declare interface CssTransformOptions {
|
|
6023
|
+
/**
|
|
6024
|
+
* which comments survive: `"some"` (the default) the ones that carry something, `true` / `"all"` every one, `false` none, or the ones a pattern matches / a predicate accepts, over the comment's own text
|
|
6025
|
+
*/
|
|
6026
|
+
comments?: string | boolean | RegExp | ((comment: string) => boolean);
|
|
6027
|
+
|
|
6028
|
+
/**
|
|
6029
|
+
* write a family of longhands as the one shorthand that sets them
|
|
6030
|
+
*/
|
|
6031
|
+
mergeLonghands?: boolean;
|
|
6032
|
+
|
|
6033
|
+
/**
|
|
6034
|
+
* join rules that print the same block, at-rules that share a prelude, and a named `@layer` block a later sibling opens again
|
|
6035
|
+
*/
|
|
6036
|
+
mergeRules?: boolean;
|
|
6037
|
+
|
|
6038
|
+
/**
|
|
6039
|
+
* normalize a string's, `url()`'s, font family's and attribute value's quoting
|
|
6040
|
+
*/
|
|
6041
|
+
normalizeQuotes?: boolean;
|
|
6042
|
+
|
|
6043
|
+
/**
|
|
6044
|
+
* compute a call into the shorter call naming the same value (`calc()` and the math functions, transforms, gradients, easing functions, filters)
|
|
6045
|
+
*/
|
|
6046
|
+
reduceFunctions?: boolean;
|
|
6047
|
+
|
|
6048
|
+
/**
|
|
6049
|
+
* drop a rule or declaration nothing can read: an empty rule, and one an identical later one supersedes
|
|
6050
|
+
*/
|
|
6051
|
+
removeDeadRules?: boolean;
|
|
6052
|
+
|
|
6053
|
+
/**
|
|
6054
|
+
* write each color in the shortest spelling of the same value
|
|
6055
|
+
*/
|
|
6056
|
+
shortenColors?: boolean;
|
|
6057
|
+
|
|
6058
|
+
/**
|
|
6059
|
+
* write a media feature in its range spelling and collapse an `and` of two into the interval
|
|
6060
|
+
*/
|
|
6061
|
+
shortenMediaQueries?: boolean;
|
|
6062
|
+
|
|
6063
|
+
/**
|
|
6064
|
+
* write each number in its shortest equal spelling
|
|
6065
|
+
*/
|
|
6066
|
+
shortenNumbers?: boolean;
|
|
6067
|
+
|
|
6068
|
+
/**
|
|
6069
|
+
* rewrite a selector into a shorter equal one
|
|
6070
|
+
*/
|
|
6071
|
+
shortenSelectors?: boolean;
|
|
6072
|
+
|
|
6073
|
+
/**
|
|
6074
|
+
* write a value the shortest way its property's own grammar allows
|
|
6075
|
+
*/
|
|
6076
|
+
shortenValues?: boolean;
|
|
6077
|
+
}
|
|
6078
|
+
type DeclarationEstreeIndex =
|
|
6079
|
+
FunctionDeclaration | VariableDeclaration | ClassDeclaration;
|
|
6080
|
+
type DeclarationSyntax = NodeSyntax & {
|
|
6081
|
+
name: string;
|
|
6082
|
+
nameStart: number;
|
|
6083
|
+
nameEnd: number;
|
|
6084
|
+
value: ComponentValue[];
|
|
6085
|
+
important: boolean;
|
|
6086
|
+
};
|
|
6087
|
+
declare interface DecodedEntitiesWithMap {
|
|
6088
|
+
text: string;
|
|
6089
|
+
map?: number[];
|
|
6090
|
+
}
|
|
6091
|
+
declare interface DefaultHandlerOptions {
|
|
6092
|
+
progressBar?:
|
|
6093
|
+
| false
|
|
6094
|
+
| Required<{
|
|
6095
|
+
/**
|
|
6096
|
+
* Color used for the filled portion of the bar.
|
|
6097
|
+
*/
|
|
6098
|
+
color?: string;
|
|
6099
|
+
/**
|
|
6100
|
+
* Name shown before the progress bar.
|
|
6101
|
+
*/
|
|
6102
|
+
name?: string;
|
|
6103
|
+
/**
|
|
6104
|
+
* Width of the progress bar in characters. Default: 25.
|
|
6105
|
+
*/
|
|
6106
|
+
width?: number;
|
|
6107
|
+
}>;
|
|
6108
|
+
estimatedTime?: boolean;
|
|
6109
|
+
phaseTimings?: boolean;
|
|
6110
|
+
}
|
|
6111
|
+
|
|
6112
|
+
declare interface DeferredEmbeddedSource {
|
|
6113
|
+
source: string;
|
|
6114
|
+
build: (answer?: string) => string;
|
|
6115
|
+
type: string;
|
|
6116
|
+
hostType: string;
|
|
6117
|
+
as?: string;
|
|
6118
|
+
}
|
|
6119
|
+
type DefineConfigInput =
|
|
6120
|
+
| Configuration
|
|
6121
|
+
| MultiConfiguration
|
|
6122
|
+
| ((
|
|
6123
|
+
env: Record<string, any>,
|
|
6124
|
+
argv: Record<string, any>
|
|
6125
|
+
) => MaybePromise<Configuration | MultiConfiguration>)
|
|
6126
|
+
| ((
|
|
6127
|
+
env: Record<string, any>,
|
|
6128
|
+
argv: Record<string, any>
|
|
6129
|
+
) => MaybePromise<Configuration | MultiConfiguration>)[]
|
|
6130
|
+
| Promise<
|
|
6131
|
+
| Configuration
|
|
6132
|
+
| MultiConfiguration
|
|
6133
|
+
| ((
|
|
6134
|
+
env: Record<string, any>,
|
|
6135
|
+
argv: Record<string, any>
|
|
6136
|
+
) => MaybePromise<Configuration | MultiConfiguration>)
|
|
6137
|
+
| ((
|
|
6138
|
+
env: Record<string, any>,
|
|
6139
|
+
argv: Record<string, any>
|
|
6140
|
+
) => MaybePromise<Configuration | MultiConfiguration>)[]
|
|
6141
|
+
>;
|
|
6142
|
+
declare class DefinePlugin {
|
|
6143
|
+
/**
|
|
6144
|
+
* Create a new define plugin
|
|
6145
|
+
*/
|
|
6146
|
+
constructor(definitions: Definitions);
|
|
6147
|
+
definitions: Definitions;
|
|
6148
|
+
|
|
6149
|
+
/**
|
|
6150
|
+
* Applies the plugin by registering its hooks on the compiler.
|
|
6151
|
+
*/
|
|
6152
|
+
apply(compiler: Compiler): void;
|
|
6153
|
+
|
|
6154
|
+
/**
|
|
6155
|
+
* Returns runtime value.
|
|
6156
|
+
*/
|
|
6157
|
+
static runtimeValue(
|
|
6158
|
+
fn: (value: {
|
|
6159
|
+
module: NormalModule;
|
|
6160
|
+
key: string;
|
|
6161
|
+
readonly version: ValueCacheVersion;
|
|
6162
|
+
}) => CodeValuePrimitive,
|
|
6163
|
+
options?: true | string[] | RuntimeValueOptions
|
|
6164
|
+
): RuntimeValue;
|
|
6165
|
+
static getCompilationHooks: (compilation: Compilation) => {
|
|
6166
|
+
/**
|
|
6167
|
+
* @since 5.104.0
|
|
6168
|
+
*/
|
|
6169
|
+
definitions: SyncWaterfallHook<
|
|
6170
|
+
[Record<string, CodeValue>],
|
|
6171
|
+
Record<string, CodeValue>
|
|
6172
|
+
>;
|
|
6173
|
+
};
|
|
6174
|
+
static VALUE_DEP_MAIN: string;
|
|
6175
|
+
static VALUE_DEP_PREFIX: string;
|
|
6176
|
+
static getDeclaredKeys: (compilation: Compilation) => undefined | Set<string>;
|
|
6177
|
+
static getMergedDefinitionNode: (
|
|
6178
|
+
compilation: Compilation,
|
|
6179
|
+
key: string
|
|
6180
|
+
) => MergedDefinitionNode;
|
|
6181
|
+
static getRuntimeRequirements: (code: string) => undefined | string[];
|
|
6182
|
+
static markInternal: (plugin: DefinePlugin) => DefinePlugin;
|
|
6183
|
+
static stringifyMergedDefinition: (
|
|
6184
|
+
compilation: Compilation,
|
|
6185
|
+
parser: JavascriptParser,
|
|
6186
|
+
node: MergedDefinitionNode,
|
|
6187
|
+
key: string,
|
|
6188
|
+
objKeys?: null | Set<string>
|
|
6189
|
+
) => string;
|
|
6190
|
+
static toPropertyKey: (key: string) => string;
|
|
6191
|
+
}
|
|
6192
|
+
declare interface Definitions {
|
|
6193
|
+
[index: string]: CodeValue;
|
|
6194
|
+
}
|
|
6195
|
+
declare class DelegatedPlugin {
|
|
6196
|
+
/**
|
|
6197
|
+
* Creates an instance of DelegatedPlugin.
|
|
6198
|
+
*/
|
|
6199
|
+
constructor(options: Options);
|
|
6200
|
+
options: Options;
|
|
6201
|
+
|
|
6202
|
+
/**
|
|
6203
|
+
* Applies the plugin by registering its hooks on the compiler.
|
|
6204
|
+
*/
|
|
6205
|
+
apply(compiler: Compiler): void;
|
|
6206
|
+
}
|
|
6207
|
+
|
|
6208
|
+
/**
|
|
6209
|
+
* DependenciesBlock is the base class for all Module classes in webpack. It describes a
|
|
6210
|
+
* "block" of dependencies which are pointers to other DependenciesBlock instances. For example
|
|
5948
6211
|
* when a Module has a CommonJs require statement, the DependencyBlock for the CommonJs module
|
|
5949
6212
|
* would be added as a dependency to the Module. DependenciesBlock is inherited by two types of classes:
|
|
5950
6213
|
* Module subclasses and AsyncDependenciesBlock subclasses. The only difference between the two is that
|
|
@@ -5985,12 +6248,12 @@ declare abstract class DependenciesBlock {
|
|
|
5985
6248
|
/**
|
|
5986
6249
|
* Serializes this instance into the provided serializer context.
|
|
5987
6250
|
*/
|
|
5988
|
-
serialize(__0:
|
|
6251
|
+
serialize(__0: ObjectSerializerContextObjectMiddlewareObject_3): void;
|
|
5989
6252
|
|
|
5990
6253
|
/**
|
|
5991
6254
|
* Restores this instance from the provided deserializer context.
|
|
5992
6255
|
*/
|
|
5993
|
-
deserialize(__0:
|
|
6256
|
+
deserialize(__0: ObjectDeserializerContextObjectMiddlewareObject_2): void;
|
|
5994
6257
|
}
|
|
5995
6258
|
declare interface DependenciesBlockLike {
|
|
5996
6259
|
dependencies: Dependency[];
|
|
@@ -6010,6 +6273,13 @@ declare class Dependency {
|
|
|
6010
6273
|
*/
|
|
6011
6274
|
get category(): string;
|
|
6012
6275
|
|
|
6276
|
+
/**
|
|
6277
|
+
* Returns the source type this dependency reads from the module it references:
|
|
6278
|
+
* `javascript` for anything going through the module wrapper, `asset-url` for a
|
|
6279
|
+
* bare url embedded into non-javascript output (css, html, a manifest).
|
|
6280
|
+
*/
|
|
6281
|
+
get referencedSourceType(): string;
|
|
6282
|
+
|
|
6013
6283
|
/**
|
|
6014
6284
|
* Returns location.
|
|
6015
6285
|
*/
|
|
@@ -6140,17 +6410,17 @@ declare class Dependency {
|
|
|
6140
6410
|
/**
|
|
6141
6411
|
* Returns true if this dependency can be concatenated
|
|
6142
6412
|
*/
|
|
6143
|
-
canConcatenate(): boolean;
|
|
6413
|
+
canConcatenate(concatenateCommonJsModules: boolean): boolean;
|
|
6144
6414
|
|
|
6145
6415
|
/**
|
|
6146
6416
|
* Serializes this instance into the provided serializer context.
|
|
6147
6417
|
*/
|
|
6148
|
-
serialize(__0:
|
|
6418
|
+
serialize(__0: ObjectSerializerContextObjectMiddlewareObject_3): void;
|
|
6149
6419
|
|
|
6150
6420
|
/**
|
|
6151
6421
|
* Restores this instance from the provided deserializer context.
|
|
6152
6422
|
*/
|
|
6153
|
-
deserialize(__0:
|
|
6423
|
+
deserialize(__0: ObjectDeserializerContextObjectMiddlewareObject_2): void;
|
|
6154
6424
|
module: any;
|
|
6155
6425
|
get disconnect(): any;
|
|
6156
6426
|
|
|
@@ -6176,7 +6446,10 @@ declare class Dependency {
|
|
|
6176
6446
|
/**
|
|
6177
6447
|
* Returns true if the dependency can be concatenated (scope hoisting).
|
|
6178
6448
|
*/
|
|
6179
|
-
static canConcatenate(
|
|
6449
|
+
static canConcatenate(
|
|
6450
|
+
dependency: Dependency,
|
|
6451
|
+
concatenateCommonJsModules: boolean
|
|
6452
|
+
): boolean;
|
|
6180
6453
|
static TRANSITIVE: symbol;
|
|
6181
6454
|
static LAZY_UNTIL_LOCAL: "local";
|
|
6182
6455
|
static LAZY_UNTIL_ID: "id";
|
|
@@ -6751,6 +7024,7 @@ declare interface EffectData {
|
|
|
6751
7024
|
mimetype?: string;
|
|
6752
7025
|
dependency: string;
|
|
6753
7026
|
descriptionData?: JsonObjectTypes;
|
|
7027
|
+
descriptionRelativePath?: string;
|
|
6754
7028
|
compiler?: string;
|
|
6755
7029
|
issuer: string;
|
|
6756
7030
|
issuerLayer: string;
|
|
@@ -6766,9 +7040,6 @@ declare interface EffectUse {
|
|
|
6766
7040
|
}
|
|
6767
7041
|
type EffectUseType = "use" | "use-pre" | "use-post";
|
|
6768
7042
|
declare class ElectronTargetPlugin {
|
|
6769
|
-
/**
|
|
6770
|
-
* Creates an instance of ElectronTargetPlugin.
|
|
6771
|
-
*/
|
|
6772
7043
|
constructor(
|
|
6773
7044
|
context?: "preload" | "main" | "renderer",
|
|
6774
7045
|
type?:
|
|
@@ -6807,6 +7078,32 @@ declare class ElectronTargetPlugin {
|
|
|
6807
7078
|
*/
|
|
6808
7079
|
apply(compiler: Compiler): void;
|
|
6809
7080
|
}
|
|
7081
|
+
declare interface EmbeddedSourceInfo {
|
|
7082
|
+
/**
|
|
7083
|
+
* the embedded source's type, e.g. `"css"` / `"html"`
|
|
7084
|
+
*/
|
|
7085
|
+
type: string;
|
|
7086
|
+
|
|
7087
|
+
/**
|
|
7088
|
+
* the type of the source it is embedded in, e.g. `"javascript"`
|
|
7089
|
+
*/
|
|
7090
|
+
hostType: string;
|
|
7091
|
+
|
|
7092
|
+
/**
|
|
7093
|
+
* the module being generated
|
|
7094
|
+
*/
|
|
7095
|
+
module: Module;
|
|
7096
|
+
|
|
7097
|
+
/**
|
|
7098
|
+
* 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
|
|
7099
|
+
*/
|
|
7100
|
+
as?: string;
|
|
7101
|
+
}
|
|
7102
|
+
declare interface EmbeddedSourceResult {
|
|
7103
|
+
code?: string;
|
|
7104
|
+
warnings?: (string | Error)[];
|
|
7105
|
+
errors?: (string | Error)[];
|
|
7106
|
+
}
|
|
6810
7107
|
|
|
6811
7108
|
/**
|
|
6812
7109
|
* No generator options are supported for this module type.
|
|
@@ -6984,9 +7281,9 @@ declare interface EntryDescription {
|
|
|
6984
7281
|
filename?: string | TemplatePathFn<PathDataChunk>;
|
|
6985
7282
|
|
|
6986
7283
|
/**
|
|
6987
|
-
* Generate an HTML file for this entrypoint with its JS and CSS output chunks injected.
|
|
7284
|
+
* 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
7285
|
*/
|
|
6989
|
-
html?: boolean;
|
|
7286
|
+
html?: boolean | OutputHtmlOptions;
|
|
6990
7287
|
|
|
6991
7288
|
/**
|
|
6992
7289
|
* Module(s) that are loaded upon startup.
|
|
@@ -7054,9 +7351,9 @@ declare interface EntryDescriptionNormalized {
|
|
|
7054
7351
|
filename?: string | TemplatePathFn<PathDataChunk>;
|
|
7055
7352
|
|
|
7056
7353
|
/**
|
|
7057
|
-
* Generate an HTML file for this entrypoint with its JS and CSS output chunks injected.
|
|
7354
|
+
* 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
7355
|
*/
|
|
7059
|
-
html?: boolean;
|
|
7356
|
+
html?: boolean | OutputHtmlOptions;
|
|
7060
7357
|
|
|
7061
7358
|
/**
|
|
7062
7359
|
* Module(s) that are loaded upon startup. The last one is exported.
|
|
@@ -7244,6 +7541,13 @@ declare interface Environment {
|
|
|
7244
7541
|
*/
|
|
7245
7542
|
const?: boolean;
|
|
7246
7543
|
|
|
7544
|
+
/**
|
|
7545
|
+
* The environment supports deferred module evaluation ('import defer * as ns from "..."', 'import.defer("...")').
|
|
7546
|
+
* @since 5.110.0
|
|
7547
|
+
* @experimental
|
|
7548
|
+
*/
|
|
7549
|
+
deferImport?: boolean;
|
|
7550
|
+
|
|
7247
7551
|
/**
|
|
7248
7552
|
* The environment supports destructuring ('{ a, b } = obj').
|
|
7249
7553
|
*/
|
|
@@ -7331,6 +7635,13 @@ declare interface Environment {
|
|
|
7331
7635
|
*/
|
|
7332
7636
|
optionalChaining?: boolean;
|
|
7333
7637
|
|
|
7638
|
+
/**
|
|
7639
|
+
* The environment supports source phase imports ('import source m from "..."', 'import.source("...")').
|
|
7640
|
+
* @since 5.110.0
|
|
7641
|
+
* @experimental
|
|
7642
|
+
*/
|
|
7643
|
+
sourceImport?: boolean;
|
|
7644
|
+
|
|
7334
7645
|
/**
|
|
7335
7646
|
* The environment supports spread and rest in array/object literals and calls ('{ ...obj }', 'fn(...args)').
|
|
7336
7647
|
*/
|
|
@@ -7978,7 +8289,7 @@ declare abstract class ExportsInfo {
|
|
|
7978
8289
|
/**
|
|
7979
8290
|
* Gets read only export info.
|
|
7980
8291
|
*/
|
|
7981
|
-
getReadOnlyExportInfo(name: string):
|
|
8292
|
+
getReadOnlyExportInfo(name: string): any;
|
|
7982
8293
|
|
|
7983
8294
|
/**
|
|
7984
8295
|
* Gets read only export info recursive.
|
|
@@ -8218,7 +8529,8 @@ type ExternalItem =
|
|
|
8218
8529
|
| string
|
|
8219
8530
|
| boolean
|
|
8220
8531
|
| string[]
|
|
8221
|
-
|
|
|
8532
|
+
| ExternalItemValueObject
|
|
8533
|
+
| ExternalItemValueWithOptions
|
|
8222
8534
|
) => void
|
|
8223
8535
|
) => void)
|
|
8224
8536
|
| ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>);
|
|
@@ -8231,7 +8543,8 @@ type ExternalItemFunction =
|
|
|
8231
8543
|
| string
|
|
8232
8544
|
| boolean
|
|
8233
8545
|
| string[]
|
|
8234
|
-
|
|
|
8546
|
+
| ExternalItemValueObject
|
|
8547
|
+
| ExternalItemValueWithOptions
|
|
8235
8548
|
) => void
|
|
8236
8549
|
) => void)
|
|
8237
8550
|
| ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>);
|
|
@@ -8272,6 +8585,11 @@ declare interface ExternalItemFunctionData {
|
|
|
8272
8585
|
* the request as written by the user in the require/import expression/statement
|
|
8273
8586
|
*/
|
|
8274
8587
|
request: string;
|
|
8588
|
+
|
|
8589
|
+
/**
|
|
8590
|
+
* 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
|
|
8591
|
+
*/
|
|
8592
|
+
originalRequest: string;
|
|
8275
8593
|
}
|
|
8276
8594
|
|
|
8277
8595
|
/**
|
|
@@ -8296,7 +8614,10 @@ type ExternalItemValue =
|
|
|
8296
8614
|
| string
|
|
8297
8615
|
| boolean
|
|
8298
8616
|
| string[]
|
|
8299
|
-
|
|
|
8617
|
+
| ExternalItemValueObject
|
|
8618
|
+
| ExternalItemValueWithOptions;
|
|
8619
|
+
type ExternalItemValueObject = ExternalItemValueObjectKnown &
|
|
8620
|
+
ExternalItemValueObjectUnknown;
|
|
8300
8621
|
|
|
8301
8622
|
/**
|
|
8302
8623
|
* The target of the external with a type, optionally with an 'interop' hint describing how its exports interoperate with ES module imports.
|
|
@@ -8315,6 +8636,25 @@ declare interface ExternalItemValueObjectKnown {
|
|
|
8315
8636
|
declare interface ExternalItemValueObjectUnknown {
|
|
8316
8637
|
[index: string]: string | string[];
|
|
8317
8638
|
}
|
|
8639
|
+
type ExternalItemValueTarget =
|
|
8640
|
+
string | boolean | string[] | ExternalItemValueObject;
|
|
8641
|
+
|
|
8642
|
+
/**
|
|
8643
|
+
* The target of the external together with options describing how webpack should treat it.
|
|
8644
|
+
* @since 5.110.0
|
|
8645
|
+
*/
|
|
8646
|
+
declare interface ExternalItemValueWithOptions {
|
|
8647
|
+
/**
|
|
8648
|
+
* The target of the external.
|
|
8649
|
+
*/
|
|
8650
|
+
external: ExternalItemValueTarget;
|
|
8651
|
+
|
|
8652
|
+
/**
|
|
8653
|
+
* 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.
|
|
8654
|
+
* @since 5.110.0
|
|
8655
|
+
*/
|
|
8656
|
+
sideEffects?: boolean;
|
|
8657
|
+
}
|
|
8318
8658
|
declare class ExternalModule extends Module {
|
|
8319
8659
|
/**
|
|
8320
8660
|
* Creates an instance of ExternalModule.
|
|
@@ -8325,7 +8665,8 @@ declare class ExternalModule extends Module {
|
|
|
8325
8665
|
userRequest: string,
|
|
8326
8666
|
dependencyMeta?:
|
|
8327
8667
|
ImportDependencyMeta | CssImportDependencyMeta | AssetDependencyMeta,
|
|
8328
|
-
interop?: "default" | "esModule"
|
|
8668
|
+
interop?: "default" | "esModule",
|
|
8669
|
+
sideEffects?: boolean
|
|
8329
8670
|
);
|
|
8330
8671
|
request: ExternalModuleRequest;
|
|
8331
8672
|
externalType: ExternalsType;
|
|
@@ -8333,6 +8674,7 @@ declare class ExternalModule extends Module {
|
|
|
8333
8674
|
dependencyMeta?:
|
|
8334
8675
|
ImportDependencyMeta | CssImportDependencyMeta | AssetDependencyMeta;
|
|
8335
8676
|
interop?: "default" | "esModule";
|
|
8677
|
+
sideEffects?: boolean;
|
|
8336
8678
|
|
|
8337
8679
|
/**
|
|
8338
8680
|
* restore unsafe cache data
|
|
@@ -8341,6 +8683,7 @@ declare class ExternalModule extends Module {
|
|
|
8341
8683
|
unsafeCacheData: UnsafeCacheData,
|
|
8342
8684
|
normalModuleFactory: NormalModuleFactory
|
|
8343
8685
|
): void;
|
|
8686
|
+
canBeWrappedInConcatenation(): boolean;
|
|
8344
8687
|
static getCompilationHooks: (compilation: Compilation) => {
|
|
8345
8688
|
/**
|
|
8346
8689
|
* @since 5.106.0
|
|
@@ -8364,6 +8707,16 @@ type ExternalModuleBuildInfo = KnownBuildInfo &
|
|
|
8364
8707
|
KnownExternalModuleBuildInfo;
|
|
8365
8708
|
declare interface ExternalModuleInfo {
|
|
8366
8709
|
type: "external";
|
|
8710
|
+
|
|
8711
|
+
/**
|
|
8712
|
+
* 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
|
|
8713
|
+
*/
|
|
8714
|
+
wrapped: boolean;
|
|
8715
|
+
|
|
8716
|
+
/**
|
|
8717
|
+
* a wrapped module reached by an eager import edge, so its accessor is called at its own slot in evaluation order
|
|
8718
|
+
*/
|
|
8719
|
+
eager: boolean;
|
|
8367
8720
|
module: Module;
|
|
8368
8721
|
runtimeCondition?: string | boolean | SortableSet<string>;
|
|
8369
8722
|
nonDeferAccess: boolean;
|
|
@@ -8374,6 +8727,11 @@ declare interface ExternalModuleInfo {
|
|
|
8374
8727
|
*/
|
|
8375
8728
|
name?: string;
|
|
8376
8729
|
|
|
8730
|
+
/**
|
|
8731
|
+
* lazy module accessor
|
|
8732
|
+
*/
|
|
8733
|
+
namespaceFnName?: string;
|
|
8734
|
+
|
|
8377
8735
|
/**
|
|
8378
8736
|
* decoupled namespace object that keeps original export names when the exports are mangled
|
|
8379
8737
|
*/
|
|
@@ -8454,7 +8812,8 @@ type Externals =
|
|
|
8454
8812
|
| string
|
|
8455
8813
|
| boolean
|
|
8456
8814
|
| string[]
|
|
8457
|
-
|
|
|
8815
|
+
| ExternalItemValueObject
|
|
8816
|
+
| ExternalItemValueWithOptions
|
|
8458
8817
|
) => void
|
|
8459
8818
|
) => void)
|
|
8460
8819
|
| ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>)
|
|
@@ -8572,9 +8931,21 @@ declare interface ExternalsPresets {
|
|
|
8572
8931
|
node?: boolean;
|
|
8573
8932
|
|
|
8574
8933
|
/**
|
|
8575
|
-
* Treat
|
|
8934
|
+
* 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).
|
|
8576
8935
|
*/
|
|
8577
|
-
|
|
8936
|
+
nodeModules?:
|
|
8937
|
+
| boolean
|
|
8938
|
+
| {
|
|
8939
|
+
/**
|
|
8940
|
+
* Keep these requests bundled instead of externalizing them.
|
|
8941
|
+
*/
|
|
8942
|
+
allowlist?: (string | RegExp | ((request: string) => boolean))[];
|
|
8943
|
+
};
|
|
8944
|
+
|
|
8945
|
+
/**
|
|
8946
|
+
* Treat NW.js legacy nw.gui module as external and load it via require() when used.
|
|
8947
|
+
*/
|
|
8948
|
+
nwjs?: boolean;
|
|
8578
8949
|
|
|
8579
8950
|
/**
|
|
8580
8951
|
* Treat references to 'http(s)://...' and 'std:...' as external and load them via import when used (Note that this changes execution order as externals are executed before any other code in the chunk).
|
|
@@ -9000,6 +9371,12 @@ declare interface Flags {
|
|
|
9000
9371
|
declare interface FullHashChunkModuleHashes {
|
|
9001
9372
|
[index: string]: string;
|
|
9002
9373
|
}
|
|
9374
|
+
type FunctionNode = NodeSyntax & {
|
|
9375
|
+
name: string;
|
|
9376
|
+
nameStart: number;
|
|
9377
|
+
nameEnd: number;
|
|
9378
|
+
value: ComponentValue[];
|
|
9379
|
+
};
|
|
9003
9380
|
declare interface GenerateContext {
|
|
9004
9381
|
/**
|
|
9005
9382
|
* mapping from dependencies to templates
|
|
@@ -9486,7 +9863,10 @@ declare class HarmonyImportDependency extends ModuleDependency {
|
|
|
9486
9863
|
/**
|
|
9487
9864
|
* Returns true if the dependency can be concatenated (scope hoisting).
|
|
9488
9865
|
*/
|
|
9489
|
-
static canConcatenate(
|
|
9866
|
+
static canConcatenate(
|
|
9867
|
+
dependency: Dependency,
|
|
9868
|
+
concatenateCommonJsModules: boolean
|
|
9869
|
+
): boolean;
|
|
9490
9870
|
static TRANSITIVE: symbol;
|
|
9491
9871
|
static LAZY_UNTIL_LOCAL: "local";
|
|
9492
9872
|
static LAZY_UNTIL_ID: "id";
|
|
@@ -9619,7 +9999,7 @@ type Head<T extends ReadonlyArray<any>> = T extends readonly [infer H, ...any[]]
|
|
|
9619
9999
|
? H
|
|
9620
10000
|
: T extends readonly []
|
|
9621
10001
|
? any
|
|
9622
|
-
: T extends (infer E)[]
|
|
10002
|
+
: T extends readonly (infer E)[]
|
|
9623
10003
|
? E
|
|
9624
10004
|
: never;
|
|
9625
10005
|
|
|
@@ -9651,6 +10031,46 @@ declare interface HotModuleReplacementPluginLoaderContext {
|
|
|
9651
10031
|
declare class HotUpdateChunk extends Chunk {
|
|
9652
10032
|
constructor();
|
|
9653
10033
|
}
|
|
10034
|
+
declare interface HtmlAstSkip {
|
|
10035
|
+
/**
|
|
10036
|
+
* 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.
|
|
10037
|
+
*/
|
|
10038
|
+
text?: boolean;
|
|
10039
|
+
|
|
10040
|
+
/**
|
|
10041
|
+
* drop comment nodes entirely. Not for consumers that read comments (e.g. webpack magic comments).
|
|
10042
|
+
*/
|
|
10043
|
+
comments?: boolean;
|
|
10044
|
+
|
|
10045
|
+
/**
|
|
10046
|
+
* drop the doctype node; quirks-mode detection is unaffected.
|
|
10047
|
+
*/
|
|
10048
|
+
doctype?: boolean;
|
|
10049
|
+
}
|
|
10050
|
+
declare interface HtmlAttribute {
|
|
10051
|
+
/**
|
|
10052
|
+
* lowercased (and, in foreign content, adjusted) attribute name
|
|
10053
|
+
*/
|
|
10054
|
+
name: string;
|
|
10055
|
+
value: string;
|
|
10056
|
+
|
|
10057
|
+
/**
|
|
10058
|
+
* name used by the html5lib tree serializer (foreign-namespaced)
|
|
10059
|
+
*/
|
|
10060
|
+
serializedName?: string;
|
|
10061
|
+
|
|
10062
|
+
/**
|
|
10063
|
+
* source offset, or -1 on adoption-agency clones
|
|
10064
|
+
*/
|
|
10065
|
+
nameStart: number;
|
|
10066
|
+
nameEnd: number;
|
|
10067
|
+
|
|
10068
|
+
/**
|
|
10069
|
+
* source offset, or -1 when valueless / on clones
|
|
10070
|
+
*/
|
|
10071
|
+
valueStart: number;
|
|
10072
|
+
valueEnd: number;
|
|
10073
|
+
}
|
|
9654
10074
|
declare interface HtmlEmittedContext {
|
|
9655
10075
|
outputName: string;
|
|
9656
10076
|
}
|
|
@@ -9836,6 +10256,17 @@ declare interface HtmlMutableTag {
|
|
|
9836
10256
|
*/
|
|
9837
10257
|
remove?: boolean;
|
|
9838
10258
|
}
|
|
10259
|
+
declare interface HtmlParseOptions {
|
|
10260
|
+
/**
|
|
10261
|
+
* context element name for fragment parsing (e.g. `td`, `svg path`); omit for a full document
|
|
10262
|
+
*/
|
|
10263
|
+
fragmentContext?: string;
|
|
10264
|
+
|
|
10265
|
+
/**
|
|
10266
|
+
* node kinds to omit from the AST (see `HtmlAstSkip`); omit to build the full tree
|
|
10267
|
+
*/
|
|
10268
|
+
skip?: HtmlAstSkip;
|
|
10269
|
+
}
|
|
9839
10270
|
declare abstract class HtmlParser extends ParserClass {
|
|
9840
10271
|
magicCommentContext: ContextImport;
|
|
9841
10272
|
template?: (source: string, context: HtmlTemplateContext) => string;
|
|
@@ -9913,6 +10344,126 @@ declare interface HtmlParserOptions {
|
|
|
9913
10344
|
*/
|
|
9914
10345
|
urlHints?: UrlHintRule[];
|
|
9915
10346
|
}
|
|
10347
|
+
type HtmlPrintOptions = Pick<
|
|
10348
|
+
CssProcessOptions,
|
|
10349
|
+
"environment" | "convertLengthUnits" | "rewriteCustomProperties"
|
|
10350
|
+
> & {
|
|
10351
|
+
cssTransforms?: CssTransformOptions;
|
|
10352
|
+
transforms?: HtmlTransformOptions;
|
|
10353
|
+
collapseWhitespace?: boolean | "all" | "conservative" | "smart";
|
|
10354
|
+
mergeStyles?: boolean;
|
|
10355
|
+
removeEmptyAttributes?: boolean;
|
|
10356
|
+
removeEmptyElements?: boolean;
|
|
10357
|
+
removeRedundantAttributes?: boolean | "all" | "smart";
|
|
10358
|
+
sortAttributes?: boolean;
|
|
10359
|
+
sortTokenLists?: boolean;
|
|
10360
|
+
removeImpliedTags?: boolean | "all" | "smart";
|
|
10361
|
+
renderEmbeddedSource?: (
|
|
10362
|
+
source: string,
|
|
10363
|
+
info: { type: string; hostType: string; as?: string }
|
|
10364
|
+
) => undefined | string;
|
|
10365
|
+
deferEmbeddedSource?: DeferredEmbeddedSource[];
|
|
10366
|
+
deferSrcdoc?: boolean;
|
|
10367
|
+
};
|
|
10368
|
+
declare interface HtmlProcessOptions {
|
|
10369
|
+
/**
|
|
10370
|
+
* context element tag name for fragment parsing (see `parseHtml`); the HTML analog of the CSS parser's `as` parse-mode option
|
|
10371
|
+
*/
|
|
10372
|
+
fragmentContext?: string;
|
|
10373
|
+
|
|
10374
|
+
/**
|
|
10375
|
+
* node kinds to omit from the AST for speed/memory (see `HtmlAstSkip`)
|
|
10376
|
+
*/
|
|
10377
|
+
skip?: HtmlAstSkip;
|
|
10378
|
+
|
|
10379
|
+
/**
|
|
10380
|
+
* 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 `""`)
|
|
10381
|
+
*/
|
|
10382
|
+
minimize?: boolean;
|
|
10383
|
+
|
|
10384
|
+
/**
|
|
10385
|
+
* 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
|
|
10386
|
+
*/
|
|
10387
|
+
environment?: CssEnvironment;
|
|
10388
|
+
|
|
10389
|
+
/**
|
|
10390
|
+
* CSS's too, handed over with `environment` (see `HtmlPrintOptions`)
|
|
10391
|
+
*/
|
|
10392
|
+
convertLengthUnits?: boolean;
|
|
10393
|
+
|
|
10394
|
+
/**
|
|
10395
|
+
* CSS's too, handed over with `environment` (see `HtmlPrintOptions`)
|
|
10396
|
+
*/
|
|
10397
|
+
rewriteCustomProperties?: boolean;
|
|
10398
|
+
|
|
10399
|
+
/**
|
|
10400
|
+
* CSS's per-transform switches too, handed over with `environment` (see `HtmlPrintOptions`)
|
|
10401
|
+
*/
|
|
10402
|
+
cssTransforms?: CssTransformOptions;
|
|
10403
|
+
|
|
10404
|
+
/**
|
|
10405
|
+
* which of the meaning-preserving rewrites the minifying print makes; each is on unless it is `false`
|
|
10406
|
+
*/
|
|
10407
|
+
transforms?: HtmlTransformOptions;
|
|
10408
|
+
|
|
10409
|
+
/**
|
|
10410
|
+
* 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)
|
|
10411
|
+
*/
|
|
10412
|
+
collapseWhitespace?: boolean | "all" | "conservative" | "smart";
|
|
10413
|
+
|
|
10414
|
+
/**
|
|
10415
|
+
* drop an attribute whose empty value leaves it in the state its absence gives (default false)
|
|
10416
|
+
*/
|
|
10417
|
+
removeEmptyAttributes?: boolean;
|
|
10418
|
+
|
|
10419
|
+
/**
|
|
10420
|
+
* drop an element with no children and no attributes, unless its bare form is meaningful (default false)
|
|
10421
|
+
*/
|
|
10422
|
+
removeEmptyElements?: boolean;
|
|
10423
|
+
|
|
10424
|
+
/**
|
|
10425
|
+
* print a run of adjacent `<style>` elements as one sheet, which removes elements (default false)
|
|
10426
|
+
*/
|
|
10427
|
+
mergeStyles?: boolean;
|
|
10428
|
+
|
|
10429
|
+
/**
|
|
10430
|
+
* print an element's attributes commonest name first, ties by name, which nothing in HTML reads (default false)
|
|
10431
|
+
*/
|
|
10432
|
+
sortAttributes?: boolean;
|
|
10433
|
+
|
|
10434
|
+
/**
|
|
10435
|
+
* print every token list the DOM reads as a set (`class`, `rel`, `part`, …) in token order (default false)
|
|
10436
|
+
*/
|
|
10437
|
+
sortTokenLists?: boolean;
|
|
10438
|
+
|
|
10439
|
+
/**
|
|
10440
|
+
* 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)
|
|
10441
|
+
*/
|
|
10442
|
+
removeRedundantAttributes?: boolean | "all" | "smart";
|
|
10443
|
+
|
|
10444
|
+
/**
|
|
10445
|
+
* 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"`)
|
|
10446
|
+
*/
|
|
10447
|
+
removeImpliedTags?: boolean | "all" | "smart";
|
|
10448
|
+
|
|
10449
|
+
/**
|
|
10450
|
+
* 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
|
|
10451
|
+
*/
|
|
10452
|
+
deferSrcdoc?: boolean;
|
|
10453
|
+
|
|
10454
|
+
/**
|
|
10455
|
+
* 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`
|
|
10456
|
+
*/
|
|
10457
|
+
deferEmbeddedSource?: DeferredEmbeddedSource[];
|
|
10458
|
+
|
|
10459
|
+
/**
|
|
10460
|
+
* 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
|
|
10461
|
+
*/
|
|
10462
|
+
renderEmbeddedSource?: (
|
|
10463
|
+
source: string,
|
|
10464
|
+
info: { type: string; hostType: string; as?: string }
|
|
10465
|
+
) => undefined | string;
|
|
10466
|
+
}
|
|
9916
10467
|
declare interface HtmlResourceHintHtmlEntryDependency {
|
|
9917
10468
|
/**
|
|
9918
10469
|
* hint relationship
|
|
@@ -10089,9 +10640,122 @@ declare interface HtmlTemplateContext {
|
|
|
10089
10640
|
*/
|
|
10090
10641
|
emitError: (error: string | Error) => void;
|
|
10091
10642
|
}
|
|
10643
|
+
declare interface HtmlTokenCallbacks {
|
|
10644
|
+
openTag?: (
|
|
10645
|
+
input: string,
|
|
10646
|
+
start: number,
|
|
10647
|
+
end: number,
|
|
10648
|
+
nameStart: number,
|
|
10649
|
+
nameEnd: number,
|
|
10650
|
+
selfClosing: boolean
|
|
10651
|
+
) => number;
|
|
10652
|
+
closeTag?: (
|
|
10653
|
+
input: string,
|
|
10654
|
+
start: number,
|
|
10655
|
+
end: number,
|
|
10656
|
+
nameStart: number,
|
|
10657
|
+
nameEnd: number
|
|
10658
|
+
) => number;
|
|
10659
|
+
text?: (input: string, start: number, end: number) => number;
|
|
10660
|
+
attribute?: (
|
|
10661
|
+
input: string,
|
|
10662
|
+
nameStart: number,
|
|
10663
|
+
nameEnd: number,
|
|
10664
|
+
valueStart: number,
|
|
10665
|
+
valueEnd: number,
|
|
10666
|
+
quoteType: number
|
|
10667
|
+
) => number;
|
|
10668
|
+
comment?: (
|
|
10669
|
+
input: string,
|
|
10670
|
+
start: number,
|
|
10671
|
+
end: number,
|
|
10672
|
+
dataStart: number,
|
|
10673
|
+
dataEnd: number
|
|
10674
|
+
) => number;
|
|
10675
|
+
doctype?: (
|
|
10676
|
+
input: string,
|
|
10677
|
+
start: number,
|
|
10678
|
+
end: number,
|
|
10679
|
+
nameStart: number,
|
|
10680
|
+
nameEnd: number,
|
|
10681
|
+
publicStart: number,
|
|
10682
|
+
publicEnd: number,
|
|
10683
|
+
systemStart: number,
|
|
10684
|
+
systemEnd: number,
|
|
10685
|
+
forceQuirks: boolean
|
|
10686
|
+
) => number;
|
|
10687
|
+
parseError?: (
|
|
10688
|
+
input: string,
|
|
10689
|
+
code: string,
|
|
10690
|
+
start: number,
|
|
10691
|
+
end: number,
|
|
10692
|
+
severity: ParseErrorSeverity
|
|
10693
|
+
) => void;
|
|
10694
|
+
|
|
10695
|
+
/**
|
|
10696
|
+
* returns true when the adjusted current node is in a foreign (SVG/MathML) namespace, which is where a `<![CDATA[` opens a CDATA section
|
|
10697
|
+
*/
|
|
10698
|
+
isForeign?: () => boolean;
|
|
10699
|
+
|
|
10700
|
+
/**
|
|
10701
|
+
* 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
|
|
10702
|
+
*/
|
|
10703
|
+
vetoesContentMode?: (name: string) => boolean;
|
|
10704
|
+
|
|
10705
|
+
/**
|
|
10706
|
+
* context element tag name for fragment parsing; seeds the initial content mode
|
|
10707
|
+
*/
|
|
10708
|
+
fragmentContext?: string;
|
|
10709
|
+
}
|
|
10092
10710
|
declare interface HtmlTransformHtmlContext {
|
|
10093
10711
|
outputName: string;
|
|
10094
10712
|
}
|
|
10713
|
+
declare interface HtmlTransformOptions {
|
|
10714
|
+
/**
|
|
10715
|
+
* write a boolean attribute spelled with its own name (`disabled="disabled"`) as the bare name
|
|
10716
|
+
*/
|
|
10717
|
+
collapseBooleanAttributes?: boolean;
|
|
10718
|
+
|
|
10719
|
+
/**
|
|
10720
|
+
* 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
|
|
10721
|
+
*/
|
|
10722
|
+
comments?: string | boolean | RegExp | ((comment: string) => boolean);
|
|
10723
|
+
|
|
10724
|
+
/**
|
|
10725
|
+
* strip the whitespace between a JSON `<script>`'s tokens
|
|
10726
|
+
*/
|
|
10727
|
+
minifyJson?: boolean;
|
|
10728
|
+
|
|
10729
|
+
/**
|
|
10730
|
+
* run the CSS minifier over an inline `<style>` and every `style=""`
|
|
10731
|
+
*/
|
|
10732
|
+
minifyStyles?: boolean;
|
|
10733
|
+
|
|
10734
|
+
/**
|
|
10735
|
+
* drop or re-pick an attribute value's quotes
|
|
10736
|
+
*/
|
|
10737
|
+
normalizeAttributeQuotes?: boolean;
|
|
10738
|
+
|
|
10739
|
+
/**
|
|
10740
|
+
* fold an enumerated value to the keyword it names
|
|
10741
|
+
*/
|
|
10742
|
+
normalizeEnumeratedAttributes?: boolean;
|
|
10743
|
+
|
|
10744
|
+
/**
|
|
10745
|
+
* normalize a space-, comma- or descriptor-separated list value (`class`, `rel`, `srcset`, `sizes`, the viewport `content`)
|
|
10746
|
+
*/
|
|
10747
|
+
normalizeListAttributes?: boolean;
|
|
10748
|
+
|
|
10749
|
+
/**
|
|
10750
|
+
* write an integer attribute the one way its rules read it
|
|
10751
|
+
*/
|
|
10752
|
+
normalizeNumericAttributes?: boolean;
|
|
10753
|
+
|
|
10754
|
+
/**
|
|
10755
|
+
* leave out an optional tag other than the `<html>` / `<head>` / `<body>` shell, which is `removeImpliedTags`
|
|
10756
|
+
*/
|
|
10757
|
+
removeOptionalTags?: boolean;
|
|
10758
|
+
}
|
|
10095
10759
|
declare interface HtmlTransformTagsContext {
|
|
10096
10760
|
outputName: string;
|
|
10097
10761
|
html: string;
|
|
@@ -10707,12 +11371,12 @@ declare class InitFragment<GenerateContext> {
|
|
|
10707
11371
|
/**
|
|
10708
11372
|
* Serializes this instance into the provided serializer context.
|
|
10709
11373
|
*/
|
|
10710
|
-
serialize(context:
|
|
11374
|
+
serialize(context: ObjectSerializerContextObjectMiddlewareObject_3): void;
|
|
10711
11375
|
|
|
10712
11376
|
/**
|
|
10713
11377
|
* Restores this instance from the provided deserializer context.
|
|
10714
11378
|
*/
|
|
10715
|
-
deserialize(context:
|
|
11379
|
+
deserialize(context: ObjectDeserializerContextObjectMiddlewareObject_2): void;
|
|
10716
11380
|
|
|
10717
11381
|
/**
|
|
10718
11382
|
* Adds the provided source to the init fragment.
|
|
@@ -10740,8 +11404,8 @@ declare abstract class InlinedValue {
|
|
|
10740
11404
|
value?: null | string | number | boolean;
|
|
10741
11405
|
renderLiteral(): string;
|
|
10742
11406
|
render(comment: string): string;
|
|
10743
|
-
serialize(__0:
|
|
10744
|
-
deserialize(__0:
|
|
11407
|
+
serialize(__0: ObjectSerializerContextObjectMiddlewareObject_3): void;
|
|
11408
|
+
deserialize(__0: ObjectDeserializerContextObjectMiddlewareObject_2): void;
|
|
10745
11409
|
}
|
|
10746
11410
|
type InlinedValueKind = "string" | "number" | "boolean" | "undefined" | "null";
|
|
10747
11411
|
declare interface InnerGraphUtils {
|
|
@@ -11014,6 +11678,15 @@ declare class JavascriptModulesPlugin {
|
|
|
11014
11678
|
[Module, Partial<RenderBootstrapContext>],
|
|
11015
11679
|
string | void
|
|
11016
11680
|
>;
|
|
11681
|
+
/**
|
|
11682
|
+
* Offers a module's rendered export-definition call to a consumer that can place
|
|
11683
|
+
* it better — a library whose entry exports the same bindings natively takes it
|
|
11684
|
+
* over and emits it only where the module is wrapped. Return true to take it.
|
|
11685
|
+
*/
|
|
11686
|
+
onDemandExportsGeneration: SyncBailHook<
|
|
11687
|
+
[Module, RuntimeSpec, string, boolean],
|
|
11688
|
+
boolean | void
|
|
11689
|
+
>;
|
|
11017
11690
|
/**
|
|
11018
11691
|
* @since 5.22.0
|
|
11019
11692
|
*/
|
|
@@ -11094,6 +11767,15 @@ declare class JavascriptModulesPlugin {
|
|
|
11094
11767
|
[Module, Partial<RenderBootstrapContext>],
|
|
11095
11768
|
string | void
|
|
11096
11769
|
>;
|
|
11770
|
+
/**
|
|
11771
|
+
* Offers a module's rendered export-definition call to a consumer that can place
|
|
11772
|
+
* it better — a library whose entry exports the same bindings natively takes it
|
|
11773
|
+
* over and emits it only where the module is wrapped. Return true to take it.
|
|
11774
|
+
*/
|
|
11775
|
+
onDemandExportsGeneration: SyncBailHook<
|
|
11776
|
+
[Module, RuntimeSpec, string, boolean],
|
|
11777
|
+
boolean | void
|
|
11778
|
+
>;
|
|
11097
11779
|
/**
|
|
11098
11780
|
* @since 5.22.0
|
|
11099
11781
|
*/
|
|
@@ -11174,6 +11856,15 @@ declare class JavascriptModulesPlugin {
|
|
|
11174
11856
|
[Module, Partial<RenderBootstrapContext>],
|
|
11175
11857
|
string | void
|
|
11176
11858
|
>;
|
|
11859
|
+
/**
|
|
11860
|
+
* Offers a module's rendered export-definition call to a consumer that can place
|
|
11861
|
+
* it better — a library whose entry exports the same bindings natively takes it
|
|
11862
|
+
* over and emits it only where the module is wrapped. Return true to take it.
|
|
11863
|
+
*/
|
|
11864
|
+
onDemandExportsGeneration: SyncBailHook<
|
|
11865
|
+
[Module, RuntimeSpec, string, boolean],
|
|
11866
|
+
boolean | void
|
|
11867
|
+
>;
|
|
11177
11868
|
/**
|
|
11178
11869
|
* @since 5.22.0
|
|
11179
11870
|
*/
|
|
@@ -11256,6 +11947,15 @@ declare class JavascriptModulesPlugin {
|
|
|
11256
11947
|
[Module, Partial<RenderBootstrapContext>],
|
|
11257
11948
|
string | void
|
|
11258
11949
|
>;
|
|
11950
|
+
/**
|
|
11951
|
+
* Offers a module's rendered export-definition call to a consumer that can place
|
|
11952
|
+
* it better — a library whose entry exports the same bindings natively takes it
|
|
11953
|
+
* over and emits it only where the module is wrapped. Return true to take it.
|
|
11954
|
+
*/
|
|
11955
|
+
onDemandExportsGeneration: SyncBailHook<
|
|
11956
|
+
[Module, RuntimeSpec, string, boolean],
|
|
11957
|
+
boolean | void
|
|
11958
|
+
>;
|
|
11259
11959
|
/**
|
|
11260
11960
|
* @since 5.22.0
|
|
11261
11961
|
*/
|
|
@@ -11336,6 +12036,15 @@ declare class JavascriptModulesPlugin {
|
|
|
11336
12036
|
[Module, Partial<RenderBootstrapContext>],
|
|
11337
12037
|
string | void
|
|
11338
12038
|
>;
|
|
12039
|
+
/**
|
|
12040
|
+
* Offers a module's rendered export-definition call to a consumer that can place
|
|
12041
|
+
* it better — a library whose entry exports the same bindings natively takes it
|
|
12042
|
+
* over and emits it only where the module is wrapped. Return true to take it.
|
|
12043
|
+
*/
|
|
12044
|
+
onDemandExportsGeneration: SyncBailHook<
|
|
12045
|
+
[Module, RuntimeSpec, string, boolean],
|
|
12046
|
+
boolean | void
|
|
12047
|
+
>;
|
|
11339
12048
|
/**
|
|
11340
12049
|
* @since 5.22.0
|
|
11341
12050
|
*/
|
|
@@ -11416,6 +12125,15 @@ declare class JavascriptModulesPlugin {
|
|
|
11416
12125
|
[Module, Partial<RenderBootstrapContext>],
|
|
11417
12126
|
string | void
|
|
11418
12127
|
>;
|
|
12128
|
+
/**
|
|
12129
|
+
* Offers a module's rendered export-definition call to a consumer that can place
|
|
12130
|
+
* it better — a library whose entry exports the same bindings natively takes it
|
|
12131
|
+
* over and emits it only where the module is wrapped. Return true to take it.
|
|
12132
|
+
*/
|
|
12133
|
+
onDemandExportsGeneration: SyncBailHook<
|
|
12134
|
+
[Module, RuntimeSpec, string, boolean],
|
|
12135
|
+
boolean | void
|
|
12136
|
+
>;
|
|
11419
12137
|
/**
|
|
11420
12138
|
* @since 5.22.0
|
|
11421
12139
|
*/
|
|
@@ -11495,6 +12213,15 @@ declare class JavascriptModulesPlugin {
|
|
|
11495
12213
|
[Module, Partial<RenderBootstrapContext>],
|
|
11496
12214
|
string | void
|
|
11497
12215
|
>;
|
|
12216
|
+
/**
|
|
12217
|
+
* Offers a module's rendered export-definition call to a consumer that can place
|
|
12218
|
+
* it better — a library whose entry exports the same bindings natively takes it
|
|
12219
|
+
* over and emits it only where the module is wrapped. Return true to take it.
|
|
12220
|
+
*/
|
|
12221
|
+
onDemandExportsGeneration: SyncBailHook<
|
|
12222
|
+
[Module, RuntimeSpec, string, boolean],
|
|
12223
|
+
boolean | void
|
|
12224
|
+
>;
|
|
11498
12225
|
/**
|
|
11499
12226
|
* @since 5.22.0
|
|
11500
12227
|
*/
|
|
@@ -11527,7 +12254,10 @@ declare class JavascriptParser extends ParserClass {
|
|
|
11527
12254
|
constructor(
|
|
11528
12255
|
sourceType?: "module" | "auto" | "script",
|
|
11529
12256
|
options?: {
|
|
11530
|
-
parse?: (
|
|
12257
|
+
parse?: (
|
|
12258
|
+
code: string,
|
|
12259
|
+
options: ParseOptionsJavascriptParser
|
|
12260
|
+
) => ParseResult;
|
|
11531
12261
|
typescript?: boolean;
|
|
11532
12262
|
importPhases?: boolean;
|
|
11533
12263
|
strictModeViolations?: false | "error" | "warn";
|
|
@@ -11879,7 +12609,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
11879
12609
|
| ExportAllDeclaration
|
|
11880
12610
|
| ExportDefaultDeclaration
|
|
11881
12611
|
),
|
|
11882
|
-
|
|
12612
|
+
DeclarationEstreeIndex
|
|
11883
12613
|
],
|
|
11884
12614
|
boolean | void
|
|
11885
12615
|
>;
|
|
@@ -12007,6 +12737,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12007
12737
|
| ThisExpression
|
|
12008
12738
|
| UpdateExpression
|
|
12009
12739
|
| YieldExpression
|
|
12740
|
+
| VariableDeclaration
|
|
12010
12741
|
| ForOfStatement
|
|
12011
12742
|
],
|
|
12012
12743
|
boolean | void
|
|
@@ -12073,7 +12804,10 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12073
12804
|
}>;
|
|
12074
12805
|
sourceType: "module" | "auto" | "script";
|
|
12075
12806
|
options: {
|
|
12076
|
-
parse?: (
|
|
12807
|
+
parse?: (
|
|
12808
|
+
code: string,
|
|
12809
|
+
options: ParseOptionsJavascriptParser
|
|
12810
|
+
) => ParseResult;
|
|
12077
12811
|
typescript?: boolean;
|
|
12078
12812
|
importPhases?: boolean;
|
|
12079
12813
|
strictModeViolations?: false | "error" | "warn";
|
|
@@ -12654,7 +13388,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12654
13388
|
* Processes the provided declaration.
|
|
12655
13389
|
*/
|
|
12656
13390
|
enterDeclaration(
|
|
12657
|
-
declaration:
|
|
13391
|
+
declaration: DeclarationEstreeIndex,
|
|
12658
13392
|
onIdent: (ident: string, identifier: Identifier) => void
|
|
12659
13393
|
): void;
|
|
12660
13394
|
|
|
@@ -13379,6 +14113,18 @@ declare class JavascriptParser extends ParserClass {
|
|
|
13379
14113
|
*/
|
|
13380
14114
|
getComments(range: [number, number]): CommentJavascriptParser[];
|
|
13381
14115
|
|
|
14116
|
+
/**
|
|
14117
|
+
* Reports whether `identifier` may occur as a word in the source text of
|
|
14118
|
+
* `range`. A conservative pre-filter for expensive AST scans: `false` means
|
|
14119
|
+
* it certainly does not occur, while a match inside a comment or a string
|
|
14120
|
+
* yields `true`. Also `true` when no source text is available (preparsed
|
|
14121
|
+
* AST), so callers must stay correct without the filter.
|
|
14122
|
+
*/
|
|
14123
|
+
sourceMayContainIdentifier(
|
|
14124
|
+
range: [number, number],
|
|
14125
|
+
identifier: string
|
|
14126
|
+
): boolean;
|
|
14127
|
+
|
|
13382
14128
|
/**
|
|
13383
14129
|
* Checks whether this javascript parser is asi position.
|
|
13384
14130
|
*/
|
|
@@ -13671,9 +14417,9 @@ declare class JavascriptParser extends ParserClass {
|
|
|
13671
14417
|
static extend(
|
|
13672
14418
|
...plugins: ((BaseParser: typeof ParserImport) => typeof ParserImport)[]
|
|
13673
14419
|
): typeof JavascriptParser;
|
|
13674
|
-
static ALLOWED_MEMBER_TYPES_ALL:
|
|
13675
|
-
static ALLOWED_MEMBER_TYPES_CALL_EXPRESSION:
|
|
13676
|
-
static ALLOWED_MEMBER_TYPES_EXPRESSION:
|
|
14420
|
+
static ALLOWED_MEMBER_TYPES_ALL: number;
|
|
14421
|
+
static ALLOWED_MEMBER_TYPES_CALL_EXPRESSION: number;
|
|
14422
|
+
static ALLOWED_MEMBER_TYPES_EXPRESSION: number;
|
|
13677
14423
|
static VariableInfo: typeof VariableInfo;
|
|
13678
14424
|
static VariableInfoFlags: Readonly<{
|
|
13679
14425
|
Evaluated: 0;
|
|
@@ -13825,7 +14571,7 @@ declare interface JavascriptParserOptions {
|
|
|
13825
14571
|
/**
|
|
13826
14572
|
* Function to parser source code.
|
|
13827
14573
|
*/
|
|
13828
|
-
parse?: (code: string, options:
|
|
14574
|
+
parse?: (code: string, options: ParseOptionsJavascriptParser) => ParseResult;
|
|
13829
14575
|
|
|
13830
14576
|
/**
|
|
13831
14577
|
* Mark the listed top-level function names for pure-function-based tree shaking.
|
|
@@ -14201,7 +14947,22 @@ declare interface KnownBuildInfo {
|
|
|
14201
14947
|
isCircular?: boolean;
|
|
14202
14948
|
|
|
14203
14949
|
/**
|
|
14204
|
-
*
|
|
14950
|
+
* true when the module calls `eval` directly
|
|
14951
|
+
*/
|
|
14952
|
+
usesEval?: boolean;
|
|
14953
|
+
|
|
14954
|
+
/**
|
|
14955
|
+
* how many `#__PURE__` annotations sit where the parser does not read them
|
|
14956
|
+
*/
|
|
14957
|
+
ineffectivePureAnnotations?: number;
|
|
14958
|
+
|
|
14959
|
+
/**
|
|
14960
|
+
* how many times the module reads `this` at its top level
|
|
14961
|
+
*/
|
|
14962
|
+
topLevelThis?: number;
|
|
14963
|
+
|
|
14964
|
+
/**
|
|
14965
|
+
* module uses top-level `for await…of` or `await using`, which can't be lowered to a generator
|
|
14205
14966
|
*/
|
|
14206
14967
|
usesTopLevelAwaitForOf?: boolean;
|
|
14207
14968
|
}
|
|
@@ -14220,6 +14981,11 @@ declare interface KnownBuildMeta {
|
|
|
14220
14981
|
* using in ModuleLibraryPlugin
|
|
14221
14982
|
*/
|
|
14222
14983
|
exportsSourceByRuntime?: Map<string, string>;
|
|
14984
|
+
|
|
14985
|
+
/**
|
|
14986
|
+
* export definitions `ModuleLibraryPlugin` took over, re-emitted only where the module is wrapped
|
|
14987
|
+
*/
|
|
14988
|
+
exportsBindingSourceByRuntime?: Map<string, string>;
|
|
14223
14989
|
}
|
|
14224
14990
|
declare interface KnownConcatenatedModuleBuildInfo {
|
|
14225
14991
|
fileDependencies?: LazySet<string>;
|
|
@@ -14320,6 +15086,11 @@ declare interface KnownJavascriptModuleBuildInfo {
|
|
|
14320
15086
|
*/
|
|
14321
15087
|
needCreateRequire?: boolean;
|
|
14322
15088
|
|
|
15089
|
+
/**
|
|
15090
|
+
* module reassigns `__webpack_public_path__` at runtime, using in APIPlugin
|
|
15091
|
+
*/
|
|
15092
|
+
usingPublicPathOverride?: boolean;
|
|
15093
|
+
|
|
14323
15094
|
/**
|
|
14324
15095
|
* names of locally declared functions known to be free of side effects
|
|
14325
15096
|
*/
|
|
@@ -14329,6 +15100,11 @@ declare interface KnownJavascriptModuleBuildInfo {
|
|
|
14329
15100
|
* whether this module was parsed with `optimization.inlineExports` enabled (gates inlining of its exports)
|
|
14330
15101
|
*/
|
|
14331
15102
|
inlineExports?: boolean;
|
|
15103
|
+
|
|
15104
|
+
/**
|
|
15105
|
+
* module scope holds a `using`/`await using` declaration, so its resources must be disposed when the module finished evaluating
|
|
15106
|
+
*/
|
|
15107
|
+
usesTopLevelUsingDeclaration?: boolean;
|
|
14332
15108
|
}
|
|
14333
15109
|
declare interface KnownJavascriptModuleBuildMeta {
|
|
14334
15110
|
strictHarmonyModule?: boolean;
|
|
@@ -14525,6 +15301,8 @@ declare interface KnownStatsCompilation {
|
|
|
14525
15301
|
errorsCount?: number;
|
|
14526
15302
|
warnings?: StatsError[];
|
|
14527
15303
|
warningsCount?: number;
|
|
15304
|
+
hints?: StatsError[];
|
|
15305
|
+
hintsCount?: number;
|
|
14528
15306
|
children?: StatsCompilation[];
|
|
14529
15307
|
logging?: Record<string, StatsLogging>;
|
|
14530
15308
|
filteredWarningDetailsCount?: number;
|
|
@@ -14854,8 +15632,8 @@ declare interface LazyCompilationDefaultBackendOptions {
|
|
|
14854
15632
|
* Specifies how to create the server handling the EventSource requests.
|
|
14855
15633
|
*/
|
|
14856
15634
|
server?:
|
|
14857
|
-
| ServerOptionsImportHttps
|
|
14858
|
-
| ServerOptionsImportHttp
|
|
15635
|
+
| ServerOptionsImportHttps
|
|
15636
|
+
| ServerOptionsImportHttp
|
|
14859
15637
|
| (() => ServerLazyCompilationBackend);
|
|
14860
15638
|
}
|
|
14861
15639
|
|
|
@@ -14978,7 +15756,7 @@ declare class LazySet<T> {
|
|
|
14978
15756
|
* serialization stream.
|
|
14979
15757
|
*/
|
|
14980
15758
|
serialize(
|
|
14981
|
-
__0:
|
|
15759
|
+
__0: ObjectSerializerContextObjectMiddlewareObject_3<(number | T)[]>
|
|
14982
15760
|
): void;
|
|
14983
15761
|
|
|
14984
15762
|
/**
|
|
@@ -14990,7 +15768,7 @@ declare class LazySet<T> {
|
|
|
14990
15768
|
* Restores a `LazySet` from serialized item data.
|
|
14991
15769
|
*/
|
|
14992
15770
|
static deserialize<T>(
|
|
14993
|
-
__0:
|
|
15771
|
+
__0: ObjectDeserializerContextObjectMiddlewareObject_2<(number | T)[]>
|
|
14994
15772
|
): LazySet<T>;
|
|
14995
15773
|
}
|
|
14996
15774
|
declare interface LibIdentOptions {
|
|
@@ -15129,6 +15907,11 @@ declare interface LibraryOptions {
|
|
|
15129
15907
|
*/
|
|
15130
15908
|
type: string;
|
|
15131
15909
|
|
|
15910
|
+
/**
|
|
15911
|
+
* 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.
|
|
15912
|
+
*/
|
|
15913
|
+
umdAmdContainer?: string;
|
|
15914
|
+
|
|
15132
15915
|
/**
|
|
15133
15916
|
* If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.
|
|
15134
15917
|
*/
|
|
@@ -15487,6 +16270,16 @@ declare class LoaderTargetPlugin {
|
|
|
15487
16270
|
*/
|
|
15488
16271
|
apply(compiler: Compiler): void;
|
|
15489
16272
|
}
|
|
16273
|
+
declare abstract class LocConverter {
|
|
16274
|
+
line: number;
|
|
16275
|
+
column: number;
|
|
16276
|
+
pos: number;
|
|
16277
|
+
|
|
16278
|
+
/**
|
|
16279
|
+
* Returns location converter.
|
|
16280
|
+
*/
|
|
16281
|
+
get(pos: number): LocConverter;
|
|
16282
|
+
}
|
|
15490
16283
|
declare abstract class LocalModule {
|
|
15491
16284
|
name: string;
|
|
15492
16285
|
idx: number;
|
|
@@ -15501,12 +16294,12 @@ declare abstract class LocalModule {
|
|
|
15501
16294
|
/**
|
|
15502
16295
|
* Serializes this instance into the provided serializer context.
|
|
15503
16296
|
*/
|
|
15504
|
-
serialize(context:
|
|
16297
|
+
serialize(context: ObjectSerializerContextObjectMiddlewareObject_1): void;
|
|
15505
16298
|
|
|
15506
16299
|
/**
|
|
15507
16300
|
* Restores this instance from the provided deserializer context.
|
|
15508
16301
|
*/
|
|
15509
|
-
deserialize(context:
|
|
16302
|
+
deserialize(context: ObjectDeserializerContextObjectMiddlewareObject_3): void;
|
|
15510
16303
|
}
|
|
15511
16304
|
declare interface LogEntry {
|
|
15512
16305
|
type:
|
|
@@ -15679,6 +16472,9 @@ declare abstract class MainTemplate {
|
|
|
15679
16472
|
get requireFn(): "__webpack_require__";
|
|
15680
16473
|
get outputOptions(): Output;
|
|
15681
16474
|
}
|
|
16475
|
+
declare interface MakeCacheableResult<T> {
|
|
16476
|
+
(value: string, cache?: object): T;
|
|
16477
|
+
}
|
|
15682
16478
|
declare interface MakeDirectoryOptions {
|
|
15683
16479
|
recursive?: boolean;
|
|
15684
16480
|
mode?: string | number;
|
|
@@ -16411,6 +17207,8 @@ declare class ModuleConcatenationPlugin {
|
|
|
16411
17207
|
* Applies the plugin by registering its hooks on the compiler.
|
|
16412
17208
|
*/
|
|
16413
17209
|
apply(compiler: Compiler): void;
|
|
17210
|
+
static BAILOUT_PREFIX: string;
|
|
17211
|
+
static REJECTED_PREFIX: string;
|
|
16414
17212
|
}
|
|
16415
17213
|
declare class ModuleDependency extends Dependency {
|
|
16416
17214
|
/**
|
|
@@ -16446,7 +17244,10 @@ declare class ModuleDependency extends Dependency {
|
|
|
16446
17244
|
/**
|
|
16447
17245
|
* Returns true if the dependency can be concatenated (scope hoisting).
|
|
16448
17246
|
*/
|
|
16449
|
-
static canConcatenate(
|
|
17247
|
+
static canConcatenate(
|
|
17248
|
+
dependency: Dependency,
|
|
17249
|
+
concatenateCommonJsModules: boolean
|
|
17250
|
+
): boolean;
|
|
16450
17251
|
static TRANSITIVE: symbol;
|
|
16451
17252
|
static LAZY_UNTIL_LOCAL: "local";
|
|
16452
17253
|
static LAZY_UNTIL_ID: "id";
|
|
@@ -17372,6 +18173,11 @@ declare abstract class ModuleProfile {
|
|
|
17372
18173
|
*/
|
|
17373
18174
|
mergeInto(realProfile: ModuleProfile): void;
|
|
17374
18175
|
}
|
|
18176
|
+
declare interface ModuleReferenceMatch {
|
|
18177
|
+
start: number;
|
|
18178
|
+
end: number;
|
|
18179
|
+
name: string;
|
|
18180
|
+
}
|
|
17375
18181
|
declare interface ModuleReferenceOptions {
|
|
17376
18182
|
/**
|
|
17377
18183
|
* the properties or exports selected from the referenced module
|
|
@@ -17398,6 +18204,11 @@ declare interface ModuleReferenceOptions {
|
|
|
17398
18204
|
*/
|
|
17399
18205
|
mangleableNamespace: boolean;
|
|
17400
18206
|
|
|
18207
|
+
/**
|
|
18208
|
+
* 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)
|
|
18209
|
+
*/
|
|
18210
|
+
moduleExportsAccess: boolean;
|
|
18211
|
+
|
|
17401
18212
|
/**
|
|
17402
18213
|
* if the position is ASI safe or unknown
|
|
17403
18214
|
*/
|
|
@@ -17577,10 +18388,11 @@ declare class MultiCompiler {
|
|
|
17577
18388
|
options: MultiCompilerOptions
|
|
17578
18389
|
);
|
|
17579
18390
|
hooks: Readonly<{
|
|
17580
|
-
done: SyncHook<[MultiStats]>;
|
|
18391
|
+
done: SyncHook<[MultiStats, Compiler[]]>;
|
|
17581
18392
|
invalid: MultiHook<SyncHook<[null | string, number]>>;
|
|
17582
18393
|
run: MultiHook<AsyncSeriesHook<[Compiler]>>;
|
|
17583
18394
|
watchClose: SyncHook<[]>;
|
|
18395
|
+
shutdown: MultiHook<AsyncSeriesHook<[]>>;
|
|
17584
18396
|
watchRun: MultiHook<AsyncSeriesHook<[Compiler]>>;
|
|
17585
18397
|
infrastructureLog: MultiHook<
|
|
17586
18398
|
SyncBailHook<[string, string, undefined | any[]], true | void>
|
|
@@ -17733,6 +18545,42 @@ declare abstract class MultiWatching {
|
|
|
17733
18545
|
*/
|
|
17734
18546
|
close(callback: (err: null | Error, result?: void) => void): void;
|
|
17735
18547
|
}
|
|
18548
|
+
declare interface MutableToken {
|
|
18549
|
+
/**
|
|
18550
|
+
* one of the `TT_*` constants
|
|
18551
|
+
*/
|
|
18552
|
+
type: number;
|
|
18553
|
+
|
|
18554
|
+
/**
|
|
18555
|
+
* byte offset of the token's first code point
|
|
18556
|
+
*/
|
|
18557
|
+
start: number;
|
|
18558
|
+
|
|
18559
|
+
/**
|
|
18560
|
+
* byte offset just past the token's last code point
|
|
18561
|
+
*/
|
|
18562
|
+
end: number;
|
|
18563
|
+
|
|
18564
|
+
/**
|
|
18565
|
+
* hash tokens: starts an ident sequence
|
|
18566
|
+
*/
|
|
18567
|
+
isId: boolean;
|
|
18568
|
+
|
|
18569
|
+
/**
|
|
18570
|
+
* url tokens: first content code point
|
|
18571
|
+
*/
|
|
18572
|
+
contentStart: number;
|
|
18573
|
+
|
|
18574
|
+
/**
|
|
18575
|
+
* url tokens: just past the last content code point
|
|
18576
|
+
*/
|
|
18577
|
+
contentEnd: number;
|
|
18578
|
+
|
|
18579
|
+
/**
|
|
18580
|
+
* dimension tokens: first unit-ident code point
|
|
18581
|
+
*/
|
|
18582
|
+
unitStart: number;
|
|
18583
|
+
}
|
|
17736
18584
|
declare class NamedChunkIdsPlugin {
|
|
17737
18585
|
/**
|
|
17738
18586
|
* Creates an instance of NamedChunkIdsPlugin.
|
|
@@ -17911,6 +18759,9 @@ declare interface NodeOptions {
|
|
|
17911
18759
|
*/
|
|
17912
18760
|
global?: boolean | "warn";
|
|
17913
18761
|
}
|
|
18762
|
+
declare interface NodePrinter<TPath, TNode, TPrintOptions = object> {
|
|
18763
|
+
(path: TPath, writer: PrintContext<TPath, TNode, TPrintOptions>): string;
|
|
18764
|
+
}
|
|
17914
18765
|
declare class NodeSourcePlugin {
|
|
17915
18766
|
constructor();
|
|
17916
18767
|
|
|
@@ -17919,24 +18770,63 @@ declare class NodeSourcePlugin {
|
|
|
17919
18770
|
*/
|
|
17920
18771
|
apply(compiler: Compiler): void;
|
|
17921
18772
|
}
|
|
17922
|
-
declare
|
|
18773
|
+
declare interface NodeSyntax {
|
|
17923
18774
|
/**
|
|
17924
|
-
*
|
|
18775
|
+
* node-type discriminator
|
|
17925
18776
|
*/
|
|
17926
|
-
|
|
17927
|
-
type: ExternalsType;
|
|
18777
|
+
type: number;
|
|
17928
18778
|
|
|
17929
18779
|
/**
|
|
17930
|
-
*
|
|
18780
|
+
* byte offset of the node's first code point
|
|
17931
18781
|
*/
|
|
17932
|
-
|
|
17933
|
-
|
|
17934
|
-
}
|
|
17935
|
-
declare class NodeTemplatePlugin {
|
|
18782
|
+
start: number;
|
|
18783
|
+
|
|
17936
18784
|
/**
|
|
17937
|
-
*
|
|
18785
|
+
* byte offset just past the node's last code point
|
|
17938
18786
|
*/
|
|
17939
|
-
|
|
18787
|
+
end: number;
|
|
18788
|
+
|
|
18789
|
+
/**
|
|
18790
|
+
* the `[start, end)` byte range
|
|
18791
|
+
*/
|
|
18792
|
+
range: [number, number];
|
|
18793
|
+
|
|
18794
|
+
/**
|
|
18795
|
+
* source location (1-based line, 0-based column)
|
|
18796
|
+
*/
|
|
18797
|
+
loc: {
|
|
18798
|
+
start: { line: number; column: number };
|
|
18799
|
+
end: { line: number; column: number };
|
|
18800
|
+
};
|
|
18801
|
+
|
|
18802
|
+
/**
|
|
18803
|
+
* source slice for this node
|
|
18804
|
+
*/
|
|
18805
|
+
toString: () => string;
|
|
18806
|
+
|
|
18807
|
+
/**
|
|
18808
|
+
* name with CSS escapes resolved (name-bearing nodes only)
|
|
18809
|
+
*/
|
|
18810
|
+
unescapedName: string;
|
|
18811
|
+
}
|
|
18812
|
+
declare class NodeTargetPlugin {
|
|
18813
|
+
/**
|
|
18814
|
+
* Creates an instance of NodeTargetPlugin.
|
|
18815
|
+
*/
|
|
18816
|
+
constructor(type?: ExternalsType);
|
|
18817
|
+
type: ExternalsType;
|
|
18818
|
+
|
|
18819
|
+
/**
|
|
18820
|
+
* Applies the plugin by registering its hooks on the compiler.
|
|
18821
|
+
*/
|
|
18822
|
+
apply(compiler: Compiler): void;
|
|
18823
|
+
static builtins: (string | RegExp)[];
|
|
18824
|
+
}
|
|
18825
|
+
declare class NodeTemplatePlugin {
|
|
18826
|
+
/**
|
|
18827
|
+
* Creates an instance of NodeTemplatePlugin.
|
|
18828
|
+
*/
|
|
18829
|
+
constructor(options?: NodeTemplatePluginOptions);
|
|
17940
18830
|
|
|
17941
18831
|
/**
|
|
17942
18832
|
* Applies the plugin by registering its hooks on the compiler.
|
|
@@ -17952,7 +18842,7 @@ declare interface NodeTemplatePluginOptions {
|
|
|
17952
18842
|
type NodeWebpackOptions = false | NodeOptions;
|
|
17953
18843
|
type NonNullable<T> = T & {};
|
|
17954
18844
|
declare class NormalModule extends Module {
|
|
17955
|
-
constructor(__0:
|
|
18845
|
+
constructor(__0: NormalModuleCreateData<string>);
|
|
17956
18846
|
request: string;
|
|
17957
18847
|
userRequest: string;
|
|
17958
18848
|
rawRequest: string;
|
|
@@ -18058,7 +18948,7 @@ declare class NormalModule extends Module {
|
|
|
18058
18948
|
needBuild: AsyncSeriesBailHook<[NormalModule, NeedBuildContext], boolean>;
|
|
18059
18949
|
};
|
|
18060
18950
|
static deserialize(
|
|
18061
|
-
context:
|
|
18951
|
+
context: ObjectDeserializerContextObjectMiddlewareObject_2
|
|
18062
18952
|
): NormalModule;
|
|
18063
18953
|
|
|
18064
18954
|
/**
|
|
@@ -18070,9 +18960,7 @@ declare class NormalModule extends Module {
|
|
|
18070
18960
|
type NormalModuleBuildInfo = KnownBuildInfo &
|
|
18071
18961
|
Record<string, any> &
|
|
18072
18962
|
KnownNormalModuleBuildInfo;
|
|
18073
|
-
declare interface
|
|
18074
|
-
T extends string = string
|
|
18075
|
-
> {
|
|
18963
|
+
declare interface NormalModuleCreateData<T extends string = string> {
|
|
18076
18964
|
/**
|
|
18077
18965
|
* an optional layer in which the module is
|
|
18078
18966
|
*/
|
|
@@ -18135,8 +19023,8 @@ declare interface NormalModuleCreateDataNormalModuleObject_1<
|
|
|
18135
19023
|
Record<"asset/resource", AssetParser> &
|
|
18136
19024
|
Record<"asset/source", AssetSourceParser> &
|
|
18137
19025
|
Record<"asset/bytes", AssetBytesParser> &
|
|
18138
|
-
Record<"webassembly/async",
|
|
18139
|
-
Record<"webassembly/sync",
|
|
19026
|
+
Record<"webassembly/async", WebAssemblyParserAsyncWebAssemblyParser> &
|
|
19027
|
+
Record<"webassembly/sync", WebAssemblyParserClass> &
|
|
18140
19028
|
Record<"css", CssParser> &
|
|
18141
19029
|
Record<"css/auto", CssParser> &
|
|
18142
19030
|
Record<"css/module", CssParser> &
|
|
@@ -18234,6 +19122,10 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
|
18234
19122
|
afterResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
|
|
18235
19123
|
createModule: AsyncSeriesBailHook<[CreateData, ResolveData], void | Module>;
|
|
18236
19124
|
module: SyncWaterfallHook<[Module, CreateData, ResolveData], Module>;
|
|
19125
|
+
/**
|
|
19126
|
+
* @since 5.110.0
|
|
19127
|
+
*/
|
|
19128
|
+
prepareModuleType: HookMap<AsyncSeriesHook<[]>>;
|
|
18237
19129
|
createParser: TypedHookMap<
|
|
18238
19130
|
Record<
|
|
18239
19131
|
"javascript/auto",
|
|
@@ -18267,11 +19159,14 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
|
18267
19159
|
> &
|
|
18268
19160
|
Record<
|
|
18269
19161
|
"webassembly/async",
|
|
18270
|
-
SyncBailHook<
|
|
19162
|
+
SyncBailHook<
|
|
19163
|
+
[EmptyParserOptions],
|
|
19164
|
+
WebAssemblyParserAsyncWebAssemblyParser
|
|
19165
|
+
>
|
|
18271
19166
|
> &
|
|
18272
19167
|
Record<
|
|
18273
19168
|
"webassembly/sync",
|
|
18274
|
-
SyncBailHook<[EmptyParserOptions],
|
|
19169
|
+
SyncBailHook<[EmptyParserOptions], WebAssemblyParserClass>
|
|
18275
19170
|
> &
|
|
18276
19171
|
Record<"css", SyncBailHook<[CssParserOptions], CssParser>> &
|
|
18277
19172
|
Record<"css/auto", SyncBailHook<[CssModuleParserOptions], CssParser>> &
|
|
@@ -18319,11 +19214,14 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
|
18319
19214
|
> &
|
|
18320
19215
|
Record<
|
|
18321
19216
|
"webassembly/async",
|
|
18322
|
-
SyncBailHook<
|
|
19217
|
+
SyncBailHook<
|
|
19218
|
+
[WebAssemblyParserAsyncWebAssemblyParser, EmptyParserOptions],
|
|
19219
|
+
void
|
|
19220
|
+
>
|
|
18323
19221
|
> &
|
|
18324
19222
|
Record<
|
|
18325
19223
|
"webassembly/sync",
|
|
18326
|
-
SyncBailHook<[
|
|
19224
|
+
SyncBailHook<[WebAssemblyParserClass, EmptyParserOptions], void>
|
|
18327
19225
|
> &
|
|
18328
19226
|
Record<"css", SyncBailHook<[CssParser, CssParserOptions], void>> &
|
|
18329
19227
|
Record<
|
|
@@ -18518,8 +19416,8 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
|
18518
19416
|
Record<"asset/resource", AssetParser> &
|
|
18519
19417
|
Record<"asset/source", AssetSourceParser> &
|
|
18520
19418
|
Record<"asset/bytes", AssetBytesParser> &
|
|
18521
|
-
Record<"webassembly/async",
|
|
18522
|
-
Record<"webassembly/sync",
|
|
19419
|
+
Record<"webassembly/async", WebAssemblyParserAsyncWebAssemblyParser> &
|
|
19420
|
+
Record<"webassembly/sync", WebAssemblyParserClass> &
|
|
18523
19421
|
Record<"css", CssParser> &
|
|
18524
19422
|
Record<"css/auto", CssParser> &
|
|
18525
19423
|
Record<"css/module", CssParser> &
|
|
@@ -18542,8 +19440,8 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
|
18542
19440
|
Record<"asset/resource", AssetParser> &
|
|
18543
19441
|
Record<"asset/source", AssetSourceParser> &
|
|
18544
19442
|
Record<"asset/bytes", AssetBytesParser> &
|
|
18545
|
-
Record<"webassembly/async",
|
|
18546
|
-
Record<"webassembly/sync",
|
|
19443
|
+
Record<"webassembly/async", WebAssemblyParserAsyncWebAssemblyParser> &
|
|
19444
|
+
Record<"webassembly/sync", WebAssemblyParserClass> &
|
|
18547
19445
|
Record<"css", CssParser> &
|
|
18548
19446
|
Record<"css/auto", CssParser> &
|
|
18549
19447
|
Record<"css/module", CssParser> &
|
|
@@ -18813,7 +19711,10 @@ declare class NullDependency extends Dependency {
|
|
|
18813
19711
|
/**
|
|
18814
19712
|
* Returns true if the dependency can be concatenated (scope hoisting).
|
|
18815
19713
|
*/
|
|
18816
|
-
static canConcatenate(
|
|
19714
|
+
static canConcatenate(
|
|
19715
|
+
dependency: Dependency,
|
|
19716
|
+
concatenateCommonJsModules: boolean
|
|
19717
|
+
): boolean;
|
|
18817
19718
|
static TRANSITIVE: symbol;
|
|
18818
19719
|
static LAZY_UNTIL_LOCAL: "local";
|
|
18819
19720
|
static LAZY_UNTIL_ID: "id";
|
|
@@ -18826,18 +19727,9 @@ declare class NullDependencyTemplate extends DependencyTemplate {
|
|
|
18826
19727
|
declare interface ObjectConfiguration {
|
|
18827
19728
|
[index: string]: any;
|
|
18828
19729
|
}
|
|
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 {
|
|
19730
|
+
declare namespace ObjectDeserializerContextObjectMiddlewareObject_1 {
|
|
18839
19731
|
export let read: () => any;
|
|
18840
|
-
export let rest:
|
|
19732
|
+
export let rest: ObjectDeserializerContextObjectMiddlewareObject_2<
|
|
18841
19733
|
ReadonlyArray<any>
|
|
18842
19734
|
>;
|
|
18843
19735
|
export let setCircularReference: (value: ReferenceableItem) => void;
|
|
@@ -18846,20 +19738,20 @@ declare namespace ObjectDeserializerContextObjectMiddlewareObject_2 {
|
|
|
18846
19738
|
/**
|
|
18847
19739
|
* Updates set size using the provided set.
|
|
18848
19740
|
*/
|
|
18849
|
-
declare interface
|
|
19741
|
+
declare interface ObjectDeserializerContextObjectMiddlewareObject_2<
|
|
18850
19742
|
T extends ReadonlyArray<any> = ReadonlyArray<any>
|
|
18851
19743
|
> {
|
|
18852
19744
|
read: () => Head<T>;
|
|
18853
|
-
rest:
|
|
19745
|
+
rest: ObjectDeserializerContextObjectMiddlewareObject_2<Tail<T>>;
|
|
18854
19746
|
setCircularReference: (value: ReferenceableItem) => void;
|
|
18855
19747
|
}
|
|
18856
19748
|
|
|
18857
19749
|
/**
|
|
18858
19750
|
* Updates set size using the provided set.
|
|
18859
19751
|
*/
|
|
18860
|
-
declare interface
|
|
18861
|
-
read: () =>
|
|
18862
|
-
rest:
|
|
19752
|
+
declare interface ObjectDeserializerContextObjectMiddlewareObject_3 {
|
|
19753
|
+
read: () => string;
|
|
19754
|
+
rest: ObjectDeserializerContextObjectMiddlewareObject_2<[number, boolean]>;
|
|
18863
19755
|
setCircularReference: (value: ReferenceableItem) => void;
|
|
18864
19756
|
}
|
|
18865
19757
|
|
|
@@ -18908,10 +19800,10 @@ declare interface ObjectEncodingOptionsTypes {
|
|
|
18908
19800
|
declare interface ObjectSerializer {
|
|
18909
19801
|
serialize: (
|
|
18910
19802
|
value: any,
|
|
18911
|
-
context:
|
|
19803
|
+
context: ObjectSerializerContextObjectMiddlewareObject_3<any>
|
|
18912
19804
|
) => void;
|
|
18913
19805
|
deserialize: (
|
|
18914
|
-
context:
|
|
19806
|
+
context: ObjectDeserializerContextObjectMiddlewareObject_2<any>
|
|
18915
19807
|
) => any;
|
|
18916
19808
|
}
|
|
18917
19809
|
|
|
@@ -18919,28 +19811,9 @@ declare interface ObjectSerializer {
|
|
|
18919
19811
|
* Updates set size using the provided set.
|
|
18920
19812
|
*/
|
|
18921
19813
|
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
19814
|
write: (
|
|
18942
19815
|
value: string
|
|
18943
|
-
) =>
|
|
19816
|
+
) => ObjectSerializerContextObjectMiddlewareObject_3<[number, boolean]>;
|
|
18944
19817
|
setCircularReference: (value: ReferenceableItem) => void;
|
|
18945
19818
|
snapshot: () => ObjectSerializerSnapshot;
|
|
18946
19819
|
rollback: (snapshot: ObjectSerializerSnapshot) => void;
|
|
@@ -18950,10 +19823,10 @@ declare interface ObjectSerializerContextObjectMiddlewareObject_2 {
|
|
|
18950
19823
|
obj?: LazyOptions
|
|
18951
19824
|
) => LazyFunction<any, any, any, LazyOptions>;
|
|
18952
19825
|
}
|
|
18953
|
-
declare namespace
|
|
19826
|
+
declare namespace ObjectSerializerContextObjectMiddlewareObject_2 {
|
|
18954
19827
|
export let write: (
|
|
18955
19828
|
value?: any
|
|
18956
|
-
) =>
|
|
19829
|
+
) => ObjectSerializerContextObjectMiddlewareObject_3<ReadonlyArray<any>>;
|
|
18957
19830
|
export let setCircularReference: (value: ReferenceableItem) => void;
|
|
18958
19831
|
export let snapshot: () => ObjectSerializerSnapshot;
|
|
18959
19832
|
export let rollback: (snapshot: ObjectSerializerSnapshot) => void;
|
|
@@ -18969,12 +19842,12 @@ declare namespace ObjectSerializerContextObjectMiddlewareObject_3 {
|
|
|
18969
19842
|
/**
|
|
18970
19843
|
* Updates set size using the provided set.
|
|
18971
19844
|
*/
|
|
18972
|
-
declare interface
|
|
19845
|
+
declare interface ObjectSerializerContextObjectMiddlewareObject_3<
|
|
18973
19846
|
T extends ReadonlyArray<any> = ReadonlyArray<any>
|
|
18974
19847
|
> {
|
|
18975
19848
|
write: (
|
|
18976
19849
|
value: Head<T>
|
|
18977
|
-
) =>
|
|
19850
|
+
) => ObjectSerializerContextObjectMiddlewareObject_3<Tail<T>>;
|
|
18978
19851
|
setCircularReference: (value: ReferenceableItem) => void;
|
|
18979
19852
|
snapshot: () => ObjectSerializerSnapshot;
|
|
18980
19853
|
rollback: (snapshot: ObjectSerializerSnapshot) => void;
|
|
@@ -18988,10 +19861,12 @@ declare interface ObjectSerializerContextObjectMiddlewareObject_4<
|
|
|
18988
19861
|
/**
|
|
18989
19862
|
* Updates set size using the provided set.
|
|
18990
19863
|
*/
|
|
18991
|
-
declare interface
|
|
19864
|
+
declare interface ObjectSerializerContextObjectMiddlewareObject_4 {
|
|
18992
19865
|
write: (
|
|
18993
|
-
value
|
|
18994
|
-
) =>
|
|
19866
|
+
value: RestoreProvidedDataExports[]
|
|
19867
|
+
) => ObjectSerializerContextObjectMiddlewareObject_3<
|
|
19868
|
+
[undefined | null | boolean, undefined | boolean, boolean]
|
|
19869
|
+
>;
|
|
18995
19870
|
setCircularReference: (value: ReferenceableItem) => void;
|
|
18996
19871
|
snapshot: () => ObjectSerializerSnapshot;
|
|
18997
19872
|
rollback: (snapshot: ObjectSerializerSnapshot) => void;
|
|
@@ -19131,9 +20006,9 @@ declare interface Optimization {
|
|
|
19131
20006
|
mergeDuplicateChunks?: boolean;
|
|
19132
20007
|
|
|
19133
20008
|
/**
|
|
19134
|
-
* Enable minimizing the output. Uses optimization.minimizer.
|
|
20009
|
+
* Enable minimizing the output. Uses optimization.minimizer. An object enables it and configures the built-in minimizer per asset type.
|
|
19135
20010
|
*/
|
|
19136
|
-
minimize?: boolean;
|
|
20011
|
+
minimize?: boolean | OptimizationMinimizeOptions;
|
|
19137
20012
|
|
|
19138
20013
|
/**
|
|
19139
20014
|
* Minimizer(s) to use for minimizing the output.
|
|
@@ -19220,6 +20095,245 @@ declare interface Optimization {
|
|
|
19220
20095
|
usedExports?: boolean | "global";
|
|
19221
20096
|
}
|
|
19222
20097
|
|
|
20098
|
+
/**
|
|
20099
|
+
* 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.
|
|
20100
|
+
* @since 5.110.0
|
|
20101
|
+
*/
|
|
20102
|
+
declare interface OptimizationMinimizeCss {
|
|
20103
|
+
/**
|
|
20104
|
+
* 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.
|
|
20105
|
+
* @since 5.110.0
|
|
20106
|
+
*/
|
|
20107
|
+
comments?: string | boolean | RegExp | ((comment: string) => boolean);
|
|
20108
|
+
|
|
20109
|
+
/**
|
|
20110
|
+
* 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.
|
|
20111
|
+
* @since 5.110.0
|
|
20112
|
+
*/
|
|
20113
|
+
convertLengthUnits?: boolean;
|
|
20114
|
+
|
|
20115
|
+
/**
|
|
20116
|
+
* 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.
|
|
20117
|
+
* @since 5.110.0
|
|
20118
|
+
*/
|
|
20119
|
+
mergeLonghands?: boolean;
|
|
20120
|
+
|
|
20121
|
+
/**
|
|
20122
|
+
* 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.
|
|
20123
|
+
* @since 5.110.0
|
|
20124
|
+
*/
|
|
20125
|
+
mergeRules?: boolean;
|
|
20126
|
+
|
|
20127
|
+
/**
|
|
20128
|
+
* 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.
|
|
20129
|
+
* @since 5.110.0
|
|
20130
|
+
*/
|
|
20131
|
+
normalizeQuotes?: boolean;
|
|
20132
|
+
|
|
20133
|
+
/**
|
|
20134
|
+
* 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.
|
|
20135
|
+
* @since 5.110.0
|
|
20136
|
+
*/
|
|
20137
|
+
reduceFunctions?: boolean;
|
|
20138
|
+
|
|
20139
|
+
/**
|
|
20140
|
+
* 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`.
|
|
20141
|
+
* @since 5.110.0
|
|
20142
|
+
*/
|
|
20143
|
+
removeDeadRules?: boolean;
|
|
20144
|
+
|
|
20145
|
+
/**
|
|
20146
|
+
* 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.
|
|
20147
|
+
* @since 5.110.0
|
|
20148
|
+
*/
|
|
20149
|
+
rewriteCustomProperties?: boolean;
|
|
20150
|
+
|
|
20151
|
+
/**
|
|
20152
|
+
* 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.
|
|
20153
|
+
* @since 5.110.0
|
|
20154
|
+
*/
|
|
20155
|
+
shortenColors?: boolean;
|
|
20156
|
+
|
|
20157
|
+
/**
|
|
20158
|
+
* 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.
|
|
20159
|
+
* @since 5.110.0
|
|
20160
|
+
*/
|
|
20161
|
+
shortenMediaQueries?: boolean;
|
|
20162
|
+
|
|
20163
|
+
/**
|
|
20164
|
+
* 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.
|
|
20165
|
+
* @since 5.110.0
|
|
20166
|
+
*/
|
|
20167
|
+
shortenNumbers?: boolean;
|
|
20168
|
+
|
|
20169
|
+
/**
|
|
20170
|
+
* 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.
|
|
20171
|
+
* @since 5.110.0
|
|
20172
|
+
*/
|
|
20173
|
+
shortenSelectors?: boolean;
|
|
20174
|
+
|
|
20175
|
+
/**
|
|
20176
|
+
* 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`.
|
|
20177
|
+
* @since 5.110.0
|
|
20178
|
+
*/
|
|
20179
|
+
shortenValues?: boolean;
|
|
20180
|
+
|
|
20181
|
+
/**
|
|
20182
|
+
* 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.
|
|
20183
|
+
* @since 5.110.0
|
|
20184
|
+
*/
|
|
20185
|
+
vendorPrefixes?: boolean;
|
|
20186
|
+
}
|
|
20187
|
+
|
|
20188
|
+
/**
|
|
20189
|
+
* 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.
|
|
20190
|
+
* @since 5.110.0
|
|
20191
|
+
*/
|
|
20192
|
+
declare interface OptimizationMinimizeHtml {
|
|
20193
|
+
/**
|
|
20194
|
+
* Write a boolean attribute spelled with its own name (`disabled="disabled"`) as the bare name the spec canonicalizes it to. On by default.
|
|
20195
|
+
* @since 5.110.0
|
|
20196
|
+
*/
|
|
20197
|
+
collapseBooleanAttributes?: boolean;
|
|
20198
|
+
|
|
20199
|
+
/**
|
|
20200
|
+
* 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.
|
|
20201
|
+
* @since 5.110.0
|
|
20202
|
+
*/
|
|
20203
|
+
collapseWhitespace?: boolean | "all" | "conservative" | "smart";
|
|
20204
|
+
|
|
20205
|
+
/**
|
|
20206
|
+
* 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.
|
|
20207
|
+
* @since 5.110.0
|
|
20208
|
+
*/
|
|
20209
|
+
comments?: string | boolean | RegExp | ((comment: string) => boolean);
|
|
20210
|
+
|
|
20211
|
+
/**
|
|
20212
|
+
* 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.
|
|
20213
|
+
* @since 5.110.0
|
|
20214
|
+
*/
|
|
20215
|
+
mergeStyles?: boolean;
|
|
20216
|
+
|
|
20217
|
+
/**
|
|
20218
|
+
* 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.
|
|
20219
|
+
* @since 5.110.0
|
|
20220
|
+
*/
|
|
20221
|
+
minifyConditionalComments?: boolean;
|
|
20222
|
+
|
|
20223
|
+
/**
|
|
20224
|
+
* 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.
|
|
20225
|
+
* @since 5.110.0
|
|
20226
|
+
*/
|
|
20227
|
+
minifyJson?: boolean;
|
|
20228
|
+
|
|
20229
|
+
/**
|
|
20230
|
+
* 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.
|
|
20231
|
+
* @since 5.110.0
|
|
20232
|
+
*/
|
|
20233
|
+
minifySrcdoc?: boolean;
|
|
20234
|
+
|
|
20235
|
+
/**
|
|
20236
|
+
* Run the CSS minimizer over an inline `<style>` element and every `style=""` attribute, with the options `optimization.minimize.css` names. On by default.
|
|
20237
|
+
* @since 5.110.0
|
|
20238
|
+
*/
|
|
20239
|
+
minifyStyles?: boolean;
|
|
20240
|
+
|
|
20241
|
+
/**
|
|
20242
|
+
* 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.
|
|
20243
|
+
* @since 5.110.0
|
|
20244
|
+
*/
|
|
20245
|
+
normalizeAttributeQuotes?: boolean;
|
|
20246
|
+
|
|
20247
|
+
/**
|
|
20248
|
+
* 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.
|
|
20249
|
+
* @since 5.110.0
|
|
20250
|
+
*/
|
|
20251
|
+
normalizeEnumeratedAttributes?: boolean;
|
|
20252
|
+
|
|
20253
|
+
/**
|
|
20254
|
+
* 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.
|
|
20255
|
+
* @since 5.110.0
|
|
20256
|
+
*/
|
|
20257
|
+
normalizeListAttributes?: boolean;
|
|
20258
|
+
|
|
20259
|
+
/**
|
|
20260
|
+
* 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.
|
|
20261
|
+
* @since 5.110.0
|
|
20262
|
+
*/
|
|
20263
|
+
normalizeNumericAttributes?: boolean;
|
|
20264
|
+
|
|
20265
|
+
/**
|
|
20266
|
+
* 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.
|
|
20267
|
+
* @since 5.110.0
|
|
20268
|
+
*/
|
|
20269
|
+
removeEmptyAttributes?: boolean;
|
|
20270
|
+
|
|
20271
|
+
/**
|
|
20272
|
+
* 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.
|
|
20273
|
+
* @since 5.110.0
|
|
20274
|
+
*/
|
|
20275
|
+
removeEmptyElements?: boolean;
|
|
20276
|
+
|
|
20277
|
+
/**
|
|
20278
|
+
* 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.
|
|
20279
|
+
* @since 5.110.0
|
|
20280
|
+
*/
|
|
20281
|
+
removeImpliedTags?: boolean | "all" | "smart";
|
|
20282
|
+
|
|
20283
|
+
/**
|
|
20284
|
+
* 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.
|
|
20285
|
+
* @since 5.110.0
|
|
20286
|
+
*/
|
|
20287
|
+
removeOptionalTags?: boolean;
|
|
20288
|
+
|
|
20289
|
+
/**
|
|
20290
|
+
* 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.
|
|
20291
|
+
* @since 5.110.0
|
|
20292
|
+
*/
|
|
20293
|
+
removeRedundantAttributes?: boolean | "all" | "smart";
|
|
20294
|
+
|
|
20295
|
+
/**
|
|
20296
|
+
* 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.
|
|
20297
|
+
* @since 5.110.0
|
|
20298
|
+
*/
|
|
20299
|
+
sortAttributes?: boolean;
|
|
20300
|
+
|
|
20301
|
+
/**
|
|
20302
|
+
* 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.
|
|
20303
|
+
* @since 5.110.0
|
|
20304
|
+
*/
|
|
20305
|
+
sortTokenLists?: boolean;
|
|
20306
|
+
}
|
|
20307
|
+
|
|
20308
|
+
/**
|
|
20309
|
+
* Options handed as-is to the JavaScript minimizer (terser-compatible). Defaults to `{ compress: { passes: 2 } }`.
|
|
20310
|
+
* @since 5.110.0
|
|
20311
|
+
*/
|
|
20312
|
+
declare interface OptimizationMinimizeJavascript {
|
|
20313
|
+
[index: string]: any;
|
|
20314
|
+
}
|
|
20315
|
+
|
|
20316
|
+
/**
|
|
20317
|
+
* Enable minimizing the output, configured per asset type. An absent type is minimized with the defaults; `false` disables minimizing it.
|
|
20318
|
+
* @since 5.110.0
|
|
20319
|
+
*/
|
|
20320
|
+
declare interface OptimizationMinimizeOptions {
|
|
20321
|
+
/**
|
|
20322
|
+
* Minimize CSS assets: `false` disables it, an object configures what the built-in minimizer may do beyond the transforms that always apply.
|
|
20323
|
+
*/
|
|
20324
|
+
css?: false | OptimizationMinimizeCss;
|
|
20325
|
+
|
|
20326
|
+
/**
|
|
20327
|
+
* Minimize HTML assets: `false` disables it, an object configures what the built-in minimizer may do beyond the transforms that always apply.
|
|
20328
|
+
*/
|
|
20329
|
+
html?: false | OptimizationMinimizeHtml;
|
|
20330
|
+
|
|
20331
|
+
/**
|
|
20332
|
+
* Minimize JavaScript assets: `false` disables it, an object is handed as-is to the JavaScript minimizer.
|
|
20333
|
+
*/
|
|
20334
|
+
javascript?: false | OptimizationMinimizeJavascript;
|
|
20335
|
+
}
|
|
20336
|
+
|
|
19223
20337
|
/**
|
|
19224
20338
|
* Enables/Disables integrated optimizations.
|
|
19225
20339
|
*/
|
|
@@ -19281,9 +20395,9 @@ declare interface OptimizationNormalized {
|
|
|
19281
20395
|
mergeDuplicateChunks?: boolean;
|
|
19282
20396
|
|
|
19283
20397
|
/**
|
|
19284
|
-
* Enable minimizing the output. Uses optimization.minimizer.
|
|
20398
|
+
* Enable minimizing the output. Uses optimization.minimizer. An object configures the built-in minimizer per asset type.
|
|
19285
20399
|
*/
|
|
19286
|
-
minimize?:
|
|
20400
|
+
minimize?: false | OptimizationMinimizeOptions;
|
|
19287
20401
|
|
|
19288
20402
|
/**
|
|
19289
20403
|
* Minimizer(s) to use for minimizing the output.
|
|
@@ -19411,7 +20525,7 @@ type OptimizationNormalizedWithDefaults = OptimizationNormalized & {
|
|
|
19411
20525
|
mangleWasmImports: NonNullable<undefined | boolean>;
|
|
19412
20526
|
portableRecords: NonNullable<undefined | boolean>;
|
|
19413
20527
|
realContentHash: NonNullable<undefined | boolean>;
|
|
19414
|
-
minimize: NonNullable<undefined |
|
|
20528
|
+
minimize: NonNullable<undefined | false | OptimizationMinimizeOptions>;
|
|
19415
20529
|
minimizer: (
|
|
19416
20530
|
| ((this: Compiler, compiler: Compiler) => void)
|
|
19417
20531
|
| WebpackPluginInstance
|
|
@@ -20656,7 +21770,8 @@ type OutputNormalizedWithDefaults = OutputNormalized & {
|
|
|
20656
21770
|
declare interface ParameterizedComparator<TArg extends object, T> {
|
|
20657
21771
|
(tArg: TArg): Comparator<T>;
|
|
20658
21772
|
}
|
|
20659
|
-
|
|
21773
|
+
type ParseErrorSeverity = "error" | "warning";
|
|
21774
|
+
declare interface ParseOptionsJavascriptParser {
|
|
20660
21775
|
sourceType: "module" | "script";
|
|
20661
21776
|
ecmaVersion: ecmaVersion;
|
|
20662
21777
|
locations?: boolean;
|
|
@@ -20685,6 +21800,12 @@ declare interface ParseOptions {
|
|
|
20685
21800
|
*/
|
|
20686
21801
|
moduleFallback?: boolean;
|
|
20687
21802
|
}
|
|
21803
|
+
declare interface ParseOptionsSyntax {
|
|
21804
|
+
/**
|
|
21805
|
+
* 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
|
|
21806
|
+
*/
|
|
21807
|
+
comment?: (input: string, start: number, end: number) => number;
|
|
21808
|
+
}
|
|
20688
21809
|
declare interface ParseResult {
|
|
20689
21810
|
ast: Program;
|
|
20690
21811
|
comments: CommentJavascriptParser[];
|
|
@@ -20927,15 +22048,111 @@ type Pattern =
|
|
|
20927
22048
|
* Configuration object for web performance recommendations.
|
|
20928
22049
|
*/
|
|
20929
22050
|
declare interface PerformanceOptions {
|
|
22051
|
+
/**
|
|
22052
|
+
* 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'.
|
|
22053
|
+
* @since 5.110.0
|
|
22054
|
+
*/
|
|
22055
|
+
all?: boolean;
|
|
22056
|
+
|
|
20930
22057
|
/**
|
|
20931
22058
|
* Filter function to select assets that are checked.
|
|
20932
22059
|
*/
|
|
20933
22060
|
assetFilter?: (name: string, source: Source, assetInfo: AssetInfo) => boolean;
|
|
20934
22061
|
|
|
20935
22062
|
/**
|
|
20936
|
-
*
|
|
22063
|
+
* 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).
|
|
22064
|
+
* @since 5.110.0
|
|
22065
|
+
*/
|
|
22066
|
+
asyncChunkWaterfalls?: boolean;
|
|
22067
|
+
|
|
22068
|
+
/**
|
|
22069
|
+
* Report 'require.context' calls with no filter, which bundle every file under a directory (requires 'hints' to be enabled).
|
|
22070
|
+
* @since 5.110.0
|
|
22071
|
+
*/
|
|
22072
|
+
broadContexts?: boolean;
|
|
22073
|
+
|
|
22074
|
+
/**
|
|
22075
|
+
* Report how much of the module graph the cache reused, and the modules that can never be reused (requires 'hints' to be enabled).
|
|
22076
|
+
* @since 5.110.0
|
|
22077
|
+
*/
|
|
22078
|
+
cacheEffectiveness?: boolean;
|
|
22079
|
+
|
|
22080
|
+
/**
|
|
22081
|
+
* Report groups of modules that import each other synchronously (requires 'hints' to be enabled).
|
|
22082
|
+
* @since 5.110.0
|
|
22083
|
+
*/
|
|
22084
|
+
circularDependencies?: boolean;
|
|
22085
|
+
|
|
22086
|
+
/**
|
|
22087
|
+
* Report chunks asked for as both prefetch and preload from the same place, where the two directives contradict each other.
|
|
22088
|
+
* @since 5.110.0
|
|
22089
|
+
*/
|
|
22090
|
+
conflictingResourceHints?: boolean;
|
|
22091
|
+
|
|
22092
|
+
/**
|
|
22093
|
+
* Report modules emitted into more than one chunk, and the bytes the extra copies cost (requires 'hints' to be enabled).
|
|
22094
|
+
* @since 5.110.0
|
|
22095
|
+
*/
|
|
22096
|
+
duplicateModules?: boolean;
|
|
22097
|
+
|
|
22098
|
+
/**
|
|
22099
|
+
* Report packages which are included more than once, in different versions or as multiple copies of the same version (requires 'hints' to be enabled).
|
|
22100
|
+
* @since 5.110.0
|
|
22101
|
+
*/
|
|
22102
|
+
duplicatePackages?: boolean;
|
|
22103
|
+
|
|
22104
|
+
/**
|
|
22105
|
+
* Report modules whose exports cannot be read statically, which stops anything importing them from being tree-shaken (requires 'hints' to be enabled).
|
|
22106
|
+
* @since 5.110.0
|
|
22107
|
+
*/
|
|
22108
|
+
dynamicExports?: boolean;
|
|
22109
|
+
|
|
22110
|
+
/**
|
|
22111
|
+
* 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).
|
|
22112
|
+
* @since 5.110.0
|
|
22113
|
+
*/
|
|
22114
|
+
embeddedSourceMaps?: boolean;
|
|
22115
|
+
|
|
22116
|
+
/**
|
|
22117
|
+
* Report modules shipped by more than one entrypoint, which every page that loads them downloads again (requires 'hints' to be enabled).
|
|
22118
|
+
* @since 5.110.0
|
|
22119
|
+
*/
|
|
22120
|
+
entrypointOverlap?: boolean;
|
|
22121
|
+
|
|
22122
|
+
/**
|
|
22123
|
+
* Report modules that call 'eval' directly, which stops minification, scope hoisting and tree shaking (requires 'hints' to be enabled).
|
|
22124
|
+
* @since 5.110.0
|
|
22125
|
+
*/
|
|
22126
|
+
evalUsage?: boolean;
|
|
22127
|
+
|
|
22128
|
+
/**
|
|
22129
|
+
* Sets the format of the hints: warnings, errors, stats-only or nothing at all.
|
|
22130
|
+
*/
|
|
22131
|
+
hints?: false | "error" | "stats" | "warning";
|
|
22132
|
+
|
|
22133
|
+
/**
|
|
22134
|
+
* 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).
|
|
22135
|
+
* @since 5.110.0
|
|
22136
|
+
*/
|
|
22137
|
+
hotspots?: boolean;
|
|
22138
|
+
|
|
22139
|
+
/**
|
|
22140
|
+
* 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).
|
|
22141
|
+
* @since 5.110.0
|
|
22142
|
+
*/
|
|
22143
|
+
inlinedAssets?: boolean;
|
|
22144
|
+
|
|
22145
|
+
/**
|
|
22146
|
+
* Report a single module that makes up most of the chunk it is in (requires 'hints' to be enabled).
|
|
22147
|
+
* @since 5.110.0
|
|
20937
22148
|
*/
|
|
20938
|
-
|
|
22149
|
+
largeModules?: boolean;
|
|
22150
|
+
|
|
22151
|
+
/**
|
|
22152
|
+
* Report polyfill packages that emulate language features the target already supports natively (requires 'hints' to be enabled).
|
|
22153
|
+
* @since 5.110.0
|
|
22154
|
+
*/
|
|
22155
|
+
legacyJavascript?: boolean;
|
|
20939
22156
|
|
|
20940
22157
|
/**
|
|
20941
22158
|
* File size limit (in bytes) when exceeded, that webpack will provide performance hints.
|
|
@@ -20946,6 +22163,96 @@ declare interface PerformanceOptions {
|
|
|
20946
22163
|
* Total size of an entry point (in bytes).
|
|
20947
22164
|
*/
|
|
20948
22165
|
maxEntrypointSize?: number;
|
|
22166
|
+
|
|
22167
|
+
/**
|
|
22168
|
+
* Report packages that keep unused code in the bundle because their package.json does not declare 'sideEffects' (requires 'hints' to be enabled).
|
|
22169
|
+
* @since 5.110.0
|
|
22170
|
+
*/
|
|
22171
|
+
missingSideEffects?: boolean;
|
|
22172
|
+
|
|
22173
|
+
/**
|
|
22174
|
+
* 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).
|
|
22175
|
+
* @since 5.110.0
|
|
22176
|
+
*/
|
|
22177
|
+
mixedExports?: boolean;
|
|
22178
|
+
|
|
22179
|
+
/**
|
|
22180
|
+
* Report conditions in 'module.rules' that hardcode a path separator, so they only match on one operating system.
|
|
22181
|
+
* @since 5.110.0
|
|
22182
|
+
*/
|
|
22183
|
+
osDependentRules?: boolean;
|
|
22184
|
+
|
|
22185
|
+
/**
|
|
22186
|
+
* Report '/*#__PURE__* /' annotations that sit somewhere the parser does not read them (requires 'hints' to be enabled).
|
|
22187
|
+
* @since 5.110.0
|
|
22188
|
+
*/
|
|
22189
|
+
pureAnnotations?: boolean;
|
|
22190
|
+
|
|
22191
|
+
/**
|
|
22192
|
+
* Report 'import()' calls whose module is already loaded where the call runs, so they defer nothing (requires 'hints' to be enabled).
|
|
22193
|
+
* @since 5.110.0
|
|
22194
|
+
*/
|
|
22195
|
+
redundantDynamicImports?: boolean;
|
|
22196
|
+
|
|
22197
|
+
/**
|
|
22198
|
+
* Report modules that could not be merged into their importer's scope, and why (requires 'hints' to be enabled).
|
|
22199
|
+
* @since 5.110.0
|
|
22200
|
+
*/
|
|
22201
|
+
scopeHoistingBailouts?: boolean;
|
|
22202
|
+
|
|
22203
|
+
/**
|
|
22204
|
+
* Report splits 'optimization.splitChunks' refused because 'maxInitialRequests' or 'maxAsyncRequests' was already reached (requires 'hints' to be enabled).
|
|
22205
|
+
* @since 5.110.0
|
|
22206
|
+
*/
|
|
22207
|
+
splitChunksCapped?: boolean;
|
|
22208
|
+
|
|
22209
|
+
/**
|
|
22210
|
+
* Report chunks loaded on demand that carry less than 'optimization.splitChunks.minSize' (requires 'hints' to be enabled).
|
|
22211
|
+
* @since 5.110.0
|
|
22212
|
+
*/
|
|
22213
|
+
tinyChunks?: boolean;
|
|
22214
|
+
|
|
22215
|
+
/**
|
|
22216
|
+
* 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).
|
|
22217
|
+
* @since 5.110.0
|
|
22218
|
+
*/
|
|
22219
|
+
topLevelThis?: boolean;
|
|
22220
|
+
|
|
22221
|
+
/**
|
|
22222
|
+
* 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).
|
|
22223
|
+
* @since 5.110.0
|
|
22224
|
+
*/
|
|
22225
|
+
unsplitVendors?: boolean;
|
|
22226
|
+
|
|
22227
|
+
/**
|
|
22228
|
+
* Report 'resolve.alias' entries that no request matched.
|
|
22229
|
+
* @since 5.110.0
|
|
22230
|
+
*/
|
|
22231
|
+
unusedAliases?: boolean;
|
|
22232
|
+
|
|
22233
|
+
/**
|
|
22234
|
+
* 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.
|
|
22235
|
+
* @since 5.110.0
|
|
22236
|
+
*/
|
|
22237
|
+
unusedDefines?: boolean;
|
|
22238
|
+
|
|
22239
|
+
/**
|
|
22240
|
+
* Report requests listed in 'externals' that no module ever imported, which usually means the request is misspelled and the real one got bundled instead.
|
|
22241
|
+
* @since 5.110.0
|
|
22242
|
+
*/
|
|
22243
|
+
unusedExternals?: boolean;
|
|
22244
|
+
|
|
22245
|
+
/**
|
|
22246
|
+
* Report modules bundled although nothing uses what they export, pulled in by a re-export (requires 'hints' to be enabled).
|
|
22247
|
+
* @since 5.110.0
|
|
22248
|
+
*/
|
|
22249
|
+
unusedReexports?: boolean;
|
|
22250
|
+
|
|
22251
|
+
/**
|
|
22252
|
+
* 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.
|
|
22253
|
+
* @since 5.110.0
|
|
22254
|
+
*/
|
|
22255
|
+
unusedRules?: boolean;
|
|
20949
22256
|
}
|
|
20950
22257
|
declare interface PitchLoaderDefinitionFunction<
|
|
20951
22258
|
OptionsType = {},
|
|
@@ -21086,6 +22393,224 @@ declare class PrefixSource extends Source {
|
|
|
21086
22393
|
declare interface PreparsedAst {
|
|
21087
22394
|
[index: string]: any;
|
|
21088
22395
|
}
|
|
22396
|
+
|
|
22397
|
+
/**
|
|
22398
|
+
* The per-node output store handed to a language node printer as its `writer`. It
|
|
22399
|
+
* carries the print `options` (today just `mode`) and one map: a finished node ->
|
|
22400
|
+
* its printed text. A printer *returns* its text (`printNode` stores it) and reads
|
|
22401
|
+
* a child's with `get`, so a parent composes its own text from its children's —
|
|
22402
|
+
* the map is what makes that composition (and the CSS value transforms built on
|
|
22403
|
+
* it) possible. `take` flushes a finished top-level node into the output and drops
|
|
22404
|
+
* the map, so a streaming grammar never holds more than one top-level subtree.
|
|
22405
|
+
*/
|
|
22406
|
+
declare class PrintContext<TPath, TNode, TPrintOptions = object> {
|
|
22407
|
+
constructor(
|
|
22408
|
+
options: PrintOptions & TPrintOptions,
|
|
22409
|
+
printer: NodePrinter<TPath, TNode, TPrintOptions>
|
|
22410
|
+
);
|
|
22411
|
+
options: PrintOptions & TPrintOptions;
|
|
22412
|
+
mapWanted: boolean;
|
|
22413
|
+
|
|
22414
|
+
/**
|
|
22415
|
+
* Hold `text` back as the opener of a node being printed in pieces. Nothing
|
|
22416
|
+
* reaches the output until {@link flushPending}, so {@link dropPending} can
|
|
22417
|
+
* still take it back if the node turns out to be empty.
|
|
22418
|
+
*/
|
|
22419
|
+
pushPending(text: string): number;
|
|
22420
|
+
|
|
22421
|
+
/**
|
|
22422
|
+
* Rewrite a held-back opener — an opener whose text depends on what turns out
|
|
22423
|
+
* to follow it can only be settled once something does.
|
|
22424
|
+
*/
|
|
22425
|
+
setPending(depth: number, text: string): void;
|
|
22426
|
+
|
|
22427
|
+
/**
|
|
22428
|
+
* Emit every held-back opener, outermost first — something inside the
|
|
22429
|
+
* innermost one has content, so all of them do.
|
|
22430
|
+
*/
|
|
22431
|
+
flushPending(): void;
|
|
22432
|
+
|
|
22433
|
+
/**
|
|
22434
|
+
* Anchor the outermost held-back opener, applied when it is flushed. Openers
|
|
22435
|
+
* are flushed together, so only the outermost carries one.
|
|
22436
|
+
*/
|
|
22437
|
+
anchorPending(srcOffset?: number, srcLine?: number, srcCol?: number): void;
|
|
22438
|
+
isPending(depth: number): boolean;
|
|
22439
|
+
|
|
22440
|
+
/**
|
|
22441
|
+
* Drop the innermost held-back opener — its node printed to nothing.
|
|
22442
|
+
*/
|
|
22443
|
+
dropPending(): void;
|
|
22444
|
+
|
|
22445
|
+
/**
|
|
22446
|
+
* Close off what has been emitted so far and return the index the next piece
|
|
22447
|
+
* will take. Cutting is the point: a caller bounding a later edit by this
|
|
22448
|
+
* (see {@link dropTrailing}) must not be able to reach output from before it,
|
|
22449
|
+
* which a mark taken while the tail was still open would sit in the middle of.
|
|
22450
|
+
*/
|
|
22451
|
+
markCut(): number;
|
|
22452
|
+
|
|
22453
|
+
/**
|
|
22454
|
+
* Append a piece of a node that is being printed in pieces. Nothing takes it
|
|
22455
|
+
* back, so it only extends the output.
|
|
22456
|
+
*/
|
|
22457
|
+
emitStreamed(text: string): void;
|
|
22458
|
+
|
|
22459
|
+
/**
|
|
22460
|
+
* Forget every node's printed text. A node printed in pieces does this once
|
|
22461
|
+
* each child is emitted, so the store never holds more than one of them —
|
|
22462
|
+
* which is also what keeps a recycled node id from reading as an earlier
|
|
22463
|
+
* node's text.
|
|
22464
|
+
*/
|
|
22465
|
+
dropStore(): void;
|
|
22466
|
+
|
|
22467
|
+
/**
|
|
22468
|
+
* Drop trailing `charCode`s from the end of the output at or after `from` —
|
|
22469
|
+
* the separator the piece before a terminator no longer needs. Walks back over
|
|
22470
|
+
* pieces emptied by {@link retract}, so it sees what the output reads as.
|
|
22471
|
+
*/
|
|
22472
|
+
dropTrailing(from: number, charCode: number): void;
|
|
22473
|
+
|
|
22474
|
+
/**
|
|
22475
|
+
* Run the node printer for `node` and store what it returns (the grammar calls
|
|
22476
|
+
* this once the node's visitors and children are done). `path` is on `node`.
|
|
22477
|
+
*/
|
|
22478
|
+
printNode(node: TNode, path: TPath): void;
|
|
22479
|
+
|
|
22480
|
+
/**
|
|
22481
|
+
* Print one node and hand its text straight back — for a node inside one being
|
|
22482
|
+
* printed in pieces, whose text is emitted as it is printed, so the store
|
|
22483
|
+
* would only ever be written and read once.
|
|
22484
|
+
*/
|
|
22485
|
+
printPiece(path: TPath): string;
|
|
22486
|
+
get(node: TNode): string;
|
|
22487
|
+
|
|
22488
|
+
/**
|
|
22489
|
+
* Append `text` as a piece of its own, so {@link retract} can still take it
|
|
22490
|
+
* back once a later sibling turns out to override it. Cuts the accumulating
|
|
22491
|
+
* tail off in front of it, so it is for the text that may actually be taken
|
|
22492
|
+
* back and not for output at large.
|
|
22493
|
+
*/
|
|
22494
|
+
emitRetractable(text: string): number;
|
|
22495
|
+
|
|
22496
|
+
/**
|
|
22497
|
+
* Take back an already-emitted piece — the printer has since found that a
|
|
22498
|
+
* later one overrides it. Pieces after it keep their place. A piece emitted by
|
|
22499
|
+
* {@link takeRetractable} takes the mapping anchored to it back as well; any
|
|
22500
|
+
* other anchor into the piece would be left pointing at what follows it, so
|
|
22501
|
+
* this must not be used on one (see {@link take}).
|
|
22502
|
+
*/
|
|
22503
|
+
retract(index: number): void;
|
|
22504
|
+
|
|
22505
|
+
/**
|
|
22506
|
+
* Fold `text` into an already-emitted piece, in front of the character it ends
|
|
22507
|
+
* with — a later sibling whose body belongs inside that piece, as a repeated
|
|
22508
|
+
* named `@layer` block's does. Mappings are piece-relative and this only grows
|
|
22509
|
+
* the piece past everything already anchored in it, so they keep their
|
|
22510
|
+
* positions; the folded text carries none of its own.
|
|
22511
|
+
*/
|
|
22512
|
+
foldIntoRetractable(index: number, text: string): void;
|
|
22513
|
+
|
|
22514
|
+
/**
|
|
22515
|
+
* Write an already-emitted piece again, shorter — a rule inside it a later
|
|
22516
|
+
* copy makes dead. Mappings anchored in the piece keep the offsets they were
|
|
22517
|
+
* given, so one inside what was cut names what now follows it.
|
|
22518
|
+
*/
|
|
22519
|
+
rewriteRetractable(index: number, text: string): void;
|
|
22520
|
+
|
|
22521
|
+
/**
|
|
22522
|
+
* {@link take} for a top-level node a later sibling may still make dead — the
|
|
22523
|
+
* unprefixed twin of a vendor-prefixed rule, which can stand anywhere after
|
|
22524
|
+
* it. The node is emitted as a piece of its own, with its mapping recorded
|
|
22525
|
+
* against that piece, so {@link retract} takes both back.
|
|
22526
|
+
*/
|
|
22527
|
+
takeRetractable(
|
|
22528
|
+
node: TNode,
|
|
22529
|
+
srcOffset?: number,
|
|
22530
|
+
srcLine?: number,
|
|
22531
|
+
srcCol?: number,
|
|
22532
|
+
text?: string
|
|
22533
|
+
): number;
|
|
22534
|
+
|
|
22535
|
+
/**
|
|
22536
|
+
* Emit one finished top-level node: first any kept comments that precede it,
|
|
22537
|
+
* then a source mapping anchoring its output start to `[srcLine, srcCol]`, then
|
|
22538
|
+
* its text — and drop the per-node store so the next top-level node starts
|
|
22539
|
+
* clean. `srcOffset` / `srcLine` / `srcCol` are the node's source position; a
|
|
22540
|
+
* grammar that doesn't map positions (e.g. HTML) omits them (no comments, no
|
|
22541
|
+
* mapping — the map ends up empty).
|
|
22542
|
+
*/
|
|
22543
|
+
take(
|
|
22544
|
+
node?: TNode,
|
|
22545
|
+
srcOffset?: number,
|
|
22546
|
+
srcLine?: number,
|
|
22547
|
+
srcCol?: number,
|
|
22548
|
+
text?: string
|
|
22549
|
+
): void;
|
|
22550
|
+
|
|
22551
|
+
/**
|
|
22552
|
+
* Tie whatever is emitted next to a source position: flush the kept comments
|
|
22553
|
+
* that precede it, then record the mapping. Split out of {@link take} for a
|
|
22554
|
+
* node printed in pieces, whose first piece is emitted well after the printer
|
|
22555
|
+
* for it began.
|
|
22556
|
+
*/
|
|
22557
|
+
anchor(srcOffset?: number, srcLine?: number, srcCol?: number): void;
|
|
22558
|
+
|
|
22559
|
+
/**
|
|
22560
|
+
* Whether a kept literal is queued to land before `pos`. A printer folding two
|
|
22561
|
+
* top-level nodes together asks first: the literal belongs between them, so
|
|
22562
|
+
* the fold would move it past what it was written above.
|
|
22563
|
+
*/
|
|
22564
|
+
hasInsertBefore(pos: number): boolean;
|
|
22565
|
+
|
|
22566
|
+
/**
|
|
22567
|
+
* Emit the kept literals landing before `pos`. A printer holding a node back
|
|
22568
|
+
* calls this at hold time, so what was written above it is still emitted
|
|
22569
|
+
* above it — and {@link hasInsertBefore} then answers about the gap to the
|
|
22570
|
+
* next node rather than the whole span since the last node taken.
|
|
22571
|
+
*/
|
|
22572
|
+
flushInsertsBefore(pos: number): void;
|
|
22573
|
+
|
|
22574
|
+
/**
|
|
22575
|
+
* Queue a literal to carry through to the output at source offset `pos` — a
|
|
22576
|
+
* comment the printer chose to keep (e.g. a `/*!` license banner). Calls
|
|
22577
|
+
* arrive in source order; each lands just before the first top-level node
|
|
22578
|
+
* starting after `pos` (or at the end, via {@link result}).
|
|
22579
|
+
*/
|
|
22580
|
+
insert(pos: number, text: string): void;
|
|
22581
|
+
|
|
22582
|
+
/**
|
|
22583
|
+
* Take the queued inserts sitting in `[start, end)` — a printer that writes
|
|
22584
|
+
* that source range out itself places them, so the writer must not flush
|
|
22585
|
+
* them ahead of the next top-level node as well.
|
|
22586
|
+
*/
|
|
22587
|
+
takeInserts(start: number, end: number): string;
|
|
22588
|
+
sourceMap(options: SourceMapOptions): SourceMap;
|
|
22589
|
+
|
|
22590
|
+
/**
|
|
22591
|
+
* Stand the text `resolve` gives back in place of every deferred write left
|
|
22592
|
+
* in the output, and move the mappings that follow one in the same piece by
|
|
22593
|
+
* what its text changed in length. Runs before {@link result} and
|
|
22594
|
+
* {@link sourceMap}, so both read the substituted output rather than
|
|
22595
|
+
* correcting for it.
|
|
22596
|
+
* The marker is `NUL id NUL`. A NUL mostly cannot reach printed output on its
|
|
22597
|
+
* own account — both preprocessors turn one into U+FFFD — but an RCDATA
|
|
22598
|
+
* element and an attribute value keep the one they were written with, so a
|
|
22599
|
+
* pair of them is read as a write only where what stands between spells an id
|
|
22600
|
+
* this answers for. Anything else is the source's own text and is left alone.
|
|
22601
|
+
*/
|
|
22602
|
+
substitute(resolve: (id: number) => undefined | string, infix: string): void;
|
|
22603
|
+
|
|
22604
|
+
/**
|
|
22605
|
+
* Throw away everything printed and stand `text` in its place. For the one
|
|
22606
|
+
* caller that can only tell its output is wrong once it has all of it.
|
|
22607
|
+
*/
|
|
22608
|
+
replaceAll(text: string): void;
|
|
22609
|
+
result(): string;
|
|
22610
|
+
}
|
|
22611
|
+
declare interface PrintOptions {
|
|
22612
|
+
mode: "minify" | "beautify";
|
|
22613
|
+
}
|
|
21089
22614
|
declare interface PrintedElement {
|
|
21090
22615
|
element: string;
|
|
21091
22616
|
content?: string;
|
|
@@ -21359,6 +22884,13 @@ declare interface ProvidesObject {
|
|
|
21359
22884
|
}
|
|
21360
22885
|
type PureCondition =
|
|
21361
22886
|
boolean | ((compilation: Compilation, module: Module) => boolean);
|
|
22887
|
+
type QualifiedRule = NodeSyntax & {
|
|
22888
|
+
prelude: ComponentValue[];
|
|
22889
|
+
declarations: null | DeclarationSyntax[];
|
|
22890
|
+
childRules: null | RuleSyntax[];
|
|
22891
|
+
blockStart: number;
|
|
22892
|
+
blockEnd: number;
|
|
22893
|
+
};
|
|
21362
22894
|
declare interface RawChunkGroupOptions {
|
|
21363
22895
|
preloadOrder?: number;
|
|
21364
22896
|
prefetchOrder?: number;
|
|
@@ -21945,10 +23477,7 @@ declare interface ReaddirTypes {
|
|
|
21945
23477
|
withFileTypes: true;
|
|
21946
23478
|
recursive?: boolean;
|
|
21947
23479
|
},
|
|
21948
|
-
callback: (
|
|
21949
|
-
err: null | NodeJS.ErrnoException,
|
|
21950
|
-
files?: DirentTypes<string>[]
|
|
21951
|
-
) => void
|
|
23480
|
+
callback: (err: null | NodeJS.ErrnoException, files?: DirentTypes[]) => void
|
|
21952
23481
|
): void;
|
|
21953
23482
|
(
|
|
21954
23483
|
path: PathLikeTypes,
|
|
@@ -22115,92 +23644,14 @@ type RecursiveArrayOrRecord<T> =
|
|
|
22115
23644
|
| RecursiveArrayOrRecord<T>[]
|
|
22116
23645
|
| T;
|
|
22117
23646
|
declare interface RecursiveNonNullable<T> {}
|
|
22118
|
-
|
|
23647
|
+
|
|
23648
|
+
/**
|
|
23649
|
+
* One identifier occurrence that refers to a binding.
|
|
23650
|
+
*/
|
|
23651
|
+
declare abstract class Reference {
|
|
22119
23652
|
identifier: Identifier;
|
|
22120
23653
|
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;
|
|
23654
|
+
resolved?: Variable;
|
|
22204
23655
|
}
|
|
22205
23656
|
type ReferenceableItem = string | object;
|
|
22206
23657
|
declare interface ReferencedExport {
|
|
@@ -23220,6 +24671,11 @@ declare interface ResourceDataWithData {
|
|
|
23220
24671
|
* @since 5.109.0
|
|
23221
24672
|
*/
|
|
23222
24673
|
declare interface ResourceHintsOptions {
|
|
24674
|
+
/**
|
|
24675
|
+
* 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).
|
|
24676
|
+
*/
|
|
24677
|
+
dedupe?: boolean;
|
|
24678
|
+
|
|
23223
24679
|
/**
|
|
23224
24680
|
* 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
24681
|
* @since 5.109.0
|
|
@@ -23290,7 +24746,7 @@ declare abstract class RestoreProvidedData {
|
|
|
23290
24746
|
/**
|
|
23291
24747
|
* Serializes this instance into the provided serializer context.
|
|
23292
24748
|
*/
|
|
23293
|
-
serialize(context:
|
|
24749
|
+
serialize(context: ObjectSerializerContextObjectMiddlewareObject_4): void;
|
|
23294
24750
|
}
|
|
23295
24751
|
declare interface RestoreProvidedDataExports {
|
|
23296
24752
|
name: string;
|
|
@@ -23301,7 +24757,28 @@ declare interface RestoreProvidedDataExports {
|
|
|
23301
24757
|
pureProvide?: boolean;
|
|
23302
24758
|
exportsInfo?: RestoreProvidedData;
|
|
23303
24759
|
}
|
|
23304
|
-
type
|
|
24760
|
+
type RuleAlias = string | RegExp | ((str: string) => boolean);
|
|
24761
|
+
declare interface RuleCondition {
|
|
24762
|
+
property: string | string[];
|
|
24763
|
+
matchWhenEmpty: boolean;
|
|
24764
|
+
fn: (
|
|
24765
|
+
value: EffectData[
|
|
24766
|
+
| "compiler"
|
|
24767
|
+
| "dependency"
|
|
24768
|
+
| "resource"
|
|
24769
|
+
| "scheme"
|
|
24770
|
+
| "realResource"
|
|
24771
|
+
| "resourceQuery"
|
|
24772
|
+
| "resourceFragment"
|
|
24773
|
+
| "attributes"
|
|
24774
|
+
| "mimetype"
|
|
24775
|
+
| "descriptionData"
|
|
24776
|
+
| "descriptionRelativePath"
|
|
24777
|
+
| "issuer"
|
|
24778
|
+
| "issuerLayer"
|
|
24779
|
+
| "phase"]
|
|
24780
|
+
) => boolean;
|
|
24781
|
+
}
|
|
23305
24782
|
declare interface RuleSet {
|
|
23306
24783
|
/**
|
|
23307
24784
|
* map of references in the rule set (may grow over time)
|
|
@@ -23312,6 +24789,11 @@ declare interface RuleSet {
|
|
|
23312
24789
|
* execute the rule set
|
|
23313
24790
|
*/
|
|
23314
24791
|
exec: (effectData: EffectData) => Effect[];
|
|
24792
|
+
|
|
24793
|
+
/**
|
|
24794
|
+
* the rules that never matched, outermost first
|
|
24795
|
+
*/
|
|
24796
|
+
unusedRules: () => CompiledRule[];
|
|
23315
24797
|
}
|
|
23316
24798
|
type RuleSetCondition =
|
|
23317
24799
|
| string
|
|
@@ -23334,7 +24816,7 @@ type RuleSetConditionOrConditions =
|
|
|
23334
24816
|
type RuleSetLoaderOptions = string | { [index: string]: any };
|
|
23335
24817
|
|
|
23336
24818
|
/**
|
|
23337
|
-
* Logic operators used in a condition matcher.
|
|
24819
|
+
* Logic operators and glob patterns used in a condition matcher.
|
|
23338
24820
|
*/
|
|
23339
24821
|
declare interface RuleSetLogicalConditions {
|
|
23340
24822
|
/**
|
|
@@ -23342,6 +24824,12 @@ declare interface RuleSetLogicalConditions {
|
|
|
23342
24824
|
*/
|
|
23343
24825
|
and?: RuleSetCondition[];
|
|
23344
24826
|
|
|
24827
|
+
/**
|
|
24828
|
+
* 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.
|
|
24829
|
+
* @since 5.110.0
|
|
24830
|
+
*/
|
|
24831
|
+
glob?: string | string[];
|
|
24832
|
+
|
|
23345
24833
|
/**
|
|
23346
24834
|
* Logical NOT.
|
|
23347
24835
|
*/
|
|
@@ -23359,7 +24847,7 @@ declare interface RuleSetLogicalConditions {
|
|
|
23359
24847
|
}
|
|
23360
24848
|
|
|
23361
24849
|
/**
|
|
23362
|
-
* Logic operators used in a condition matcher.
|
|
24850
|
+
* Logic operators and glob patterns used in a condition matcher.
|
|
23363
24851
|
*/
|
|
23364
24852
|
declare interface RuleSetLogicalConditionsAbsolute {
|
|
23365
24853
|
/**
|
|
@@ -23367,6 +24855,12 @@ declare interface RuleSetLogicalConditionsAbsolute {
|
|
|
23367
24855
|
*/
|
|
23368
24856
|
and?: RuleSetConditionAbsolute[];
|
|
23369
24857
|
|
|
24858
|
+
/**
|
|
24859
|
+
* 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.
|
|
24860
|
+
* @since 5.110.0
|
|
24861
|
+
*/
|
|
24862
|
+
glob?: string | string[];
|
|
24863
|
+
|
|
23370
24864
|
/**
|
|
23371
24865
|
* Logical NOT.
|
|
23372
24866
|
*/
|
|
@@ -23417,6 +24911,17 @@ declare interface RuleSetRule {
|
|
|
23417
24911
|
*/
|
|
23418
24912
|
descriptionData?: { [index: string]: RuleSetConditionOrConditions };
|
|
23419
24913
|
|
|
24914
|
+
/**
|
|
24915
|
+
* 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.
|
|
24916
|
+
* @since 5.110.0
|
|
24917
|
+
*/
|
|
24918
|
+
descriptionRelativePath?:
|
|
24919
|
+
| string
|
|
24920
|
+
| RegExp
|
|
24921
|
+
| ((value: string) => boolean)
|
|
24922
|
+
| RuleSetLogicalConditions
|
|
24923
|
+
| RuleSetCondition[];
|
|
24924
|
+
|
|
23420
24925
|
/**
|
|
23421
24926
|
* Enforce this rule as pre or post step.
|
|
23422
24927
|
*/
|
|
@@ -23442,6 +24947,12 @@ declare interface RuleSetRule {
|
|
|
23442
24947
|
*/
|
|
23443
24948
|
generator?: { [index: string]: any };
|
|
23444
24949
|
|
|
24950
|
+
/**
|
|
24951
|
+
* Match the module resource against glob patterns, `!` in front of a pattern excludes it. Combines with `test`, `include` and `exclude`.
|
|
24952
|
+
* @since 5.110.0
|
|
24953
|
+
*/
|
|
24954
|
+
glob?: string | string[];
|
|
24955
|
+
|
|
23445
24956
|
/**
|
|
23446
24957
|
* Shortcut for resource.include.
|
|
23447
24958
|
*/
|
|
@@ -23740,6 +25251,7 @@ type RuleSetUseItem =
|
|
|
23740
25251
|
*/
|
|
23741
25252
|
options?: string | { [index: string]: any };
|
|
23742
25253
|
};
|
|
25254
|
+
type RuleSyntax = AtRule | QualifiedRule;
|
|
23743
25255
|
declare class RuntimeChunkPlugin {
|
|
23744
25256
|
/**
|
|
23745
25257
|
* Creates an instance of RuntimeChunkPlugin.
|
|
@@ -23789,6 +25301,8 @@ declare class RuntimeModule extends Module {
|
|
|
23789
25301
|
|
|
23790
25302
|
/**
|
|
23791
25303
|
* Returns true, if the runtime module should get it's own scope.
|
|
25304
|
+
* When false, `generate()` must emit complete statements ending with `;`
|
|
25305
|
+
* so a following runtime IIFE is not parsed as a call (ASI).
|
|
23792
25306
|
*/
|
|
23793
25307
|
shouldIsolate(): boolean;
|
|
23794
25308
|
|
|
@@ -23906,6 +25420,12 @@ declare abstract class RuntimeTemplate {
|
|
|
23906
25420
|
globalObject: string;
|
|
23907
25421
|
contentHashReplacement: string;
|
|
23908
25422
|
isIIFE(): boolean;
|
|
25423
|
+
|
|
25424
|
+
/**
|
|
25425
|
+
* Whether the global object expression reads the `this` binding, which only
|
|
25426
|
+
* refers to the global object outside of strict mode.
|
|
25427
|
+
*/
|
|
25428
|
+
globalObjectUsesThis(): boolean;
|
|
23909
25429
|
isModule(): boolean;
|
|
23910
25430
|
isNeutralPlatform(): boolean;
|
|
23911
25431
|
|
|
@@ -23923,8 +25443,10 @@ declare abstract class RuntimeTemplate {
|
|
|
23923
25443
|
|
|
23924
25444
|
/**
|
|
23925
25445
|
* 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`.
|
|
25446
|
+
* is no DOM (SSR). Read it with `__webpack_css_server_styles__`; it is keyed
|
|
25447
|
+
* by the style/chunk identifier and namespaced by `output.uniqueName`.
|
|
25448
|
+
* Targets without `globalThis` go through the `__webpack_require__.g`
|
|
25449
|
+
* polyfill, so consumers must also require `RuntimeGlobals.global`.
|
|
23928
25450
|
*/
|
|
23929
25451
|
cssServerStyleRegistry(): string;
|
|
23930
25452
|
supportsConst(): boolean;
|
|
@@ -23943,8 +25465,81 @@ declare abstract class RuntimeTemplate {
|
|
|
23943
25465
|
supportsBigIntLiteral(): boolean;
|
|
23944
25466
|
supportsDynamicImport(): boolean;
|
|
23945
25467
|
supportsEcmaScriptModuleSyntax(): boolean;
|
|
25468
|
+
supportsDeferImport(): boolean;
|
|
25469
|
+
supportsSourceImport(): boolean;
|
|
23946
25470
|
supportsModulePreload(): boolean;
|
|
23947
|
-
|
|
25471
|
+
|
|
25472
|
+
/**
|
|
25473
|
+
* Whether a reference a foreign bundler can follow without running webpack's runtime
|
|
25474
|
+
* may be emitted — the one question every caller asks, in the form it is asking for:
|
|
25475
|
+
* - `"import"` — a literal `import("./chunk.js")` in place of `ensureChunk(id)`
|
|
25476
|
+
* - `"url"` — a literal `new URL(<file>, import.meta.url)`
|
|
25477
|
+
* - `"url-runtime"` — the same, written into a runtime module rather than a module
|
|
25478
|
+
* - `"url-inline"` — whether such a reference names the file at the call site
|
|
25479
|
+
* - `"wasm"` — the same, fully baked for a wasm binary the runtime would name
|
|
25480
|
+
* - `"wasm-relative"` — a wasm path built at runtime under an `import.meta.url` base
|
|
25481
|
+
* `"url-inline"` differs from `"url"` only in taking the `.p + <file>` fallback as
|
|
25482
|
+
* an answer too — both name the file where it is used rather than through the
|
|
25483
|
+
* asset's javascript wrapper, which is what decides whether that wrapper is emitted.
|
|
25484
|
+
* A name code generation cannot settle may still be baked, through a stand-in the
|
|
25485
|
+
* deferred pass fills in. Not covered here, because only the reference can tell: a
|
|
25486
|
+
* chunk with no id, and one this compilation emits no javascript for.
|
|
25487
|
+
*/
|
|
25488
|
+
supportsAnalyzable(
|
|
25489
|
+
form: AnalyzableForm,
|
|
25490
|
+
chunkGraph?: ChunkGraph,
|
|
25491
|
+
module?: Module,
|
|
25492
|
+
runtime?: RuntimeSpec
|
|
25493
|
+
): boolean;
|
|
25494
|
+
|
|
25495
|
+
/**
|
|
25496
|
+
* Builds the analyzable `new URL(specifier, import.meta.url)` expression the ESM
|
|
25497
|
+
* wasm/asset loader backends use to reference an emitted binary relative to the
|
|
25498
|
+
* current module (via `output.importMetaName`) instead of the runtime public-path
|
|
25499
|
+
* global — the form other bundlers and webpack itself can statically follow.
|
|
25500
|
+
*/
|
|
25501
|
+
importMetaUrl(specifier: string): string;
|
|
25502
|
+
|
|
25503
|
+
/**
|
|
25504
|
+
* Whether a baked asset url resolves against the entry `baseUri` at all. A public
|
|
25505
|
+
* path that reaches the same place from any base never reads `.b` — and `auto`
|
|
25506
|
+
* resolves to an absolute url too — while output with no baked form has nothing to
|
|
25507
|
+
* resolve. Where this is false, what `baseUri` is set to cannot reach the generated
|
|
25508
|
+
* code, so it must not reach the module hash either: `URLDependency.updateHash`
|
|
25509
|
+
* asks this before contributing one.
|
|
25510
|
+
*/
|
|
25511
|
+
analyzableUrlReadsBaseUri(): boolean;
|
|
25512
|
+
|
|
25513
|
+
/**
|
|
25514
|
+
* Static literal specifier (already quoted) for the `new URL(<here>, import.meta.url)`
|
|
25515
|
+
* an asset reference bakes to, or `null` to keep the runtime form. Unlike a wasm
|
|
25516
|
+
* binary, the runtime resolves an asset url against `__webpack_require__.b` — the
|
|
25517
|
+
* output root, or an entry `baseUri` where one is set — so that base is settled here
|
|
25518
|
+
* before the rest of the name is.
|
|
25519
|
+
*/
|
|
25520
|
+
getAnalyzableAssetUrl(
|
|
25521
|
+
module: Module,
|
|
25522
|
+
chunkGraph: ChunkGraph,
|
|
25523
|
+
filename: string,
|
|
25524
|
+
runtime: RuntimeSpec
|
|
25525
|
+
): null | string;
|
|
25526
|
+
|
|
25527
|
+
/**
|
|
25528
|
+
* The `baseUri` the entries this code runs under agree on, which replaces the output
|
|
25529
|
+
* root an asset url resolves against. Asked per runtime, because that is what the
|
|
25530
|
+
* module is generated for: two entries with different bases each get their own
|
|
25531
|
+
* source. `undefined` when none of them sets one, `null` when they disagree — an
|
|
25532
|
+
* entry that omits it disagrees with one that sets it.
|
|
25533
|
+
*/
|
|
25534
|
+
entryBaseUri(runtime: RuntimeSpec): undefined | null | string;
|
|
25535
|
+
|
|
25536
|
+
/**
|
|
25537
|
+
* `output.publicPath` as the constant it will be, for code that would otherwise read
|
|
25538
|
+
* `__webpack_require__.p` for a value that never changes. `undefined` when only the
|
|
25539
|
+
* hash could say, or when a runtime reassigns `__webpack_public_path__` — then the
|
|
25540
|
+
* global is the only thing that knows.
|
|
25541
|
+
*/
|
|
25542
|
+
constantPublicPath(): undefined | string;
|
|
23948
25543
|
supportTemplateLiteral(): boolean;
|
|
23949
25544
|
supportNodePrefixForCoreModules(): boolean;
|
|
23950
25545
|
|
|
@@ -24000,6 +25595,12 @@ declare abstract class RuntimeTemplate {
|
|
|
24000
25595
|
*/
|
|
24001
25596
|
getBuiltinModule(request: string, access?: string): string;
|
|
24002
25597
|
|
|
25598
|
+
/**
|
|
25599
|
+
* Renders a `then` callback calling `fn` with `args`. An arrow keeps the `this`
|
|
25600
|
+
* a method call gives; the bound form is shorter without arrows.
|
|
25601
|
+
*/
|
|
25602
|
+
deferredCall(fn: string, args: string): string;
|
|
25603
|
+
|
|
24003
25604
|
/**
|
|
24004
25605
|
* Renders an object-literal method, using method shorthand when supported
|
|
24005
25606
|
* and falling back to a `prop: function/arrow` property otherwise.
|
|
@@ -24458,6 +26059,70 @@ declare abstract class RuntimeTemplate {
|
|
|
24458
26059
|
originModule?: Module;
|
|
24459
26060
|
}): string;
|
|
24460
26061
|
|
|
26062
|
+
/**
|
|
26063
|
+
* For ESM module output, load a single statically-named chunk through the
|
|
26064
|
+
* `analyzableChunkImport` helper — a literal `import("./chunk.js")` other bundlers
|
|
26065
|
+
* and webpack itself can follow, wrapped to keep `ensureChunk` timing and deduplication.
|
|
26066
|
+
* Returns `null` to fall back to the runtime `ensureChunk` form.
|
|
26067
|
+
*/
|
|
26068
|
+
analyzableChunkImport(
|
|
26069
|
+
chunk: Chunk,
|
|
26070
|
+
comment: string,
|
|
26071
|
+
runtimeRequirements: Set<string>,
|
|
26072
|
+
originModule: undefined | Module,
|
|
26073
|
+
chunkGraph: ChunkGraph
|
|
26074
|
+
): null | string;
|
|
26075
|
+
|
|
26076
|
+
/**
|
|
26077
|
+
* The `../` path from a chunk's own asset back to the output root. Hashes are
|
|
26078
|
+
* neutralized first: a runtime module is generated once to be hashed, before any
|
|
26079
|
+
* hash exists, so resolving one there throws — and `RuntimeModule.updateHash`
|
|
26080
|
+
* swallows that, pinning the module's hash to the message.
|
|
26081
|
+
*/
|
|
26082
|
+
chunkRootOutputDir(chunk: Chunk, enforceRelative: boolean): string;
|
|
26083
|
+
|
|
26084
|
+
/**
|
|
26085
|
+
* Static `new URL(<file>, import.meta.url)` for every stylesheet a runtime can load,
|
|
26086
|
+
* keyed by chunk id, or `null` when any of them has to keep the runtime
|
|
26087
|
+
* `publicPath + getChunkCssFilename(id)` form. Both the runtime module reading them
|
|
26088
|
+
* and the plugin declaring what it needs ask this, so the two always agree. The
|
|
26089
|
+
* runtime hands an absolute url string to `link.href`, and so does this — the browser
|
|
26090
|
+
* resolves the element against the document, which is not where the chunk sits, and
|
|
26091
|
+
* the loader reads the url as text either way. Nothing is written out for a runtime
|
|
26092
|
+
* that also carries the hot handler; see below.
|
|
26093
|
+
*/
|
|
26094
|
+
analyzableCssChunkUrls(
|
|
26095
|
+
runtimeChunk: Chunk,
|
|
26096
|
+
chunkGraph: ChunkGraph,
|
|
26097
|
+
runtimeRequirements: ReadonlySet<string>,
|
|
26098
|
+
consumingModule?: Module
|
|
26099
|
+
): null | Map<ChunkId, string>;
|
|
26100
|
+
|
|
26101
|
+
/**
|
|
26102
|
+
* Static `new URL(<file>, import.meta.url).href` for every javascript chunk a
|
|
26103
|
+
* runtime can hint at with `<link rel="prefetch"/"modulepreload">`, keyed by chunk
|
|
26104
|
+
* id, or `null` when any of them has to keep the runtime
|
|
26105
|
+
* `publicPath + getChunkScriptFilename(id)` form. Both the runtime module reading
|
|
26106
|
+
* them and the plugin declaring what it needs ask this, so the two always agree.
|
|
26107
|
+
*/
|
|
26108
|
+
analyzableChunkScriptUrls(
|
|
26109
|
+
runtimeChunk: Chunk,
|
|
26110
|
+
chunkGraph: ChunkGraph,
|
|
26111
|
+
runtimeRequirements: ReadonlySet<string>,
|
|
26112
|
+
consumingModule?: Module
|
|
26113
|
+
): null | Map<ChunkId, string>;
|
|
26114
|
+
|
|
26115
|
+
/**
|
|
26116
|
+
* Static `new URL(<file>, import.meta.url)` for the binary emitted for an async wasm
|
|
26117
|
+
* module. Only called when `supportsAnalyzable("wasm")` holds.
|
|
26118
|
+
*/
|
|
26119
|
+
getAnalyzableWasmUrl(
|
|
26120
|
+
module: Module,
|
|
26121
|
+
chunkGraph: ChunkGraph,
|
|
26122
|
+
runtime: RuntimeSpec,
|
|
26123
|
+
runtimeRequirements: Set<string>
|
|
26124
|
+
): string;
|
|
26125
|
+
|
|
24461
26126
|
/**
|
|
24462
26127
|
* Async module factory.
|
|
24463
26128
|
*/
|
|
@@ -24478,6 +26143,10 @@ declare abstract class RuntimeTemplate {
|
|
|
24478
26143
|
* request string used originally
|
|
24479
26144
|
*/
|
|
24480
26145
|
request?: string;
|
|
26146
|
+
/**
|
|
26147
|
+
* the module the factory is emitted into
|
|
26148
|
+
*/
|
|
26149
|
+
originModule?: Module;
|
|
24481
26150
|
}): string;
|
|
24482
26151
|
|
|
24483
26152
|
/**
|
|
@@ -24542,32 +26211,28 @@ declare interface RuntimeValueOptions {
|
|
|
24542
26211
|
buildDependencies?: string[];
|
|
24543
26212
|
version?: string | (() => string);
|
|
24544
26213
|
}
|
|
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;
|
|
26214
|
+
|
|
26215
|
+
/**
|
|
26216
|
+
* A lexical scope. One shape for every kind, so the property loads in the
|
|
26217
|
+
* resolution loop stay monomorphic.
|
|
26218
|
+
*/
|
|
26219
|
+
declare abstract class Scope {
|
|
26220
|
+
type: ScopeType;
|
|
26221
|
+
block: NodeEstreeIndex;
|
|
24561
26222
|
upper: null | Scope;
|
|
24562
26223
|
childScopes: Scope[];
|
|
24563
|
-
variableScope: Scope;
|
|
24564
|
-
block: NodeEstreeIndex;
|
|
24565
26224
|
variables: Variable[];
|
|
24566
|
-
|
|
24567
|
-
|
|
24568
|
-
|
|
24569
|
-
|
|
24570
|
-
|
|
26225
|
+
variableScope: Scope;
|
|
26226
|
+
|
|
26227
|
+
/**
|
|
26228
|
+
* For a function scope with parameters, the offset where its body
|
|
26229
|
+
* starts; `-1` for every other scope. Separates the two regions that
|
|
26230
|
+
* share this scope, so a reference in the parameter list can be kept
|
|
26231
|
+
* from resolving to a binding declared in the body — see
|
|
26232
|
+
* `isHiddenBodyBinding`.
|
|
26233
|
+
*/
|
|
26234
|
+
paramBoundary: number;
|
|
26235
|
+
getBinding(name: string): undefined | Variable;
|
|
24571
26236
|
}
|
|
24572
26237
|
|
|
24573
26238
|
/**
|
|
@@ -24585,6 +26250,19 @@ declare interface ScopeInfo {
|
|
|
24585
26250
|
isAsmJs: boolean;
|
|
24586
26251
|
terminated?: 1 | 2;
|
|
24587
26252
|
}
|
|
26253
|
+
type ScopeType =
|
|
26254
|
+
| "function"
|
|
26255
|
+
| "module"
|
|
26256
|
+
| "global"
|
|
26257
|
+
| "function-expression-name"
|
|
26258
|
+
| "block"
|
|
26259
|
+
| "switch"
|
|
26260
|
+
| "catch"
|
|
26261
|
+
| "with"
|
|
26262
|
+
| "for"
|
|
26263
|
+
| "class"
|
|
26264
|
+
| "class-field-initializer"
|
|
26265
|
+
| "class-static-block";
|
|
24588
26266
|
declare interface Selector<A, B> {
|
|
24589
26267
|
(input: A): undefined | null | B;
|
|
24590
26268
|
}
|
|
@@ -24638,9 +26316,7 @@ declare abstract class SerializerMiddleware<
|
|
|
24638
26316
|
context: Context
|
|
24639
26317
|
): DeserializedType | Promise<DeserializedType>;
|
|
24640
26318
|
}
|
|
24641
|
-
type ServerLazyCompilationBackend =
|
|
24642
|
-
| ServerImportHttp<typeof IncomingMessage>
|
|
24643
|
-
| ServerImportHttps<typeof IncomingMessage>;
|
|
26319
|
+
type ServerLazyCompilationBackend = ServerImportHttp | ServerImportHttps;
|
|
24644
26320
|
declare interface SetIterator<T> extends IteratorObject<T, undefined> {
|
|
24645
26321
|
[Symbol.iterator](): SetIterator<T>;
|
|
24646
26322
|
[Symbol.dispose](): void;
|
|
@@ -24750,10 +26426,31 @@ declare class SideEffectsFlagPlugin {
|
|
|
24750
26426
|
): undefined | boolean;
|
|
24751
26427
|
}
|
|
24752
26428
|
type SideEffectsFlagValue = undefined | string | boolean | string[];
|
|
26429
|
+
type SimpleBlock = NodeSyntax & {
|
|
26430
|
+
token: SimpleBlockToken;
|
|
26431
|
+
value: ComponentValue[];
|
|
26432
|
+
};
|
|
26433
|
+
type SimpleBlockToken = "[" | "(" | "{";
|
|
24753
26434
|
type SimpleType = "string" | "number" | "boolean";
|
|
24754
26435
|
declare class SizeOnlySource extends Source {
|
|
24755
26436
|
constructor(size: number);
|
|
24756
26437
|
}
|
|
26438
|
+
declare interface SkipOptions {
|
|
26439
|
+
/**
|
|
26440
|
+
* component-value node types to drop from declaration value / function-arg lists (indexed by `NodeType`, 1 = skip; build with `buildSkipSet`)
|
|
26441
|
+
*/
|
|
26442
|
+
types?: Uint8Array;
|
|
26443
|
+
|
|
26444
|
+
/**
|
|
26445
|
+
* drop qualified-rule (selector) preludes — the rule and its block are still produced (default false)
|
|
26446
|
+
*/
|
|
26447
|
+
selectorPrelude?: boolean;
|
|
26448
|
+
|
|
26449
|
+
/**
|
|
26450
|
+
* drop at-rule preludes — the at-rule and its block are still produced (default false)
|
|
26451
|
+
*/
|
|
26452
|
+
atRulePrelude?: boolean;
|
|
26453
|
+
}
|
|
24757
26454
|
declare abstract class Snapshot {
|
|
24758
26455
|
startTime?: number;
|
|
24759
26456
|
fileTimestamps?: Map<string, null | FileSystemInfoEntry>;
|
|
@@ -24864,12 +26561,12 @@ declare abstract class Snapshot {
|
|
|
24864
26561
|
/**
|
|
24865
26562
|
* Serializes this instance into the provided serializer context.
|
|
24866
26563
|
*/
|
|
24867
|
-
serialize(__0:
|
|
26564
|
+
serialize(__0: ObjectSerializerContextObjectMiddlewareObject_3): void;
|
|
24868
26565
|
|
|
24869
26566
|
/**
|
|
24870
26567
|
* Restores this instance from the provided deserializer context.
|
|
24871
26568
|
*/
|
|
24872
|
-
deserialize(__0:
|
|
26569
|
+
deserialize(__0: ObjectDeserializerContextObjectMiddlewareObject_2): void;
|
|
24873
26570
|
|
|
24874
26571
|
/**
|
|
24875
26572
|
* Gets file iterable.
|
|
@@ -25144,6 +26841,14 @@ declare interface SourceLike {
|
|
|
25144
26841
|
*/
|
|
25145
26842
|
clearCache?: (options?: ClearCacheOptions, visited?: WeakSet<Source>) => void;
|
|
25146
26843
|
}
|
|
26844
|
+
declare interface SourceMap {
|
|
26845
|
+
version: 3;
|
|
26846
|
+
file: string;
|
|
26847
|
+
sources: string[];
|
|
26848
|
+
sourcesContent?: string[];
|
|
26849
|
+
names: string[];
|
|
26850
|
+
mappings: string;
|
|
26851
|
+
}
|
|
25147
26852
|
declare class SourceMapDevToolPlugin {
|
|
25148
26853
|
/**
|
|
25149
26854
|
* Creates an instance of SourceMapDevToolPlugin.
|
|
@@ -25180,7 +26885,7 @@ declare interface SourceMapDevToolPluginOptions {
|
|
|
25180
26885
|
/**
|
|
25181
26886
|
* Exclude modules that match the given value from source map generation.
|
|
25182
26887
|
*/
|
|
25183
|
-
exclude?: string | RegExp | ((str: string) => boolean) |
|
|
26888
|
+
exclude?: string | RegExp | ((str: string) => boolean) | RuleAlias[];
|
|
25184
26889
|
|
|
25185
26890
|
/**
|
|
25186
26891
|
* 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 +26906,12 @@ declare interface SourceMapDevToolPluginOptions {
|
|
|
25201
26906
|
/**
|
|
25202
26907
|
* Decide whether to ignore source files that match the specified value in the SourceMap.
|
|
25203
26908
|
*/
|
|
25204
|
-
ignoreList?: string | RegExp | ((str: string) => boolean) |
|
|
26909
|
+
ignoreList?: string | RegExp | ((str: string) => boolean) | RuleAlias[];
|
|
25205
26910
|
|
|
25206
26911
|
/**
|
|
25207
26912
|
* Include source maps for module paths that match the given value.
|
|
25208
26913
|
*/
|
|
25209
|
-
include?: string | RegExp | ((str: string) => boolean) |
|
|
26914
|
+
include?: string | RegExp | ((str: string) => boolean) | RuleAlias[];
|
|
25210
26915
|
|
|
25211
26916
|
/**
|
|
25212
26917
|
* Indicates whether SourceMaps from loaders should be used (defaults to true).
|
|
@@ -25242,7 +26947,11 @@ declare interface SourceMapDevToolPluginOptions {
|
|
|
25242
26947
|
/**
|
|
25243
26948
|
* Include source maps for modules based on their extension (defaults to .js and .css).
|
|
25244
26949
|
*/
|
|
25245
|
-
test?: string | RegExp | ((str: string) => boolean) |
|
|
26950
|
+
test?: string | RegExp | ((str: string) => boolean) | RuleAlias[];
|
|
26951
|
+
}
|
|
26952
|
+
declare interface SourceMapOptions {
|
|
26953
|
+
source: string;
|
|
26954
|
+
content?: string;
|
|
25246
26955
|
}
|
|
25247
26956
|
declare class SourceMapSource extends Source {
|
|
25248
26957
|
constructor(
|
|
@@ -25284,6 +26993,232 @@ declare interface SourcePosition {
|
|
|
25284
26993
|
line: number;
|
|
25285
26994
|
column?: number;
|
|
25286
26995
|
}
|
|
26996
|
+
|
|
26997
|
+
/**
|
|
26998
|
+
* Visitor coordinator: owns the visitor registry and drives a language
|
|
26999
|
+
* `grammar` over the source. Language-agnostic — each syntax (CSS, HTML, …)
|
|
27000
|
+
* binds its own grammar, node-type enum and (optionally) node printer.
|
|
27001
|
+
* Babel-style usage:
|
|
27002
|
+
* ```
|
|
27003
|
+
* processor.use({ [NodeType.X]: (path) => {}, [NodeType.Y]: { enter, exit } });
|
|
27004
|
+
* processor.process(source);
|
|
27005
|
+
* ```
|
|
27006
|
+
*/
|
|
27007
|
+
declare abstract class SourceProcessorClass<
|
|
27008
|
+
TPath,
|
|
27009
|
+
TNode,
|
|
27010
|
+
TProcessOptions = object,
|
|
27011
|
+
TPrintOptions = object
|
|
27012
|
+
> {
|
|
27013
|
+
/**
|
|
27014
|
+
* Register a Babel-style visitor map; calls accumulate per node type.
|
|
27015
|
+
* A bucket is a function (= `{ enter }`) or `{ enter?, exit? }`.
|
|
27016
|
+
*/
|
|
27017
|
+
use(
|
|
27018
|
+
map: VisitorMap<TPath>
|
|
27019
|
+
): SourceProcessorClass<TPath, TNode, TProcessOptions, TPrintOptions>;
|
|
27020
|
+
|
|
27021
|
+
/**
|
|
27022
|
+
* Parse `input` once and fire the visitors in source order. Asking for output
|
|
27023
|
+
* — `mode`, the one thing that names it — makes the same walk print, given a
|
|
27024
|
+
* printer supplied at construction: a
|
|
27025
|
+
* {@link PrintContext} is created, each node's printer fires into it as the node
|
|
27026
|
+
* finishes, and the result is returned as `{ code, map }`: the serialized output
|
|
27027
|
+
* and, for a caller that named its input with `source` / `content`, the
|
|
27028
|
+
* input->output source map — `map` is `undefined` without one. Asking for
|
|
27029
|
+
* none of it only walks and returns `undefined`. A single parse — printing
|
|
27030
|
+
* never re-parses; all configuration is per-call.
|
|
27031
|
+
*/
|
|
27032
|
+
process(
|
|
27033
|
+
input: string,
|
|
27034
|
+
options: TProcessOptions & { mode: "minify" | "beautify" } & {
|
|
27035
|
+
source: string;
|
|
27036
|
+
content?: string;
|
|
27037
|
+
}
|
|
27038
|
+
): { code: string; map: SourceMap };
|
|
27039
|
+
process(
|
|
27040
|
+
input: string,
|
|
27041
|
+
options: TProcessOptions & { mode: "minify" | "beautify" }
|
|
27042
|
+
): { code: string; map: undefined };
|
|
27043
|
+
process(input: string, options?: TProcessOptions): undefined;
|
|
27044
|
+
|
|
27045
|
+
/**
|
|
27046
|
+
* {@link process}, for a caller whose renderer answers asynchronously. Code
|
|
27047
|
+
* generation is synchronous — a printer returns its node's text, it cannot
|
|
27048
|
+
* await one — so the walk leaves a marker where each answer goes, they are
|
|
27049
|
+
* asked for together, and {@link PrintContext.substitute} stands each in its
|
|
27050
|
+
* place before the output and its map are built. One parse either way, and
|
|
27051
|
+
* the async boundary stays at the top rather than on every node.
|
|
27052
|
+
* This is the shape `process` itself takes once it is async: how the answers
|
|
27053
|
+
* are waited for is this method's business, so nothing above it changes.
|
|
27054
|
+
*/
|
|
27055
|
+
processAsync(
|
|
27056
|
+
input: string,
|
|
27057
|
+
options: Omit<TProcessOptions, "renderEmbeddedSource"> & {
|
|
27058
|
+
mode: "minify" | "beautify";
|
|
27059
|
+
} & {
|
|
27060
|
+
source?: string;
|
|
27061
|
+
content?: string;
|
|
27062
|
+
renderEmbeddedSource?: (
|
|
27063
|
+
source: string,
|
|
27064
|
+
hole?: any
|
|
27065
|
+
) => undefined | string | Promise<undefined | string>;
|
|
27066
|
+
}
|
|
27067
|
+
): Promise<{ code: string; map?: SourceMap }>;
|
|
27068
|
+
}
|
|
27069
|
+
|
|
27070
|
+
/**
|
|
27071
|
+
* The generic visitor coordinator (`util/SourceProcessor`) bound to the HTML
|
|
27072
|
+
* `grammar`. Babel-style usage:
|
|
27073
|
+
* ```
|
|
27074
|
+
* new SourceProcessor().use({ [NodeType.Element]: (path) => {}, [NodeType.Comment]: { enter, exit } }).process(source, { skip });
|
|
27075
|
+
* ```
|
|
27076
|
+
* @experimental exposed as `webpack.html.syntax.SourceProcessor`; unstable API
|
|
27077
|
+
*/
|
|
27078
|
+
declare class SourceProcessorSyntaxClass_1 extends SourceProcessorClass<
|
|
27079
|
+
{
|
|
27080
|
+
get node(): number;
|
|
27081
|
+
get parent(): null | number;
|
|
27082
|
+
/**
|
|
27083
|
+
* Stop the walk descending into the current node (enter only).
|
|
27084
|
+
*/
|
|
27085
|
+
skipChildren(): void;
|
|
27086
|
+
type(n?: number): number;
|
|
27087
|
+
start(n?: number): number;
|
|
27088
|
+
end(n?: number): number;
|
|
27089
|
+
/**
|
|
27090
|
+
* Raw source slice `[start, end)` — valid only during the walk (the printer's
|
|
27091
|
+
* window), before `parseHtml` releases `_htmlSource`.
|
|
27092
|
+
*/
|
|
27093
|
+
source(n?: number): string;
|
|
27094
|
+
sourceSpanAt(from: number, to: number): string;
|
|
27095
|
+
tagName(n?: number): string;
|
|
27096
|
+
namespace(n?: number): number;
|
|
27097
|
+
selfClosing(n?: number): boolean;
|
|
27098
|
+
attributes(n?: number): HtmlAttribute[];
|
|
27099
|
+
attributeCount(n?: number): number;
|
|
27100
|
+
/**
|
|
27101
|
+
* The i-th attribute of an element, as an id for the `attribute*` reads.
|
|
27102
|
+
*/
|
|
27103
|
+
attributeAt(i: number, n?: number): number;
|
|
27104
|
+
/**
|
|
27105
|
+
* Linear lookup by (lowercased) name.
|
|
27106
|
+
*/
|
|
27107
|
+
findAttribute(name: string, n?: number): number;
|
|
27108
|
+
attributeName(a: number): string;
|
|
27109
|
+
attributeValue(a: number): string;
|
|
27110
|
+
attributeNameStart(a: number): number;
|
|
27111
|
+
attributeNameEnd(a: number): number;
|
|
27112
|
+
attributeValueStart(a: number): number;
|
|
27113
|
+
attributeValueEnd(a: number): number;
|
|
27114
|
+
tagEnd(n?: number): number;
|
|
27115
|
+
nameEnd(n?: number): number;
|
|
27116
|
+
/**
|
|
27117
|
+
* Whether the source wrote this element's end tag rather than the parser
|
|
27118
|
+
* popping it for an implied close. Read back off the range instead of marked
|
|
27119
|
+
* during the parse: an element's end spans the token that closed it, so its
|
|
27120
|
+
* own end tag is the last thing in it — and only the few elements around a
|
|
27121
|
+
* region printed from source ever ask.
|
|
27122
|
+
*/
|
|
27123
|
+
sourceClosed(n?: number): boolean;
|
|
27124
|
+
openTag(n?: number): string;
|
|
27125
|
+
/**
|
|
27126
|
+
* An element's end tag, generated as `</name>` from the opening tag's own name
|
|
27127
|
+
* (exact source casing, correct for foreign camelCase elements). Generated, not
|
|
27128
|
+
* sliced: element `end` offsets don't span the end tag, and an omitted optional
|
|
27129
|
+
* end tag (`<li>`, `<p>`, …) still serializes to the same DOM. `""` when the
|
|
27130
|
+
* parser inserted the element, as {@link openTag } does — it has no name in the
|
|
27131
|
+
* source to echo, and slicing one would spell `</>`.
|
|
27132
|
+
*/
|
|
27133
|
+
closeTag(n?: number): string;
|
|
27134
|
+
contentEnd(n?: number): number;
|
|
27135
|
+
templateContent(n?: number): number;
|
|
27136
|
+
data(n?: number): string;
|
|
27137
|
+
piTarget(n?: number): string;
|
|
27138
|
+
doctypeName(n?: number): string;
|
|
27139
|
+
doctypePublicId(_n?: number): null | string;
|
|
27140
|
+
doctypeSystemId(_n?: number): null | string;
|
|
27141
|
+
firstChild(n?: number): number;
|
|
27142
|
+
nextSibling(n?: number): number;
|
|
27143
|
+
parentOf(n?: number): number;
|
|
27144
|
+
children(n?: number): number[];
|
|
27145
|
+
},
|
|
27146
|
+
number,
|
|
27147
|
+
HtmlProcessOptions
|
|
27148
|
+
> {
|
|
27149
|
+
constructor();
|
|
27150
|
+
static PrintContext: typeof PrintContext;
|
|
27151
|
+
static deferredWrite: (id: number) => string;
|
|
27152
|
+
}
|
|
27153
|
+
|
|
27154
|
+
/**
|
|
27155
|
+
* The generic visitor coordinator (`util/SourceProcessor`) bound to the CSS
|
|
27156
|
+
* `grammar`. All configuration is per `process` call. `process(src, { minimize:
|
|
27157
|
+
* true })` returns `{ code, map }` — the safely-minified serialization (built by
|
|
27158
|
+
* the same walk that fires visitors) and its source map; without `minimize` it
|
|
27159
|
+
* just walks and returns `undefined`. Babel-style usage:
|
|
27160
|
+
* ```
|
|
27161
|
+
* new SourceProcessor().use({ [NodeType.AtRule]: (path) => {} }).process(source, { skip });
|
|
27162
|
+
* ```
|
|
27163
|
+
* @experimental exposed as `webpack.css.syntax.SourceProcessor`; unstable API
|
|
27164
|
+
*/
|
|
27165
|
+
declare class SourceProcessorSyntaxClass_2 extends SourceProcessorClass<
|
|
27166
|
+
{
|
|
27167
|
+
get node(): NodeSyntax;
|
|
27168
|
+
get parent(): null | NodeSyntax;
|
|
27169
|
+
get index(): number;
|
|
27170
|
+
/**
|
|
27171
|
+
* Stop the walk descending into the current node (enter only).
|
|
27172
|
+
*/
|
|
27173
|
+
skipChildren(): void;
|
|
27174
|
+
inValue(): boolean;
|
|
27175
|
+
type(n?: NodeSyntax): number;
|
|
27176
|
+
start(n?: NodeSyntax): number;
|
|
27177
|
+
end(n?: NodeSyntax): number;
|
|
27178
|
+
range(n?: NodeSyntax): [number, number];
|
|
27179
|
+
loc(n?: NodeSyntax): {
|
|
27180
|
+
start: { line: number; column: number };
|
|
27181
|
+
end: { line: number; column: number };
|
|
27182
|
+
};
|
|
27183
|
+
source(n?: NodeSyntax): string;
|
|
27184
|
+
value(n?: NodeSyntax): string;
|
|
27185
|
+
unescaped(n?: NodeSyntax): string;
|
|
27186
|
+
typeFlag(n?: NodeSyntax): string;
|
|
27187
|
+
contentStart(n?: NodeSyntax): number;
|
|
27188
|
+
contentEnd(n?: NodeSyntax): number;
|
|
27189
|
+
name(n?: NodeSyntax): string;
|
|
27190
|
+
nameStart(n?: NodeSyntax): number;
|
|
27191
|
+
nameEnd(n?: NodeSyntax): number;
|
|
27192
|
+
unescapedName(n?: NodeSyntax): string;
|
|
27193
|
+
children(n?: NodeSyntax): ComponentValue[];
|
|
27194
|
+
prelude(n?: NodeSyntax): ComponentValue[];
|
|
27195
|
+
childCount(n?: NodeSyntax): number;
|
|
27196
|
+
childAt(n: NodeSyntax, i: number): ComponentValue;
|
|
27197
|
+
/**
|
|
27198
|
+
* A block big enough to stream hands its children to the visitors as each one
|
|
27199
|
+
* finishes rather than collecting them, so both lists read as an empty block
|
|
27200
|
+
* on it — `null`, which means no block at all, is still only for the `@…;`
|
|
27201
|
+
* forms. Read a block's children from the walk, not from here.
|
|
27202
|
+
*/
|
|
27203
|
+
declarations(n?: NodeSyntax): null | DeclarationSyntax[];
|
|
27204
|
+
/**
|
|
27205
|
+
* Reads as an empty block on a streamed rule; see {@link declarations }.
|
|
27206
|
+
*/
|
|
27207
|
+
childRules(n?: NodeSyntax): null | RuleSyntax[];
|
|
27208
|
+
blockStart(n?: NodeSyntax): number;
|
|
27209
|
+
blockEnd(n?: NodeSyntax): number;
|
|
27210
|
+
important(n?: NodeSyntax): boolean;
|
|
27211
|
+
blockToken(n?: NodeSyntax): SimpleBlockToken;
|
|
27212
|
+
setEnd(n: NodeSyntax, v: number): void;
|
|
27213
|
+
setBlockEnd(n: NodeSyntax, v: number): void;
|
|
27214
|
+
},
|
|
27215
|
+
NodeSyntax,
|
|
27216
|
+
CssProcessOptions
|
|
27217
|
+
> {
|
|
27218
|
+
constructor();
|
|
27219
|
+
static PrintContext: typeof PrintContext;
|
|
27220
|
+
static deferredWrite: (id: number) => string;
|
|
27221
|
+
}
|
|
25287
27222
|
declare interface SourceTable {
|
|
25288
27223
|
[index: string]: SourceBucket;
|
|
25289
27224
|
}
|
|
@@ -25354,6 +27289,9 @@ declare class SplitChunksPlugin {
|
|
|
25354
27289
|
* Applies the plugin by registering its hooks on the compiler.
|
|
25355
27290
|
*/
|
|
25356
27291
|
apply(compiler: Compiler): void;
|
|
27292
|
+
static getCappedSplits: (
|
|
27293
|
+
compilation: Compilation
|
|
27294
|
+
) => undefined | CappedSplit[];
|
|
25357
27295
|
}
|
|
25358
27296
|
declare interface SplitChunksSizes {
|
|
25359
27297
|
[index: string]: number;
|
|
@@ -25509,7 +27447,7 @@ declare abstract class StackedMap<K, V> {
|
|
|
25509
27447
|
*/
|
|
25510
27448
|
declare interface StarListDeserializerContext {
|
|
25511
27449
|
read: () => HarmonyExportImportedSpecifierDependency[];
|
|
25512
|
-
rest:
|
|
27450
|
+
rest: ObjectDeserializerContextObjectMiddlewareObject_2<[]>;
|
|
25513
27451
|
setCircularReference: (value: ReferenceableItem) => void;
|
|
25514
27452
|
}
|
|
25515
27453
|
|
|
@@ -25519,7 +27457,7 @@ declare interface StarListDeserializerContext {
|
|
|
25519
27457
|
declare interface StarListSerializerContext {
|
|
25520
27458
|
write: (
|
|
25521
27459
|
value: HarmonyExportImportedSpecifierDependency[]
|
|
25522
|
-
) =>
|
|
27460
|
+
) => ObjectSerializerContextObjectMiddlewareObject_3<[]>;
|
|
25523
27461
|
setCircularReference: (value: ReferenceableItem) => void;
|
|
25524
27462
|
snapshot: () => ObjectSerializerSnapshot;
|
|
25525
27463
|
rollback: (snapshot: ObjectSerializerSnapshot) => void;
|
|
@@ -26210,6 +28148,18 @@ declare interface StatsOptions {
|
|
|
26210
28148
|
*/
|
|
26211
28149
|
hash?: boolean;
|
|
26212
28150
|
|
|
28151
|
+
/**
|
|
28152
|
+
* Add performance hints reported with 'performance.hints: "stats"'.
|
|
28153
|
+
* @since 5.110.0
|
|
28154
|
+
*/
|
|
28155
|
+
hints?: boolean;
|
|
28156
|
+
|
|
28157
|
+
/**
|
|
28158
|
+
* Add the number of performance hints.
|
|
28159
|
+
* @since 5.110.0
|
|
28160
|
+
*/
|
|
28161
|
+
hintsCount?: boolean;
|
|
28162
|
+
|
|
26213
28163
|
/**
|
|
26214
28164
|
* Add ids.
|
|
26215
28165
|
*/
|
|
@@ -26457,6 +28407,7 @@ declare interface StreamOptions {
|
|
|
26457
28407
|
declare interface Stringable {
|
|
26458
28408
|
toString: () => string;
|
|
26459
28409
|
}
|
|
28410
|
+
type Stylesheet = NodeSyntax & { rules: RuleSyntax[] };
|
|
26460
28411
|
type Supports = undefined | string;
|
|
26461
28412
|
declare class SyncModuleIdsPlugin {
|
|
26462
28413
|
/**
|
|
@@ -26621,6 +28572,95 @@ declare interface TimestampAndHash {
|
|
|
26621
28572
|
timestamp?: number;
|
|
26622
28573
|
hash: string;
|
|
26623
28574
|
}
|
|
28575
|
+
type Token = NodeSyntax & {
|
|
28576
|
+
value: string;
|
|
28577
|
+
unescaped: string;
|
|
28578
|
+
numericValue: number;
|
|
28579
|
+
typeFlag: "number" | "id" | "integer" | "unrestricted";
|
|
28580
|
+
sign: "" | "+" | "-";
|
|
28581
|
+
unit: string;
|
|
28582
|
+
contentStart: number;
|
|
28583
|
+
contentEnd: number;
|
|
28584
|
+
};
|
|
28585
|
+
|
|
28586
|
+
/**
|
|
28587
|
+
* Position-based view over the lexer — webpack's stand-in for the spec's
|
|
28588
|
+
* "normalize into a token stream" (CSS Syntax §9). It unifies the lexer and the
|
|
28589
|
+
* stream in one class: the `readToken` primitive lexes one token (the CSS
|
|
28590
|
+
* tokenizer), and the spec token-stream operations `next` / `consume` /
|
|
28591
|
+
* `discard` / `mark` / `restoreMark` / `discardMark` drive it from a byte
|
|
28592
|
+
* cursor. `parse*` entry points wrap a source string in one of these and every
|
|
28593
|
+
* `consume*` algorithm reads tokens from it.
|
|
28594
|
+
* No token buffer is kept: the cursor is a byte offset and the only state is
|
|
28595
|
+
* the next token (lazily tokenized once and cached until consumed). The
|
|
28596
|
+
* declaration-vs-qualified-rule backtracking in `consumeABlocksContents`
|
|
28597
|
+
* rewinds by `mark`ing / `restoreMark`ing that byte offset, which simply
|
|
28598
|
+
* re-tokenizes the rewound span — comment tokens are filtered here and fire
|
|
28599
|
+
* `onComment` once each, tracked by a monotonic high-water mark so a
|
|
28600
|
+
* re-tokenized span never re-fires them.
|
|
28601
|
+
* `SourceProcessor` is handed this class (not an instance) and threads it to
|
|
28602
|
+
* the grammar, so a different language can drive the same visitor machinery by
|
|
28603
|
+
* swapping the tokenizer — the per-token `readToken` primitive — for its own.
|
|
28604
|
+
*/
|
|
28605
|
+
declare class TokenStream {
|
|
28606
|
+
constructor(
|
|
28607
|
+
input: string,
|
|
28608
|
+
pos?: number,
|
|
28609
|
+
locConverter?: LocConverter,
|
|
28610
|
+
onComment?: (input: string, start: number, end: number) => number
|
|
28611
|
+
);
|
|
28612
|
+
input: string;
|
|
28613
|
+
locConverter: LocConverter;
|
|
28614
|
+
|
|
28615
|
+
/**
|
|
28616
|
+
* The next token (CSS Syntax §3 "next token") — the upcoming token without
|
|
28617
|
+
* consuming it; the `<eof-token>` once the source is exhausted. This is the
|
|
28618
|
+
* token the consume algorithms dispatch on (the spec's "process"). Tokenized
|
|
28619
|
+
* from `_pos` on first use and cached until consumed; comment tokens are
|
|
28620
|
+
* skipped here, firing `onComment` once each.
|
|
28621
|
+
*/
|
|
28622
|
+
next(): MutableToken;
|
|
28623
|
+
|
|
28624
|
+
/**
|
|
28625
|
+
* Consume a token (CSS Syntax §3 "consume a token") — return the next token
|
|
28626
|
+
* and advance the cursor past it. The returned token is valid until the next
|
|
28627
|
+
* `next` re-tokenizes (the reused instance is not cleared by advancing).
|
|
28628
|
+
*/
|
|
28629
|
+
consume(): MutableToken;
|
|
28630
|
+
|
|
28631
|
+
/**
|
|
28632
|
+
* Discard a token (CSS Syntax §3 "discard a token") — advance the cursor past
|
|
28633
|
+
* the next token without returning it.
|
|
28634
|
+
*/
|
|
28635
|
+
discard(): void;
|
|
28636
|
+
|
|
28637
|
+
/**
|
|
28638
|
+
* Advance past the already-peeked next token, skipping the redundant `next()`
|
|
28639
|
+
* re-check `consume` / `discard` pay. Precondition: the caller has just called
|
|
28640
|
+
* `next()` (so `_tok` is the cached next token and `_hasNext` is true) and that
|
|
28641
|
+
* token is not the `<eof-token>` — the hot "peek, decide, advance" sites where
|
|
28642
|
+
* both always hold. Callers that can't guarantee a non-EOF cached token use
|
|
28643
|
+
* `consume` / `discard` instead.
|
|
28644
|
+
*/
|
|
28645
|
+
advance(): void;
|
|
28646
|
+
|
|
28647
|
+
/**
|
|
28648
|
+
* Mark (CSS Syntax §3 "mark") — push the current cursor position.
|
|
28649
|
+
*/
|
|
28650
|
+
mark(): void;
|
|
28651
|
+
|
|
28652
|
+
/**
|
|
28653
|
+
* Restore a mark (CSS Syntax §3 "restore a mark") — pop the last mark and
|
|
28654
|
+
* rewind the cursor to it. The rewound span is re-tokenized on the next read;
|
|
28655
|
+
* already-fired comments are not re-fired (`_commentHigh`).
|
|
28656
|
+
*/
|
|
28657
|
+
restoreMark(): void;
|
|
28658
|
+
|
|
28659
|
+
/**
|
|
28660
|
+
* Discard a mark (CSS Syntax §3 "discard a mark") — pop without rewinding.
|
|
28661
|
+
*/
|
|
28662
|
+
discardMark(): void;
|
|
28663
|
+
}
|
|
26624
28664
|
declare class TopLevelSymbol {
|
|
26625
28665
|
/**
|
|
26626
28666
|
* Creates an instance of TopLevelSymbol.
|
|
@@ -26829,12 +28869,15 @@ type ValueCacheVersion = string | Set<string>;
|
|
|
26829
28869
|
declare interface Values {
|
|
26830
28870
|
[index: string]: Value[];
|
|
26831
28871
|
}
|
|
26832
|
-
|
|
28872
|
+
|
|
28873
|
+
/**
|
|
28874
|
+
* A binding: one name declared in one scope.
|
|
28875
|
+
*/
|
|
28876
|
+
declare abstract class Variable {
|
|
26833
28877
|
name: string;
|
|
26834
|
-
scope: Scope;
|
|
26835
28878
|
identifiers: Identifier[];
|
|
26836
28879
|
references: Reference[];
|
|
26837
|
-
|
|
28880
|
+
scope: Scope;
|
|
26838
28881
|
}
|
|
26839
28882
|
declare class VariableInfo {
|
|
26840
28883
|
/**
|
|
@@ -26947,6 +28990,14 @@ declare class VirtualUrlPlugin {
|
|
|
26947
28990
|
getCacheVersion(version: string | true | (() => string)): undefined | string;
|
|
26948
28991
|
static DEFAULT_SCHEME: string;
|
|
26949
28992
|
}
|
|
28993
|
+
type VisitorBucket<TPath> =
|
|
28994
|
+
VisitorFn<TPath> | { enter?: VisitorFn<TPath>; exit?: VisitorFn<TPath> };
|
|
28995
|
+
declare interface VisitorFn<TPath> {
|
|
28996
|
+
(path: TPath): void;
|
|
28997
|
+
}
|
|
28998
|
+
declare interface VisitorMap<TPath> {
|
|
28999
|
+
[index: number]: VisitorBucket<TPath>;
|
|
29000
|
+
}
|
|
26950
29001
|
type WarningFilterItemTypes =
|
|
26951
29002
|
string | RegExp | ((warning: StatsError, warningString: string) => boolean);
|
|
26952
29003
|
|
|
@@ -27211,7 +29262,8 @@ declare abstract class WeakTupleMap<K extends any[], V> {
|
|
|
27211
29262
|
*/
|
|
27212
29263
|
clear(): void;
|
|
27213
29264
|
}
|
|
27214
|
-
declare abstract class
|
|
29265
|
+
declare abstract class WebAssemblyParserAsyncWebAssemblyParser extends ParserClass {}
|
|
29266
|
+
declare abstract class WebAssemblyParserClass extends ParserClass {}
|
|
27215
29267
|
declare interface WebAssemblyRenderContext {
|
|
27216
29268
|
/**
|
|
27217
29269
|
* the chunk
|
|
@@ -27267,12 +29319,12 @@ declare class WebpackError extends Error {
|
|
|
27267
29319
|
/**
|
|
27268
29320
|
* Serializes this instance into the provided serializer context.
|
|
27269
29321
|
*/
|
|
27270
|
-
serialize(__0:
|
|
29322
|
+
serialize(__0: ObjectSerializerContextObjectMiddlewareObject_3): void;
|
|
27271
29323
|
|
|
27272
29324
|
/**
|
|
27273
29325
|
* Restores this instance from the provided deserializer context.
|
|
27274
29326
|
*/
|
|
27275
|
-
deserialize(__0:
|
|
29327
|
+
deserialize(__0: ObjectDeserializerContextObjectMiddlewareObject_2): void;
|
|
27276
29328
|
|
|
27277
29329
|
/**
|
|
27278
29330
|
* Creates a `.stack` property on `targetObject`, which when accessed returns
|
|
@@ -27744,6 +29796,7 @@ declare interface WebpackRequire {
|
|
|
27744
29796
|
(id: string): any;
|
|
27745
29797
|
i?: ((options: ExecuteOptions) => void)[];
|
|
27746
29798
|
c?: Record<string, ExecuteModuleObject>;
|
|
29799
|
+
p?: string;
|
|
27747
29800
|
}
|
|
27748
29801
|
declare interface WithId {
|
|
27749
29802
|
id: string | number;
|
|
@@ -27792,6 +29845,31 @@ type WriteStreamOptions = StreamOptions & {
|
|
|
27792
29845
|
fs?: null | CreateWriteStreamFSImplementation;
|
|
27793
29846
|
flush?: boolean;
|
|
27794
29847
|
};
|
|
29848
|
+
declare interface _functionSyntax {
|
|
29849
|
+
/**
|
|
29850
|
+
* Decode HTML character references in a string. Handles all numeric
|
|
29851
|
+
* references (with WHATWG remap of 0x00, surrogates, out-of-range, and the
|
|
29852
|
+
* C1 Windows-1252 table) and the full WHATWG named character references
|
|
29853
|
+
* table. Unknown or malformed references are left as literal text.
|
|
29854
|
+
* When `isAttribute` is `true`, applies the WHATWG
|
|
29855
|
+
* "consumed-as-part-of-an-attribute" rule: a named reference without a
|
|
29856
|
+
* trailing `;` whose next character is `=` or ASCII alphanumeric is left
|
|
29857
|
+
* undecoded, so e.g. `&=foo` stays literal in an attribute value but
|
|
29858
|
+
* decodes to `&=foo` in text.
|
|
29859
|
+
* With `withMap` the result also carries a boundary map from the decoded
|
|
29860
|
+
* string back to raw offsets, so spans computed on the decoded text (e.g.
|
|
29861
|
+
* srcset candidate URLs) can be translated to source ranges. `map[i]` is the
|
|
29862
|
+
* raw offset of decoded boundary `i` (`0..text.length`); boundaries inside a
|
|
29863
|
+
* reference's decoded text map to the reference start. `map` is `undefined`
|
|
29864
|
+
* when nothing was decoded (then `text === str`).
|
|
29865
|
+
*/
|
|
29866
|
+
(str: string, isAttribute?: boolean): string;
|
|
29867
|
+
(
|
|
29868
|
+
str: string,
|
|
29869
|
+
isAttribute: undefined | boolean,
|
|
29870
|
+
withMap: true
|
|
29871
|
+
): DecodedEntitiesWithMap;
|
|
29872
|
+
}
|
|
27795
29873
|
|
|
27796
29874
|
/**
|
|
27797
29875
|
* Returns compiler or MultiCompiler.
|
|
@@ -27923,6 +30001,8 @@ declare namespace exports {
|
|
|
27923
30001
|
) => null | Problem[];
|
|
27924
30002
|
}
|
|
27925
30003
|
export namespace ModuleFilenameHelpers {
|
|
30004
|
+
export let DEFAULT_MODULE_FILENAME_TEMPLATE: string;
|
|
30005
|
+
export let DEFAULT_FALLBACK_MODULE_FILENAME_TEMPLATE: string;
|
|
27926
30006
|
export let ALL_LOADERS_RESOURCE: string;
|
|
27927
30007
|
export let REGEXP_ALL_LOADERS_RESOURCE: RegExp;
|
|
27928
30008
|
export let LOADERS_RESOURCE: string;
|
|
@@ -27986,9 +30066,10 @@ declare namespace exports {
|
|
|
27986
30066
|
export let baseURI: "__webpack_require__.b";
|
|
27987
30067
|
export let chunkCallback: "webpackChunk";
|
|
27988
30068
|
export let chunkName: "__webpack_require__.cn";
|
|
27989
|
-
export let commonJsWrap: "__webpack_require__.cjs";
|
|
27990
30069
|
export let compatGetDefaultExport: "__webpack_require__.n";
|
|
27991
30070
|
export let compileWasm: "__webpack_require__.vs";
|
|
30071
|
+
export let concatenationWrap: "__webpack_require__.cw";
|
|
30072
|
+
export let constructRequire: "__webpack_require__.cr";
|
|
27992
30073
|
export let createFakeNamespaceObject: "__webpack_require__.t";
|
|
27993
30074
|
export let createScript: "__webpack_require__.ts";
|
|
27994
30075
|
export let createScriptUrl: "__webpack_require__.tu";
|
|
@@ -27997,11 +30078,11 @@ declare namespace exports {
|
|
|
27997
30078
|
export let deferredModuleAsyncTransitiveDependencies: "__webpack_require__.zT";
|
|
27998
30079
|
export let deferredModuleAsyncTransitiveDependenciesSymbol: "__webpack_require__.zS";
|
|
27999
30080
|
export let definePropertyGetters: "__webpack_require__.d";
|
|
30081
|
+
export let definePropertyGettersFromArray: "__webpack_require__.d (array)";
|
|
28000
30082
|
export let ensureChunk: "__webpack_require__.e";
|
|
28001
30083
|
export let ensureChunkHandlers: "__webpack_require__.f";
|
|
28002
30084
|
export let ensureChunkIncludeEntries: "__webpack_require__.f (include entries)";
|
|
28003
30085
|
export let entryModuleId: "__webpack_require__.s";
|
|
28004
|
-
export let esmId: "__webpack_esm_id__";
|
|
28005
30086
|
export let esmIds: "__webpack_esm_ids__";
|
|
28006
30087
|
export let esmModules: "__webpack_esm_modules__";
|
|
28007
30088
|
export let esmRuntime: "__webpack_esm_runtime__";
|
|
@@ -28011,6 +30092,7 @@ declare namespace exports {
|
|
|
28011
30092
|
export let getChunkScriptFilename: "__webpack_require__.u";
|
|
28012
30093
|
export let getChunkUpdateCssFilename: "__webpack_require__.hk";
|
|
28013
30094
|
export let getChunkUpdateScriptFilename: "__webpack_require__.hu";
|
|
30095
|
+
export let getCssServerStyles: "__webpack_require__.cs";
|
|
28014
30096
|
export let getFullHash: "__webpack_require__.h";
|
|
28015
30097
|
export let getTrustedTypesPolicy: "__webpack_require__.tt";
|
|
28016
30098
|
export let getUpdateManifestFilename: "__webpack_require__.hmrF";
|
|
@@ -28184,9 +30266,607 @@ declare namespace exports {
|
|
|
28184
30266
|
export { AsyncWebAssemblyModulesPlugin, EnableWasmLoadingPlugin };
|
|
28185
30267
|
}
|
|
28186
30268
|
export namespace css {
|
|
30269
|
+
export namespace syntax {
|
|
30270
|
+
export let A: {
|
|
30271
|
+
get node(): NodeSyntax;
|
|
30272
|
+
get parent(): null | NodeSyntax;
|
|
30273
|
+
get index(): number;
|
|
30274
|
+
/**
|
|
30275
|
+
* Stop the walk descending into the current node (enter only).
|
|
30276
|
+
*/
|
|
30277
|
+
skipChildren(): void;
|
|
30278
|
+
inValue(): boolean;
|
|
30279
|
+
type(n?: NodeSyntax): number;
|
|
30280
|
+
start(n?: NodeSyntax): number;
|
|
30281
|
+
end(n?: NodeSyntax): number;
|
|
30282
|
+
range(n?: NodeSyntax): [number, number];
|
|
30283
|
+
loc(n?: NodeSyntax): {
|
|
30284
|
+
start: { line: number; column: number };
|
|
30285
|
+
end: { line: number; column: number };
|
|
30286
|
+
};
|
|
30287
|
+
source(n?: NodeSyntax): string;
|
|
30288
|
+
value(n?: NodeSyntax): string;
|
|
30289
|
+
unescaped(n?: NodeSyntax): string;
|
|
30290
|
+
typeFlag(n?: NodeSyntax): string;
|
|
30291
|
+
contentStart(n?: NodeSyntax): number;
|
|
30292
|
+
contentEnd(n?: NodeSyntax): number;
|
|
30293
|
+
name(n?: NodeSyntax): string;
|
|
30294
|
+
nameStart(n?: NodeSyntax): number;
|
|
30295
|
+
nameEnd(n?: NodeSyntax): number;
|
|
30296
|
+
unescapedName(n?: NodeSyntax): string;
|
|
30297
|
+
children(n?: NodeSyntax): ComponentValue[];
|
|
30298
|
+
prelude(n?: NodeSyntax): ComponentValue[];
|
|
30299
|
+
childCount(n?: NodeSyntax): number;
|
|
30300
|
+
childAt(n: NodeSyntax, i: number): ComponentValue;
|
|
30301
|
+
/**
|
|
30302
|
+
* A block big enough to stream hands its children to the visitors as each one
|
|
30303
|
+
* finishes rather than collecting them, so both lists read as an empty block
|
|
30304
|
+
* on it — `null`, which means no block at all, is still only for the `@…;`
|
|
30305
|
+
* forms. Read a block's children from the walk, not from here.
|
|
30306
|
+
*/
|
|
30307
|
+
declarations(n?: NodeSyntax): null | DeclarationSyntax[];
|
|
30308
|
+
/**
|
|
30309
|
+
* Reads as an empty block on a streamed rule; see {@link declarations }.
|
|
30310
|
+
*/
|
|
30311
|
+
childRules(n?: NodeSyntax): null | RuleSyntax[];
|
|
30312
|
+
blockStart(n?: NodeSyntax): number;
|
|
30313
|
+
blockEnd(n?: NodeSyntax): number;
|
|
30314
|
+
important(n?: NodeSyntax): boolean;
|
|
30315
|
+
blockToken(n?: NodeSyntax): SimpleBlockToken;
|
|
30316
|
+
setEnd(n: NodeSyntax, v: number): void;
|
|
30317
|
+
setBlockEnd(n: NodeSyntax, v: number): void;
|
|
30318
|
+
};
|
|
30319
|
+
export let EMBEDDED_LANGUAGES: string[];
|
|
30320
|
+
export namespace NodeType {
|
|
30321
|
+
export let Ident: number;
|
|
30322
|
+
export let Function: number;
|
|
30323
|
+
export let AtKeyword: number;
|
|
30324
|
+
export let Hash: number;
|
|
30325
|
+
export let String: number;
|
|
30326
|
+
export let BadString: number;
|
|
30327
|
+
export let Url: number;
|
|
30328
|
+
export let BadUrl: number;
|
|
30329
|
+
export let Delim: number;
|
|
30330
|
+
export let Number: number;
|
|
30331
|
+
export let Percentage: number;
|
|
30332
|
+
export let Dimension: number;
|
|
30333
|
+
export let Whitespace: number;
|
|
30334
|
+
export let Colon: number;
|
|
30335
|
+
export let Semicolon: number;
|
|
30336
|
+
export let Comma: number;
|
|
30337
|
+
export let RightParenthesis: number;
|
|
30338
|
+
export let RightSquareBracket: number;
|
|
30339
|
+
export let RightCurlyBracket: number;
|
|
30340
|
+
export let CDO: number;
|
|
30341
|
+
export let CDC: number;
|
|
30342
|
+
export let SimpleBlock: number;
|
|
30343
|
+
export let Declaration: number;
|
|
30344
|
+
export let AtRule: number;
|
|
30345
|
+
export let QualifiedRule: number;
|
|
30346
|
+
export let Stylesheet: number;
|
|
30347
|
+
export let Comment: number;
|
|
30348
|
+
export let Raw: number;
|
|
30349
|
+
}
|
|
30350
|
+
export let TT_AT_KEYWORD: 16;
|
|
30351
|
+
export let TT_BAD_STRING_TOKEN: 4;
|
|
30352
|
+
export let TT_BAD_URL_TOKEN: 19;
|
|
30353
|
+
export let TT_CDC: 25;
|
|
30354
|
+
export let TT_CDO: 24;
|
|
30355
|
+
export let TT_COLON: 14;
|
|
30356
|
+
export let TT_COMMA: 13;
|
|
30357
|
+
export let TT_COMMENT: 1;
|
|
30358
|
+
export let TT_DELIM: 6;
|
|
30359
|
+
export let TT_DIMENSION: 23;
|
|
30360
|
+
export let TT_EOF: 26;
|
|
30361
|
+
export let TT_FUNCTION: 17;
|
|
30362
|
+
export let TT_HASH: 5;
|
|
30363
|
+
export let TT_IDENTIFIER: 20;
|
|
30364
|
+
export let TT_LEFT_CURLY_BRACKET: 9;
|
|
30365
|
+
export let TT_LEFT_PARENTHESIS: 7;
|
|
30366
|
+
export let TT_LEFT_SQUARE_BRACKET: 8;
|
|
30367
|
+
export let TT_NUMBER: 21;
|
|
30368
|
+
export let TT_PERCENTAGE: 22;
|
|
30369
|
+
export let TT_RIGHT_CURLY_BRACKET: 12;
|
|
30370
|
+
export let TT_RIGHT_PARENTHESIS: 10;
|
|
30371
|
+
export let TT_RIGHT_SQUARE_BRACKET: 11;
|
|
30372
|
+
export let TT_SEMICOLON: 15;
|
|
30373
|
+
export let TT_STRING: 3;
|
|
30374
|
+
export let TT_URL: 18;
|
|
30375
|
+
export let TT_WHITESPACE: 2;
|
|
30376
|
+
export let askEmbeddedRenderer: (
|
|
30377
|
+
render: (
|
|
30378
|
+
source: string,
|
|
30379
|
+
info: { type: string; hostType: string; as?: string }
|
|
30380
|
+
) =>
|
|
30381
|
+
| undefined
|
|
30382
|
+
| string
|
|
30383
|
+
| EmbeddedSourceResult
|
|
30384
|
+
| Promise<undefined | string | EmbeddedSourceResult>,
|
|
30385
|
+
hole: { source: string; type: string; hostType: string; as?: string },
|
|
30386
|
+
reported: EmbeddedSourceResult[]
|
|
30387
|
+
) => Promise<undefined | string | EmbeddedSourceResult>;
|
|
30388
|
+
export let buildSkipSet: (nodeTypes: number[]) => Uint8Array;
|
|
30389
|
+
export let collectEmbeddedDiagnostics: (
|
|
30390
|
+
reported: {
|
|
30391
|
+
warnings?: (string | Error)[];
|
|
30392
|
+
errors?: (string | Error)[];
|
|
30393
|
+
}[]
|
|
30394
|
+
) => { warnings?: (string | Error)[]; errors?: (string | Error)[] };
|
|
30395
|
+
export let embeddedText: (
|
|
30396
|
+
answer?: string | { code?: string }
|
|
30397
|
+
) => undefined | string;
|
|
30398
|
+
export let equalsLowerCase: (s: string, lit: string) => boolean;
|
|
30399
|
+
export let escapeIdentifier: MakeCacheableResult<string> & {
|
|
30400
|
+
bindCache: BindCache<string>;
|
|
30401
|
+
};
|
|
30402
|
+
export let isDashedIdentifier: (identifier: string) => boolean;
|
|
30403
|
+
export let isWhitespace: (cc: number) => boolean;
|
|
30404
|
+
export let normalizeUrl: (str: string, isString: boolean) => string;
|
|
30405
|
+
export let parseABlocksContents: (
|
|
30406
|
+
input: string | TokenStream,
|
|
30407
|
+
pos?: number,
|
|
30408
|
+
options?: ParseOptionsSyntax
|
|
30409
|
+
) => { decls: DeclarationSyntax[]; rules: RuleSyntax[] };
|
|
30410
|
+
export let parseACommaSeparatedListOfComponentValues: (
|
|
30411
|
+
input: string | TokenStream,
|
|
30412
|
+
pos?: number,
|
|
30413
|
+
options?: ParseOptionsSyntax
|
|
30414
|
+
) => ComponentValue[][];
|
|
30415
|
+
export let parseAComponentValue: (
|
|
30416
|
+
input: string | TokenStream,
|
|
30417
|
+
pos?: number,
|
|
30418
|
+
options?: ParseOptionsSyntax
|
|
30419
|
+
) => undefined | Token | FunctionNode | SimpleBlock;
|
|
30420
|
+
export let parseADeclaration: (
|
|
30421
|
+
input: string | TokenStream,
|
|
30422
|
+
pos?: number,
|
|
30423
|
+
options?: ParseOptionsSyntax
|
|
30424
|
+
) => undefined | DeclarationSyntax;
|
|
30425
|
+
export let parseAListOfComponentValues: (
|
|
30426
|
+
input: string | TokenStream,
|
|
30427
|
+
pos?: number,
|
|
30428
|
+
options?: ParseOptionsSyntax
|
|
30429
|
+
) => ComponentValue[];
|
|
30430
|
+
export let parseARule: (
|
|
30431
|
+
input: string | TokenStream,
|
|
30432
|
+
pos?: number,
|
|
30433
|
+
options?: ParseOptionsSyntax
|
|
30434
|
+
) => undefined | AtRule | QualifiedRule;
|
|
30435
|
+
export let parseAStylesheet: (
|
|
30436
|
+
input: string | TokenStream,
|
|
30437
|
+
pos?: number,
|
|
30438
|
+
options?: ParseOptionsSyntax
|
|
30439
|
+
) => Stylesheet;
|
|
30440
|
+
export let parseAStylesheetsContents: (
|
|
30441
|
+
input: string | TokenStream,
|
|
30442
|
+
pos?: number,
|
|
30443
|
+
options?: ParseOptionsSyntax
|
|
30444
|
+
) => RuleSyntax[];
|
|
30445
|
+
export let pickTransforms: (
|
|
30446
|
+
options: object
|
|
30447
|
+
) => undefined | CssTransformOptions;
|
|
30448
|
+
export let printer: (
|
|
30449
|
+
path: {
|
|
30450
|
+
get node(): NodeSyntax;
|
|
30451
|
+
get parent(): null | NodeSyntax;
|
|
30452
|
+
get index(): number;
|
|
30453
|
+
/**
|
|
30454
|
+
* Stop the walk descending into the current node (enter only).
|
|
30455
|
+
*/
|
|
30456
|
+
skipChildren(): void;
|
|
30457
|
+
inValue(): boolean;
|
|
30458
|
+
type(n?: NodeSyntax): number;
|
|
30459
|
+
start(n?: NodeSyntax): number;
|
|
30460
|
+
end(n?: NodeSyntax): number;
|
|
30461
|
+
range(n?: NodeSyntax): [number, number];
|
|
30462
|
+
loc(n?: NodeSyntax): {
|
|
30463
|
+
start: { line: number; column: number };
|
|
30464
|
+
end: { line: number; column: number };
|
|
30465
|
+
};
|
|
30466
|
+
source(n?: NodeSyntax): string;
|
|
30467
|
+
value(n?: NodeSyntax): string;
|
|
30468
|
+
unescaped(n?: NodeSyntax): string;
|
|
30469
|
+
typeFlag(n?: NodeSyntax): string;
|
|
30470
|
+
contentStart(n?: NodeSyntax): number;
|
|
30471
|
+
contentEnd(n?: NodeSyntax): number;
|
|
30472
|
+
name(n?: NodeSyntax): string;
|
|
30473
|
+
nameStart(n?: NodeSyntax): number;
|
|
30474
|
+
nameEnd(n?: NodeSyntax): number;
|
|
30475
|
+
unescapedName(n?: NodeSyntax): string;
|
|
30476
|
+
children(n?: NodeSyntax): ComponentValue[];
|
|
30477
|
+
prelude(n?: NodeSyntax): ComponentValue[];
|
|
30478
|
+
childCount(n?: NodeSyntax): number;
|
|
30479
|
+
childAt(n: NodeSyntax, i: number): ComponentValue;
|
|
30480
|
+
/**
|
|
30481
|
+
* A block big enough to stream hands its children to the visitors as each one
|
|
30482
|
+
* finishes rather than collecting them, so both lists read as an empty block
|
|
30483
|
+
* on it — `null`, which means no block at all, is still only for the `@…;`
|
|
30484
|
+
* forms. Read a block's children from the walk, not from here.
|
|
30485
|
+
*/
|
|
30486
|
+
declarations(n?: NodeSyntax): null | DeclarationSyntax[];
|
|
30487
|
+
/**
|
|
30488
|
+
* Reads as an empty block on a streamed rule; see {@link declarations }.
|
|
30489
|
+
*/
|
|
30490
|
+
childRules(n?: NodeSyntax): null | RuleSyntax[];
|
|
30491
|
+
blockStart(n?: NodeSyntax): number;
|
|
30492
|
+
blockEnd(n?: NodeSyntax): number;
|
|
30493
|
+
important(n?: NodeSyntax): boolean;
|
|
30494
|
+
blockToken(n?: NodeSyntax): SimpleBlockToken;
|
|
30495
|
+
setEnd(n: NodeSyntax, v: number): void;
|
|
30496
|
+
setBlockEnd(n: NodeSyntax, v: number): void;
|
|
30497
|
+
},
|
|
30498
|
+
writer: PrintContext<
|
|
30499
|
+
{
|
|
30500
|
+
get node(): NodeSyntax;
|
|
30501
|
+
get parent(): null | NodeSyntax;
|
|
30502
|
+
get index(): number;
|
|
30503
|
+
/**
|
|
30504
|
+
* Stop the walk descending into the current node (enter only).
|
|
30505
|
+
*/
|
|
30506
|
+
skipChildren(): void;
|
|
30507
|
+
inValue(): boolean;
|
|
30508
|
+
type(n?: NodeSyntax): number;
|
|
30509
|
+
start(n?: NodeSyntax): number;
|
|
30510
|
+
end(n?: NodeSyntax): number;
|
|
30511
|
+
range(n?: NodeSyntax): [number, number];
|
|
30512
|
+
loc(n?: NodeSyntax): {
|
|
30513
|
+
start: { line: number; column: number };
|
|
30514
|
+
end: { line: number; column: number };
|
|
30515
|
+
};
|
|
30516
|
+
source(n?: NodeSyntax): string;
|
|
30517
|
+
value(n?: NodeSyntax): string;
|
|
30518
|
+
unescaped(n?: NodeSyntax): string;
|
|
30519
|
+
typeFlag(n?: NodeSyntax): string;
|
|
30520
|
+
contentStart(n?: NodeSyntax): number;
|
|
30521
|
+
contentEnd(n?: NodeSyntax): number;
|
|
30522
|
+
name(n?: NodeSyntax): string;
|
|
30523
|
+
nameStart(n?: NodeSyntax): number;
|
|
30524
|
+
nameEnd(n?: NodeSyntax): number;
|
|
30525
|
+
unescapedName(n?: NodeSyntax): string;
|
|
30526
|
+
children(n?: NodeSyntax): ComponentValue[];
|
|
30527
|
+
prelude(n?: NodeSyntax): ComponentValue[];
|
|
30528
|
+
childCount(n?: NodeSyntax): number;
|
|
30529
|
+
childAt(n: NodeSyntax, i: number): ComponentValue;
|
|
30530
|
+
/**
|
|
30531
|
+
* A block big enough to stream hands its children to the visitors as each one
|
|
30532
|
+
* finishes rather than collecting them, so both lists read as an empty block
|
|
30533
|
+
* on it — `null`, which means no block at all, is still only for the `@…;`
|
|
30534
|
+
* forms. Read a block's children from the walk, not from here.
|
|
30535
|
+
*/
|
|
30536
|
+
declarations(n?: NodeSyntax): null | DeclarationSyntax[];
|
|
30537
|
+
/**
|
|
30538
|
+
* Reads as an empty block on a streamed rule; see {@link declarations }.
|
|
30539
|
+
*/
|
|
30540
|
+
childRules(n?: NodeSyntax): null | RuleSyntax[];
|
|
30541
|
+
blockStart(n?: NodeSyntax): number;
|
|
30542
|
+
blockEnd(n?: NodeSyntax): number;
|
|
30543
|
+
important(n?: NodeSyntax): boolean;
|
|
30544
|
+
blockToken(n?: NodeSyntax): SimpleBlockToken;
|
|
30545
|
+
setEnd(n: NodeSyntax, v: number): void;
|
|
30546
|
+
setBlockEnd(n: NodeSyntax, v: number): void;
|
|
30547
|
+
},
|
|
30548
|
+
NodeSyntax,
|
|
30549
|
+
CssPrintOptions
|
|
30550
|
+
>
|
|
30551
|
+
) => string;
|
|
30552
|
+
export let rangeEquals: (
|
|
30553
|
+
input: string,
|
|
30554
|
+
start: number,
|
|
30555
|
+
end: number,
|
|
30556
|
+
lit: string
|
|
30557
|
+
) => boolean;
|
|
30558
|
+
export let rangeEqualsLowerCase: (
|
|
30559
|
+
input: string,
|
|
30560
|
+
start: number,
|
|
30561
|
+
end: number,
|
|
30562
|
+
lit: string
|
|
30563
|
+
) => boolean;
|
|
30564
|
+
export let readToken: (
|
|
30565
|
+
input: string,
|
|
30566
|
+
pos: number,
|
|
30567
|
+
out: MutableToken
|
|
30568
|
+
) => undefined | MutableToken;
|
|
30569
|
+
export let skipEscape: (input: string, pos: number) => number;
|
|
30570
|
+
export let toLowerCaseIfNeeded: (s: string) => string;
|
|
30571
|
+
export let unescapeIdentifier: MakeCacheableResult<string> & {
|
|
30572
|
+
bindCache: BindCache<string>;
|
|
30573
|
+
};
|
|
30574
|
+
export { SourceProcessorSyntaxClass_2 as SourceProcessor, TokenStream };
|
|
30575
|
+
}
|
|
28187
30576
|
export { CssModulesPlugin };
|
|
28188
30577
|
}
|
|
28189
30578
|
export namespace html {
|
|
30579
|
+
export namespace syntax {
|
|
30580
|
+
export let A: {
|
|
30581
|
+
get node(): number;
|
|
30582
|
+
get parent(): null | number;
|
|
30583
|
+
/**
|
|
30584
|
+
* Stop the walk descending into the current node (enter only).
|
|
30585
|
+
*/
|
|
30586
|
+
skipChildren(): void;
|
|
30587
|
+
type(n?: number): number;
|
|
30588
|
+
start(n?: number): number;
|
|
30589
|
+
end(n?: number): number;
|
|
30590
|
+
/**
|
|
30591
|
+
* Raw source slice `[start, end)` — valid only during the walk (the printer's
|
|
30592
|
+
* window), before `parseHtml` releases `_htmlSource`.
|
|
30593
|
+
*/
|
|
30594
|
+
source(n?: number): string;
|
|
30595
|
+
sourceSpanAt(from: number, to: number): string;
|
|
30596
|
+
tagName(n?: number): string;
|
|
30597
|
+
namespace(n?: number): number;
|
|
30598
|
+
selfClosing(n?: number): boolean;
|
|
30599
|
+
attributes(n?: number): HtmlAttribute[];
|
|
30600
|
+
attributeCount(n?: number): number;
|
|
30601
|
+
/**
|
|
30602
|
+
* The i-th attribute of an element, as an id for the `attribute*` reads.
|
|
30603
|
+
*/
|
|
30604
|
+
attributeAt(i: number, n?: number): number;
|
|
30605
|
+
/**
|
|
30606
|
+
* Linear lookup by (lowercased) name.
|
|
30607
|
+
*/
|
|
30608
|
+
findAttribute(name: string, n?: number): number;
|
|
30609
|
+
attributeName(a: number): string;
|
|
30610
|
+
attributeValue(a: number): string;
|
|
30611
|
+
attributeNameStart(a: number): number;
|
|
30612
|
+
attributeNameEnd(a: number): number;
|
|
30613
|
+
attributeValueStart(a: number): number;
|
|
30614
|
+
attributeValueEnd(a: number): number;
|
|
30615
|
+
tagEnd(n?: number): number;
|
|
30616
|
+
nameEnd(n?: number): number;
|
|
30617
|
+
/**
|
|
30618
|
+
* Whether the source wrote this element's end tag rather than the parser
|
|
30619
|
+
* popping it for an implied close. Read back off the range instead of marked
|
|
30620
|
+
* during the parse: an element's end spans the token that closed it, so its
|
|
30621
|
+
* own end tag is the last thing in it — and only the few elements around a
|
|
30622
|
+
* region printed from source ever ask.
|
|
30623
|
+
*/
|
|
30624
|
+
sourceClosed(n?: number): boolean;
|
|
30625
|
+
openTag(n?: number): string;
|
|
30626
|
+
/**
|
|
30627
|
+
* An element's end tag, generated as `</name>` from the opening tag's own name
|
|
30628
|
+
* (exact source casing, correct for foreign camelCase elements). Generated, not
|
|
30629
|
+
* sliced: element `end` offsets don't span the end tag, and an omitted optional
|
|
30630
|
+
* end tag (`<li>`, `<p>`, …) still serializes to the same DOM. `""` when the
|
|
30631
|
+
* parser inserted the element, as {@link openTag } does — it has no name in the
|
|
30632
|
+
* source to echo, and slicing one would spell `</>`.
|
|
30633
|
+
*/
|
|
30634
|
+
closeTag(n?: number): string;
|
|
30635
|
+
contentEnd(n?: number): number;
|
|
30636
|
+
templateContent(n?: number): number;
|
|
30637
|
+
data(n?: number): string;
|
|
30638
|
+
piTarget(n?: number): string;
|
|
30639
|
+
doctypeName(n?: number): string;
|
|
30640
|
+
doctypePublicId(_n?: number): null | string;
|
|
30641
|
+
doctypeSystemId(_n?: number): null | string;
|
|
30642
|
+
firstChild(n?: number): number;
|
|
30643
|
+
nextSibling(n?: number): number;
|
|
30644
|
+
parentOf(n?: number): number;
|
|
30645
|
+
children(n?: number): number[];
|
|
30646
|
+
};
|
|
30647
|
+
export let EMBEDDED_LANGUAGES: string[];
|
|
30648
|
+
export let NS_HTML: 0;
|
|
30649
|
+
export let NS_MATHML: 1;
|
|
30650
|
+
export let NS_SVG: 2;
|
|
30651
|
+
export namespace NodeType {
|
|
30652
|
+
export let Document: 1;
|
|
30653
|
+
export let DocumentFragment: 2;
|
|
30654
|
+
export let Element: 3;
|
|
30655
|
+
export let Text: 4;
|
|
30656
|
+
export let Comment: 5;
|
|
30657
|
+
export let Doctype: 6;
|
|
30658
|
+
export let ProcessingInstruction: 7;
|
|
30659
|
+
}
|
|
30660
|
+
export let QUOTE_DOUBLE: 1;
|
|
30661
|
+
export let QUOTE_NONE: 0;
|
|
30662
|
+
export let QUOTE_SINGLE: 2;
|
|
30663
|
+
export let SVG_TAG_ADJUST: Record<string, string>;
|
|
30664
|
+
export let askEmbeddedRenderer: (
|
|
30665
|
+
render: (
|
|
30666
|
+
source: string,
|
|
30667
|
+
info: { type: string; hostType: string; as?: string }
|
|
30668
|
+
) =>
|
|
30669
|
+
| undefined
|
|
30670
|
+
| string
|
|
30671
|
+
| EmbeddedSourceResult
|
|
30672
|
+
| Promise<undefined | string | EmbeddedSourceResult>,
|
|
30673
|
+
hole: { source: string; type: string; hostType: string; as?: string },
|
|
30674
|
+
reported: EmbeddedSourceResult[]
|
|
30675
|
+
) => Promise<undefined | string | EmbeddedSourceResult>;
|
|
30676
|
+
export let baseTag: (
|
|
30677
|
+
base:
|
|
30678
|
+
| string
|
|
30679
|
+
| {
|
|
30680
|
+
/**
|
|
30681
|
+
* Value for the `href` attribute of the `<base>` element.
|
|
30682
|
+
*/
|
|
30683
|
+
href: string;
|
|
30684
|
+
/**
|
|
30685
|
+
* Value for the `target` attribute of the `<base>` element (e.g. `"_blank"`).
|
|
30686
|
+
*/
|
|
30687
|
+
target?: string;
|
|
30688
|
+
}
|
|
30689
|
+
) => string;
|
|
30690
|
+
export let buildHeadTags: (opts: OutputHtmlOptions) => string;
|
|
30691
|
+
export let collectEmbeddedDiagnostics: (
|
|
30692
|
+
reported: {
|
|
30693
|
+
warnings?: (string | Error)[];
|
|
30694
|
+
errors?: (string | Error)[];
|
|
30695
|
+
}[]
|
|
30696
|
+
) => { warnings?: (string | Error)[]; errors?: (string | Error)[] };
|
|
30697
|
+
export let decodeEntities: _functionSyntax;
|
|
30698
|
+
export let embeddedText: (
|
|
30699
|
+
answer?: string | { code?: string }
|
|
30700
|
+
) => undefined | string;
|
|
30701
|
+
export let escapeAttribute: (
|
|
30702
|
+
s: string,
|
|
30703
|
+
delimiter?: number,
|
|
30704
|
+
minimal?: boolean
|
|
30705
|
+
) => string;
|
|
30706
|
+
export let escapeText: (s: string) => string;
|
|
30707
|
+
export let isAsciiWhitespace: (cc: number) => boolean;
|
|
30708
|
+
export let metaTag: (name: string, content: string) => string;
|
|
30709
|
+
export let parseCssUrls: (input: string) => [string, number, number][];
|
|
30710
|
+
export let parseHtml: (
|
|
30711
|
+
input: string,
|
|
30712
|
+
pos?: number,
|
|
30713
|
+
options?: HtmlParseOptions
|
|
30714
|
+
) => number;
|
|
30715
|
+
export let parseMsapplicationTask: (
|
|
30716
|
+
input: string
|
|
30717
|
+
) => [string, number, number][];
|
|
30718
|
+
export let parseSrc: (input: string) => [string, number, number][];
|
|
30719
|
+
export let parseSrcset: (input: string) => [string, number, number][];
|
|
30720
|
+
export let pickTransforms: (
|
|
30721
|
+
options: object
|
|
30722
|
+
) => undefined | HtmlTransformOptions;
|
|
30723
|
+
export let printer: (
|
|
30724
|
+
path: {
|
|
30725
|
+
get node(): number;
|
|
30726
|
+
get parent(): null | number;
|
|
30727
|
+
/**
|
|
30728
|
+
* Stop the walk descending into the current node (enter only).
|
|
30729
|
+
*/
|
|
30730
|
+
skipChildren(): void;
|
|
30731
|
+
type(n?: number): number;
|
|
30732
|
+
start(n?: number): number;
|
|
30733
|
+
end(n?: number): number;
|
|
30734
|
+
/**
|
|
30735
|
+
* Raw source slice `[start, end)` — valid only during the walk (the printer's
|
|
30736
|
+
* window), before `parseHtml` releases `_htmlSource`.
|
|
30737
|
+
*/
|
|
30738
|
+
source(n?: number): string;
|
|
30739
|
+
sourceSpanAt(from: number, to: number): string;
|
|
30740
|
+
tagName(n?: number): string;
|
|
30741
|
+
namespace(n?: number): number;
|
|
30742
|
+
selfClosing(n?: number): boolean;
|
|
30743
|
+
attributes(n?: number): HtmlAttribute[];
|
|
30744
|
+
attributeCount(n?: number): number;
|
|
30745
|
+
/**
|
|
30746
|
+
* The i-th attribute of an element, as an id for the `attribute*` reads.
|
|
30747
|
+
*/
|
|
30748
|
+
attributeAt(i: number, n?: number): number;
|
|
30749
|
+
/**
|
|
30750
|
+
* Linear lookup by (lowercased) name.
|
|
30751
|
+
*/
|
|
30752
|
+
findAttribute(name: string, n?: number): number;
|
|
30753
|
+
attributeName(a: number): string;
|
|
30754
|
+
attributeValue(a: number): string;
|
|
30755
|
+
attributeNameStart(a: number): number;
|
|
30756
|
+
attributeNameEnd(a: number): number;
|
|
30757
|
+
attributeValueStart(a: number): number;
|
|
30758
|
+
attributeValueEnd(a: number): number;
|
|
30759
|
+
tagEnd(n?: number): number;
|
|
30760
|
+
nameEnd(n?: number): number;
|
|
30761
|
+
/**
|
|
30762
|
+
* Whether the source wrote this element's end tag rather than the parser
|
|
30763
|
+
* popping it for an implied close. Read back off the range instead of marked
|
|
30764
|
+
* during the parse: an element's end spans the token that closed it, so its
|
|
30765
|
+
* own end tag is the last thing in it — and only the few elements around a
|
|
30766
|
+
* region printed from source ever ask.
|
|
30767
|
+
*/
|
|
30768
|
+
sourceClosed(n?: number): boolean;
|
|
30769
|
+
openTag(n?: number): string;
|
|
30770
|
+
/**
|
|
30771
|
+
* An element's end tag, generated as `</name>` from the opening tag's own name
|
|
30772
|
+
* (exact source casing, correct for foreign camelCase elements). Generated, not
|
|
30773
|
+
* sliced: element `end` offsets don't span the end tag, and an omitted optional
|
|
30774
|
+
* end tag (`<li>`, `<p>`, …) still serializes to the same DOM. `""` when the
|
|
30775
|
+
* parser inserted the element, as {@link openTag } does — it has no name in the
|
|
30776
|
+
* source to echo, and slicing one would spell `</>`.
|
|
30777
|
+
*/
|
|
30778
|
+
closeTag(n?: number): string;
|
|
30779
|
+
contentEnd(n?: number): number;
|
|
30780
|
+
templateContent(n?: number): number;
|
|
30781
|
+
data(n?: number): string;
|
|
30782
|
+
piTarget(n?: number): string;
|
|
30783
|
+
doctypeName(n?: number): string;
|
|
30784
|
+
doctypePublicId(_n?: number): null | string;
|
|
30785
|
+
doctypeSystemId(_n?: number): null | string;
|
|
30786
|
+
firstChild(n?: number): number;
|
|
30787
|
+
nextSibling(n?: number): number;
|
|
30788
|
+
parentOf(n?: number): number;
|
|
30789
|
+
children(n?: number): number[];
|
|
30790
|
+
},
|
|
30791
|
+
writer: PrintContext<
|
|
30792
|
+
{
|
|
30793
|
+
get node(): number;
|
|
30794
|
+
get parent(): null | number;
|
|
30795
|
+
/**
|
|
30796
|
+
* Stop the walk descending into the current node (enter only).
|
|
30797
|
+
*/
|
|
30798
|
+
skipChildren(): void;
|
|
30799
|
+
type(n?: number): number;
|
|
30800
|
+
start(n?: number): number;
|
|
30801
|
+
end(n?: number): number;
|
|
30802
|
+
/**
|
|
30803
|
+
* Raw source slice `[start, end)` — valid only during the walk (the printer's
|
|
30804
|
+
* window), before `parseHtml` releases `_htmlSource`.
|
|
30805
|
+
*/
|
|
30806
|
+
source(n?: number): string;
|
|
30807
|
+
sourceSpanAt(from: number, to: number): string;
|
|
30808
|
+
tagName(n?: number): string;
|
|
30809
|
+
namespace(n?: number): number;
|
|
30810
|
+
selfClosing(n?: number): boolean;
|
|
30811
|
+
attributes(n?: number): HtmlAttribute[];
|
|
30812
|
+
attributeCount(n?: number): number;
|
|
30813
|
+
/**
|
|
30814
|
+
* The i-th attribute of an element, as an id for the `attribute*` reads.
|
|
30815
|
+
*/
|
|
30816
|
+
attributeAt(i: number, n?: number): number;
|
|
30817
|
+
/**
|
|
30818
|
+
* Linear lookup by (lowercased) name.
|
|
30819
|
+
*/
|
|
30820
|
+
findAttribute(name: string, n?: number): number;
|
|
30821
|
+
attributeName(a: number): string;
|
|
30822
|
+
attributeValue(a: number): string;
|
|
30823
|
+
attributeNameStart(a: number): number;
|
|
30824
|
+
attributeNameEnd(a: number): number;
|
|
30825
|
+
attributeValueStart(a: number): number;
|
|
30826
|
+
attributeValueEnd(a: number): number;
|
|
30827
|
+
tagEnd(n?: number): number;
|
|
30828
|
+
nameEnd(n?: number): number;
|
|
30829
|
+
/**
|
|
30830
|
+
* Whether the source wrote this element's end tag rather than the parser
|
|
30831
|
+
* popping it for an implied close. Read back off the range instead of marked
|
|
30832
|
+
* during the parse: an element's end spans the token that closed it, so its
|
|
30833
|
+
* own end tag is the last thing in it — and only the few elements around a
|
|
30834
|
+
* region printed from source ever ask.
|
|
30835
|
+
*/
|
|
30836
|
+
sourceClosed(n?: number): boolean;
|
|
30837
|
+
openTag(n?: number): string;
|
|
30838
|
+
/**
|
|
30839
|
+
* An element's end tag, generated as `</name>` from the opening tag's own name
|
|
30840
|
+
* (exact source casing, correct for foreign camelCase elements). Generated, not
|
|
30841
|
+
* sliced: element `end` offsets don't span the end tag, and an omitted optional
|
|
30842
|
+
* end tag (`<li>`, `<p>`, …) still serializes to the same DOM. `""` when the
|
|
30843
|
+
* parser inserted the element, as {@link openTag } does — it has no name in the
|
|
30844
|
+
* source to echo, and slicing one would spell `</>`.
|
|
30845
|
+
*/
|
|
30846
|
+
closeTag(n?: number): string;
|
|
30847
|
+
contentEnd(n?: number): number;
|
|
30848
|
+
templateContent(n?: number): number;
|
|
30849
|
+
data(n?: number): string;
|
|
30850
|
+
piTarget(n?: number): string;
|
|
30851
|
+
doctypeName(n?: number): string;
|
|
30852
|
+
doctypePublicId(_n?: number): null | string;
|
|
30853
|
+
doctypeSystemId(_n?: number): null | string;
|
|
30854
|
+
firstChild(n?: number): number;
|
|
30855
|
+
nextSibling(n?: number): number;
|
|
30856
|
+
parentOf(n?: number): number;
|
|
30857
|
+
children(n?: number): number[];
|
|
30858
|
+
},
|
|
30859
|
+
number,
|
|
30860
|
+
HtmlPrintOptions
|
|
30861
|
+
>
|
|
30862
|
+
) => string;
|
|
30863
|
+
export let tokenize: (
|
|
30864
|
+
input: string,
|
|
30865
|
+
pos?: number,
|
|
30866
|
+
callbacks?: HtmlTokenCallbacks
|
|
30867
|
+
) => number;
|
|
30868
|
+
export { SourceProcessorSyntaxClass_1 as SourceProcessor };
|
|
30869
|
+
}
|
|
28190
30870
|
export { HtmlModulesPlugin };
|
|
28191
30871
|
}
|
|
28192
30872
|
export namespace library {
|
|
@@ -28233,6 +30913,7 @@ declare namespace exports {
|
|
|
28233
30913
|
export let compareChunksNatural: (
|
|
28234
30914
|
chunkGraph: ChunkGraph
|
|
28235
30915
|
) => Comparator<Chunk>;
|
|
30916
|
+
export let compareErrors: Comparator<Error>;
|
|
28236
30917
|
export let compareIds: (
|
|
28237
30918
|
a: string | number,
|
|
28238
30919
|
b: string | number
|
|
@@ -28449,7 +31130,8 @@ declare namespace exports {
|
|
|
28449
31130
|
| string
|
|
28450
31131
|
| boolean
|
|
28451
31132
|
| string[]
|
|
28452
|
-
|
|
|
31133
|
+
| ExternalItemValueObject
|
|
31134
|
+
| ExternalItemValueWithOptions
|
|
28453
31135
|
) => void
|
|
28454
31136
|
) => void;
|
|
28455
31137
|
export type ExternalItemFunctionDataGetResolve = (
|
|
@@ -28486,9 +31168,9 @@ declare namespace exports {
|
|
|
28486
31168
|
argv: Record<string, any>
|
|
28487
31169
|
) => MaybePromise<Configuration | MultiConfiguration>;
|
|
28488
31170
|
export type ObjectSerializerContext =
|
|
28489
|
-
typeof
|
|
31171
|
+
typeof ObjectSerializerContextObjectMiddlewareObject_2;
|
|
28490
31172
|
export type ObjectDeserializerContext =
|
|
28491
|
-
typeof
|
|
31173
|
+
typeof ObjectDeserializerContextObjectMiddlewareObject_1;
|
|
28492
31174
|
export {
|
|
28493
31175
|
AutomaticPrefetchPlugin,
|
|
28494
31176
|
AsyncDependenciesBlock,
|