@depup/webpack 5.109.2-depup.0 → 5.110.1-depup.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/changes.json +7 -7
- package/lib/APIPlugin.js +123 -17
- package/lib/AsyncDependenciesBlock.js +10 -7
- package/lib/AutomaticPrefetchPlugin.js +1 -1
- package/lib/BannerPlugin.js +10 -6
- package/lib/CacheFacade.js +6 -6
- package/lib/Chunk.js +14 -11
- package/lib/ChunkGraph.js +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 +44 -70
- 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 +36 -15
- package/lib/HotModuleReplacementPlugin.js +16 -44
- package/lib/IgnorePlugin.js +8 -4
- package/lib/IgnoreWarningsPlugin.js +2 -2
- package/lib/InitFragment.js +8 -4
- package/lib/JavascriptMetaInfoPlugin.js +35 -4
- package/lib/LazyBarrel.js +3 -4
- package/lib/LibraryTemplatePlugin.js +10 -6
- package/lib/LoaderOptionsPlugin.js +7 -3
- package/lib/LoaderTargetPlugin.js +1 -1
- package/lib/MainTemplate.js +49 -42
- package/lib/ManifestPlugin.js +12 -11
- package/lib/Module.js +62 -33
- package/lib/ModuleFactory.js +3 -3
- package/lib/ModuleFilenameHelpers.js +9 -4
- package/lib/ModuleGraph.js +195 -21
- package/lib/ModuleGraphConnection.js +6 -13
- package/lib/ModuleInfoHeaderPlugin.js +8 -10
- package/lib/ModuleTemplate.js +62 -63
- package/lib/MultiCompiler.js +130 -64
- package/lib/MultiStats.js +40 -9
- package/lib/MultiWatching.js +3 -3
- package/lib/NoEmitOnErrorsPlugin.js +1 -1
- package/lib/NodeStuffPlugin.js +29 -19
- package/lib/NormalModule.js +141 -85
- 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 +12 -10
- package/lib/asset/AssetBytesParser.js +2 -4
- package/lib/asset/AssetGenerator.js +188 -95
- package/lib/asset/AssetModule.js +7 -3
- package/lib/asset/AssetModulesPlugin.js +110 -38
- package/lib/asset/AssetParser.js +9 -7
- package/lib/asset/AssetSourceGenerator.js +60 -13
- package/lib/asset/AssetSourceParser.js +2 -4
- package/lib/asset/RawDataUrlModule.js +24 -16
- package/lib/asset/WebManifestGenerator.js +8 -10
- package/lib/asset/WebManifestParser.js +24 -10
- package/lib/async-modules/AsyncModuleHelpers.js +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 +261 -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 +171 -43
- 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 +277 -77
- 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 +65 -165
- 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 +38 -16
- package/lib/json/JsonModule.js +7 -3
- package/lib/json/JsonModulesPlugin.js +1 -1
- package/lib/json/JsonParser.js +5 -6
- package/lib/library/AbstractLibraryPlugin.js +20 -14
- package/lib/library/AmdLibraryPlugin.js +11 -7
- package/lib/library/AssignLibraryPlugin.js +19 -13
- package/lib/library/EnableLibraryPlugin.js +2 -2
- package/lib/library/ExportPropertyLibraryPlugin.js +15 -8
- package/lib/library/JsonpLibraryPlugin.js +11 -7
- package/lib/library/ModuleLibraryPlugin.js +256 -64
- package/lib/library/SystemLibraryPlugin.js +12 -8
- package/lib/library/UmdLibraryPlugin.js +62 -25
- package/lib/loaders/LoaderRunner.js +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 +139 -114
- package/lib/serialization/PlainObjectSerializer.js +19 -16
- package/lib/sharing/ConsumeSharedModule.js +30 -21
- package/lib/sharing/ConsumeSharedPlugin.js +18 -10
- package/lib/sharing/ConsumeSharedRuntimeModule.js +6 -9
- package/lib/sharing/ProvideSharedModule.js +25 -16
- package/lib/sharing/ProvideSharedModuleFactory.js +7 -3
- package/lib/sharing/ProvideSharedPlugin.js +8 -4
- package/lib/sharing/SharePlugin.js +17 -5
- package/lib/sharing/ShareRuntimeModule.js +4 -4
- package/lib/sharing/resolveMatchedConfigs.js +9 -6
- package/lib/sharing/utils.js +1 -3
- package/lib/stats/DefaultStatsFactoryPlugin.js +50 -29
- package/lib/stats/DefaultStatsPresetPlugin.js +17 -8
- package/lib/stats/DefaultStatsPrinterPlugin.js +36 -26
- package/lib/stats/StatsFactory.js +25 -26
- package/lib/stats/StatsPrinter.js +16 -12
- package/lib/typescript/TypeScriptPlugin.js +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 +57 -17
- 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 +7 -7
- package/lib/wasm-sync/WebAssemblyModulesPlugin.js +24 -11
- package/lib/wasm-sync/WebAssemblyParser.js +4 -6
- package/lib/wasm-sync/WebAssemblyUtils.js +2 -2
- package/lib/web/FetchCompileAsyncWasmPlugin.js +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 +32 -25
- 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 +3144 -454
- 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
|
|
@@ -9105,6 +9482,14 @@ declare class Generator {
|
|
|
9105
9482
|
static byType(map: {
|
|
9106
9483
|
[index: string]: undefined | Generator;
|
|
9107
9484
|
}): ByTypeGenerator;
|
|
9485
|
+
|
|
9486
|
+
/**
|
|
9487
|
+
* Returns the statement a module that failed to build throws when executed.
|
|
9488
|
+
*/
|
|
9489
|
+
static throwBuildErrorCode(
|
|
9490
|
+
error: Error,
|
|
9491
|
+
parseErrorConstructor?: string
|
|
9492
|
+
): string;
|
|
9108
9493
|
}
|
|
9109
9494
|
declare interface GeneratorOptions {
|
|
9110
9495
|
[index: string]: any;
|
|
@@ -9486,7 +9871,10 @@ declare class HarmonyImportDependency extends ModuleDependency {
|
|
|
9486
9871
|
/**
|
|
9487
9872
|
* Returns true if the dependency can be concatenated (scope hoisting).
|
|
9488
9873
|
*/
|
|
9489
|
-
static canConcatenate(
|
|
9874
|
+
static canConcatenate(
|
|
9875
|
+
dependency: Dependency,
|
|
9876
|
+
concatenateCommonJsModules: boolean
|
|
9877
|
+
): boolean;
|
|
9490
9878
|
static TRANSITIVE: symbol;
|
|
9491
9879
|
static LAZY_UNTIL_LOCAL: "local";
|
|
9492
9880
|
static LAZY_UNTIL_ID: "id";
|
|
@@ -9619,7 +10007,7 @@ type Head<T extends ReadonlyArray<any>> = T extends readonly [infer H, ...any[]]
|
|
|
9619
10007
|
? H
|
|
9620
10008
|
: T extends readonly []
|
|
9621
10009
|
? any
|
|
9622
|
-
: T extends (infer E)[]
|
|
10010
|
+
: T extends readonly (infer E)[]
|
|
9623
10011
|
? E
|
|
9624
10012
|
: never;
|
|
9625
10013
|
|
|
@@ -9651,6 +10039,46 @@ declare interface HotModuleReplacementPluginLoaderContext {
|
|
|
9651
10039
|
declare class HotUpdateChunk extends Chunk {
|
|
9652
10040
|
constructor();
|
|
9653
10041
|
}
|
|
10042
|
+
declare interface HtmlAstSkip {
|
|
10043
|
+
/**
|
|
10044
|
+
* 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.
|
|
10045
|
+
*/
|
|
10046
|
+
text?: boolean;
|
|
10047
|
+
|
|
10048
|
+
/**
|
|
10049
|
+
* drop comment nodes entirely. Not for consumers that read comments (e.g. webpack magic comments).
|
|
10050
|
+
*/
|
|
10051
|
+
comments?: boolean;
|
|
10052
|
+
|
|
10053
|
+
/**
|
|
10054
|
+
* drop the doctype node; quirks-mode detection is unaffected.
|
|
10055
|
+
*/
|
|
10056
|
+
doctype?: boolean;
|
|
10057
|
+
}
|
|
10058
|
+
declare interface HtmlAttribute {
|
|
10059
|
+
/**
|
|
10060
|
+
* lowercased (and, in foreign content, adjusted) attribute name
|
|
10061
|
+
*/
|
|
10062
|
+
name: string;
|
|
10063
|
+
value: string;
|
|
10064
|
+
|
|
10065
|
+
/**
|
|
10066
|
+
* name used by the html5lib tree serializer (foreign-namespaced)
|
|
10067
|
+
*/
|
|
10068
|
+
serializedName?: string;
|
|
10069
|
+
|
|
10070
|
+
/**
|
|
10071
|
+
* source offset, or -1 on adoption-agency clones
|
|
10072
|
+
*/
|
|
10073
|
+
nameStart: number;
|
|
10074
|
+
nameEnd: number;
|
|
10075
|
+
|
|
10076
|
+
/**
|
|
10077
|
+
* source offset, or -1 when valueless / on clones
|
|
10078
|
+
*/
|
|
10079
|
+
valueStart: number;
|
|
10080
|
+
valueEnd: number;
|
|
10081
|
+
}
|
|
9654
10082
|
declare interface HtmlEmittedContext {
|
|
9655
10083
|
outputName: string;
|
|
9656
10084
|
}
|
|
@@ -9836,6 +10264,17 @@ declare interface HtmlMutableTag {
|
|
|
9836
10264
|
*/
|
|
9837
10265
|
remove?: boolean;
|
|
9838
10266
|
}
|
|
10267
|
+
declare interface HtmlParseOptions {
|
|
10268
|
+
/**
|
|
10269
|
+
* context element name for fragment parsing (e.g. `td`, `svg path`); omit for a full document
|
|
10270
|
+
*/
|
|
10271
|
+
fragmentContext?: string;
|
|
10272
|
+
|
|
10273
|
+
/**
|
|
10274
|
+
* node kinds to omit from the AST (see `HtmlAstSkip`); omit to build the full tree
|
|
10275
|
+
*/
|
|
10276
|
+
skip?: HtmlAstSkip;
|
|
10277
|
+
}
|
|
9839
10278
|
declare abstract class HtmlParser extends ParserClass {
|
|
9840
10279
|
magicCommentContext: ContextImport;
|
|
9841
10280
|
template?: (source: string, context: HtmlTemplateContext) => string;
|
|
@@ -9913,6 +10352,126 @@ declare interface HtmlParserOptions {
|
|
|
9913
10352
|
*/
|
|
9914
10353
|
urlHints?: UrlHintRule[];
|
|
9915
10354
|
}
|
|
10355
|
+
type HtmlPrintOptions = Pick<
|
|
10356
|
+
CssProcessOptions,
|
|
10357
|
+
"environment" | "convertLengthUnits" | "rewriteCustomProperties"
|
|
10358
|
+
> & {
|
|
10359
|
+
cssTransforms?: CssTransformOptions;
|
|
10360
|
+
transforms?: HtmlTransformOptions;
|
|
10361
|
+
collapseWhitespace?: boolean | "all" | "conservative" | "smart";
|
|
10362
|
+
mergeStyles?: boolean;
|
|
10363
|
+
removeEmptyAttributes?: boolean;
|
|
10364
|
+
removeEmptyElements?: boolean;
|
|
10365
|
+
removeRedundantAttributes?: boolean | "all" | "smart";
|
|
10366
|
+
sortAttributes?: boolean;
|
|
10367
|
+
sortTokenLists?: boolean;
|
|
10368
|
+
removeImpliedTags?: boolean | "all" | "smart";
|
|
10369
|
+
renderEmbeddedSource?: (
|
|
10370
|
+
source: string,
|
|
10371
|
+
info: { type: string; hostType: string; as?: string }
|
|
10372
|
+
) => undefined | string;
|
|
10373
|
+
deferEmbeddedSource?: DeferredEmbeddedSource[];
|
|
10374
|
+
deferSrcdoc?: boolean;
|
|
10375
|
+
};
|
|
10376
|
+
declare interface HtmlProcessOptions {
|
|
10377
|
+
/**
|
|
10378
|
+
* context element tag name for fragment parsing (see `parseHtml`); the HTML analog of the CSS parser's `as` parse-mode option
|
|
10379
|
+
*/
|
|
10380
|
+
fragmentContext?: string;
|
|
10381
|
+
|
|
10382
|
+
/**
|
|
10383
|
+
* node kinds to omit from the AST for speed/memory (see `HtmlAstSkip`)
|
|
10384
|
+
*/
|
|
10385
|
+
skip?: HtmlAstSkip;
|
|
10386
|
+
|
|
10387
|
+
/**
|
|
10388
|
+
* 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 `""`)
|
|
10389
|
+
*/
|
|
10390
|
+
minimize?: boolean;
|
|
10391
|
+
|
|
10392
|
+
/**
|
|
10393
|
+
* CSS's, not HTML's: handed to the CSS minifier that runs over an inline `<style>` and every `style=""`, so the inline copy of a declaration agrees with the `.css` asset
|
|
10394
|
+
*/
|
|
10395
|
+
environment?: CssEnvironment;
|
|
10396
|
+
|
|
10397
|
+
/**
|
|
10398
|
+
* CSS's too, handed over with `environment` (see `HtmlPrintOptions`)
|
|
10399
|
+
*/
|
|
10400
|
+
convertLengthUnits?: boolean;
|
|
10401
|
+
|
|
10402
|
+
/**
|
|
10403
|
+
* CSS's too, handed over with `environment` (see `HtmlPrintOptions`)
|
|
10404
|
+
*/
|
|
10405
|
+
rewriteCustomProperties?: boolean;
|
|
10406
|
+
|
|
10407
|
+
/**
|
|
10408
|
+
* CSS's per-transform switches too, handed over with `environment` (see `HtmlPrintOptions`)
|
|
10409
|
+
*/
|
|
10410
|
+
cssTransforms?: CssTransformOptions;
|
|
10411
|
+
|
|
10412
|
+
/**
|
|
10413
|
+
* which of the meaning-preserving rewrites the minifying print makes; each is on unless it is `false`
|
|
10414
|
+
*/
|
|
10415
|
+
transforms?: HtmlTransformOptions;
|
|
10416
|
+
|
|
10417
|
+
/**
|
|
10418
|
+
* 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)
|
|
10419
|
+
*/
|
|
10420
|
+
collapseWhitespace?: boolean | "all" | "conservative" | "smart";
|
|
10421
|
+
|
|
10422
|
+
/**
|
|
10423
|
+
* drop an attribute whose empty value leaves it in the state its absence gives (default false)
|
|
10424
|
+
*/
|
|
10425
|
+
removeEmptyAttributes?: boolean;
|
|
10426
|
+
|
|
10427
|
+
/**
|
|
10428
|
+
* drop an element with no children and no attributes, unless its bare form is meaningful (default false)
|
|
10429
|
+
*/
|
|
10430
|
+
removeEmptyElements?: boolean;
|
|
10431
|
+
|
|
10432
|
+
/**
|
|
10433
|
+
* print a run of adjacent `<style>` elements as one sheet, which removes elements (default false)
|
|
10434
|
+
*/
|
|
10435
|
+
mergeStyles?: boolean;
|
|
10436
|
+
|
|
10437
|
+
/**
|
|
10438
|
+
* print an element's attributes commonest name first, ties by name, which nothing in HTML reads (default false)
|
|
10439
|
+
*/
|
|
10440
|
+
sortAttributes?: boolean;
|
|
10441
|
+
|
|
10442
|
+
/**
|
|
10443
|
+
* print every token list the DOM reads as a set (`class`, `rel`, `part`, …) in token order (default false)
|
|
10444
|
+
*/
|
|
10445
|
+
sortTokenLists?: boolean;
|
|
10446
|
+
|
|
10447
|
+
/**
|
|
10448
|
+
* drop an attribute whose value is the element's own default; `true` is `"smart"`, and `"all"` also drops the spec defaults a selector can match (default false)
|
|
10449
|
+
*/
|
|
10450
|
+
removeRedundantAttributes?: boolean | "all" | "smart";
|
|
10451
|
+
|
|
10452
|
+
/**
|
|
10453
|
+
* 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"`)
|
|
10454
|
+
*/
|
|
10455
|
+
removeImpliedTags?: boolean | "all" | "smart";
|
|
10456
|
+
|
|
10457
|
+
/**
|
|
10458
|
+
* 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
|
|
10459
|
+
*/
|
|
10460
|
+
deferSrcdoc?: boolean;
|
|
10461
|
+
|
|
10462
|
+
/**
|
|
10463
|
+
* collects what `renderEmbeddedSource` would be offered instead of offering it, for a caller whose renderer is asynchronous: the print leaves a marker for each and `finish` puts the answers in their place, so one parse serves both. 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`
|
|
10464
|
+
*/
|
|
10465
|
+
deferEmbeddedSource?: DeferredEmbeddedSource[];
|
|
10466
|
+
|
|
10467
|
+
/**
|
|
10468
|
+
* 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
|
|
10469
|
+
*/
|
|
10470
|
+
renderEmbeddedSource?: (
|
|
10471
|
+
source: string,
|
|
10472
|
+
info: { type: string; hostType: string; as?: string }
|
|
10473
|
+
) => undefined | string;
|
|
10474
|
+
}
|
|
9916
10475
|
declare interface HtmlResourceHintHtmlEntryDependency {
|
|
9917
10476
|
/**
|
|
9918
10477
|
* hint relationship
|
|
@@ -10089,9 +10648,122 @@ declare interface HtmlTemplateContext {
|
|
|
10089
10648
|
*/
|
|
10090
10649
|
emitError: (error: string | Error) => void;
|
|
10091
10650
|
}
|
|
10651
|
+
declare interface HtmlTokenCallbacks {
|
|
10652
|
+
openTag?: (
|
|
10653
|
+
input: string,
|
|
10654
|
+
start: number,
|
|
10655
|
+
end: number,
|
|
10656
|
+
nameStart: number,
|
|
10657
|
+
nameEnd: number,
|
|
10658
|
+
selfClosing: boolean
|
|
10659
|
+
) => number;
|
|
10660
|
+
closeTag?: (
|
|
10661
|
+
input: string,
|
|
10662
|
+
start: number,
|
|
10663
|
+
end: number,
|
|
10664
|
+
nameStart: number,
|
|
10665
|
+
nameEnd: number
|
|
10666
|
+
) => number;
|
|
10667
|
+
text?: (input: string, start: number, end: number) => number;
|
|
10668
|
+
attribute?: (
|
|
10669
|
+
input: string,
|
|
10670
|
+
nameStart: number,
|
|
10671
|
+
nameEnd: number,
|
|
10672
|
+
valueStart: number,
|
|
10673
|
+
valueEnd: number,
|
|
10674
|
+
quoteType: number
|
|
10675
|
+
) => number;
|
|
10676
|
+
comment?: (
|
|
10677
|
+
input: string,
|
|
10678
|
+
start: number,
|
|
10679
|
+
end: number,
|
|
10680
|
+
dataStart: number,
|
|
10681
|
+
dataEnd: number
|
|
10682
|
+
) => number;
|
|
10683
|
+
doctype?: (
|
|
10684
|
+
input: string,
|
|
10685
|
+
start: number,
|
|
10686
|
+
end: number,
|
|
10687
|
+
nameStart: number,
|
|
10688
|
+
nameEnd: number,
|
|
10689
|
+
publicStart: number,
|
|
10690
|
+
publicEnd: number,
|
|
10691
|
+
systemStart: number,
|
|
10692
|
+
systemEnd: number,
|
|
10693
|
+
forceQuirks: boolean
|
|
10694
|
+
) => number;
|
|
10695
|
+
parseError?: (
|
|
10696
|
+
input: string,
|
|
10697
|
+
code: string,
|
|
10698
|
+
start: number,
|
|
10699
|
+
end: number,
|
|
10700
|
+
severity: ParseErrorSeverity
|
|
10701
|
+
) => void;
|
|
10702
|
+
|
|
10703
|
+
/**
|
|
10704
|
+
* returns true when the adjusted current node is in a foreign (SVG/MathML) namespace, which is where a `<![CDATA[` opens a CDATA section
|
|
10705
|
+
*/
|
|
10706
|
+
isForeign?: () => boolean;
|
|
10707
|
+
|
|
10708
|
+
/**
|
|
10709
|
+
* 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
|
|
10710
|
+
*/
|
|
10711
|
+
vetoesContentMode?: (name: string) => boolean;
|
|
10712
|
+
|
|
10713
|
+
/**
|
|
10714
|
+
* context element tag name for fragment parsing; seeds the initial content mode
|
|
10715
|
+
*/
|
|
10716
|
+
fragmentContext?: string;
|
|
10717
|
+
}
|
|
10092
10718
|
declare interface HtmlTransformHtmlContext {
|
|
10093
10719
|
outputName: string;
|
|
10094
10720
|
}
|
|
10721
|
+
declare interface HtmlTransformOptions {
|
|
10722
|
+
/**
|
|
10723
|
+
* write a boolean attribute spelled with its own name (`disabled="disabled"`) as the bare name
|
|
10724
|
+
*/
|
|
10725
|
+
collapseBooleanAttributes?: boolean;
|
|
10726
|
+
|
|
10727
|
+
/**
|
|
10728
|
+
* which comments survive: `"some"` (the default) the ones that carry something, `true` / `"all"` every one, `false` none, or the ones a pattern matches / a predicate accepts, over the comment's own text. A comment a parser or a server reads is kept whatever this says
|
|
10729
|
+
*/
|
|
10730
|
+
comments?: string | boolean | RegExp | ((comment: string) => boolean);
|
|
10731
|
+
|
|
10732
|
+
/**
|
|
10733
|
+
* strip the whitespace between a JSON `<script>`'s tokens
|
|
10734
|
+
*/
|
|
10735
|
+
minifyJson?: boolean;
|
|
10736
|
+
|
|
10737
|
+
/**
|
|
10738
|
+
* run the CSS minifier over an inline `<style>` and every `style=""`
|
|
10739
|
+
*/
|
|
10740
|
+
minifyStyles?: boolean;
|
|
10741
|
+
|
|
10742
|
+
/**
|
|
10743
|
+
* drop or re-pick an attribute value's quotes
|
|
10744
|
+
*/
|
|
10745
|
+
normalizeAttributeQuotes?: boolean;
|
|
10746
|
+
|
|
10747
|
+
/**
|
|
10748
|
+
* fold an enumerated value to the keyword it names
|
|
10749
|
+
*/
|
|
10750
|
+
normalizeEnumeratedAttributes?: boolean;
|
|
10751
|
+
|
|
10752
|
+
/**
|
|
10753
|
+
* normalize a space-, comma- or descriptor-separated list value (`class`, `rel`, `srcset`, `sizes`, the viewport `content`)
|
|
10754
|
+
*/
|
|
10755
|
+
normalizeListAttributes?: boolean;
|
|
10756
|
+
|
|
10757
|
+
/**
|
|
10758
|
+
* write an integer attribute the one way its rules read it
|
|
10759
|
+
*/
|
|
10760
|
+
normalizeNumericAttributes?: boolean;
|
|
10761
|
+
|
|
10762
|
+
/**
|
|
10763
|
+
* leave out an optional tag other than the `<html>` / `<head>` / `<body>` shell, which is `removeImpliedTags`
|
|
10764
|
+
*/
|
|
10765
|
+
removeOptionalTags?: boolean;
|
|
10766
|
+
}
|
|
10095
10767
|
declare interface HtmlTransformTagsContext {
|
|
10096
10768
|
outputName: string;
|
|
10097
10769
|
html: string;
|
|
@@ -10707,12 +11379,12 @@ declare class InitFragment<GenerateContext> {
|
|
|
10707
11379
|
/**
|
|
10708
11380
|
* Serializes this instance into the provided serializer context.
|
|
10709
11381
|
*/
|
|
10710
|
-
serialize(context:
|
|
11382
|
+
serialize(context: ObjectSerializerContextObjectMiddlewareObject_3): void;
|
|
10711
11383
|
|
|
10712
11384
|
/**
|
|
10713
11385
|
* Restores this instance from the provided deserializer context.
|
|
10714
11386
|
*/
|
|
10715
|
-
deserialize(context:
|
|
11387
|
+
deserialize(context: ObjectDeserializerContextObjectMiddlewareObject_2): void;
|
|
10716
11388
|
|
|
10717
11389
|
/**
|
|
10718
11390
|
* Adds the provided source to the init fragment.
|
|
@@ -10740,8 +11412,8 @@ declare abstract class InlinedValue {
|
|
|
10740
11412
|
value?: null | string | number | boolean;
|
|
10741
11413
|
renderLiteral(): string;
|
|
10742
11414
|
render(comment: string): string;
|
|
10743
|
-
serialize(__0:
|
|
10744
|
-
deserialize(__0:
|
|
11415
|
+
serialize(__0: ObjectSerializerContextObjectMiddlewareObject_3): void;
|
|
11416
|
+
deserialize(__0: ObjectDeserializerContextObjectMiddlewareObject_2): void;
|
|
10745
11417
|
}
|
|
10746
11418
|
type InlinedValueKind = "string" | "number" | "boolean" | "undefined" | "null";
|
|
10747
11419
|
declare interface InnerGraphUtils {
|
|
@@ -11014,6 +11686,15 @@ declare class JavascriptModulesPlugin {
|
|
|
11014
11686
|
[Module, Partial<RenderBootstrapContext>],
|
|
11015
11687
|
string | void
|
|
11016
11688
|
>;
|
|
11689
|
+
/**
|
|
11690
|
+
* Offers a module's rendered export-definition call to a consumer that can place
|
|
11691
|
+
* it better — a library whose entry exports the same bindings natively takes it
|
|
11692
|
+
* over and emits it only where the module is wrapped. Return true to take it.
|
|
11693
|
+
*/
|
|
11694
|
+
onDemandExportsGeneration: SyncBailHook<
|
|
11695
|
+
[Module, RuntimeSpec, string, boolean],
|
|
11696
|
+
boolean | void
|
|
11697
|
+
>;
|
|
11017
11698
|
/**
|
|
11018
11699
|
* @since 5.22.0
|
|
11019
11700
|
*/
|
|
@@ -11094,6 +11775,15 @@ declare class JavascriptModulesPlugin {
|
|
|
11094
11775
|
[Module, Partial<RenderBootstrapContext>],
|
|
11095
11776
|
string | void
|
|
11096
11777
|
>;
|
|
11778
|
+
/**
|
|
11779
|
+
* Offers a module's rendered export-definition call to a consumer that can place
|
|
11780
|
+
* it better — a library whose entry exports the same bindings natively takes it
|
|
11781
|
+
* over and emits it only where the module is wrapped. Return true to take it.
|
|
11782
|
+
*/
|
|
11783
|
+
onDemandExportsGeneration: SyncBailHook<
|
|
11784
|
+
[Module, RuntimeSpec, string, boolean],
|
|
11785
|
+
boolean | void
|
|
11786
|
+
>;
|
|
11097
11787
|
/**
|
|
11098
11788
|
* @since 5.22.0
|
|
11099
11789
|
*/
|
|
@@ -11174,6 +11864,15 @@ declare class JavascriptModulesPlugin {
|
|
|
11174
11864
|
[Module, Partial<RenderBootstrapContext>],
|
|
11175
11865
|
string | void
|
|
11176
11866
|
>;
|
|
11867
|
+
/**
|
|
11868
|
+
* Offers a module's rendered export-definition call to a consumer that can place
|
|
11869
|
+
* it better — a library whose entry exports the same bindings natively takes it
|
|
11870
|
+
* over and emits it only where the module is wrapped. Return true to take it.
|
|
11871
|
+
*/
|
|
11872
|
+
onDemandExportsGeneration: SyncBailHook<
|
|
11873
|
+
[Module, RuntimeSpec, string, boolean],
|
|
11874
|
+
boolean | void
|
|
11875
|
+
>;
|
|
11177
11876
|
/**
|
|
11178
11877
|
* @since 5.22.0
|
|
11179
11878
|
*/
|
|
@@ -11256,6 +11955,15 @@ declare class JavascriptModulesPlugin {
|
|
|
11256
11955
|
[Module, Partial<RenderBootstrapContext>],
|
|
11257
11956
|
string | void
|
|
11258
11957
|
>;
|
|
11958
|
+
/**
|
|
11959
|
+
* Offers a module's rendered export-definition call to a consumer that can place
|
|
11960
|
+
* it better — a library whose entry exports the same bindings natively takes it
|
|
11961
|
+
* over and emits it only where the module is wrapped. Return true to take it.
|
|
11962
|
+
*/
|
|
11963
|
+
onDemandExportsGeneration: SyncBailHook<
|
|
11964
|
+
[Module, RuntimeSpec, string, boolean],
|
|
11965
|
+
boolean | void
|
|
11966
|
+
>;
|
|
11259
11967
|
/**
|
|
11260
11968
|
* @since 5.22.0
|
|
11261
11969
|
*/
|
|
@@ -11336,6 +12044,15 @@ declare class JavascriptModulesPlugin {
|
|
|
11336
12044
|
[Module, Partial<RenderBootstrapContext>],
|
|
11337
12045
|
string | void
|
|
11338
12046
|
>;
|
|
12047
|
+
/**
|
|
12048
|
+
* Offers a module's rendered export-definition call to a consumer that can place
|
|
12049
|
+
* it better — a library whose entry exports the same bindings natively takes it
|
|
12050
|
+
* over and emits it only where the module is wrapped. Return true to take it.
|
|
12051
|
+
*/
|
|
12052
|
+
onDemandExportsGeneration: SyncBailHook<
|
|
12053
|
+
[Module, RuntimeSpec, string, boolean],
|
|
12054
|
+
boolean | void
|
|
12055
|
+
>;
|
|
11339
12056
|
/**
|
|
11340
12057
|
* @since 5.22.0
|
|
11341
12058
|
*/
|
|
@@ -11416,6 +12133,15 @@ declare class JavascriptModulesPlugin {
|
|
|
11416
12133
|
[Module, Partial<RenderBootstrapContext>],
|
|
11417
12134
|
string | void
|
|
11418
12135
|
>;
|
|
12136
|
+
/**
|
|
12137
|
+
* Offers a module's rendered export-definition call to a consumer that can place
|
|
12138
|
+
* it better — a library whose entry exports the same bindings natively takes it
|
|
12139
|
+
* over and emits it only where the module is wrapped. Return true to take it.
|
|
12140
|
+
*/
|
|
12141
|
+
onDemandExportsGeneration: SyncBailHook<
|
|
12142
|
+
[Module, RuntimeSpec, string, boolean],
|
|
12143
|
+
boolean | void
|
|
12144
|
+
>;
|
|
11419
12145
|
/**
|
|
11420
12146
|
* @since 5.22.0
|
|
11421
12147
|
*/
|
|
@@ -11495,6 +12221,15 @@ declare class JavascriptModulesPlugin {
|
|
|
11495
12221
|
[Module, Partial<RenderBootstrapContext>],
|
|
11496
12222
|
string | void
|
|
11497
12223
|
>;
|
|
12224
|
+
/**
|
|
12225
|
+
* Offers a module's rendered export-definition call to a consumer that can place
|
|
12226
|
+
* it better — a library whose entry exports the same bindings natively takes it
|
|
12227
|
+
* over and emits it only where the module is wrapped. Return true to take it.
|
|
12228
|
+
*/
|
|
12229
|
+
onDemandExportsGeneration: SyncBailHook<
|
|
12230
|
+
[Module, RuntimeSpec, string, boolean],
|
|
12231
|
+
boolean | void
|
|
12232
|
+
>;
|
|
11498
12233
|
/**
|
|
11499
12234
|
* @since 5.22.0
|
|
11500
12235
|
*/
|
|
@@ -11527,7 +12262,10 @@ declare class JavascriptParser extends ParserClass {
|
|
|
11527
12262
|
constructor(
|
|
11528
12263
|
sourceType?: "module" | "auto" | "script",
|
|
11529
12264
|
options?: {
|
|
11530
|
-
parse?: (
|
|
12265
|
+
parse?: (
|
|
12266
|
+
code: string,
|
|
12267
|
+
options: ParseOptionsJavascriptParser
|
|
12268
|
+
) => ParseResult;
|
|
11531
12269
|
typescript?: boolean;
|
|
11532
12270
|
importPhases?: boolean;
|
|
11533
12271
|
strictModeViolations?: false | "error" | "warn";
|
|
@@ -11879,7 +12617,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
11879
12617
|
| ExportAllDeclaration
|
|
11880
12618
|
| ExportDefaultDeclaration
|
|
11881
12619
|
),
|
|
11882
|
-
|
|
12620
|
+
DeclarationEstreeIndex
|
|
11883
12621
|
],
|
|
11884
12622
|
boolean | void
|
|
11885
12623
|
>;
|
|
@@ -12007,6 +12745,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12007
12745
|
| ThisExpression
|
|
12008
12746
|
| UpdateExpression
|
|
12009
12747
|
| YieldExpression
|
|
12748
|
+
| VariableDeclaration
|
|
12010
12749
|
| ForOfStatement
|
|
12011
12750
|
],
|
|
12012
12751
|
boolean | void
|
|
@@ -12073,7 +12812,10 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12073
12812
|
}>;
|
|
12074
12813
|
sourceType: "module" | "auto" | "script";
|
|
12075
12814
|
options: {
|
|
12076
|
-
parse?: (
|
|
12815
|
+
parse?: (
|
|
12816
|
+
code: string,
|
|
12817
|
+
options: ParseOptionsJavascriptParser
|
|
12818
|
+
) => ParseResult;
|
|
12077
12819
|
typescript?: boolean;
|
|
12078
12820
|
importPhases?: boolean;
|
|
12079
12821
|
strictModeViolations?: false | "error" | "warn";
|
|
@@ -12654,7 +13396,7 @@ declare class JavascriptParser extends ParserClass {
|
|
|
12654
13396
|
* Processes the provided declaration.
|
|
12655
13397
|
*/
|
|
12656
13398
|
enterDeclaration(
|
|
12657
|
-
declaration:
|
|
13399
|
+
declaration: DeclarationEstreeIndex,
|
|
12658
13400
|
onIdent: (ident: string, identifier: Identifier) => void
|
|
12659
13401
|
): void;
|
|
12660
13402
|
|
|
@@ -13379,6 +14121,18 @@ declare class JavascriptParser extends ParserClass {
|
|
|
13379
14121
|
*/
|
|
13380
14122
|
getComments(range: [number, number]): CommentJavascriptParser[];
|
|
13381
14123
|
|
|
14124
|
+
/**
|
|
14125
|
+
* Reports whether `identifier` may occur as a word in the source text of
|
|
14126
|
+
* `range`. A conservative pre-filter for expensive AST scans: `false` means
|
|
14127
|
+
* it certainly does not occur, while a match inside a comment or a string
|
|
14128
|
+
* yields `true`. Also `true` when no source text is available (preparsed
|
|
14129
|
+
* AST), so callers must stay correct without the filter.
|
|
14130
|
+
*/
|
|
14131
|
+
sourceMayContainIdentifier(
|
|
14132
|
+
range: [number, number],
|
|
14133
|
+
identifier: string
|
|
14134
|
+
): boolean;
|
|
14135
|
+
|
|
13382
14136
|
/**
|
|
13383
14137
|
* Checks whether this javascript parser is asi position.
|
|
13384
14138
|
*/
|
|
@@ -13671,9 +14425,9 @@ declare class JavascriptParser extends ParserClass {
|
|
|
13671
14425
|
static extend(
|
|
13672
14426
|
...plugins: ((BaseParser: typeof ParserImport) => typeof ParserImport)[]
|
|
13673
14427
|
): typeof JavascriptParser;
|
|
13674
|
-
static ALLOWED_MEMBER_TYPES_ALL:
|
|
13675
|
-
static ALLOWED_MEMBER_TYPES_CALL_EXPRESSION:
|
|
13676
|
-
static ALLOWED_MEMBER_TYPES_EXPRESSION:
|
|
14428
|
+
static ALLOWED_MEMBER_TYPES_ALL: number;
|
|
14429
|
+
static ALLOWED_MEMBER_TYPES_CALL_EXPRESSION: number;
|
|
14430
|
+
static ALLOWED_MEMBER_TYPES_EXPRESSION: number;
|
|
13677
14431
|
static VariableInfo: typeof VariableInfo;
|
|
13678
14432
|
static VariableInfoFlags: Readonly<{
|
|
13679
14433
|
Evaluated: 0;
|
|
@@ -13825,7 +14579,7 @@ declare interface JavascriptParserOptions {
|
|
|
13825
14579
|
/**
|
|
13826
14580
|
* Function to parser source code.
|
|
13827
14581
|
*/
|
|
13828
|
-
parse?: (code: string, options:
|
|
14582
|
+
parse?: (code: string, options: ParseOptionsJavascriptParser) => ParseResult;
|
|
13829
14583
|
|
|
13830
14584
|
/**
|
|
13831
14585
|
* Mark the listed top-level function names for pure-function-based tree shaking.
|
|
@@ -14201,7 +14955,22 @@ declare interface KnownBuildInfo {
|
|
|
14201
14955
|
isCircular?: boolean;
|
|
14202
14956
|
|
|
14203
14957
|
/**
|
|
14204
|
-
*
|
|
14958
|
+
* true when the module calls `eval` directly
|
|
14959
|
+
*/
|
|
14960
|
+
usesEval?: boolean;
|
|
14961
|
+
|
|
14962
|
+
/**
|
|
14963
|
+
* how many `#__PURE__` annotations sit where the parser does not read them
|
|
14964
|
+
*/
|
|
14965
|
+
ineffectivePureAnnotations?: number;
|
|
14966
|
+
|
|
14967
|
+
/**
|
|
14968
|
+
* how many times the module reads `this` at its top level
|
|
14969
|
+
*/
|
|
14970
|
+
topLevelThis?: number;
|
|
14971
|
+
|
|
14972
|
+
/**
|
|
14973
|
+
* module uses top-level `for await…of` or `await using`, which can't be lowered to a generator
|
|
14205
14974
|
*/
|
|
14206
14975
|
usesTopLevelAwaitForOf?: boolean;
|
|
14207
14976
|
}
|
|
@@ -14220,6 +14989,11 @@ declare interface KnownBuildMeta {
|
|
|
14220
14989
|
* using in ModuleLibraryPlugin
|
|
14221
14990
|
*/
|
|
14222
14991
|
exportsSourceByRuntime?: Map<string, string>;
|
|
14992
|
+
|
|
14993
|
+
/**
|
|
14994
|
+
* export definitions `ModuleLibraryPlugin` took over, re-emitted only where the module is wrapped
|
|
14995
|
+
*/
|
|
14996
|
+
exportsBindingSourceByRuntime?: Map<string, string>;
|
|
14223
14997
|
}
|
|
14224
14998
|
declare interface KnownConcatenatedModuleBuildInfo {
|
|
14225
14999
|
fileDependencies?: LazySet<string>;
|
|
@@ -14320,6 +15094,11 @@ declare interface KnownJavascriptModuleBuildInfo {
|
|
|
14320
15094
|
*/
|
|
14321
15095
|
needCreateRequire?: boolean;
|
|
14322
15096
|
|
|
15097
|
+
/**
|
|
15098
|
+
* module reassigns `__webpack_public_path__` at runtime, using in APIPlugin
|
|
15099
|
+
*/
|
|
15100
|
+
usingPublicPathOverride?: boolean;
|
|
15101
|
+
|
|
14323
15102
|
/**
|
|
14324
15103
|
* names of locally declared functions known to be free of side effects
|
|
14325
15104
|
*/
|
|
@@ -14329,6 +15108,11 @@ declare interface KnownJavascriptModuleBuildInfo {
|
|
|
14329
15108
|
* whether this module was parsed with `optimization.inlineExports` enabled (gates inlining of its exports)
|
|
14330
15109
|
*/
|
|
14331
15110
|
inlineExports?: boolean;
|
|
15111
|
+
|
|
15112
|
+
/**
|
|
15113
|
+
* module scope holds a `using`/`await using` declaration, so its resources must be disposed when the module finished evaluating
|
|
15114
|
+
*/
|
|
15115
|
+
usesTopLevelUsingDeclaration?: boolean;
|
|
14332
15116
|
}
|
|
14333
15117
|
declare interface KnownJavascriptModuleBuildMeta {
|
|
14334
15118
|
strictHarmonyModule?: boolean;
|
|
@@ -14525,6 +15309,8 @@ declare interface KnownStatsCompilation {
|
|
|
14525
15309
|
errorsCount?: number;
|
|
14526
15310
|
warnings?: StatsError[];
|
|
14527
15311
|
warningsCount?: number;
|
|
15312
|
+
hints?: StatsError[];
|
|
15313
|
+
hintsCount?: number;
|
|
14528
15314
|
children?: StatsCompilation[];
|
|
14529
15315
|
logging?: Record<string, StatsLogging>;
|
|
14530
15316
|
filteredWarningDetailsCount?: number;
|
|
@@ -14854,8 +15640,8 @@ declare interface LazyCompilationDefaultBackendOptions {
|
|
|
14854
15640
|
* Specifies how to create the server handling the EventSource requests.
|
|
14855
15641
|
*/
|
|
14856
15642
|
server?:
|
|
14857
|
-
| ServerOptionsImportHttps
|
|
14858
|
-
| ServerOptionsImportHttp
|
|
15643
|
+
| ServerOptionsImportHttps
|
|
15644
|
+
| ServerOptionsImportHttp
|
|
14859
15645
|
| (() => ServerLazyCompilationBackend);
|
|
14860
15646
|
}
|
|
14861
15647
|
|
|
@@ -14978,7 +15764,7 @@ declare class LazySet<T> {
|
|
|
14978
15764
|
* serialization stream.
|
|
14979
15765
|
*/
|
|
14980
15766
|
serialize(
|
|
14981
|
-
__0:
|
|
15767
|
+
__0: ObjectSerializerContextObjectMiddlewareObject_3<(number | T)[]>
|
|
14982
15768
|
): void;
|
|
14983
15769
|
|
|
14984
15770
|
/**
|
|
@@ -14990,7 +15776,7 @@ declare class LazySet<T> {
|
|
|
14990
15776
|
* Restores a `LazySet` from serialized item data.
|
|
14991
15777
|
*/
|
|
14992
15778
|
static deserialize<T>(
|
|
14993
|
-
__0:
|
|
15779
|
+
__0: ObjectDeserializerContextObjectMiddlewareObject_2<(number | T)[]>
|
|
14994
15780
|
): LazySet<T>;
|
|
14995
15781
|
}
|
|
14996
15782
|
declare interface LibIdentOptions {
|
|
@@ -15129,6 +15915,11 @@ declare interface LibraryOptions {
|
|
|
15129
15915
|
*/
|
|
15130
15916
|
type: string;
|
|
15131
15917
|
|
|
15918
|
+
/**
|
|
15919
|
+
* 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.
|
|
15920
|
+
*/
|
|
15921
|
+
umdAmdContainer?: string;
|
|
15922
|
+
|
|
15132
15923
|
/**
|
|
15133
15924
|
* If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.
|
|
15134
15925
|
*/
|
|
@@ -15487,6 +16278,16 @@ declare class LoaderTargetPlugin {
|
|
|
15487
16278
|
*/
|
|
15488
16279
|
apply(compiler: Compiler): void;
|
|
15489
16280
|
}
|
|
16281
|
+
declare abstract class LocConverter {
|
|
16282
|
+
line: number;
|
|
16283
|
+
column: number;
|
|
16284
|
+
pos: number;
|
|
16285
|
+
|
|
16286
|
+
/**
|
|
16287
|
+
* Returns location converter.
|
|
16288
|
+
*/
|
|
16289
|
+
get(pos: number): LocConverter;
|
|
16290
|
+
}
|
|
15490
16291
|
declare abstract class LocalModule {
|
|
15491
16292
|
name: string;
|
|
15492
16293
|
idx: number;
|
|
@@ -15501,12 +16302,12 @@ declare abstract class LocalModule {
|
|
|
15501
16302
|
/**
|
|
15502
16303
|
* Serializes this instance into the provided serializer context.
|
|
15503
16304
|
*/
|
|
15504
|
-
serialize(context:
|
|
16305
|
+
serialize(context: ObjectSerializerContextObjectMiddlewareObject_1): void;
|
|
15505
16306
|
|
|
15506
16307
|
/**
|
|
15507
16308
|
* Restores this instance from the provided deserializer context.
|
|
15508
16309
|
*/
|
|
15509
|
-
deserialize(context:
|
|
16310
|
+
deserialize(context: ObjectDeserializerContextObjectMiddlewareObject_3): void;
|
|
15510
16311
|
}
|
|
15511
16312
|
declare interface LogEntry {
|
|
15512
16313
|
type:
|
|
@@ -15679,6 +16480,9 @@ declare abstract class MainTemplate {
|
|
|
15679
16480
|
get requireFn(): "__webpack_require__";
|
|
15680
16481
|
get outputOptions(): Output;
|
|
15681
16482
|
}
|
|
16483
|
+
declare interface MakeCacheableResult<T> {
|
|
16484
|
+
(value: string, cache?: object): T;
|
|
16485
|
+
}
|
|
15682
16486
|
declare interface MakeDirectoryOptions {
|
|
15683
16487
|
recursive?: boolean;
|
|
15684
16488
|
mode?: string | number;
|
|
@@ -16411,6 +17215,8 @@ declare class ModuleConcatenationPlugin {
|
|
|
16411
17215
|
* Applies the plugin by registering its hooks on the compiler.
|
|
16412
17216
|
*/
|
|
16413
17217
|
apply(compiler: Compiler): void;
|
|
17218
|
+
static BAILOUT_PREFIX: string;
|
|
17219
|
+
static REJECTED_PREFIX: string;
|
|
16414
17220
|
}
|
|
16415
17221
|
declare class ModuleDependency extends Dependency {
|
|
16416
17222
|
/**
|
|
@@ -16446,7 +17252,10 @@ declare class ModuleDependency extends Dependency {
|
|
|
16446
17252
|
/**
|
|
16447
17253
|
* Returns true if the dependency can be concatenated (scope hoisting).
|
|
16448
17254
|
*/
|
|
16449
|
-
static canConcatenate(
|
|
17255
|
+
static canConcatenate(
|
|
17256
|
+
dependency: Dependency,
|
|
17257
|
+
concatenateCommonJsModules: boolean
|
|
17258
|
+
): boolean;
|
|
16450
17259
|
static TRANSITIVE: symbol;
|
|
16451
17260
|
static LAZY_UNTIL_LOCAL: "local";
|
|
16452
17261
|
static LAZY_UNTIL_ID: "id";
|
|
@@ -17372,6 +18181,11 @@ declare abstract class ModuleProfile {
|
|
|
17372
18181
|
*/
|
|
17373
18182
|
mergeInto(realProfile: ModuleProfile): void;
|
|
17374
18183
|
}
|
|
18184
|
+
declare interface ModuleReferenceMatch {
|
|
18185
|
+
start: number;
|
|
18186
|
+
end: number;
|
|
18187
|
+
name: string;
|
|
18188
|
+
}
|
|
17375
18189
|
declare interface ModuleReferenceOptions {
|
|
17376
18190
|
/**
|
|
17377
18191
|
* the properties or exports selected from the referenced module
|
|
@@ -17398,6 +18212,11 @@ declare interface ModuleReferenceOptions {
|
|
|
17398
18212
|
*/
|
|
17399
18213
|
mangleableNamespace: boolean;
|
|
17400
18214
|
|
|
18215
|
+
/**
|
|
18216
|
+
* 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)
|
|
18217
|
+
*/
|
|
18218
|
+
moduleExportsAccess: boolean;
|
|
18219
|
+
|
|
17401
18220
|
/**
|
|
17402
18221
|
* if the position is ASI safe or unknown
|
|
17403
18222
|
*/
|
|
@@ -17577,10 +18396,11 @@ declare class MultiCompiler {
|
|
|
17577
18396
|
options: MultiCompilerOptions
|
|
17578
18397
|
);
|
|
17579
18398
|
hooks: Readonly<{
|
|
17580
|
-
done: SyncHook<[MultiStats]>;
|
|
18399
|
+
done: SyncHook<[MultiStats, Compiler[]]>;
|
|
17581
18400
|
invalid: MultiHook<SyncHook<[null | string, number]>>;
|
|
17582
18401
|
run: MultiHook<AsyncSeriesHook<[Compiler]>>;
|
|
17583
18402
|
watchClose: SyncHook<[]>;
|
|
18403
|
+
shutdown: MultiHook<AsyncSeriesHook<[]>>;
|
|
17584
18404
|
watchRun: MultiHook<AsyncSeriesHook<[Compiler]>>;
|
|
17585
18405
|
infrastructureLog: MultiHook<
|
|
17586
18406
|
SyncBailHook<[string, string, undefined | any[]], true | void>
|
|
@@ -17733,6 +18553,42 @@ declare abstract class MultiWatching {
|
|
|
17733
18553
|
*/
|
|
17734
18554
|
close(callback: (err: null | Error, result?: void) => void): void;
|
|
17735
18555
|
}
|
|
18556
|
+
declare interface MutableToken {
|
|
18557
|
+
/**
|
|
18558
|
+
* one of the `TT_*` constants
|
|
18559
|
+
*/
|
|
18560
|
+
type: number;
|
|
18561
|
+
|
|
18562
|
+
/**
|
|
18563
|
+
* byte offset of the token's first code point
|
|
18564
|
+
*/
|
|
18565
|
+
start: number;
|
|
18566
|
+
|
|
18567
|
+
/**
|
|
18568
|
+
* byte offset just past the token's last code point
|
|
18569
|
+
*/
|
|
18570
|
+
end: number;
|
|
18571
|
+
|
|
18572
|
+
/**
|
|
18573
|
+
* hash tokens: starts an ident sequence
|
|
18574
|
+
*/
|
|
18575
|
+
isId: boolean;
|
|
18576
|
+
|
|
18577
|
+
/**
|
|
18578
|
+
* url tokens: first content code point
|
|
18579
|
+
*/
|
|
18580
|
+
contentStart: number;
|
|
18581
|
+
|
|
18582
|
+
/**
|
|
18583
|
+
* url tokens: just past the last content code point
|
|
18584
|
+
*/
|
|
18585
|
+
contentEnd: number;
|
|
18586
|
+
|
|
18587
|
+
/**
|
|
18588
|
+
* dimension tokens: first unit-ident code point
|
|
18589
|
+
*/
|
|
18590
|
+
unitStart: number;
|
|
18591
|
+
}
|
|
17736
18592
|
declare class NamedChunkIdsPlugin {
|
|
17737
18593
|
/**
|
|
17738
18594
|
* Creates an instance of NamedChunkIdsPlugin.
|
|
@@ -17911,6 +18767,9 @@ declare interface NodeOptions {
|
|
|
17911
18767
|
*/
|
|
17912
18768
|
global?: boolean | "warn";
|
|
17913
18769
|
}
|
|
18770
|
+
declare interface NodePrinter<TPath, TNode, TPrintOptions = object> {
|
|
18771
|
+
(path: TPath, writer: PrintContext<TPath, TNode, TPrintOptions>): string;
|
|
18772
|
+
}
|
|
17914
18773
|
declare class NodeSourcePlugin {
|
|
17915
18774
|
constructor();
|
|
17916
18775
|
|
|
@@ -17919,20 +18778,59 @@ declare class NodeSourcePlugin {
|
|
|
17919
18778
|
*/
|
|
17920
18779
|
apply(compiler: Compiler): void;
|
|
17921
18780
|
}
|
|
17922
|
-
declare
|
|
18781
|
+
declare interface NodeSyntax {
|
|
17923
18782
|
/**
|
|
17924
|
-
*
|
|
18783
|
+
* node-type discriminator
|
|
17925
18784
|
*/
|
|
17926
|
-
|
|
17927
|
-
type: ExternalsType;
|
|
18785
|
+
type: number;
|
|
17928
18786
|
|
|
17929
18787
|
/**
|
|
17930
|
-
*
|
|
18788
|
+
* byte offset of the node's first code point
|
|
17931
18789
|
*/
|
|
17932
|
-
|
|
17933
|
-
|
|
17934
|
-
|
|
17935
|
-
|
|
18790
|
+
start: number;
|
|
18791
|
+
|
|
18792
|
+
/**
|
|
18793
|
+
* byte offset just past the node's last code point
|
|
18794
|
+
*/
|
|
18795
|
+
end: number;
|
|
18796
|
+
|
|
18797
|
+
/**
|
|
18798
|
+
* the `[start, end)` byte range
|
|
18799
|
+
*/
|
|
18800
|
+
range: [number, number];
|
|
18801
|
+
|
|
18802
|
+
/**
|
|
18803
|
+
* source location (1-based line, 0-based column)
|
|
18804
|
+
*/
|
|
18805
|
+
loc: {
|
|
18806
|
+
start: { line: number; column: number };
|
|
18807
|
+
end: { line: number; column: number };
|
|
18808
|
+
};
|
|
18809
|
+
|
|
18810
|
+
/**
|
|
18811
|
+
* source slice for this node
|
|
18812
|
+
*/
|
|
18813
|
+
toString: () => string;
|
|
18814
|
+
|
|
18815
|
+
/**
|
|
18816
|
+
* name with CSS escapes resolved (name-bearing nodes only)
|
|
18817
|
+
*/
|
|
18818
|
+
unescapedName: string;
|
|
18819
|
+
}
|
|
18820
|
+
declare class NodeTargetPlugin {
|
|
18821
|
+
/**
|
|
18822
|
+
* Creates an instance of NodeTargetPlugin.
|
|
18823
|
+
*/
|
|
18824
|
+
constructor(type?: ExternalsType);
|
|
18825
|
+
type: ExternalsType;
|
|
18826
|
+
|
|
18827
|
+
/**
|
|
18828
|
+
* Applies the plugin by registering its hooks on the compiler.
|
|
18829
|
+
*/
|
|
18830
|
+
apply(compiler: Compiler): void;
|
|
18831
|
+
static builtins: (string | RegExp)[];
|
|
18832
|
+
}
|
|
18833
|
+
declare class NodeTemplatePlugin {
|
|
17936
18834
|
/**
|
|
17937
18835
|
* Creates an instance of NodeTemplatePlugin.
|
|
17938
18836
|
*/
|
|
@@ -17952,7 +18850,7 @@ declare interface NodeTemplatePluginOptions {
|
|
|
17952
18850
|
type NodeWebpackOptions = false | NodeOptions;
|
|
17953
18851
|
type NonNullable<T> = T & {};
|
|
17954
18852
|
declare class NormalModule extends Module {
|
|
17955
|
-
constructor(__0:
|
|
18853
|
+
constructor(__0: NormalModuleCreateData<string>);
|
|
17956
18854
|
request: string;
|
|
17957
18855
|
userRequest: string;
|
|
17958
18856
|
rawRequest: string;
|
|
@@ -18058,7 +18956,7 @@ declare class NormalModule extends Module {
|
|
|
18058
18956
|
needBuild: AsyncSeriesBailHook<[NormalModule, NeedBuildContext], boolean>;
|
|
18059
18957
|
};
|
|
18060
18958
|
static deserialize(
|
|
18061
|
-
context:
|
|
18959
|
+
context: ObjectDeserializerContextObjectMiddlewareObject_2
|
|
18062
18960
|
): NormalModule;
|
|
18063
18961
|
|
|
18064
18962
|
/**
|
|
@@ -18070,9 +18968,7 @@ declare class NormalModule extends Module {
|
|
|
18070
18968
|
type NormalModuleBuildInfo = KnownBuildInfo &
|
|
18071
18969
|
Record<string, any> &
|
|
18072
18970
|
KnownNormalModuleBuildInfo;
|
|
18073
|
-
declare interface
|
|
18074
|
-
T extends string = string
|
|
18075
|
-
> {
|
|
18971
|
+
declare interface NormalModuleCreateData<T extends string = string> {
|
|
18076
18972
|
/**
|
|
18077
18973
|
* an optional layer in which the module is
|
|
18078
18974
|
*/
|
|
@@ -18135,8 +19031,8 @@ declare interface NormalModuleCreateDataNormalModuleObject_1<
|
|
|
18135
19031
|
Record<"asset/resource", AssetParser> &
|
|
18136
19032
|
Record<"asset/source", AssetSourceParser> &
|
|
18137
19033
|
Record<"asset/bytes", AssetBytesParser> &
|
|
18138
|
-
Record<"webassembly/async",
|
|
18139
|
-
Record<"webassembly/sync",
|
|
19034
|
+
Record<"webassembly/async", WebAssemblyParserAsyncWebAssemblyParser> &
|
|
19035
|
+
Record<"webassembly/sync", WebAssemblyParserClass> &
|
|
18140
19036
|
Record<"css", CssParser> &
|
|
18141
19037
|
Record<"css/auto", CssParser> &
|
|
18142
19038
|
Record<"css/module", CssParser> &
|
|
@@ -18234,6 +19130,10 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
|
18234
19130
|
afterResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
|
|
18235
19131
|
createModule: AsyncSeriesBailHook<[CreateData, ResolveData], void | Module>;
|
|
18236
19132
|
module: SyncWaterfallHook<[Module, CreateData, ResolveData], Module>;
|
|
19133
|
+
/**
|
|
19134
|
+
* @since 5.110.0
|
|
19135
|
+
*/
|
|
19136
|
+
prepareModuleType: HookMap<AsyncSeriesHook<[]>>;
|
|
18237
19137
|
createParser: TypedHookMap<
|
|
18238
19138
|
Record<
|
|
18239
19139
|
"javascript/auto",
|
|
@@ -18267,11 +19167,14 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
|
18267
19167
|
> &
|
|
18268
19168
|
Record<
|
|
18269
19169
|
"webassembly/async",
|
|
18270
|
-
SyncBailHook<
|
|
19170
|
+
SyncBailHook<
|
|
19171
|
+
[EmptyParserOptions],
|
|
19172
|
+
WebAssemblyParserAsyncWebAssemblyParser
|
|
19173
|
+
>
|
|
18271
19174
|
> &
|
|
18272
19175
|
Record<
|
|
18273
19176
|
"webassembly/sync",
|
|
18274
|
-
SyncBailHook<[EmptyParserOptions],
|
|
19177
|
+
SyncBailHook<[EmptyParserOptions], WebAssemblyParserClass>
|
|
18275
19178
|
> &
|
|
18276
19179
|
Record<"css", SyncBailHook<[CssParserOptions], CssParser>> &
|
|
18277
19180
|
Record<"css/auto", SyncBailHook<[CssModuleParserOptions], CssParser>> &
|
|
@@ -18319,11 +19222,14 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
|
18319
19222
|
> &
|
|
18320
19223
|
Record<
|
|
18321
19224
|
"webassembly/async",
|
|
18322
|
-
SyncBailHook<
|
|
19225
|
+
SyncBailHook<
|
|
19226
|
+
[WebAssemblyParserAsyncWebAssemblyParser, EmptyParserOptions],
|
|
19227
|
+
void
|
|
19228
|
+
>
|
|
18323
19229
|
> &
|
|
18324
19230
|
Record<
|
|
18325
19231
|
"webassembly/sync",
|
|
18326
|
-
SyncBailHook<[
|
|
19232
|
+
SyncBailHook<[WebAssemblyParserClass, EmptyParserOptions], void>
|
|
18327
19233
|
> &
|
|
18328
19234
|
Record<"css", SyncBailHook<[CssParser, CssParserOptions], void>> &
|
|
18329
19235
|
Record<
|
|
@@ -18518,8 +19424,8 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
|
18518
19424
|
Record<"asset/resource", AssetParser> &
|
|
18519
19425
|
Record<"asset/source", AssetSourceParser> &
|
|
18520
19426
|
Record<"asset/bytes", AssetBytesParser> &
|
|
18521
|
-
Record<"webassembly/async",
|
|
18522
|
-
Record<"webassembly/sync",
|
|
19427
|
+
Record<"webassembly/async", WebAssemblyParserAsyncWebAssemblyParser> &
|
|
19428
|
+
Record<"webassembly/sync", WebAssemblyParserClass> &
|
|
18523
19429
|
Record<"css", CssParser> &
|
|
18524
19430
|
Record<"css/auto", CssParser> &
|
|
18525
19431
|
Record<"css/module", CssParser> &
|
|
@@ -18542,8 +19448,8 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
|
18542
19448
|
Record<"asset/resource", AssetParser> &
|
|
18543
19449
|
Record<"asset/source", AssetSourceParser> &
|
|
18544
19450
|
Record<"asset/bytes", AssetBytesParser> &
|
|
18545
|
-
Record<"webassembly/async",
|
|
18546
|
-
Record<"webassembly/sync",
|
|
19451
|
+
Record<"webassembly/async", WebAssemblyParserAsyncWebAssemblyParser> &
|
|
19452
|
+
Record<"webassembly/sync", WebAssemblyParserClass> &
|
|
18547
19453
|
Record<"css", CssParser> &
|
|
18548
19454
|
Record<"css/auto", CssParser> &
|
|
18549
19455
|
Record<"css/module", CssParser> &
|
|
@@ -18813,7 +19719,10 @@ declare class NullDependency extends Dependency {
|
|
|
18813
19719
|
/**
|
|
18814
19720
|
* Returns true if the dependency can be concatenated (scope hoisting).
|
|
18815
19721
|
*/
|
|
18816
|
-
static canConcatenate(
|
|
19722
|
+
static canConcatenate(
|
|
19723
|
+
dependency: Dependency,
|
|
19724
|
+
concatenateCommonJsModules: boolean
|
|
19725
|
+
): boolean;
|
|
18817
19726
|
static TRANSITIVE: symbol;
|
|
18818
19727
|
static LAZY_UNTIL_LOCAL: "local";
|
|
18819
19728
|
static LAZY_UNTIL_ID: "id";
|
|
@@ -18826,18 +19735,9 @@ declare class NullDependencyTemplate extends DependencyTemplate {
|
|
|
18826
19735
|
declare interface ObjectConfiguration {
|
|
18827
19736
|
[index: string]: any;
|
|
18828
19737
|
}
|
|
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 {
|
|
19738
|
+
declare namespace ObjectDeserializerContextObjectMiddlewareObject_1 {
|
|
18839
19739
|
export let read: () => any;
|
|
18840
|
-
export let rest:
|
|
19740
|
+
export let rest: ObjectDeserializerContextObjectMiddlewareObject_2<
|
|
18841
19741
|
ReadonlyArray<any>
|
|
18842
19742
|
>;
|
|
18843
19743
|
export let setCircularReference: (value: ReferenceableItem) => void;
|
|
@@ -18846,20 +19746,20 @@ declare namespace ObjectDeserializerContextObjectMiddlewareObject_2 {
|
|
|
18846
19746
|
/**
|
|
18847
19747
|
* Updates set size using the provided set.
|
|
18848
19748
|
*/
|
|
18849
|
-
declare interface
|
|
19749
|
+
declare interface ObjectDeserializerContextObjectMiddlewareObject_2<
|
|
18850
19750
|
T extends ReadonlyArray<any> = ReadonlyArray<any>
|
|
18851
19751
|
> {
|
|
18852
19752
|
read: () => Head<T>;
|
|
18853
|
-
rest:
|
|
19753
|
+
rest: ObjectDeserializerContextObjectMiddlewareObject_2<Tail<T>>;
|
|
18854
19754
|
setCircularReference: (value: ReferenceableItem) => void;
|
|
18855
19755
|
}
|
|
18856
19756
|
|
|
18857
19757
|
/**
|
|
18858
19758
|
* Updates set size using the provided set.
|
|
18859
19759
|
*/
|
|
18860
|
-
declare interface
|
|
18861
|
-
read: () =>
|
|
18862
|
-
rest:
|
|
19760
|
+
declare interface ObjectDeserializerContextObjectMiddlewareObject_3 {
|
|
19761
|
+
read: () => string;
|
|
19762
|
+
rest: ObjectDeserializerContextObjectMiddlewareObject_2<[number, boolean]>;
|
|
18863
19763
|
setCircularReference: (value: ReferenceableItem) => void;
|
|
18864
19764
|
}
|
|
18865
19765
|
|
|
@@ -18908,10 +19808,10 @@ declare interface ObjectEncodingOptionsTypes {
|
|
|
18908
19808
|
declare interface ObjectSerializer {
|
|
18909
19809
|
serialize: (
|
|
18910
19810
|
value: any,
|
|
18911
|
-
context:
|
|
19811
|
+
context: ObjectSerializerContextObjectMiddlewareObject_3<any>
|
|
18912
19812
|
) => void;
|
|
18913
19813
|
deserialize: (
|
|
18914
|
-
context:
|
|
19814
|
+
context: ObjectDeserializerContextObjectMiddlewareObject_2<any>
|
|
18915
19815
|
) => any;
|
|
18916
19816
|
}
|
|
18917
19817
|
|
|
@@ -18919,28 +19819,9 @@ declare interface ObjectSerializer {
|
|
|
18919
19819
|
* Updates set size using the provided set.
|
|
18920
19820
|
*/
|
|
18921
19821
|
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
19822
|
write: (
|
|
18942
19823
|
value: string
|
|
18943
|
-
) =>
|
|
19824
|
+
) => ObjectSerializerContextObjectMiddlewareObject_3<[number, boolean]>;
|
|
18944
19825
|
setCircularReference: (value: ReferenceableItem) => void;
|
|
18945
19826
|
snapshot: () => ObjectSerializerSnapshot;
|
|
18946
19827
|
rollback: (snapshot: ObjectSerializerSnapshot) => void;
|
|
@@ -18950,10 +19831,10 @@ declare interface ObjectSerializerContextObjectMiddlewareObject_2 {
|
|
|
18950
19831
|
obj?: LazyOptions
|
|
18951
19832
|
) => LazyFunction<any, any, any, LazyOptions>;
|
|
18952
19833
|
}
|
|
18953
|
-
declare namespace
|
|
19834
|
+
declare namespace ObjectSerializerContextObjectMiddlewareObject_2 {
|
|
18954
19835
|
export let write: (
|
|
18955
19836
|
value?: any
|
|
18956
|
-
) =>
|
|
19837
|
+
) => ObjectSerializerContextObjectMiddlewareObject_3<ReadonlyArray<any>>;
|
|
18957
19838
|
export let setCircularReference: (value: ReferenceableItem) => void;
|
|
18958
19839
|
export let snapshot: () => ObjectSerializerSnapshot;
|
|
18959
19840
|
export let rollback: (snapshot: ObjectSerializerSnapshot) => void;
|
|
@@ -18969,12 +19850,12 @@ declare namespace ObjectSerializerContextObjectMiddlewareObject_3 {
|
|
|
18969
19850
|
/**
|
|
18970
19851
|
* Updates set size using the provided set.
|
|
18971
19852
|
*/
|
|
18972
|
-
declare interface
|
|
19853
|
+
declare interface ObjectSerializerContextObjectMiddlewareObject_3<
|
|
18973
19854
|
T extends ReadonlyArray<any> = ReadonlyArray<any>
|
|
18974
19855
|
> {
|
|
18975
19856
|
write: (
|
|
18976
19857
|
value: Head<T>
|
|
18977
|
-
) =>
|
|
19858
|
+
) => ObjectSerializerContextObjectMiddlewareObject_3<Tail<T>>;
|
|
18978
19859
|
setCircularReference: (value: ReferenceableItem) => void;
|
|
18979
19860
|
snapshot: () => ObjectSerializerSnapshot;
|
|
18980
19861
|
rollback: (snapshot: ObjectSerializerSnapshot) => void;
|
|
@@ -18988,10 +19869,12 @@ declare interface ObjectSerializerContextObjectMiddlewareObject_4<
|
|
|
18988
19869
|
/**
|
|
18989
19870
|
* Updates set size using the provided set.
|
|
18990
19871
|
*/
|
|
18991
|
-
declare interface
|
|
19872
|
+
declare interface ObjectSerializerContextObjectMiddlewareObject_4 {
|
|
18992
19873
|
write: (
|
|
18993
|
-
value
|
|
18994
|
-
) =>
|
|
19874
|
+
value: RestoreProvidedDataExports[]
|
|
19875
|
+
) => ObjectSerializerContextObjectMiddlewareObject_3<
|
|
19876
|
+
[undefined | null | boolean, undefined | boolean, boolean]
|
|
19877
|
+
>;
|
|
18995
19878
|
setCircularReference: (value: ReferenceableItem) => void;
|
|
18996
19879
|
snapshot: () => ObjectSerializerSnapshot;
|
|
18997
19880
|
rollback: (snapshot: ObjectSerializerSnapshot) => void;
|
|
@@ -19131,9 +20014,9 @@ declare interface Optimization {
|
|
|
19131
20014
|
mergeDuplicateChunks?: boolean;
|
|
19132
20015
|
|
|
19133
20016
|
/**
|
|
19134
|
-
* Enable minimizing the output. Uses optimization.minimizer.
|
|
20017
|
+
* Enable minimizing the output. Uses optimization.minimizer. An object enables it and configures the built-in minimizer per asset type.
|
|
19135
20018
|
*/
|
|
19136
|
-
minimize?: boolean;
|
|
20019
|
+
minimize?: boolean | OptimizationMinimizeOptions;
|
|
19137
20020
|
|
|
19138
20021
|
/**
|
|
19139
20022
|
* Minimizer(s) to use for minimizing the output.
|
|
@@ -19220,6 +20103,245 @@ declare interface Optimization {
|
|
|
19220
20103
|
usedExports?: boolean | "global";
|
|
19221
20104
|
}
|
|
19222
20105
|
|
|
20106
|
+
/**
|
|
20107
|
+
* 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.
|
|
20108
|
+
* @since 5.110.0
|
|
20109
|
+
*/
|
|
20110
|
+
declare interface OptimizationMinimizeCss {
|
|
20111
|
+
/**
|
|
20112
|
+
* Which comments survive. `"some"`, the default, keeps a `/*!` banner and a comment annotated `@license` or `@preserve`; `true` (or `"all"`) keeps every comment and `false` keeps none; a string is read as a regular expression source, and it, a `RegExp` or a `(comment) => boolean` predicate is asked about each comment's own text and keeps the ones it accepts — standing in for the default rule rather than beside it, as terser's `format.comments` does, so a pattern that names nothing else drops the ones `"some"` would have kept. A `/*#` source-map pragma is a link rather than a comment, so `"some"` and `"all"` keep it; `false`, a pattern or a predicate decides it like any other. A predicate is handed to the minimizer's worker pool as source, so it must not close over anything.
|
|
20113
|
+
* @since 5.110.0
|
|
20114
|
+
*/
|
|
20115
|
+
comments?: string | boolean | RegExp | ((comment: string) => boolean);
|
|
20116
|
+
|
|
20117
|
+
/**
|
|
20118
|
+
* 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.
|
|
20119
|
+
* @since 5.110.0
|
|
20120
|
+
*/
|
|
20121
|
+
convertLengthUnits?: boolean;
|
|
20122
|
+
|
|
20123
|
+
/**
|
|
20124
|
+
* Write a family of longhands as the one shorthand that sets them — four sides or corners, the two a pair shorthand sets, or the slots of an order-free one — even where unrelated declarations stand between them. On by default.
|
|
20125
|
+
* @since 5.110.0
|
|
20126
|
+
*/
|
|
20127
|
+
mergeLonghands?: boolean;
|
|
20128
|
+
|
|
20129
|
+
/**
|
|
20130
|
+
* 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.
|
|
20131
|
+
* @since 5.110.0
|
|
20132
|
+
*/
|
|
20133
|
+
mergeRules?: boolean;
|
|
20134
|
+
|
|
20135
|
+
/**
|
|
20136
|
+
* 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.
|
|
20137
|
+
* @since 5.110.0
|
|
20138
|
+
*/
|
|
20139
|
+
normalizeQuotes?: boolean;
|
|
20140
|
+
|
|
20141
|
+
/**
|
|
20142
|
+
* Compute a call into the shorter call naming the same value: `calc()` and every math function over constants, a transform naming one axis or an identity, a gradient's default direction and its implied stops, an easing function that has a keyword, and a filter function given the amount an omitted argument already means. On by default.
|
|
20143
|
+
* @since 5.110.0
|
|
20144
|
+
*/
|
|
20145
|
+
reduceFunctions?: boolean;
|
|
20146
|
+
|
|
20147
|
+
/**
|
|
20148
|
+
* 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`.
|
|
20149
|
+
* @since 5.110.0
|
|
20150
|
+
*/
|
|
20151
|
+
removeDeadRules?: boolean;
|
|
20152
|
+
|
|
20153
|
+
/**
|
|
20154
|
+
* Shorten the values of custom properties (`--x: #ffffff` -> `#fff`, `--y: 0.5rem` -> `.5rem`), which are otherwise written back exactly as authored. Off by default: `getComputedStyle().getPropertyValue()` hands this text back, so a rewritten value is a different CSSOM — the one place a declaration's authored text survives. What it may rewrite is exactly what any other value's tokens may be, a color in a substitution's fallback included — that fallback being the property's value rather than the function's own argument.
|
|
20155
|
+
* @since 5.110.0
|
|
20156
|
+
*/
|
|
20157
|
+
rewriteCustomProperties?: boolean;
|
|
20158
|
+
|
|
20159
|
+
/**
|
|
20160
|
+
* Write each color in the shortest spelling of the same value: `#ffffff` -> `#fff`, `rgb(1 2 3)` -> `#010203`, a named color where the property takes no identifier of the author's own, and every polar and Lab function the target agrees with hex on. On by default.
|
|
20161
|
+
* @since 5.110.0
|
|
20162
|
+
*/
|
|
20163
|
+
shortenColors?: boolean;
|
|
20164
|
+
|
|
20165
|
+
/**
|
|
20166
|
+
* 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.
|
|
20167
|
+
* @since 5.110.0
|
|
20168
|
+
*/
|
|
20169
|
+
shortenMediaQueries?: boolean;
|
|
20170
|
+
|
|
20171
|
+
/**
|
|
20172
|
+
* 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.
|
|
20173
|
+
* @since 5.110.0
|
|
20174
|
+
*/
|
|
20175
|
+
shortenNumbers?: boolean;
|
|
20176
|
+
|
|
20177
|
+
/**
|
|
20178
|
+
* 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.
|
|
20179
|
+
* @since 5.110.0
|
|
20180
|
+
*/
|
|
20181
|
+
shortenSelectors?: boolean;
|
|
20182
|
+
|
|
20183
|
+
/**
|
|
20184
|
+
* 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`.
|
|
20185
|
+
* @since 5.110.0
|
|
20186
|
+
*/
|
|
20187
|
+
shortenValues?: boolean;
|
|
20188
|
+
|
|
20189
|
+
/**
|
|
20190
|
+
* Maintain vendor prefixes for the `browserslist` target: add the `-webkit-` / `-moz-` / `-ms-` spelling of a property, at-rule or pseudo-selector that a selected browser still needs, and drop one none of them does. On by default, and only in effect for a `browserslist` target — any other target names no browsers to prefix for. A browserslist name no compat dataset covers (`op_mini`, `and_uc`, `and_qq`, `baidu`, `kaios`, `bb`) is skipped, and a selection of nothing but those prefixes for no one.
|
|
20191
|
+
* @since 5.110.0
|
|
20192
|
+
*/
|
|
20193
|
+
vendorPrefixes?: boolean;
|
|
20194
|
+
}
|
|
20195
|
+
|
|
20196
|
+
/**
|
|
20197
|
+
* 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.
|
|
20198
|
+
* @since 5.110.0
|
|
20199
|
+
*/
|
|
20200
|
+
declare interface OptimizationMinimizeHtml {
|
|
20201
|
+
/**
|
|
20202
|
+
* Write a boolean attribute spelled with its own name (`disabled="disabled"`) as the bare name the spec canonicalizes it to. On by default.
|
|
20203
|
+
* @since 5.110.0
|
|
20204
|
+
*/
|
|
20205
|
+
collapseBooleanAttributes?: boolean;
|
|
20206
|
+
|
|
20207
|
+
/**
|
|
20208
|
+
* 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.
|
|
20209
|
+
* @since 5.110.0
|
|
20210
|
+
*/
|
|
20211
|
+
collapseWhitespace?: boolean | "all" | "conservative" | "smart";
|
|
20212
|
+
|
|
20213
|
+
/**
|
|
20214
|
+
* 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.
|
|
20215
|
+
* @since 5.110.0
|
|
20216
|
+
*/
|
|
20217
|
+
comments?: string | boolean | RegExp | ((comment: string) => boolean);
|
|
20218
|
+
|
|
20219
|
+
/**
|
|
20220
|
+
* Print a run of adjacent `<style>` elements as one sheet. Off by default: it removes elements, so `document.styleSheets`, a `style:nth-child()` selector and `querySelectorAll("style").length` all read a different document. A sheet the CSS minifier does not accept is never folded — appending to one that may be unterminated would make the next sheet part of its last rule — and neither is one led by `@import` / `@charset` / `@namespace`, which apply only at the top of a sheet.
|
|
20221
|
+
* @since 5.110.0
|
|
20222
|
+
*/
|
|
20223
|
+
mergeStyles?: boolean;
|
|
20224
|
+
|
|
20225
|
+
/**
|
|
20226
|
+
* 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.
|
|
20227
|
+
* @since 5.110.0
|
|
20228
|
+
*/
|
|
20229
|
+
minifyConditionalComments?: boolean;
|
|
20230
|
+
|
|
20231
|
+
/**
|
|
20232
|
+
* Strip the whitespace between the tokens of a `<script>` whose type is a JSON MIME type. Every literal is copied byte for byte, so no number is rounded and no escape rewritten. On by default.
|
|
20233
|
+
* @since 5.110.0
|
|
20234
|
+
*/
|
|
20235
|
+
minifyJson?: boolean;
|
|
20236
|
+
|
|
20237
|
+
/**
|
|
20238
|
+
* Minify the document held in an `<iframe srcdoc>` attribute. Off by default: the body is a whole document of its own (its base URL is `about:srcdoc`), so minifying it is safe, but the attribute is readable from script and a consumer comparing `iframe.srcdoc` byte for byte would see it change.
|
|
20239
|
+
* @since 5.110.0
|
|
20240
|
+
*/
|
|
20241
|
+
minifySrcdoc?: boolean;
|
|
20242
|
+
|
|
20243
|
+
/**
|
|
20244
|
+
* Run the CSS minimizer over an inline `<style>` element and every `style=""` attribute, with the options `optimization.minimize.css` names. On by default.
|
|
20245
|
+
* @since 5.110.0
|
|
20246
|
+
*/
|
|
20247
|
+
minifyStyles?: boolean;
|
|
20248
|
+
|
|
20249
|
+
/**
|
|
20250
|
+
* Write an attribute value with whichever delimiters cost least — bare where the grammar allows it, else under the quote that needs fewer character references. On by default: the DOM reads the same value either way.
|
|
20251
|
+
* @since 5.110.0
|
|
20252
|
+
*/
|
|
20253
|
+
normalizeAttributeQuotes?: boolean;
|
|
20254
|
+
|
|
20255
|
+
/**
|
|
20256
|
+
* 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.
|
|
20257
|
+
* @since 5.110.0
|
|
20258
|
+
*/
|
|
20259
|
+
normalizeEnumeratedAttributes?: boolean;
|
|
20260
|
+
|
|
20261
|
+
/**
|
|
20262
|
+
* Normalize a list-shaped attribute value: a space-separated token list (`class`, `rel`, `part`, …), a comma-separated one (`accept`, `sizes`, …), a `srcset` and the viewport `<meta content>`. On by default. Reordering a token list is `sortTokenLists`, which is separate and off by default.
|
|
20263
|
+
* @since 5.110.0
|
|
20264
|
+
*/
|
|
20265
|
+
normalizeListAttributes?: boolean;
|
|
20266
|
+
|
|
20267
|
+
/**
|
|
20268
|
+
* 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.
|
|
20269
|
+
* @since 5.110.0
|
|
20270
|
+
*/
|
|
20271
|
+
normalizeNumericAttributes?: boolean;
|
|
20272
|
+
|
|
20273
|
+
/**
|
|
20274
|
+
* Drop an attribute whose empty or all-whitespace value leaves it in the state its absence gives: the globals `class`, `id`, `style`, `dir`, `accesskey`, `itemprop`, `itemref`, `itemtype` and `part`, and every attribute reflecting a token list on the elements the spec defines it for — `rel` on `<a>`, `<area>`, `<form>` and `<link>`, `ping` on `<a>` and `<area>`, `headers` on `<td>` and `<th>`, `blocking` on `<link>`, `<script>` and `<style>`, `sizes` on `<link>`, `for` on `<output>` — where an empty list is no tokens. Anywhere else that spelling is an author attribute whose meaning is a script's, so `<x-foo rel="">` and `<label for="">` keep it. Off by default: an attribute selector matches on presence, so `[class]` stops matching. Never dropped: `title` and `lang`, whose empty value means what absence does not; `sandbox`, whose empty list is the most restrictive state an `<iframe>` has; and an event handler, whose empty body still compiles to a function where absence reads null.
|
|
20275
|
+
* @since 5.110.0
|
|
20276
|
+
*/
|
|
20277
|
+
removeEmptyAttributes?: boolean;
|
|
20278
|
+
|
|
20279
|
+
/**
|
|
20280
|
+
* 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.
|
|
20281
|
+
* @since 5.110.0
|
|
20282
|
+
*/
|
|
20283
|
+
removeEmptyElements?: boolean;
|
|
20284
|
+
|
|
20285
|
+
/**
|
|
20286
|
+
* 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.
|
|
20287
|
+
* @since 5.110.0
|
|
20288
|
+
*/
|
|
20289
|
+
removeImpliedTags?: boolean | "all" | "smart";
|
|
20290
|
+
|
|
20291
|
+
/**
|
|
20292
|
+
* 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.
|
|
20293
|
+
* @since 5.110.0
|
|
20294
|
+
*/
|
|
20295
|
+
removeOptionalTags?: boolean;
|
|
20296
|
+
|
|
20297
|
+
/**
|
|
20298
|
+
* 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.
|
|
20299
|
+
* @since 5.110.0
|
|
20300
|
+
*/
|
|
20301
|
+
removeRedundantAttributes?: boolean | "all" | "smart";
|
|
20302
|
+
|
|
20303
|
+
/**
|
|
20304
|
+
* 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.
|
|
20305
|
+
* @since 5.110.0
|
|
20306
|
+
*/
|
|
20307
|
+
sortAttributes?: boolean;
|
|
20308
|
+
|
|
20309
|
+
/**
|
|
20310
|
+
* Print every space-separated token list the DOM reads as a set — `class`, `rel`, `part`, `sandbox`, `blocking`, `itemprop` / `itemref` / `itemtype`, `<output for>` and `<link sizes>` — in token order. Nothing matching those reads order, so this only makes the same markup compress better across pages. Off by default: a script reading `className` or `rel` back sees the new order. The lists the DOM does not read as a set are left alone whatever this says — `ping` is the order its requests go out in and `accesskey` the order its keys are tried.
|
|
20311
|
+
* @since 5.110.0
|
|
20312
|
+
*/
|
|
20313
|
+
sortTokenLists?: boolean;
|
|
20314
|
+
}
|
|
20315
|
+
|
|
20316
|
+
/**
|
|
20317
|
+
* Options handed as-is to the JavaScript minimizer (terser-compatible). Defaults to `{ compress: { passes: 2 } }`.
|
|
20318
|
+
* @since 5.110.0
|
|
20319
|
+
*/
|
|
20320
|
+
declare interface OptimizationMinimizeJavascript {
|
|
20321
|
+
[index: string]: any;
|
|
20322
|
+
}
|
|
20323
|
+
|
|
20324
|
+
/**
|
|
20325
|
+
* Enable minimizing the output, configured per asset type. An absent type is minimized with the defaults; `false` disables minimizing it.
|
|
20326
|
+
* @since 5.110.0
|
|
20327
|
+
*/
|
|
20328
|
+
declare interface OptimizationMinimizeOptions {
|
|
20329
|
+
/**
|
|
20330
|
+
* Minimize CSS assets: `false` disables it, an object configures what the built-in minimizer may do beyond the transforms that always apply.
|
|
20331
|
+
*/
|
|
20332
|
+
css?: false | OptimizationMinimizeCss;
|
|
20333
|
+
|
|
20334
|
+
/**
|
|
20335
|
+
* Minimize HTML assets: `false` disables it, an object configures what the built-in minimizer may do beyond the transforms that always apply.
|
|
20336
|
+
*/
|
|
20337
|
+
html?: false | OptimizationMinimizeHtml;
|
|
20338
|
+
|
|
20339
|
+
/**
|
|
20340
|
+
* Minimize JavaScript assets: `false` disables it, an object is handed as-is to the JavaScript minimizer.
|
|
20341
|
+
*/
|
|
20342
|
+
javascript?: false | OptimizationMinimizeJavascript;
|
|
20343
|
+
}
|
|
20344
|
+
|
|
19223
20345
|
/**
|
|
19224
20346
|
* Enables/Disables integrated optimizations.
|
|
19225
20347
|
*/
|
|
@@ -19281,9 +20403,9 @@ declare interface OptimizationNormalized {
|
|
|
19281
20403
|
mergeDuplicateChunks?: boolean;
|
|
19282
20404
|
|
|
19283
20405
|
/**
|
|
19284
|
-
* Enable minimizing the output. Uses optimization.minimizer.
|
|
20406
|
+
* Enable minimizing the output. Uses optimization.minimizer. An object configures the built-in minimizer per asset type.
|
|
19285
20407
|
*/
|
|
19286
|
-
minimize?:
|
|
20408
|
+
minimize?: false | OptimizationMinimizeOptions;
|
|
19287
20409
|
|
|
19288
20410
|
/**
|
|
19289
20411
|
* Minimizer(s) to use for minimizing the output.
|
|
@@ -19411,7 +20533,7 @@ type OptimizationNormalizedWithDefaults = OptimizationNormalized & {
|
|
|
19411
20533
|
mangleWasmImports: NonNullable<undefined | boolean>;
|
|
19412
20534
|
portableRecords: NonNullable<undefined | boolean>;
|
|
19413
20535
|
realContentHash: NonNullable<undefined | boolean>;
|
|
19414
|
-
minimize: NonNullable<undefined |
|
|
20536
|
+
minimize: NonNullable<undefined | false | OptimizationMinimizeOptions>;
|
|
19415
20537
|
minimizer: (
|
|
19416
20538
|
| ((this: Compiler, compiler: Compiler) => void)
|
|
19417
20539
|
| WebpackPluginInstance
|
|
@@ -20656,7 +21778,8 @@ type OutputNormalizedWithDefaults = OutputNormalized & {
|
|
|
20656
21778
|
declare interface ParameterizedComparator<TArg extends object, T> {
|
|
20657
21779
|
(tArg: TArg): Comparator<T>;
|
|
20658
21780
|
}
|
|
20659
|
-
|
|
21781
|
+
type ParseErrorSeverity = "error" | "warning";
|
|
21782
|
+
declare interface ParseOptionsJavascriptParser {
|
|
20660
21783
|
sourceType: "module" | "script";
|
|
20661
21784
|
ecmaVersion: ecmaVersion;
|
|
20662
21785
|
locations?: boolean;
|
|
@@ -20685,6 +21808,12 @@ declare interface ParseOptions {
|
|
|
20685
21808
|
*/
|
|
20686
21809
|
moduleFallback?: boolean;
|
|
20687
21810
|
}
|
|
21811
|
+
declare interface ParseOptionsSyntax {
|
|
21812
|
+
/**
|
|
21813
|
+
* 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
|
|
21814
|
+
*/
|
|
21815
|
+
comment?: (input: string, start: number, end: number) => number;
|
|
21816
|
+
}
|
|
20688
21817
|
declare interface ParseResult {
|
|
20689
21818
|
ast: Program;
|
|
20690
21819
|
comments: CommentJavascriptParser[];
|
|
@@ -20927,15 +22056,111 @@ type Pattern =
|
|
|
20927
22056
|
* Configuration object for web performance recommendations.
|
|
20928
22057
|
*/
|
|
20929
22058
|
declare interface PerformanceOptions {
|
|
22059
|
+
/**
|
|
22060
|
+
* 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'.
|
|
22061
|
+
* @since 5.110.0
|
|
22062
|
+
*/
|
|
22063
|
+
all?: boolean;
|
|
22064
|
+
|
|
20930
22065
|
/**
|
|
20931
22066
|
* Filter function to select assets that are checked.
|
|
20932
22067
|
*/
|
|
20933
22068
|
assetFilter?: (name: string, source: Source, assetInfo: AssetInfo) => boolean;
|
|
20934
22069
|
|
|
20935
22070
|
/**
|
|
20936
|
-
*
|
|
22071
|
+
* 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).
|
|
22072
|
+
* @since 5.110.0
|
|
22073
|
+
*/
|
|
22074
|
+
asyncChunkWaterfalls?: boolean;
|
|
22075
|
+
|
|
22076
|
+
/**
|
|
22077
|
+
* Report 'require.context' calls with no filter, which bundle every file under a directory (requires 'hints' to be enabled).
|
|
22078
|
+
* @since 5.110.0
|
|
22079
|
+
*/
|
|
22080
|
+
broadContexts?: boolean;
|
|
22081
|
+
|
|
22082
|
+
/**
|
|
22083
|
+
* Report how much of the module graph the cache reused, and the modules that can never be reused (requires 'hints' to be enabled).
|
|
22084
|
+
* @since 5.110.0
|
|
22085
|
+
*/
|
|
22086
|
+
cacheEffectiveness?: boolean;
|
|
22087
|
+
|
|
22088
|
+
/**
|
|
22089
|
+
* Report groups of modules that import each other synchronously (requires 'hints' to be enabled).
|
|
22090
|
+
* @since 5.110.0
|
|
20937
22091
|
*/
|
|
20938
|
-
|
|
22092
|
+
circularDependencies?: boolean;
|
|
22093
|
+
|
|
22094
|
+
/**
|
|
22095
|
+
* Report chunks asked for as both prefetch and preload from the same place, where the two directives contradict each other.
|
|
22096
|
+
* @since 5.110.0
|
|
22097
|
+
*/
|
|
22098
|
+
conflictingResourceHints?: boolean;
|
|
22099
|
+
|
|
22100
|
+
/**
|
|
22101
|
+
* Report modules emitted into more than one chunk, and the bytes the extra copies cost (requires 'hints' to be enabled).
|
|
22102
|
+
* @since 5.110.0
|
|
22103
|
+
*/
|
|
22104
|
+
duplicateModules?: boolean;
|
|
22105
|
+
|
|
22106
|
+
/**
|
|
22107
|
+
* Report packages which are included more than once, in different versions or as multiple copies of the same version (requires 'hints' to be enabled).
|
|
22108
|
+
* @since 5.110.0
|
|
22109
|
+
*/
|
|
22110
|
+
duplicatePackages?: boolean;
|
|
22111
|
+
|
|
22112
|
+
/**
|
|
22113
|
+
* Report modules whose exports cannot be read statically, which stops anything importing them from being tree-shaken (requires 'hints' to be enabled).
|
|
22114
|
+
* @since 5.110.0
|
|
22115
|
+
*/
|
|
22116
|
+
dynamicExports?: boolean;
|
|
22117
|
+
|
|
22118
|
+
/**
|
|
22119
|
+
* Report a production build whose 'devtool' writes the source map into the JavaScript, so everyone loading the page downloads it (requires 'hints' to be enabled).
|
|
22120
|
+
* @since 5.110.0
|
|
22121
|
+
*/
|
|
22122
|
+
embeddedSourceMaps?: boolean;
|
|
22123
|
+
|
|
22124
|
+
/**
|
|
22125
|
+
* Report modules shipped by more than one entrypoint, which every page that loads them downloads again (requires 'hints' to be enabled).
|
|
22126
|
+
* @since 5.110.0
|
|
22127
|
+
*/
|
|
22128
|
+
entrypointOverlap?: boolean;
|
|
22129
|
+
|
|
22130
|
+
/**
|
|
22131
|
+
* Report modules that call 'eval' directly, which stops minification, scope hoisting and tree shaking (requires 'hints' to be enabled).
|
|
22132
|
+
* @since 5.110.0
|
|
22133
|
+
*/
|
|
22134
|
+
evalUsage?: boolean;
|
|
22135
|
+
|
|
22136
|
+
/**
|
|
22137
|
+
* Sets the format of the hints: warnings, errors, stats-only or nothing at all.
|
|
22138
|
+
*/
|
|
22139
|
+
hints?: false | "error" | "stats" | "warning";
|
|
22140
|
+
|
|
22141
|
+
/**
|
|
22142
|
+
* 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).
|
|
22143
|
+
* @since 5.110.0
|
|
22144
|
+
*/
|
|
22145
|
+
hotspots?: boolean;
|
|
22146
|
+
|
|
22147
|
+
/**
|
|
22148
|
+
* 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).
|
|
22149
|
+
* @since 5.110.0
|
|
22150
|
+
*/
|
|
22151
|
+
inlinedAssets?: boolean;
|
|
22152
|
+
|
|
22153
|
+
/**
|
|
22154
|
+
* Report a single module that makes up most of the chunk it is in (requires 'hints' to be enabled).
|
|
22155
|
+
* @since 5.110.0
|
|
22156
|
+
*/
|
|
22157
|
+
largeModules?: boolean;
|
|
22158
|
+
|
|
22159
|
+
/**
|
|
22160
|
+
* Report polyfill packages that emulate language features the target already supports natively (requires 'hints' to be enabled).
|
|
22161
|
+
* @since 5.110.0
|
|
22162
|
+
*/
|
|
22163
|
+
legacyJavascript?: boolean;
|
|
20939
22164
|
|
|
20940
22165
|
/**
|
|
20941
22166
|
* File size limit (in bytes) when exceeded, that webpack will provide performance hints.
|
|
@@ -20946,6 +22171,96 @@ declare interface PerformanceOptions {
|
|
|
20946
22171
|
* Total size of an entry point (in bytes).
|
|
20947
22172
|
*/
|
|
20948
22173
|
maxEntrypointSize?: number;
|
|
22174
|
+
|
|
22175
|
+
/**
|
|
22176
|
+
* Report packages that keep unused code in the bundle because their package.json does not declare 'sideEffects' (requires 'hints' to be enabled).
|
|
22177
|
+
* @since 5.110.0
|
|
22178
|
+
*/
|
|
22179
|
+
missingSideEffects?: boolean;
|
|
22180
|
+
|
|
22181
|
+
/**
|
|
22182
|
+
* 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).
|
|
22183
|
+
* @since 5.110.0
|
|
22184
|
+
*/
|
|
22185
|
+
mixedExports?: boolean;
|
|
22186
|
+
|
|
22187
|
+
/**
|
|
22188
|
+
* Report conditions in 'module.rules' that hardcode a path separator, so they only match on one operating system.
|
|
22189
|
+
* @since 5.110.0
|
|
22190
|
+
*/
|
|
22191
|
+
osDependentRules?: boolean;
|
|
22192
|
+
|
|
22193
|
+
/**
|
|
22194
|
+
* Report '/*#__PURE__* /' annotations that sit somewhere the parser does not read them (requires 'hints' to be enabled).
|
|
22195
|
+
* @since 5.110.0
|
|
22196
|
+
*/
|
|
22197
|
+
pureAnnotations?: boolean;
|
|
22198
|
+
|
|
22199
|
+
/**
|
|
22200
|
+
* Report 'import()' calls whose module is already loaded where the call runs, so they defer nothing (requires 'hints' to be enabled).
|
|
22201
|
+
* @since 5.110.0
|
|
22202
|
+
*/
|
|
22203
|
+
redundantDynamicImports?: boolean;
|
|
22204
|
+
|
|
22205
|
+
/**
|
|
22206
|
+
* Report modules that could not be merged into their importer's scope, and why (requires 'hints' to be enabled).
|
|
22207
|
+
* @since 5.110.0
|
|
22208
|
+
*/
|
|
22209
|
+
scopeHoistingBailouts?: boolean;
|
|
22210
|
+
|
|
22211
|
+
/**
|
|
22212
|
+
* Report splits 'optimization.splitChunks' refused because 'maxInitialRequests' or 'maxAsyncRequests' was already reached (requires 'hints' to be enabled).
|
|
22213
|
+
* @since 5.110.0
|
|
22214
|
+
*/
|
|
22215
|
+
splitChunksCapped?: boolean;
|
|
22216
|
+
|
|
22217
|
+
/**
|
|
22218
|
+
* Report chunks loaded on demand that carry less than 'optimization.splitChunks.minSize' (requires 'hints' to be enabled).
|
|
22219
|
+
* @since 5.110.0
|
|
22220
|
+
*/
|
|
22221
|
+
tinyChunks?: boolean;
|
|
22222
|
+
|
|
22223
|
+
/**
|
|
22224
|
+
* 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).
|
|
22225
|
+
* @since 5.110.0
|
|
22226
|
+
*/
|
|
22227
|
+
topLevelThis?: boolean;
|
|
22228
|
+
|
|
22229
|
+
/**
|
|
22230
|
+
* 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).
|
|
22231
|
+
* @since 5.110.0
|
|
22232
|
+
*/
|
|
22233
|
+
unsplitVendors?: boolean;
|
|
22234
|
+
|
|
22235
|
+
/**
|
|
22236
|
+
* Report 'resolve.alias' entries that no request matched.
|
|
22237
|
+
* @since 5.110.0
|
|
22238
|
+
*/
|
|
22239
|
+
unusedAliases?: boolean;
|
|
22240
|
+
|
|
22241
|
+
/**
|
|
22242
|
+
* Report keys defined by 'DefinePlugin' that no module ever referenced, which cost a parser hook per module and invalidate the build when their value changes.
|
|
22243
|
+
* @since 5.110.0
|
|
22244
|
+
*/
|
|
22245
|
+
unusedDefines?: boolean;
|
|
22246
|
+
|
|
22247
|
+
/**
|
|
22248
|
+
* Report requests listed in 'externals' that no module ever imported, which usually means the request is misspelled and the real one got bundled instead.
|
|
22249
|
+
* @since 5.110.0
|
|
22250
|
+
*/
|
|
22251
|
+
unusedExternals?: boolean;
|
|
22252
|
+
|
|
22253
|
+
/**
|
|
22254
|
+
* Report modules bundled although nothing uses what they export, pulled in by a re-export (requires 'hints' to be enabled).
|
|
22255
|
+
* @since 5.110.0
|
|
22256
|
+
*/
|
|
22257
|
+
unusedReexports?: boolean;
|
|
22258
|
+
|
|
22259
|
+
/**
|
|
22260
|
+
* Report rules in 'module.rules' that never matched a module, which cost condition evaluation on every build. Note that plugins may add rules too, so a reported rule is not necessarily one you wrote.
|
|
22261
|
+
* @since 5.110.0
|
|
22262
|
+
*/
|
|
22263
|
+
unusedRules?: boolean;
|
|
20949
22264
|
}
|
|
20950
22265
|
declare interface PitchLoaderDefinitionFunction<
|
|
20951
22266
|
OptionsType = {},
|
|
@@ -21086,6 +22401,224 @@ declare class PrefixSource extends Source {
|
|
|
21086
22401
|
declare interface PreparsedAst {
|
|
21087
22402
|
[index: string]: any;
|
|
21088
22403
|
}
|
|
22404
|
+
|
|
22405
|
+
/**
|
|
22406
|
+
* The per-node output store handed to a language node printer as its `writer`. It
|
|
22407
|
+
* carries the print `options` (today just `mode`) and one map: a finished node ->
|
|
22408
|
+
* its printed text. A printer *returns* its text (`printNode` stores it) and reads
|
|
22409
|
+
* a child's with `get`, so a parent composes its own text from its children's —
|
|
22410
|
+
* the map is what makes that composition (and the CSS value transforms built on
|
|
22411
|
+
* it) possible. `take` flushes a finished top-level node into the output and drops
|
|
22412
|
+
* the map, so a streaming grammar never holds more than one top-level subtree.
|
|
22413
|
+
*/
|
|
22414
|
+
declare class PrintContext<TPath, TNode, TPrintOptions = object> {
|
|
22415
|
+
constructor(
|
|
22416
|
+
options: PrintOptions & TPrintOptions,
|
|
22417
|
+
printer: NodePrinter<TPath, TNode, TPrintOptions>
|
|
22418
|
+
);
|
|
22419
|
+
options: PrintOptions & TPrintOptions;
|
|
22420
|
+
mapWanted: boolean;
|
|
22421
|
+
|
|
22422
|
+
/**
|
|
22423
|
+
* Hold `text` back as the opener of a node being printed in pieces. Nothing
|
|
22424
|
+
* reaches the output until {@link flushPending}, so {@link dropPending} can
|
|
22425
|
+
* still take it back if the node turns out to be empty.
|
|
22426
|
+
*/
|
|
22427
|
+
pushPending(text: string): number;
|
|
22428
|
+
|
|
22429
|
+
/**
|
|
22430
|
+
* Rewrite a held-back opener — an opener whose text depends on what turns out
|
|
22431
|
+
* to follow it can only be settled once something does.
|
|
22432
|
+
*/
|
|
22433
|
+
setPending(depth: number, text: string): void;
|
|
22434
|
+
|
|
22435
|
+
/**
|
|
22436
|
+
* Emit every held-back opener, outermost first — something inside the
|
|
22437
|
+
* innermost one has content, so all of them do.
|
|
22438
|
+
*/
|
|
22439
|
+
flushPending(): void;
|
|
22440
|
+
|
|
22441
|
+
/**
|
|
22442
|
+
* Anchor the outermost held-back opener, applied when it is flushed. Openers
|
|
22443
|
+
* are flushed together, so only the outermost carries one.
|
|
22444
|
+
*/
|
|
22445
|
+
anchorPending(srcOffset?: number, srcLine?: number, srcCol?: number): void;
|
|
22446
|
+
isPending(depth: number): boolean;
|
|
22447
|
+
|
|
22448
|
+
/**
|
|
22449
|
+
* Drop the innermost held-back opener — its node printed to nothing.
|
|
22450
|
+
*/
|
|
22451
|
+
dropPending(): void;
|
|
22452
|
+
|
|
22453
|
+
/**
|
|
22454
|
+
* Close off what has been emitted so far and return the index the next piece
|
|
22455
|
+
* will take. Cutting is the point: a caller bounding a later edit by this
|
|
22456
|
+
* (see {@link dropTrailing}) must not be able to reach output from before it,
|
|
22457
|
+
* which a mark taken while the tail was still open would sit in the middle of.
|
|
22458
|
+
*/
|
|
22459
|
+
markCut(): number;
|
|
22460
|
+
|
|
22461
|
+
/**
|
|
22462
|
+
* Append a piece of a node that is being printed in pieces. Nothing takes it
|
|
22463
|
+
* back, so it only extends the output.
|
|
22464
|
+
*/
|
|
22465
|
+
emitStreamed(text: string): void;
|
|
22466
|
+
|
|
22467
|
+
/**
|
|
22468
|
+
* Forget every node's printed text. A node printed in pieces does this once
|
|
22469
|
+
* each child is emitted, so the store never holds more than one of them —
|
|
22470
|
+
* which is also what keeps a recycled node id from reading as an earlier
|
|
22471
|
+
* node's text.
|
|
22472
|
+
*/
|
|
22473
|
+
dropStore(): void;
|
|
22474
|
+
|
|
22475
|
+
/**
|
|
22476
|
+
* Drop trailing `charCode`s from the end of the output at or after `from` —
|
|
22477
|
+
* the separator the piece before a terminator no longer needs. Walks back over
|
|
22478
|
+
* pieces emptied by {@link retract}, so it sees what the output reads as.
|
|
22479
|
+
*/
|
|
22480
|
+
dropTrailing(from: number, charCode: number): void;
|
|
22481
|
+
|
|
22482
|
+
/**
|
|
22483
|
+
* Run the node printer for `node` and store what it returns (the grammar calls
|
|
22484
|
+
* this once the node's visitors and children are done). `path` is on `node`.
|
|
22485
|
+
*/
|
|
22486
|
+
printNode(node: TNode, path: TPath): void;
|
|
22487
|
+
|
|
22488
|
+
/**
|
|
22489
|
+
* Print one node and hand its text straight back — for a node inside one being
|
|
22490
|
+
* printed in pieces, whose text is emitted as it is printed, so the store
|
|
22491
|
+
* would only ever be written and read once.
|
|
22492
|
+
*/
|
|
22493
|
+
printPiece(path: TPath): string;
|
|
22494
|
+
get(node: TNode): string;
|
|
22495
|
+
|
|
22496
|
+
/**
|
|
22497
|
+
* Append `text` as a piece of its own, so {@link retract} can still take it
|
|
22498
|
+
* back once a later sibling turns out to override it. Cuts the accumulating
|
|
22499
|
+
* tail off in front of it, so it is for the text that may actually be taken
|
|
22500
|
+
* back and not for output at large.
|
|
22501
|
+
*/
|
|
22502
|
+
emitRetractable(text: string): number;
|
|
22503
|
+
|
|
22504
|
+
/**
|
|
22505
|
+
* Take back an already-emitted piece — the printer has since found that a
|
|
22506
|
+
* later one overrides it. Pieces after it keep their place. A piece emitted by
|
|
22507
|
+
* {@link takeRetractable} takes the mapping anchored to it back as well; any
|
|
22508
|
+
* other anchor into the piece would be left pointing at what follows it, so
|
|
22509
|
+
* this must not be used on one (see {@link take}).
|
|
22510
|
+
*/
|
|
22511
|
+
retract(index: number): void;
|
|
22512
|
+
|
|
22513
|
+
/**
|
|
22514
|
+
* Fold `text` into an already-emitted piece, in front of the character it ends
|
|
22515
|
+
* with — a later sibling whose body belongs inside that piece, as a repeated
|
|
22516
|
+
* named `@layer` block's does. Mappings are piece-relative and this only grows
|
|
22517
|
+
* the piece past everything already anchored in it, so they keep their
|
|
22518
|
+
* positions; the folded text carries none of its own.
|
|
22519
|
+
*/
|
|
22520
|
+
foldIntoRetractable(index: number, text: string): void;
|
|
22521
|
+
|
|
22522
|
+
/**
|
|
22523
|
+
* Write an already-emitted piece again, shorter — a rule inside it a later
|
|
22524
|
+
* copy makes dead. Mappings anchored in the piece keep the offsets they were
|
|
22525
|
+
* given, so one inside what was cut names what now follows it.
|
|
22526
|
+
*/
|
|
22527
|
+
rewriteRetractable(index: number, text: string): void;
|
|
22528
|
+
|
|
22529
|
+
/**
|
|
22530
|
+
* {@link take} for a top-level node a later sibling may still make dead — the
|
|
22531
|
+
* unprefixed twin of a vendor-prefixed rule, which can stand anywhere after
|
|
22532
|
+
* it. The node is emitted as a piece of its own, with its mapping recorded
|
|
22533
|
+
* against that piece, so {@link retract} takes both back.
|
|
22534
|
+
*/
|
|
22535
|
+
takeRetractable(
|
|
22536
|
+
node: TNode,
|
|
22537
|
+
srcOffset?: number,
|
|
22538
|
+
srcLine?: number,
|
|
22539
|
+
srcCol?: number,
|
|
22540
|
+
text?: string
|
|
22541
|
+
): number;
|
|
22542
|
+
|
|
22543
|
+
/**
|
|
22544
|
+
* Emit one finished top-level node: first any kept comments that precede it,
|
|
22545
|
+
* then a source mapping anchoring its output start to `[srcLine, srcCol]`, then
|
|
22546
|
+
* its text — and drop the per-node store so the next top-level node starts
|
|
22547
|
+
* clean. `srcOffset` / `srcLine` / `srcCol` are the node's source position; a
|
|
22548
|
+
* grammar that doesn't map positions (e.g. HTML) omits them (no comments, no
|
|
22549
|
+
* mapping — the map ends up empty).
|
|
22550
|
+
*/
|
|
22551
|
+
take(
|
|
22552
|
+
node?: TNode,
|
|
22553
|
+
srcOffset?: number,
|
|
22554
|
+
srcLine?: number,
|
|
22555
|
+
srcCol?: number,
|
|
22556
|
+
text?: string
|
|
22557
|
+
): void;
|
|
22558
|
+
|
|
22559
|
+
/**
|
|
22560
|
+
* Tie whatever is emitted next to a source position: flush the kept comments
|
|
22561
|
+
* that precede it, then record the mapping. Split out of {@link take} for a
|
|
22562
|
+
* node printed in pieces, whose first piece is emitted well after the printer
|
|
22563
|
+
* for it began.
|
|
22564
|
+
*/
|
|
22565
|
+
anchor(srcOffset?: number, srcLine?: number, srcCol?: number): void;
|
|
22566
|
+
|
|
22567
|
+
/**
|
|
22568
|
+
* Whether a kept literal is queued to land before `pos`. A printer folding two
|
|
22569
|
+
* top-level nodes together asks first: the literal belongs between them, so
|
|
22570
|
+
* the fold would move it past what it was written above.
|
|
22571
|
+
*/
|
|
22572
|
+
hasInsertBefore(pos: number): boolean;
|
|
22573
|
+
|
|
22574
|
+
/**
|
|
22575
|
+
* Emit the kept literals landing before `pos`. A printer holding a node back
|
|
22576
|
+
* calls this at hold time, so what was written above it is still emitted
|
|
22577
|
+
* above it — and {@link hasInsertBefore} then answers about the gap to the
|
|
22578
|
+
* next node rather than the whole span since the last node taken.
|
|
22579
|
+
*/
|
|
22580
|
+
flushInsertsBefore(pos: number): void;
|
|
22581
|
+
|
|
22582
|
+
/**
|
|
22583
|
+
* Queue a literal to carry through to the output at source offset `pos` — a
|
|
22584
|
+
* comment the printer chose to keep (e.g. a `/*!` license banner). Calls
|
|
22585
|
+
* arrive in source order; each lands just before the first top-level node
|
|
22586
|
+
* starting after `pos` (or at the end, via {@link result}).
|
|
22587
|
+
*/
|
|
22588
|
+
insert(pos: number, text: string): void;
|
|
22589
|
+
|
|
22590
|
+
/**
|
|
22591
|
+
* Take the queued inserts sitting in `[start, end)` — a printer that writes
|
|
22592
|
+
* that source range out itself places them, so the writer must not flush
|
|
22593
|
+
* them ahead of the next top-level node as well.
|
|
22594
|
+
*/
|
|
22595
|
+
takeInserts(start: number, end: number): string;
|
|
22596
|
+
sourceMap(options: SourceMapOptions): SourceMap;
|
|
22597
|
+
|
|
22598
|
+
/**
|
|
22599
|
+
* Stand the text `resolve` gives back in place of every deferred write left
|
|
22600
|
+
* in the output, and move the mappings that follow one in the same piece by
|
|
22601
|
+
* what its text changed in length. Runs before {@link result} and
|
|
22602
|
+
* {@link sourceMap}, so both read the substituted output rather than
|
|
22603
|
+
* correcting for it.
|
|
22604
|
+
* The marker is `NUL id NUL`. A NUL mostly cannot reach printed output on its
|
|
22605
|
+
* own account — both preprocessors turn one into U+FFFD — but an RCDATA
|
|
22606
|
+
* element and an attribute value keep the one they were written with, so a
|
|
22607
|
+
* pair of them is read as a write only where what stands between spells an id
|
|
22608
|
+
* this answers for. Anything else is the source's own text and is left alone.
|
|
22609
|
+
*/
|
|
22610
|
+
substitute(resolve: (id: number) => undefined | string, infix: string): void;
|
|
22611
|
+
|
|
22612
|
+
/**
|
|
22613
|
+
* Throw away everything printed and stand `text` in its place. For the one
|
|
22614
|
+
* caller that can only tell its output is wrong once it has all of it.
|
|
22615
|
+
*/
|
|
22616
|
+
replaceAll(text: string): void;
|
|
22617
|
+
result(): string;
|
|
22618
|
+
}
|
|
22619
|
+
declare interface PrintOptions {
|
|
22620
|
+
mode: "minify" | "beautify";
|
|
22621
|
+
}
|
|
21089
22622
|
declare interface PrintedElement {
|
|
21090
22623
|
element: string;
|
|
21091
22624
|
content?: string;
|
|
@@ -21359,6 +22892,13 @@ declare interface ProvidesObject {
|
|
|
21359
22892
|
}
|
|
21360
22893
|
type PureCondition =
|
|
21361
22894
|
boolean | ((compilation: Compilation, module: Module) => boolean);
|
|
22895
|
+
type QualifiedRule = NodeSyntax & {
|
|
22896
|
+
prelude: ComponentValue[];
|
|
22897
|
+
declarations: null | DeclarationSyntax[];
|
|
22898
|
+
childRules: null | RuleSyntax[];
|
|
22899
|
+
blockStart: number;
|
|
22900
|
+
blockEnd: number;
|
|
22901
|
+
};
|
|
21362
22902
|
declare interface RawChunkGroupOptions {
|
|
21363
22903
|
preloadOrder?: number;
|
|
21364
22904
|
prefetchOrder?: number;
|
|
@@ -21945,10 +23485,7 @@ declare interface ReaddirTypes {
|
|
|
21945
23485
|
withFileTypes: true;
|
|
21946
23486
|
recursive?: boolean;
|
|
21947
23487
|
},
|
|
21948
|
-
callback: (
|
|
21949
|
-
err: null | NodeJS.ErrnoException,
|
|
21950
|
-
files?: DirentTypes<string>[]
|
|
21951
|
-
) => void
|
|
23488
|
+
callback: (err: null | NodeJS.ErrnoException, files?: DirentTypes[]) => void
|
|
21952
23489
|
): void;
|
|
21953
23490
|
(
|
|
21954
23491
|
path: PathLikeTypes,
|
|
@@ -22115,92 +23652,14 @@ type RecursiveArrayOrRecord<T> =
|
|
|
22115
23652
|
| RecursiveArrayOrRecord<T>[]
|
|
22116
23653
|
| T;
|
|
22117
23654
|
declare interface RecursiveNonNullable<T> {}
|
|
22118
|
-
|
|
23655
|
+
|
|
23656
|
+
/**
|
|
23657
|
+
* One identifier occurrence that refers to a binding.
|
|
23658
|
+
*/
|
|
23659
|
+
declare abstract class Reference {
|
|
22119
23660
|
identifier: Identifier;
|
|
22120
23661
|
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;
|
|
23662
|
+
resolved?: Variable;
|
|
22204
23663
|
}
|
|
22205
23664
|
type ReferenceableItem = string | object;
|
|
22206
23665
|
declare interface ReferencedExport {
|
|
@@ -23220,6 +24679,11 @@ declare interface ResourceDataWithData {
|
|
|
23220
24679
|
* @since 5.109.0
|
|
23221
24680
|
*/
|
|
23222
24681
|
declare interface ResourceHintsOptions {
|
|
24682
|
+
/**
|
|
24683
|
+
* 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).
|
|
24684
|
+
*/
|
|
24685
|
+
dedupe?: boolean;
|
|
24686
|
+
|
|
23223
24687
|
/**
|
|
23224
24688
|
* 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
24689
|
* @since 5.109.0
|
|
@@ -23290,7 +24754,7 @@ declare abstract class RestoreProvidedData {
|
|
|
23290
24754
|
/**
|
|
23291
24755
|
* Serializes this instance into the provided serializer context.
|
|
23292
24756
|
*/
|
|
23293
|
-
serialize(context:
|
|
24757
|
+
serialize(context: ObjectSerializerContextObjectMiddlewareObject_4): void;
|
|
23294
24758
|
}
|
|
23295
24759
|
declare interface RestoreProvidedDataExports {
|
|
23296
24760
|
name: string;
|
|
@@ -23301,7 +24765,28 @@ declare interface RestoreProvidedDataExports {
|
|
|
23301
24765
|
pureProvide?: boolean;
|
|
23302
24766
|
exportsInfo?: RestoreProvidedData;
|
|
23303
24767
|
}
|
|
23304
|
-
type
|
|
24768
|
+
type RuleAlias = string | RegExp | ((str: string) => boolean);
|
|
24769
|
+
declare interface RuleCondition {
|
|
24770
|
+
property: string | string[];
|
|
24771
|
+
matchWhenEmpty: boolean;
|
|
24772
|
+
fn: (
|
|
24773
|
+
value: EffectData[
|
|
24774
|
+
| "compiler"
|
|
24775
|
+
| "dependency"
|
|
24776
|
+
| "resource"
|
|
24777
|
+
| "scheme"
|
|
24778
|
+
| "realResource"
|
|
24779
|
+
| "resourceQuery"
|
|
24780
|
+
| "resourceFragment"
|
|
24781
|
+
| "attributes"
|
|
24782
|
+
| "mimetype"
|
|
24783
|
+
| "descriptionData"
|
|
24784
|
+
| "descriptionRelativePath"
|
|
24785
|
+
| "issuer"
|
|
24786
|
+
| "issuerLayer"
|
|
24787
|
+
| "phase"]
|
|
24788
|
+
) => boolean;
|
|
24789
|
+
}
|
|
23305
24790
|
declare interface RuleSet {
|
|
23306
24791
|
/**
|
|
23307
24792
|
* map of references in the rule set (may grow over time)
|
|
@@ -23312,6 +24797,11 @@ declare interface RuleSet {
|
|
|
23312
24797
|
* execute the rule set
|
|
23313
24798
|
*/
|
|
23314
24799
|
exec: (effectData: EffectData) => Effect[];
|
|
24800
|
+
|
|
24801
|
+
/**
|
|
24802
|
+
* the rules that never matched, outermost first
|
|
24803
|
+
*/
|
|
24804
|
+
unusedRules: () => CompiledRule[];
|
|
23315
24805
|
}
|
|
23316
24806
|
type RuleSetCondition =
|
|
23317
24807
|
| string
|
|
@@ -23334,7 +24824,7 @@ type RuleSetConditionOrConditions =
|
|
|
23334
24824
|
type RuleSetLoaderOptions = string | { [index: string]: any };
|
|
23335
24825
|
|
|
23336
24826
|
/**
|
|
23337
|
-
* Logic operators used in a condition matcher.
|
|
24827
|
+
* Logic operators and glob patterns used in a condition matcher.
|
|
23338
24828
|
*/
|
|
23339
24829
|
declare interface RuleSetLogicalConditions {
|
|
23340
24830
|
/**
|
|
@@ -23342,6 +24832,12 @@ declare interface RuleSetLogicalConditions {
|
|
|
23342
24832
|
*/
|
|
23343
24833
|
and?: RuleSetCondition[];
|
|
23344
24834
|
|
|
24835
|
+
/**
|
|
24836
|
+
* 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.
|
|
24837
|
+
* @since 5.110.0
|
|
24838
|
+
*/
|
|
24839
|
+
glob?: string | string[];
|
|
24840
|
+
|
|
23345
24841
|
/**
|
|
23346
24842
|
* Logical NOT.
|
|
23347
24843
|
*/
|
|
@@ -23359,7 +24855,7 @@ declare interface RuleSetLogicalConditions {
|
|
|
23359
24855
|
}
|
|
23360
24856
|
|
|
23361
24857
|
/**
|
|
23362
|
-
* Logic operators used in a condition matcher.
|
|
24858
|
+
* Logic operators and glob patterns used in a condition matcher.
|
|
23363
24859
|
*/
|
|
23364
24860
|
declare interface RuleSetLogicalConditionsAbsolute {
|
|
23365
24861
|
/**
|
|
@@ -23367,6 +24863,12 @@ declare interface RuleSetLogicalConditionsAbsolute {
|
|
|
23367
24863
|
*/
|
|
23368
24864
|
and?: RuleSetConditionAbsolute[];
|
|
23369
24865
|
|
|
24866
|
+
/**
|
|
24867
|
+
* 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.
|
|
24868
|
+
* @since 5.110.0
|
|
24869
|
+
*/
|
|
24870
|
+
glob?: string | string[];
|
|
24871
|
+
|
|
23370
24872
|
/**
|
|
23371
24873
|
* Logical NOT.
|
|
23372
24874
|
*/
|
|
@@ -23417,6 +24919,17 @@ declare interface RuleSetRule {
|
|
|
23417
24919
|
*/
|
|
23418
24920
|
descriptionData?: { [index: string]: RuleSetConditionOrConditions };
|
|
23419
24921
|
|
|
24922
|
+
/**
|
|
24923
|
+
* 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.
|
|
24924
|
+
* @since 5.110.0
|
|
24925
|
+
*/
|
|
24926
|
+
descriptionRelativePath?:
|
|
24927
|
+
| string
|
|
24928
|
+
| RegExp
|
|
24929
|
+
| ((value: string) => boolean)
|
|
24930
|
+
| RuleSetLogicalConditions
|
|
24931
|
+
| RuleSetCondition[];
|
|
24932
|
+
|
|
23420
24933
|
/**
|
|
23421
24934
|
* Enforce this rule as pre or post step.
|
|
23422
24935
|
*/
|
|
@@ -23442,6 +24955,12 @@ declare interface RuleSetRule {
|
|
|
23442
24955
|
*/
|
|
23443
24956
|
generator?: { [index: string]: any };
|
|
23444
24957
|
|
|
24958
|
+
/**
|
|
24959
|
+
* Match the module resource against glob patterns, `!` in front of a pattern excludes it. Combines with `test`, `include` and `exclude`.
|
|
24960
|
+
* @since 5.110.0
|
|
24961
|
+
*/
|
|
24962
|
+
glob?: string | string[];
|
|
24963
|
+
|
|
23445
24964
|
/**
|
|
23446
24965
|
* Shortcut for resource.include.
|
|
23447
24966
|
*/
|
|
@@ -23740,6 +25259,7 @@ type RuleSetUseItem =
|
|
|
23740
25259
|
*/
|
|
23741
25260
|
options?: string | { [index: string]: any };
|
|
23742
25261
|
};
|
|
25262
|
+
type RuleSyntax = AtRule | QualifiedRule;
|
|
23743
25263
|
declare class RuntimeChunkPlugin {
|
|
23744
25264
|
/**
|
|
23745
25265
|
* Creates an instance of RuntimeChunkPlugin.
|
|
@@ -23789,6 +25309,8 @@ declare class RuntimeModule extends Module {
|
|
|
23789
25309
|
|
|
23790
25310
|
/**
|
|
23791
25311
|
* Returns true, if the runtime module should get it's own scope.
|
|
25312
|
+
* When false, `generate()` must emit complete statements ending with `;`
|
|
25313
|
+
* so a following runtime IIFE is not parsed as a call (ASI).
|
|
23792
25314
|
*/
|
|
23793
25315
|
shouldIsolate(): boolean;
|
|
23794
25316
|
|
|
@@ -23906,6 +25428,12 @@ declare abstract class RuntimeTemplate {
|
|
|
23906
25428
|
globalObject: string;
|
|
23907
25429
|
contentHashReplacement: string;
|
|
23908
25430
|
isIIFE(): boolean;
|
|
25431
|
+
|
|
25432
|
+
/**
|
|
25433
|
+
* Whether the global object expression reads the `this` binding, which only
|
|
25434
|
+
* refers to the global object outside of strict mode.
|
|
25435
|
+
*/
|
|
25436
|
+
globalObjectUsesThis(): boolean;
|
|
23909
25437
|
isModule(): boolean;
|
|
23910
25438
|
isNeutralPlatform(): boolean;
|
|
23911
25439
|
|
|
@@ -23923,8 +25451,10 @@ declare abstract class RuntimeTemplate {
|
|
|
23923
25451
|
|
|
23924
25452
|
/**
|
|
23925
25453
|
* 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`.
|
|
25454
|
+
* is no DOM (SSR). Read it with `__webpack_css_server_styles__`; it is keyed
|
|
25455
|
+
* by the style/chunk identifier and namespaced by `output.uniqueName`.
|
|
25456
|
+
* Targets without `globalThis` go through the `__webpack_require__.g`
|
|
25457
|
+
* polyfill, so consumers must also require `RuntimeGlobals.global`.
|
|
23928
25458
|
*/
|
|
23929
25459
|
cssServerStyleRegistry(): string;
|
|
23930
25460
|
supportsConst(): boolean;
|
|
@@ -23943,8 +25473,81 @@ declare abstract class RuntimeTemplate {
|
|
|
23943
25473
|
supportsBigIntLiteral(): boolean;
|
|
23944
25474
|
supportsDynamicImport(): boolean;
|
|
23945
25475
|
supportsEcmaScriptModuleSyntax(): boolean;
|
|
25476
|
+
supportsDeferImport(): boolean;
|
|
25477
|
+
supportsSourceImport(): boolean;
|
|
23946
25478
|
supportsModulePreload(): boolean;
|
|
23947
|
-
|
|
25479
|
+
|
|
25480
|
+
/**
|
|
25481
|
+
* Whether a reference a foreign bundler can follow without running webpack's runtime
|
|
25482
|
+
* may be emitted — the one question every caller asks, in the form it is asking for:
|
|
25483
|
+
* - `"import"` — a literal `import("./chunk.js")` in place of `ensureChunk(id)`
|
|
25484
|
+
* - `"url"` — a literal `new URL(<file>, import.meta.url)`
|
|
25485
|
+
* - `"url-runtime"` — the same, written into a runtime module rather than a module
|
|
25486
|
+
* - `"url-inline"` — whether such a reference names the file at the call site
|
|
25487
|
+
* - `"wasm"` — the same, fully baked for a wasm binary the runtime would name
|
|
25488
|
+
* - `"wasm-relative"` — a wasm path built at runtime under an `import.meta.url` base
|
|
25489
|
+
* `"url-inline"` differs from `"url"` only in taking the `.p + <file>` fallback as
|
|
25490
|
+
* an answer too — both name the file where it is used rather than through the
|
|
25491
|
+
* asset's javascript wrapper, which is what decides whether that wrapper is emitted.
|
|
25492
|
+
* A name code generation cannot settle may still be baked, through a stand-in the
|
|
25493
|
+
* deferred pass fills in. Not covered here, because only the reference can tell: a
|
|
25494
|
+
* chunk with no id, and one this compilation emits no javascript for.
|
|
25495
|
+
*/
|
|
25496
|
+
supportsAnalyzable(
|
|
25497
|
+
form: AnalyzableForm,
|
|
25498
|
+
chunkGraph?: ChunkGraph,
|
|
25499
|
+
module?: Module,
|
|
25500
|
+
runtime?: RuntimeSpec
|
|
25501
|
+
): boolean;
|
|
25502
|
+
|
|
25503
|
+
/**
|
|
25504
|
+
* Builds the analyzable `new URL(specifier, import.meta.url)` expression the ESM
|
|
25505
|
+
* wasm/asset loader backends use to reference an emitted binary relative to the
|
|
25506
|
+
* current module (via `output.importMetaName`) instead of the runtime public-path
|
|
25507
|
+
* global — the form other bundlers and webpack itself can statically follow.
|
|
25508
|
+
*/
|
|
25509
|
+
importMetaUrl(specifier: string): string;
|
|
25510
|
+
|
|
25511
|
+
/**
|
|
25512
|
+
* Whether a baked asset url resolves against the entry `baseUri` at all. A public
|
|
25513
|
+
* path that reaches the same place from any base never reads `.b` — and `auto`
|
|
25514
|
+
* resolves to an absolute url too — while output with no baked form has nothing to
|
|
25515
|
+
* resolve. Where this is false, what `baseUri` is set to cannot reach the generated
|
|
25516
|
+
* code, so it must not reach the module hash either: `URLDependency.updateHash`
|
|
25517
|
+
* asks this before contributing one.
|
|
25518
|
+
*/
|
|
25519
|
+
analyzableUrlReadsBaseUri(): boolean;
|
|
25520
|
+
|
|
25521
|
+
/**
|
|
25522
|
+
* Static literal specifier (already quoted) for the `new URL(<here>, import.meta.url)`
|
|
25523
|
+
* an asset reference bakes to, or `null` to keep the runtime form. Unlike a wasm
|
|
25524
|
+
* binary, the runtime resolves an asset url against `__webpack_require__.b` — the
|
|
25525
|
+
* output root, or an entry `baseUri` where one is set — so that base is settled here
|
|
25526
|
+
* before the rest of the name is.
|
|
25527
|
+
*/
|
|
25528
|
+
getAnalyzableAssetUrl(
|
|
25529
|
+
module: Module,
|
|
25530
|
+
chunkGraph: ChunkGraph,
|
|
25531
|
+
filename: string,
|
|
25532
|
+
runtime: RuntimeSpec
|
|
25533
|
+
): null | string;
|
|
25534
|
+
|
|
25535
|
+
/**
|
|
25536
|
+
* The `baseUri` the entries this code runs under agree on, which replaces the output
|
|
25537
|
+
* root an asset url resolves against. Asked per runtime, because that is what the
|
|
25538
|
+
* module is generated for: two entries with different bases each get their own
|
|
25539
|
+
* source. `undefined` when none of them sets one, `null` when they disagree — an
|
|
25540
|
+
* entry that omits it disagrees with one that sets it.
|
|
25541
|
+
*/
|
|
25542
|
+
entryBaseUri(runtime: RuntimeSpec): undefined | null | string;
|
|
25543
|
+
|
|
25544
|
+
/**
|
|
25545
|
+
* `output.publicPath` as the constant it will be, for code that would otherwise read
|
|
25546
|
+
* `__webpack_require__.p` for a value that never changes. `undefined` when only the
|
|
25547
|
+
* hash could say, or when a runtime reassigns `__webpack_public_path__` — then the
|
|
25548
|
+
* global is the only thing that knows.
|
|
25549
|
+
*/
|
|
25550
|
+
constantPublicPath(): undefined | string;
|
|
23948
25551
|
supportTemplateLiteral(): boolean;
|
|
23949
25552
|
supportNodePrefixForCoreModules(): boolean;
|
|
23950
25553
|
|
|
@@ -24000,6 +25603,12 @@ declare abstract class RuntimeTemplate {
|
|
|
24000
25603
|
*/
|
|
24001
25604
|
getBuiltinModule(request: string, access?: string): string;
|
|
24002
25605
|
|
|
25606
|
+
/**
|
|
25607
|
+
* Renders a `then` callback calling `fn` with `args`. An arrow keeps the `this`
|
|
25608
|
+
* a method call gives; the bound form is shorter without arrows.
|
|
25609
|
+
*/
|
|
25610
|
+
deferredCall(fn: string, args: string): string;
|
|
25611
|
+
|
|
24003
25612
|
/**
|
|
24004
25613
|
* Renders an object-literal method, using method shorthand when supported
|
|
24005
25614
|
* and falling back to a `prop: function/arrow` property otherwise.
|
|
@@ -24458,6 +26067,70 @@ declare abstract class RuntimeTemplate {
|
|
|
24458
26067
|
originModule?: Module;
|
|
24459
26068
|
}): string;
|
|
24460
26069
|
|
|
26070
|
+
/**
|
|
26071
|
+
* For ESM module output, load a single statically-named chunk through the
|
|
26072
|
+
* `analyzableChunkImport` helper — a literal `import("./chunk.js")` other bundlers
|
|
26073
|
+
* and webpack itself can follow, wrapped to keep `ensureChunk` timing and deduplication.
|
|
26074
|
+
* Returns `null` to fall back to the runtime `ensureChunk` form.
|
|
26075
|
+
*/
|
|
26076
|
+
analyzableChunkImport(
|
|
26077
|
+
chunk: Chunk,
|
|
26078
|
+
comment: string,
|
|
26079
|
+
runtimeRequirements: Set<string>,
|
|
26080
|
+
originModule: undefined | Module,
|
|
26081
|
+
chunkGraph: ChunkGraph
|
|
26082
|
+
): null | string;
|
|
26083
|
+
|
|
26084
|
+
/**
|
|
26085
|
+
* The `../` path from a chunk's own asset back to the output root. Hashes are
|
|
26086
|
+
* neutralized first: a runtime module is generated once to be hashed, before any
|
|
26087
|
+
* hash exists, so resolving one there throws — and `RuntimeModule.updateHash`
|
|
26088
|
+
* swallows that, pinning the module's hash to the message.
|
|
26089
|
+
*/
|
|
26090
|
+
chunkRootOutputDir(chunk: Chunk, enforceRelative: boolean): string;
|
|
26091
|
+
|
|
26092
|
+
/**
|
|
26093
|
+
* Static `new URL(<file>, import.meta.url)` for every stylesheet a runtime can load,
|
|
26094
|
+
* keyed by chunk id, or `null` when any of them has to keep the runtime
|
|
26095
|
+
* `publicPath + getChunkCssFilename(id)` form. Both the runtime module reading them
|
|
26096
|
+
* and the plugin declaring what it needs ask this, so the two always agree. The
|
|
26097
|
+
* runtime hands an absolute url string to `link.href`, and so does this — the browser
|
|
26098
|
+
* resolves the element against the document, which is not where the chunk sits, and
|
|
26099
|
+
* the loader reads the url as text either way. Nothing is written out for a runtime
|
|
26100
|
+
* that also carries the hot handler; see below.
|
|
26101
|
+
*/
|
|
26102
|
+
analyzableCssChunkUrls(
|
|
26103
|
+
runtimeChunk: Chunk,
|
|
26104
|
+
chunkGraph: ChunkGraph,
|
|
26105
|
+
runtimeRequirements: ReadonlySet<string>,
|
|
26106
|
+
consumingModule?: Module
|
|
26107
|
+
): null | Map<ChunkId, string>;
|
|
26108
|
+
|
|
26109
|
+
/**
|
|
26110
|
+
* Static `new URL(<file>, import.meta.url).href` for every javascript chunk a
|
|
26111
|
+
* runtime can hint at with `<link rel="prefetch"/"modulepreload">`, keyed by chunk
|
|
26112
|
+
* id, or `null` when any of them has to keep the runtime
|
|
26113
|
+
* `publicPath + getChunkScriptFilename(id)` form. Both the runtime module reading
|
|
26114
|
+
* them and the plugin declaring what it needs ask this, so the two always agree.
|
|
26115
|
+
*/
|
|
26116
|
+
analyzableChunkScriptUrls(
|
|
26117
|
+
runtimeChunk: Chunk,
|
|
26118
|
+
chunkGraph: ChunkGraph,
|
|
26119
|
+
runtimeRequirements: ReadonlySet<string>,
|
|
26120
|
+
consumingModule?: Module
|
|
26121
|
+
): null | Map<ChunkId, string>;
|
|
26122
|
+
|
|
26123
|
+
/**
|
|
26124
|
+
* Static `new URL(<file>, import.meta.url)` for the binary emitted for an async wasm
|
|
26125
|
+
* module. Only called when `supportsAnalyzable("wasm")` holds.
|
|
26126
|
+
*/
|
|
26127
|
+
getAnalyzableWasmUrl(
|
|
26128
|
+
module: Module,
|
|
26129
|
+
chunkGraph: ChunkGraph,
|
|
26130
|
+
runtime: RuntimeSpec,
|
|
26131
|
+
runtimeRequirements: Set<string>
|
|
26132
|
+
): string;
|
|
26133
|
+
|
|
24461
26134
|
/**
|
|
24462
26135
|
* Async module factory.
|
|
24463
26136
|
*/
|
|
@@ -24478,6 +26151,10 @@ declare abstract class RuntimeTemplate {
|
|
|
24478
26151
|
* request string used originally
|
|
24479
26152
|
*/
|
|
24480
26153
|
request?: string;
|
|
26154
|
+
/**
|
|
26155
|
+
* the module the factory is emitted into
|
|
26156
|
+
*/
|
|
26157
|
+
originModule?: Module;
|
|
24481
26158
|
}): string;
|
|
24482
26159
|
|
|
24483
26160
|
/**
|
|
@@ -24542,32 +26219,28 @@ declare interface RuntimeValueOptions {
|
|
|
24542
26219
|
buildDependencies?: string[];
|
|
24543
26220
|
version?: string | (() => string);
|
|
24544
26221
|
}
|
|
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;
|
|
26222
|
+
|
|
26223
|
+
/**
|
|
26224
|
+
* A lexical scope. One shape for every kind, so the property loads in the
|
|
26225
|
+
* resolution loop stay monomorphic.
|
|
26226
|
+
*/
|
|
26227
|
+
declare abstract class Scope {
|
|
26228
|
+
type: ScopeType;
|
|
26229
|
+
block: NodeEstreeIndex;
|
|
24561
26230
|
upper: null | Scope;
|
|
24562
26231
|
childScopes: Scope[];
|
|
24563
|
-
variableScope: Scope;
|
|
24564
|
-
block: NodeEstreeIndex;
|
|
24565
26232
|
variables: Variable[];
|
|
24566
|
-
|
|
24567
|
-
|
|
24568
|
-
|
|
24569
|
-
|
|
24570
|
-
|
|
26233
|
+
variableScope: Scope;
|
|
26234
|
+
|
|
26235
|
+
/**
|
|
26236
|
+
* For a function scope with parameters, the offset where its body
|
|
26237
|
+
* starts; `-1` for every other scope. Separates the two regions that
|
|
26238
|
+
* share this scope, so a reference in the parameter list can be kept
|
|
26239
|
+
* from resolving to a binding declared in the body — see
|
|
26240
|
+
* `isHiddenBodyBinding`.
|
|
26241
|
+
*/
|
|
26242
|
+
paramBoundary: number;
|
|
26243
|
+
getBinding(name: string): undefined | Variable;
|
|
24571
26244
|
}
|
|
24572
26245
|
|
|
24573
26246
|
/**
|
|
@@ -24585,6 +26258,19 @@ declare interface ScopeInfo {
|
|
|
24585
26258
|
isAsmJs: boolean;
|
|
24586
26259
|
terminated?: 1 | 2;
|
|
24587
26260
|
}
|
|
26261
|
+
type ScopeType =
|
|
26262
|
+
| "function"
|
|
26263
|
+
| "module"
|
|
26264
|
+
| "global"
|
|
26265
|
+
| "function-expression-name"
|
|
26266
|
+
| "block"
|
|
26267
|
+
| "switch"
|
|
26268
|
+
| "catch"
|
|
26269
|
+
| "with"
|
|
26270
|
+
| "for"
|
|
26271
|
+
| "class"
|
|
26272
|
+
| "class-field-initializer"
|
|
26273
|
+
| "class-static-block";
|
|
24588
26274
|
declare interface Selector<A, B> {
|
|
24589
26275
|
(input: A): undefined | null | B;
|
|
24590
26276
|
}
|
|
@@ -24638,9 +26324,7 @@ declare abstract class SerializerMiddleware<
|
|
|
24638
26324
|
context: Context
|
|
24639
26325
|
): DeserializedType | Promise<DeserializedType>;
|
|
24640
26326
|
}
|
|
24641
|
-
type ServerLazyCompilationBackend =
|
|
24642
|
-
| ServerImportHttp<typeof IncomingMessage>
|
|
24643
|
-
| ServerImportHttps<typeof IncomingMessage>;
|
|
26327
|
+
type ServerLazyCompilationBackend = ServerImportHttp | ServerImportHttps;
|
|
24644
26328
|
declare interface SetIterator<T> extends IteratorObject<T, undefined> {
|
|
24645
26329
|
[Symbol.iterator](): SetIterator<T>;
|
|
24646
26330
|
[Symbol.dispose](): void;
|
|
@@ -24750,10 +26434,31 @@ declare class SideEffectsFlagPlugin {
|
|
|
24750
26434
|
): undefined | boolean;
|
|
24751
26435
|
}
|
|
24752
26436
|
type SideEffectsFlagValue = undefined | string | boolean | string[];
|
|
26437
|
+
type SimpleBlock = NodeSyntax & {
|
|
26438
|
+
token: SimpleBlockToken;
|
|
26439
|
+
value: ComponentValue[];
|
|
26440
|
+
};
|
|
26441
|
+
type SimpleBlockToken = "[" | "(" | "{";
|
|
24753
26442
|
type SimpleType = "string" | "number" | "boolean";
|
|
24754
26443
|
declare class SizeOnlySource extends Source {
|
|
24755
26444
|
constructor(size: number);
|
|
24756
26445
|
}
|
|
26446
|
+
declare interface SkipOptions {
|
|
26447
|
+
/**
|
|
26448
|
+
* component-value node types to drop from declaration value / function-arg lists (indexed by `NodeType`, 1 = skip; build with `buildSkipSet`)
|
|
26449
|
+
*/
|
|
26450
|
+
types?: Uint8Array;
|
|
26451
|
+
|
|
26452
|
+
/**
|
|
26453
|
+
* drop qualified-rule (selector) preludes — the rule and its block are still produced (default false)
|
|
26454
|
+
*/
|
|
26455
|
+
selectorPrelude?: boolean;
|
|
26456
|
+
|
|
26457
|
+
/**
|
|
26458
|
+
* drop at-rule preludes — the at-rule and its block are still produced (default false)
|
|
26459
|
+
*/
|
|
26460
|
+
atRulePrelude?: boolean;
|
|
26461
|
+
}
|
|
24757
26462
|
declare abstract class Snapshot {
|
|
24758
26463
|
startTime?: number;
|
|
24759
26464
|
fileTimestamps?: Map<string, null | FileSystemInfoEntry>;
|
|
@@ -24864,12 +26569,12 @@ declare abstract class Snapshot {
|
|
|
24864
26569
|
/**
|
|
24865
26570
|
* Serializes this instance into the provided serializer context.
|
|
24866
26571
|
*/
|
|
24867
|
-
serialize(__0:
|
|
26572
|
+
serialize(__0: ObjectSerializerContextObjectMiddlewareObject_3): void;
|
|
24868
26573
|
|
|
24869
26574
|
/**
|
|
24870
26575
|
* Restores this instance from the provided deserializer context.
|
|
24871
26576
|
*/
|
|
24872
|
-
deserialize(__0:
|
|
26577
|
+
deserialize(__0: ObjectDeserializerContextObjectMiddlewareObject_2): void;
|
|
24873
26578
|
|
|
24874
26579
|
/**
|
|
24875
26580
|
* Gets file iterable.
|
|
@@ -25144,6 +26849,14 @@ declare interface SourceLike {
|
|
|
25144
26849
|
*/
|
|
25145
26850
|
clearCache?: (options?: ClearCacheOptions, visited?: WeakSet<Source>) => void;
|
|
25146
26851
|
}
|
|
26852
|
+
declare interface SourceMap {
|
|
26853
|
+
version: 3;
|
|
26854
|
+
file: string;
|
|
26855
|
+
sources: string[];
|
|
26856
|
+
sourcesContent?: string[];
|
|
26857
|
+
names: string[];
|
|
26858
|
+
mappings: string;
|
|
26859
|
+
}
|
|
25147
26860
|
declare class SourceMapDevToolPlugin {
|
|
25148
26861
|
/**
|
|
25149
26862
|
* Creates an instance of SourceMapDevToolPlugin.
|
|
@@ -25180,7 +26893,7 @@ declare interface SourceMapDevToolPluginOptions {
|
|
|
25180
26893
|
/**
|
|
25181
26894
|
* Exclude modules that match the given value from source map generation.
|
|
25182
26895
|
*/
|
|
25183
|
-
exclude?: string | RegExp | ((str: string) => boolean) |
|
|
26896
|
+
exclude?: string | RegExp | ((str: string) => boolean) | RuleAlias[];
|
|
25184
26897
|
|
|
25185
26898
|
/**
|
|
25186
26899
|
* 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 +26914,12 @@ declare interface SourceMapDevToolPluginOptions {
|
|
|
25201
26914
|
/**
|
|
25202
26915
|
* Decide whether to ignore source files that match the specified value in the SourceMap.
|
|
25203
26916
|
*/
|
|
25204
|
-
ignoreList?: string | RegExp | ((str: string) => boolean) |
|
|
26917
|
+
ignoreList?: string | RegExp | ((str: string) => boolean) | RuleAlias[];
|
|
25205
26918
|
|
|
25206
26919
|
/**
|
|
25207
26920
|
* Include source maps for module paths that match the given value.
|
|
25208
26921
|
*/
|
|
25209
|
-
include?: string | RegExp | ((str: string) => boolean) |
|
|
26922
|
+
include?: string | RegExp | ((str: string) => boolean) | RuleAlias[];
|
|
25210
26923
|
|
|
25211
26924
|
/**
|
|
25212
26925
|
* Indicates whether SourceMaps from loaders should be used (defaults to true).
|
|
@@ -25242,7 +26955,11 @@ declare interface SourceMapDevToolPluginOptions {
|
|
|
25242
26955
|
/**
|
|
25243
26956
|
* Include source maps for modules based on their extension (defaults to .js and .css).
|
|
25244
26957
|
*/
|
|
25245
|
-
test?: string | RegExp | ((str: string) => boolean) |
|
|
26958
|
+
test?: string | RegExp | ((str: string) => boolean) | RuleAlias[];
|
|
26959
|
+
}
|
|
26960
|
+
declare interface SourceMapOptions {
|
|
26961
|
+
source: string;
|
|
26962
|
+
content?: string;
|
|
25246
26963
|
}
|
|
25247
26964
|
declare class SourceMapSource extends Source {
|
|
25248
26965
|
constructor(
|
|
@@ -25284,6 +27001,232 @@ declare interface SourcePosition {
|
|
|
25284
27001
|
line: number;
|
|
25285
27002
|
column?: number;
|
|
25286
27003
|
}
|
|
27004
|
+
|
|
27005
|
+
/**
|
|
27006
|
+
* Visitor coordinator: owns the visitor registry and drives a language
|
|
27007
|
+
* `grammar` over the source. Language-agnostic — each syntax (CSS, HTML, …)
|
|
27008
|
+
* binds its own grammar, node-type enum and (optionally) node printer.
|
|
27009
|
+
* Babel-style usage:
|
|
27010
|
+
* ```
|
|
27011
|
+
* processor.use({ [NodeType.X]: (path) => {}, [NodeType.Y]: { enter, exit } });
|
|
27012
|
+
* processor.process(source);
|
|
27013
|
+
* ```
|
|
27014
|
+
*/
|
|
27015
|
+
declare abstract class SourceProcessorClass<
|
|
27016
|
+
TPath,
|
|
27017
|
+
TNode,
|
|
27018
|
+
TProcessOptions = object,
|
|
27019
|
+
TPrintOptions = object
|
|
27020
|
+
> {
|
|
27021
|
+
/**
|
|
27022
|
+
* Register a Babel-style visitor map; calls accumulate per node type.
|
|
27023
|
+
* A bucket is a function (= `{ enter }`) or `{ enter?, exit? }`.
|
|
27024
|
+
*/
|
|
27025
|
+
use(
|
|
27026
|
+
map: VisitorMap<TPath>
|
|
27027
|
+
): SourceProcessorClass<TPath, TNode, TProcessOptions, TPrintOptions>;
|
|
27028
|
+
|
|
27029
|
+
/**
|
|
27030
|
+
* Parse `input` once and fire the visitors in source order. Asking for output
|
|
27031
|
+
* — `mode`, the one thing that names it — makes the same walk print, given a
|
|
27032
|
+
* printer supplied at construction: a
|
|
27033
|
+
* {@link PrintContext} is created, each node's printer fires into it as the node
|
|
27034
|
+
* finishes, and the result is returned as `{ code, map }`: the serialized output
|
|
27035
|
+
* and, for a caller that named its input with `source` / `content`, the
|
|
27036
|
+
* input->output source map — `map` is `undefined` without one. Asking for
|
|
27037
|
+
* none of it only walks and returns `undefined`. A single parse — printing
|
|
27038
|
+
* never re-parses; all configuration is per-call.
|
|
27039
|
+
*/
|
|
27040
|
+
process(
|
|
27041
|
+
input: string,
|
|
27042
|
+
options: TProcessOptions & { mode: "minify" | "beautify" } & {
|
|
27043
|
+
source: string;
|
|
27044
|
+
content?: string;
|
|
27045
|
+
}
|
|
27046
|
+
): { code: string; map: SourceMap };
|
|
27047
|
+
process(
|
|
27048
|
+
input: string,
|
|
27049
|
+
options: TProcessOptions & { mode: "minify" | "beautify" }
|
|
27050
|
+
): { code: string; map: undefined };
|
|
27051
|
+
process(input: string, options?: TProcessOptions): undefined;
|
|
27052
|
+
|
|
27053
|
+
/**
|
|
27054
|
+
* {@link process}, for a caller whose renderer answers asynchronously. Code
|
|
27055
|
+
* generation is synchronous — a printer returns its node's text, it cannot
|
|
27056
|
+
* await one — so the walk leaves a marker where each answer goes, they are
|
|
27057
|
+
* asked for together, and {@link PrintContext.substitute} stands each in its
|
|
27058
|
+
* place before the output and its map are built. One parse either way, and
|
|
27059
|
+
* the async boundary stays at the top rather than on every node.
|
|
27060
|
+
* This is the shape `process` itself takes once it is async: how the answers
|
|
27061
|
+
* are waited for is this method's business, so nothing above it changes.
|
|
27062
|
+
*/
|
|
27063
|
+
processAsync(
|
|
27064
|
+
input: string,
|
|
27065
|
+
options: Omit<TProcessOptions, "renderEmbeddedSource"> & {
|
|
27066
|
+
mode: "minify" | "beautify";
|
|
27067
|
+
} & {
|
|
27068
|
+
source?: string;
|
|
27069
|
+
content?: string;
|
|
27070
|
+
renderEmbeddedSource?: (
|
|
27071
|
+
source: string,
|
|
27072
|
+
hole?: any
|
|
27073
|
+
) => undefined | string | Promise<undefined | string>;
|
|
27074
|
+
}
|
|
27075
|
+
): Promise<{ code: string; map?: SourceMap }>;
|
|
27076
|
+
}
|
|
27077
|
+
|
|
27078
|
+
/**
|
|
27079
|
+
* The generic visitor coordinator (`util/SourceProcessor`) bound to the HTML
|
|
27080
|
+
* `grammar`. Babel-style usage:
|
|
27081
|
+
* ```
|
|
27082
|
+
* new SourceProcessor().use({ [NodeType.Element]: (path) => {}, [NodeType.Comment]: { enter, exit } }).process(source, { skip });
|
|
27083
|
+
* ```
|
|
27084
|
+
* @experimental exposed as `webpack.html.syntax.SourceProcessor`; unstable API
|
|
27085
|
+
*/
|
|
27086
|
+
declare class SourceProcessorSyntaxClass_1 extends SourceProcessorClass<
|
|
27087
|
+
{
|
|
27088
|
+
get node(): number;
|
|
27089
|
+
get parent(): null | number;
|
|
27090
|
+
/**
|
|
27091
|
+
* Stop the walk descending into the current node (enter only).
|
|
27092
|
+
*/
|
|
27093
|
+
skipChildren(): void;
|
|
27094
|
+
type(n?: number): number;
|
|
27095
|
+
start(n?: number): number;
|
|
27096
|
+
end(n?: number): number;
|
|
27097
|
+
/**
|
|
27098
|
+
* Raw source slice `[start, end)` — valid only during the walk (the printer's
|
|
27099
|
+
* window), before `parseHtml` releases `_htmlSource`.
|
|
27100
|
+
*/
|
|
27101
|
+
source(n?: number): string;
|
|
27102
|
+
sourceSpanAt(from: number, to: number): string;
|
|
27103
|
+
tagName(n?: number): string;
|
|
27104
|
+
namespace(n?: number): number;
|
|
27105
|
+
selfClosing(n?: number): boolean;
|
|
27106
|
+
attributes(n?: number): HtmlAttribute[];
|
|
27107
|
+
attributeCount(n?: number): number;
|
|
27108
|
+
/**
|
|
27109
|
+
* The i-th attribute of an element, as an id for the `attribute*` reads.
|
|
27110
|
+
*/
|
|
27111
|
+
attributeAt(i: number, n?: number): number;
|
|
27112
|
+
/**
|
|
27113
|
+
* Linear lookup by (lowercased) name.
|
|
27114
|
+
*/
|
|
27115
|
+
findAttribute(name: string, n?: number): number;
|
|
27116
|
+
attributeName(a: number): string;
|
|
27117
|
+
attributeValue(a: number): string;
|
|
27118
|
+
attributeNameStart(a: number): number;
|
|
27119
|
+
attributeNameEnd(a: number): number;
|
|
27120
|
+
attributeValueStart(a: number): number;
|
|
27121
|
+
attributeValueEnd(a: number): number;
|
|
27122
|
+
tagEnd(n?: number): number;
|
|
27123
|
+
nameEnd(n?: number): number;
|
|
27124
|
+
/**
|
|
27125
|
+
* Whether the source wrote this element's end tag rather than the parser
|
|
27126
|
+
* popping it for an implied close. Read back off the range instead of marked
|
|
27127
|
+
* during the parse: an element's end spans the token that closed it, so its
|
|
27128
|
+
* own end tag is the last thing in it — and only the few elements around a
|
|
27129
|
+
* region printed from source ever ask.
|
|
27130
|
+
*/
|
|
27131
|
+
sourceClosed(n?: number): boolean;
|
|
27132
|
+
openTag(n?: number): string;
|
|
27133
|
+
/**
|
|
27134
|
+
* An element's end tag, generated as `</name>` from the opening tag's own name
|
|
27135
|
+
* (exact source casing, correct for foreign camelCase elements). Generated, not
|
|
27136
|
+
* sliced: element `end` offsets don't span the end tag, and an omitted optional
|
|
27137
|
+
* end tag (`<li>`, `<p>`, …) still serializes to the same DOM. `""` when the
|
|
27138
|
+
* parser inserted the element, as {@link openTag } does — it has no name in the
|
|
27139
|
+
* source to echo, and slicing one would spell `</>`.
|
|
27140
|
+
*/
|
|
27141
|
+
closeTag(n?: number): string;
|
|
27142
|
+
contentEnd(n?: number): number;
|
|
27143
|
+
templateContent(n?: number): number;
|
|
27144
|
+
data(n?: number): string;
|
|
27145
|
+
piTarget(n?: number): string;
|
|
27146
|
+
doctypeName(n?: number): string;
|
|
27147
|
+
doctypePublicId(_n?: number): null | string;
|
|
27148
|
+
doctypeSystemId(_n?: number): null | string;
|
|
27149
|
+
firstChild(n?: number): number;
|
|
27150
|
+
nextSibling(n?: number): number;
|
|
27151
|
+
parentOf(n?: number): number;
|
|
27152
|
+
children(n?: number): number[];
|
|
27153
|
+
},
|
|
27154
|
+
number,
|
|
27155
|
+
HtmlProcessOptions
|
|
27156
|
+
> {
|
|
27157
|
+
constructor();
|
|
27158
|
+
static PrintContext: typeof PrintContext;
|
|
27159
|
+
static deferredWrite: (id: number) => string;
|
|
27160
|
+
}
|
|
27161
|
+
|
|
27162
|
+
/**
|
|
27163
|
+
* The generic visitor coordinator (`util/SourceProcessor`) bound to the CSS
|
|
27164
|
+
* `grammar`. All configuration is per `process` call. `process(src, { minimize:
|
|
27165
|
+
* true })` returns `{ code, map }` — the safely-minified serialization (built by
|
|
27166
|
+
* the same walk that fires visitors) and its source map; without `minimize` it
|
|
27167
|
+
* just walks and returns `undefined`. Babel-style usage:
|
|
27168
|
+
* ```
|
|
27169
|
+
* new SourceProcessor().use({ [NodeType.AtRule]: (path) => {} }).process(source, { skip });
|
|
27170
|
+
* ```
|
|
27171
|
+
* @experimental exposed as `webpack.css.syntax.SourceProcessor`; unstable API
|
|
27172
|
+
*/
|
|
27173
|
+
declare class SourceProcessorSyntaxClass_2 extends SourceProcessorClass<
|
|
27174
|
+
{
|
|
27175
|
+
get node(): NodeSyntax;
|
|
27176
|
+
get parent(): null | NodeSyntax;
|
|
27177
|
+
get index(): number;
|
|
27178
|
+
/**
|
|
27179
|
+
* Stop the walk descending into the current node (enter only).
|
|
27180
|
+
*/
|
|
27181
|
+
skipChildren(): void;
|
|
27182
|
+
inValue(): boolean;
|
|
27183
|
+
type(n?: NodeSyntax): number;
|
|
27184
|
+
start(n?: NodeSyntax): number;
|
|
27185
|
+
end(n?: NodeSyntax): number;
|
|
27186
|
+
range(n?: NodeSyntax): [number, number];
|
|
27187
|
+
loc(n?: NodeSyntax): {
|
|
27188
|
+
start: { line: number; column: number };
|
|
27189
|
+
end: { line: number; column: number };
|
|
27190
|
+
};
|
|
27191
|
+
source(n?: NodeSyntax): string;
|
|
27192
|
+
value(n?: NodeSyntax): string;
|
|
27193
|
+
unescaped(n?: NodeSyntax): string;
|
|
27194
|
+
typeFlag(n?: NodeSyntax): string;
|
|
27195
|
+
contentStart(n?: NodeSyntax): number;
|
|
27196
|
+
contentEnd(n?: NodeSyntax): number;
|
|
27197
|
+
name(n?: NodeSyntax): string;
|
|
27198
|
+
nameStart(n?: NodeSyntax): number;
|
|
27199
|
+
nameEnd(n?: NodeSyntax): number;
|
|
27200
|
+
unescapedName(n?: NodeSyntax): string;
|
|
27201
|
+
children(n?: NodeSyntax): ComponentValue[];
|
|
27202
|
+
prelude(n?: NodeSyntax): ComponentValue[];
|
|
27203
|
+
childCount(n?: NodeSyntax): number;
|
|
27204
|
+
childAt(n: NodeSyntax, i: number): ComponentValue;
|
|
27205
|
+
/**
|
|
27206
|
+
* A block big enough to stream hands its children to the visitors as each one
|
|
27207
|
+
* finishes rather than collecting them, so both lists read as an empty block
|
|
27208
|
+
* on it — `null`, which means no block at all, is still only for the `@…;`
|
|
27209
|
+
* forms. Read a block's children from the walk, not from here.
|
|
27210
|
+
*/
|
|
27211
|
+
declarations(n?: NodeSyntax): null | DeclarationSyntax[];
|
|
27212
|
+
/**
|
|
27213
|
+
* Reads as an empty block on a streamed rule; see {@link declarations }.
|
|
27214
|
+
*/
|
|
27215
|
+
childRules(n?: NodeSyntax): null | RuleSyntax[];
|
|
27216
|
+
blockStart(n?: NodeSyntax): number;
|
|
27217
|
+
blockEnd(n?: NodeSyntax): number;
|
|
27218
|
+
important(n?: NodeSyntax): boolean;
|
|
27219
|
+
blockToken(n?: NodeSyntax): SimpleBlockToken;
|
|
27220
|
+
setEnd(n: NodeSyntax, v: number): void;
|
|
27221
|
+
setBlockEnd(n: NodeSyntax, v: number): void;
|
|
27222
|
+
},
|
|
27223
|
+
NodeSyntax,
|
|
27224
|
+
CssProcessOptions
|
|
27225
|
+
> {
|
|
27226
|
+
constructor();
|
|
27227
|
+
static PrintContext: typeof PrintContext;
|
|
27228
|
+
static deferredWrite: (id: number) => string;
|
|
27229
|
+
}
|
|
25287
27230
|
declare interface SourceTable {
|
|
25288
27231
|
[index: string]: SourceBucket;
|
|
25289
27232
|
}
|
|
@@ -25354,6 +27297,9 @@ declare class SplitChunksPlugin {
|
|
|
25354
27297
|
* Applies the plugin by registering its hooks on the compiler.
|
|
25355
27298
|
*/
|
|
25356
27299
|
apply(compiler: Compiler): void;
|
|
27300
|
+
static getCappedSplits: (
|
|
27301
|
+
compilation: Compilation
|
|
27302
|
+
) => undefined | CappedSplit[];
|
|
25357
27303
|
}
|
|
25358
27304
|
declare interface SplitChunksSizes {
|
|
25359
27305
|
[index: string]: number;
|
|
@@ -25509,7 +27455,7 @@ declare abstract class StackedMap<K, V> {
|
|
|
25509
27455
|
*/
|
|
25510
27456
|
declare interface StarListDeserializerContext {
|
|
25511
27457
|
read: () => HarmonyExportImportedSpecifierDependency[];
|
|
25512
|
-
rest:
|
|
27458
|
+
rest: ObjectDeserializerContextObjectMiddlewareObject_2<[]>;
|
|
25513
27459
|
setCircularReference: (value: ReferenceableItem) => void;
|
|
25514
27460
|
}
|
|
25515
27461
|
|
|
@@ -25519,7 +27465,7 @@ declare interface StarListDeserializerContext {
|
|
|
25519
27465
|
declare interface StarListSerializerContext {
|
|
25520
27466
|
write: (
|
|
25521
27467
|
value: HarmonyExportImportedSpecifierDependency[]
|
|
25522
|
-
) =>
|
|
27468
|
+
) => ObjectSerializerContextObjectMiddlewareObject_3<[]>;
|
|
25523
27469
|
setCircularReference: (value: ReferenceableItem) => void;
|
|
25524
27470
|
snapshot: () => ObjectSerializerSnapshot;
|
|
25525
27471
|
rollback: (snapshot: ObjectSerializerSnapshot) => void;
|
|
@@ -26210,6 +28156,18 @@ declare interface StatsOptions {
|
|
|
26210
28156
|
*/
|
|
26211
28157
|
hash?: boolean;
|
|
26212
28158
|
|
|
28159
|
+
/**
|
|
28160
|
+
* Add performance hints reported with 'performance.hints: "stats"'.
|
|
28161
|
+
* @since 5.110.0
|
|
28162
|
+
*/
|
|
28163
|
+
hints?: boolean;
|
|
28164
|
+
|
|
28165
|
+
/**
|
|
28166
|
+
* Add the number of performance hints.
|
|
28167
|
+
* @since 5.110.0
|
|
28168
|
+
*/
|
|
28169
|
+
hintsCount?: boolean;
|
|
28170
|
+
|
|
26213
28171
|
/**
|
|
26214
28172
|
* Add ids.
|
|
26215
28173
|
*/
|
|
@@ -26457,6 +28415,7 @@ declare interface StreamOptions {
|
|
|
26457
28415
|
declare interface Stringable {
|
|
26458
28416
|
toString: () => string;
|
|
26459
28417
|
}
|
|
28418
|
+
type Stylesheet = NodeSyntax & { rules: RuleSyntax[] };
|
|
26460
28419
|
type Supports = undefined | string;
|
|
26461
28420
|
declare class SyncModuleIdsPlugin {
|
|
26462
28421
|
/**
|
|
@@ -26621,6 +28580,95 @@ declare interface TimestampAndHash {
|
|
|
26621
28580
|
timestamp?: number;
|
|
26622
28581
|
hash: string;
|
|
26623
28582
|
}
|
|
28583
|
+
type Token = NodeSyntax & {
|
|
28584
|
+
value: string;
|
|
28585
|
+
unescaped: string;
|
|
28586
|
+
numericValue: number;
|
|
28587
|
+
typeFlag: "number" | "id" | "integer" | "unrestricted";
|
|
28588
|
+
sign: "" | "+" | "-";
|
|
28589
|
+
unit: string;
|
|
28590
|
+
contentStart: number;
|
|
28591
|
+
contentEnd: number;
|
|
28592
|
+
};
|
|
28593
|
+
|
|
28594
|
+
/**
|
|
28595
|
+
* Position-based view over the lexer — webpack's stand-in for the spec's
|
|
28596
|
+
* "normalize into a token stream" (CSS Syntax §9). It unifies the lexer and the
|
|
28597
|
+
* stream in one class: the `readToken` primitive lexes one token (the CSS
|
|
28598
|
+
* tokenizer), and the spec token-stream operations `next` / `consume` /
|
|
28599
|
+
* `discard` / `mark` / `restoreMark` / `discardMark` drive it from a byte
|
|
28600
|
+
* cursor. `parse*` entry points wrap a source string in one of these and every
|
|
28601
|
+
* `consume*` algorithm reads tokens from it.
|
|
28602
|
+
* No token buffer is kept: the cursor is a byte offset and the only state is
|
|
28603
|
+
* the next token (lazily tokenized once and cached until consumed). The
|
|
28604
|
+
* declaration-vs-qualified-rule backtracking in `consumeABlocksContents`
|
|
28605
|
+
* rewinds by `mark`ing / `restoreMark`ing that byte offset, which simply
|
|
28606
|
+
* re-tokenizes the rewound span — comment tokens are filtered here and fire
|
|
28607
|
+
* `onComment` once each, tracked by a monotonic high-water mark so a
|
|
28608
|
+
* re-tokenized span never re-fires them.
|
|
28609
|
+
* `SourceProcessor` is handed this class (not an instance) and threads it to
|
|
28610
|
+
* the grammar, so a different language can drive the same visitor machinery by
|
|
28611
|
+
* swapping the tokenizer — the per-token `readToken` primitive — for its own.
|
|
28612
|
+
*/
|
|
28613
|
+
declare class TokenStream {
|
|
28614
|
+
constructor(
|
|
28615
|
+
input: string,
|
|
28616
|
+
pos?: number,
|
|
28617
|
+
locConverter?: LocConverter,
|
|
28618
|
+
onComment?: (input: string, start: number, end: number) => number
|
|
28619
|
+
);
|
|
28620
|
+
input: string;
|
|
28621
|
+
locConverter: LocConverter;
|
|
28622
|
+
|
|
28623
|
+
/**
|
|
28624
|
+
* The next token (CSS Syntax §3 "next token") — the upcoming token without
|
|
28625
|
+
* consuming it; the `<eof-token>` once the source is exhausted. This is the
|
|
28626
|
+
* token the consume algorithms dispatch on (the spec's "process"). Tokenized
|
|
28627
|
+
* from `_pos` on first use and cached until consumed; comment tokens are
|
|
28628
|
+
* skipped here, firing `onComment` once each.
|
|
28629
|
+
*/
|
|
28630
|
+
next(): MutableToken;
|
|
28631
|
+
|
|
28632
|
+
/**
|
|
28633
|
+
* Consume a token (CSS Syntax §3 "consume a token") — return the next token
|
|
28634
|
+
* and advance the cursor past it. The returned token is valid until the next
|
|
28635
|
+
* `next` re-tokenizes (the reused instance is not cleared by advancing).
|
|
28636
|
+
*/
|
|
28637
|
+
consume(): MutableToken;
|
|
28638
|
+
|
|
28639
|
+
/**
|
|
28640
|
+
* Discard a token (CSS Syntax §3 "discard a token") — advance the cursor past
|
|
28641
|
+
* the next token without returning it.
|
|
28642
|
+
*/
|
|
28643
|
+
discard(): void;
|
|
28644
|
+
|
|
28645
|
+
/**
|
|
28646
|
+
* Advance past the already-peeked next token, skipping the redundant `next()`
|
|
28647
|
+
* re-check `consume` / `discard` pay. Precondition: the caller has just called
|
|
28648
|
+
* `next()` (so `_tok` is the cached next token and `_hasNext` is true) and that
|
|
28649
|
+
* token is not the `<eof-token>` — the hot "peek, decide, advance" sites where
|
|
28650
|
+
* both always hold. Callers that can't guarantee a non-EOF cached token use
|
|
28651
|
+
* `consume` / `discard` instead.
|
|
28652
|
+
*/
|
|
28653
|
+
advance(): void;
|
|
28654
|
+
|
|
28655
|
+
/**
|
|
28656
|
+
* Mark (CSS Syntax §3 "mark") — push the current cursor position.
|
|
28657
|
+
*/
|
|
28658
|
+
mark(): void;
|
|
28659
|
+
|
|
28660
|
+
/**
|
|
28661
|
+
* Restore a mark (CSS Syntax §3 "restore a mark") — pop the last mark and
|
|
28662
|
+
* rewind the cursor to it. The rewound span is re-tokenized on the next read;
|
|
28663
|
+
* already-fired comments are not re-fired (`_commentHigh`).
|
|
28664
|
+
*/
|
|
28665
|
+
restoreMark(): void;
|
|
28666
|
+
|
|
28667
|
+
/**
|
|
28668
|
+
* Discard a mark (CSS Syntax §3 "discard a mark") — pop without rewinding.
|
|
28669
|
+
*/
|
|
28670
|
+
discardMark(): void;
|
|
28671
|
+
}
|
|
26624
28672
|
declare class TopLevelSymbol {
|
|
26625
28673
|
/**
|
|
26626
28674
|
* Creates an instance of TopLevelSymbol.
|
|
@@ -26829,12 +28877,15 @@ type ValueCacheVersion = string | Set<string>;
|
|
|
26829
28877
|
declare interface Values {
|
|
26830
28878
|
[index: string]: Value[];
|
|
26831
28879
|
}
|
|
26832
|
-
|
|
28880
|
+
|
|
28881
|
+
/**
|
|
28882
|
+
* A binding: one name declared in one scope.
|
|
28883
|
+
*/
|
|
28884
|
+
declare abstract class Variable {
|
|
26833
28885
|
name: string;
|
|
26834
|
-
scope: Scope;
|
|
26835
28886
|
identifiers: Identifier[];
|
|
26836
28887
|
references: Reference[];
|
|
26837
|
-
|
|
28888
|
+
scope: Scope;
|
|
26838
28889
|
}
|
|
26839
28890
|
declare class VariableInfo {
|
|
26840
28891
|
/**
|
|
@@ -26947,6 +28998,14 @@ declare class VirtualUrlPlugin {
|
|
|
26947
28998
|
getCacheVersion(version: string | true | (() => string)): undefined | string;
|
|
26948
28999
|
static DEFAULT_SCHEME: string;
|
|
26949
29000
|
}
|
|
29001
|
+
type VisitorBucket<TPath> =
|
|
29002
|
+
VisitorFn<TPath> | { enter?: VisitorFn<TPath>; exit?: VisitorFn<TPath> };
|
|
29003
|
+
declare interface VisitorFn<TPath> {
|
|
29004
|
+
(path: TPath): void;
|
|
29005
|
+
}
|
|
29006
|
+
declare interface VisitorMap<TPath> {
|
|
29007
|
+
[index: number]: VisitorBucket<TPath>;
|
|
29008
|
+
}
|
|
26950
29009
|
type WarningFilterItemTypes =
|
|
26951
29010
|
string | RegExp | ((warning: StatsError, warningString: string) => boolean);
|
|
26952
29011
|
|
|
@@ -27211,7 +29270,8 @@ declare abstract class WeakTupleMap<K extends any[], V> {
|
|
|
27211
29270
|
*/
|
|
27212
29271
|
clear(): void;
|
|
27213
29272
|
}
|
|
27214
|
-
declare abstract class
|
|
29273
|
+
declare abstract class WebAssemblyParserAsyncWebAssemblyParser extends ParserClass {}
|
|
29274
|
+
declare abstract class WebAssemblyParserClass extends ParserClass {}
|
|
27215
29275
|
declare interface WebAssemblyRenderContext {
|
|
27216
29276
|
/**
|
|
27217
29277
|
* the chunk
|
|
@@ -27267,12 +29327,12 @@ declare class WebpackError extends Error {
|
|
|
27267
29327
|
/**
|
|
27268
29328
|
* Serializes this instance into the provided serializer context.
|
|
27269
29329
|
*/
|
|
27270
|
-
serialize(__0:
|
|
29330
|
+
serialize(__0: ObjectSerializerContextObjectMiddlewareObject_3): void;
|
|
27271
29331
|
|
|
27272
29332
|
/**
|
|
27273
29333
|
* Restores this instance from the provided deserializer context.
|
|
27274
29334
|
*/
|
|
27275
|
-
deserialize(__0:
|
|
29335
|
+
deserialize(__0: ObjectDeserializerContextObjectMiddlewareObject_2): void;
|
|
27276
29336
|
|
|
27277
29337
|
/**
|
|
27278
29338
|
* Creates a `.stack` property on `targetObject`, which when accessed returns
|
|
@@ -27744,6 +29804,7 @@ declare interface WebpackRequire {
|
|
|
27744
29804
|
(id: string): any;
|
|
27745
29805
|
i?: ((options: ExecuteOptions) => void)[];
|
|
27746
29806
|
c?: Record<string, ExecuteModuleObject>;
|
|
29807
|
+
p?: string;
|
|
27747
29808
|
}
|
|
27748
29809
|
declare interface WithId {
|
|
27749
29810
|
id: string | number;
|
|
@@ -27792,6 +29853,31 @@ type WriteStreamOptions = StreamOptions & {
|
|
|
27792
29853
|
fs?: null | CreateWriteStreamFSImplementation;
|
|
27793
29854
|
flush?: boolean;
|
|
27794
29855
|
};
|
|
29856
|
+
declare interface _functionSyntax {
|
|
29857
|
+
/**
|
|
29858
|
+
* Decode HTML character references in a string. Handles all numeric
|
|
29859
|
+
* references (with WHATWG remap of 0x00, surrogates, out-of-range, and the
|
|
29860
|
+
* C1 Windows-1252 table) and the full WHATWG named character references
|
|
29861
|
+
* table. Unknown or malformed references are left as literal text.
|
|
29862
|
+
* When `isAttribute` is `true`, applies the WHATWG
|
|
29863
|
+
* "consumed-as-part-of-an-attribute" rule: a named reference without a
|
|
29864
|
+
* trailing `;` whose next character is `=` or ASCII alphanumeric is left
|
|
29865
|
+
* undecoded, so e.g. `&=foo` stays literal in an attribute value but
|
|
29866
|
+
* decodes to `&=foo` in text.
|
|
29867
|
+
* With `withMap` the result also carries a boundary map from the decoded
|
|
29868
|
+
* string back to raw offsets, so spans computed on the decoded text (e.g.
|
|
29869
|
+
* srcset candidate URLs) can be translated to source ranges. `map[i]` is the
|
|
29870
|
+
* raw offset of decoded boundary `i` (`0..text.length`); boundaries inside a
|
|
29871
|
+
* reference's decoded text map to the reference start. `map` is `undefined`
|
|
29872
|
+
* when nothing was decoded (then `text === str`).
|
|
29873
|
+
*/
|
|
29874
|
+
(str: string, isAttribute?: boolean): string;
|
|
29875
|
+
(
|
|
29876
|
+
str: string,
|
|
29877
|
+
isAttribute: undefined | boolean,
|
|
29878
|
+
withMap: true
|
|
29879
|
+
): DecodedEntitiesWithMap;
|
|
29880
|
+
}
|
|
27795
29881
|
|
|
27796
29882
|
/**
|
|
27797
29883
|
* Returns compiler or MultiCompiler.
|
|
@@ -27923,6 +30009,8 @@ declare namespace exports {
|
|
|
27923
30009
|
) => null | Problem[];
|
|
27924
30010
|
}
|
|
27925
30011
|
export namespace ModuleFilenameHelpers {
|
|
30012
|
+
export let DEFAULT_MODULE_FILENAME_TEMPLATE: string;
|
|
30013
|
+
export let DEFAULT_FALLBACK_MODULE_FILENAME_TEMPLATE: string;
|
|
27926
30014
|
export let ALL_LOADERS_RESOURCE: string;
|
|
27927
30015
|
export let REGEXP_ALL_LOADERS_RESOURCE: RegExp;
|
|
27928
30016
|
export let LOADERS_RESOURCE: string;
|
|
@@ -27986,9 +30074,10 @@ declare namespace exports {
|
|
|
27986
30074
|
export let baseURI: "__webpack_require__.b";
|
|
27987
30075
|
export let chunkCallback: "webpackChunk";
|
|
27988
30076
|
export let chunkName: "__webpack_require__.cn";
|
|
27989
|
-
export let commonJsWrap: "__webpack_require__.cjs";
|
|
27990
30077
|
export let compatGetDefaultExport: "__webpack_require__.n";
|
|
27991
30078
|
export let compileWasm: "__webpack_require__.vs";
|
|
30079
|
+
export let concatenationWrap: "__webpack_require__.cw";
|
|
30080
|
+
export let constructRequire: "__webpack_require__.cr";
|
|
27992
30081
|
export let createFakeNamespaceObject: "__webpack_require__.t";
|
|
27993
30082
|
export let createScript: "__webpack_require__.ts";
|
|
27994
30083
|
export let createScriptUrl: "__webpack_require__.tu";
|
|
@@ -27997,11 +30086,11 @@ declare namespace exports {
|
|
|
27997
30086
|
export let deferredModuleAsyncTransitiveDependencies: "__webpack_require__.zT";
|
|
27998
30087
|
export let deferredModuleAsyncTransitiveDependenciesSymbol: "__webpack_require__.zS";
|
|
27999
30088
|
export let definePropertyGetters: "__webpack_require__.d";
|
|
30089
|
+
export let definePropertyGettersFromArray: "__webpack_require__.d (array)";
|
|
28000
30090
|
export let ensureChunk: "__webpack_require__.e";
|
|
28001
30091
|
export let ensureChunkHandlers: "__webpack_require__.f";
|
|
28002
30092
|
export let ensureChunkIncludeEntries: "__webpack_require__.f (include entries)";
|
|
28003
30093
|
export let entryModuleId: "__webpack_require__.s";
|
|
28004
|
-
export let esmId: "__webpack_esm_id__";
|
|
28005
30094
|
export let esmIds: "__webpack_esm_ids__";
|
|
28006
30095
|
export let esmModules: "__webpack_esm_modules__";
|
|
28007
30096
|
export let esmRuntime: "__webpack_esm_runtime__";
|
|
@@ -28011,6 +30100,7 @@ declare namespace exports {
|
|
|
28011
30100
|
export let getChunkScriptFilename: "__webpack_require__.u";
|
|
28012
30101
|
export let getChunkUpdateCssFilename: "__webpack_require__.hk";
|
|
28013
30102
|
export let getChunkUpdateScriptFilename: "__webpack_require__.hu";
|
|
30103
|
+
export let getCssServerStyles: "__webpack_require__.cs";
|
|
28014
30104
|
export let getFullHash: "__webpack_require__.h";
|
|
28015
30105
|
export let getTrustedTypesPolicy: "__webpack_require__.tt";
|
|
28016
30106
|
export let getUpdateManifestFilename: "__webpack_require__.hmrF";
|
|
@@ -28184,9 +30274,607 @@ declare namespace exports {
|
|
|
28184
30274
|
export { AsyncWebAssemblyModulesPlugin, EnableWasmLoadingPlugin };
|
|
28185
30275
|
}
|
|
28186
30276
|
export namespace css {
|
|
30277
|
+
export namespace syntax {
|
|
30278
|
+
export let A: {
|
|
30279
|
+
get node(): NodeSyntax;
|
|
30280
|
+
get parent(): null | NodeSyntax;
|
|
30281
|
+
get index(): number;
|
|
30282
|
+
/**
|
|
30283
|
+
* Stop the walk descending into the current node (enter only).
|
|
30284
|
+
*/
|
|
30285
|
+
skipChildren(): void;
|
|
30286
|
+
inValue(): boolean;
|
|
30287
|
+
type(n?: NodeSyntax): number;
|
|
30288
|
+
start(n?: NodeSyntax): number;
|
|
30289
|
+
end(n?: NodeSyntax): number;
|
|
30290
|
+
range(n?: NodeSyntax): [number, number];
|
|
30291
|
+
loc(n?: NodeSyntax): {
|
|
30292
|
+
start: { line: number; column: number };
|
|
30293
|
+
end: { line: number; column: number };
|
|
30294
|
+
};
|
|
30295
|
+
source(n?: NodeSyntax): string;
|
|
30296
|
+
value(n?: NodeSyntax): string;
|
|
30297
|
+
unescaped(n?: NodeSyntax): string;
|
|
30298
|
+
typeFlag(n?: NodeSyntax): string;
|
|
30299
|
+
contentStart(n?: NodeSyntax): number;
|
|
30300
|
+
contentEnd(n?: NodeSyntax): number;
|
|
30301
|
+
name(n?: NodeSyntax): string;
|
|
30302
|
+
nameStart(n?: NodeSyntax): number;
|
|
30303
|
+
nameEnd(n?: NodeSyntax): number;
|
|
30304
|
+
unescapedName(n?: NodeSyntax): string;
|
|
30305
|
+
children(n?: NodeSyntax): ComponentValue[];
|
|
30306
|
+
prelude(n?: NodeSyntax): ComponentValue[];
|
|
30307
|
+
childCount(n?: NodeSyntax): number;
|
|
30308
|
+
childAt(n: NodeSyntax, i: number): ComponentValue;
|
|
30309
|
+
/**
|
|
30310
|
+
* A block big enough to stream hands its children to the visitors as each one
|
|
30311
|
+
* finishes rather than collecting them, so both lists read as an empty block
|
|
30312
|
+
* on it — `null`, which means no block at all, is still only for the `@…;`
|
|
30313
|
+
* forms. Read a block's children from the walk, not from here.
|
|
30314
|
+
*/
|
|
30315
|
+
declarations(n?: NodeSyntax): null | DeclarationSyntax[];
|
|
30316
|
+
/**
|
|
30317
|
+
* Reads as an empty block on a streamed rule; see {@link declarations }.
|
|
30318
|
+
*/
|
|
30319
|
+
childRules(n?: NodeSyntax): null | RuleSyntax[];
|
|
30320
|
+
blockStart(n?: NodeSyntax): number;
|
|
30321
|
+
blockEnd(n?: NodeSyntax): number;
|
|
30322
|
+
important(n?: NodeSyntax): boolean;
|
|
30323
|
+
blockToken(n?: NodeSyntax): SimpleBlockToken;
|
|
30324
|
+
setEnd(n: NodeSyntax, v: number): void;
|
|
30325
|
+
setBlockEnd(n: NodeSyntax, v: number): void;
|
|
30326
|
+
};
|
|
30327
|
+
export let EMBEDDED_LANGUAGES: string[];
|
|
30328
|
+
export namespace NodeType {
|
|
30329
|
+
export let Ident: number;
|
|
30330
|
+
export let Function: number;
|
|
30331
|
+
export let AtKeyword: number;
|
|
30332
|
+
export let Hash: number;
|
|
30333
|
+
export let String: number;
|
|
30334
|
+
export let BadString: number;
|
|
30335
|
+
export let Url: number;
|
|
30336
|
+
export let BadUrl: number;
|
|
30337
|
+
export let Delim: number;
|
|
30338
|
+
export let Number: number;
|
|
30339
|
+
export let Percentage: number;
|
|
30340
|
+
export let Dimension: number;
|
|
30341
|
+
export let Whitespace: number;
|
|
30342
|
+
export let Colon: number;
|
|
30343
|
+
export let Semicolon: number;
|
|
30344
|
+
export let Comma: number;
|
|
30345
|
+
export let RightParenthesis: number;
|
|
30346
|
+
export let RightSquareBracket: number;
|
|
30347
|
+
export let RightCurlyBracket: number;
|
|
30348
|
+
export let CDO: number;
|
|
30349
|
+
export let CDC: number;
|
|
30350
|
+
export let SimpleBlock: number;
|
|
30351
|
+
export let Declaration: number;
|
|
30352
|
+
export let AtRule: number;
|
|
30353
|
+
export let QualifiedRule: number;
|
|
30354
|
+
export let Stylesheet: number;
|
|
30355
|
+
export let Comment: number;
|
|
30356
|
+
export let Raw: number;
|
|
30357
|
+
}
|
|
30358
|
+
export let TT_AT_KEYWORD: 16;
|
|
30359
|
+
export let TT_BAD_STRING_TOKEN: 4;
|
|
30360
|
+
export let TT_BAD_URL_TOKEN: 19;
|
|
30361
|
+
export let TT_CDC: 25;
|
|
30362
|
+
export let TT_CDO: 24;
|
|
30363
|
+
export let TT_COLON: 14;
|
|
30364
|
+
export let TT_COMMA: 13;
|
|
30365
|
+
export let TT_COMMENT: 1;
|
|
30366
|
+
export let TT_DELIM: 6;
|
|
30367
|
+
export let TT_DIMENSION: 23;
|
|
30368
|
+
export let TT_EOF: 26;
|
|
30369
|
+
export let TT_FUNCTION: 17;
|
|
30370
|
+
export let TT_HASH: 5;
|
|
30371
|
+
export let TT_IDENTIFIER: 20;
|
|
30372
|
+
export let TT_LEFT_CURLY_BRACKET: 9;
|
|
30373
|
+
export let TT_LEFT_PARENTHESIS: 7;
|
|
30374
|
+
export let TT_LEFT_SQUARE_BRACKET: 8;
|
|
30375
|
+
export let TT_NUMBER: 21;
|
|
30376
|
+
export let TT_PERCENTAGE: 22;
|
|
30377
|
+
export let TT_RIGHT_CURLY_BRACKET: 12;
|
|
30378
|
+
export let TT_RIGHT_PARENTHESIS: 10;
|
|
30379
|
+
export let TT_RIGHT_SQUARE_BRACKET: 11;
|
|
30380
|
+
export let TT_SEMICOLON: 15;
|
|
30381
|
+
export let TT_STRING: 3;
|
|
30382
|
+
export let TT_URL: 18;
|
|
30383
|
+
export let TT_WHITESPACE: 2;
|
|
30384
|
+
export let askEmbeddedRenderer: (
|
|
30385
|
+
render: (
|
|
30386
|
+
source: string,
|
|
30387
|
+
info: { type: string; hostType: string; as?: string }
|
|
30388
|
+
) =>
|
|
30389
|
+
| undefined
|
|
30390
|
+
| string
|
|
30391
|
+
| EmbeddedSourceResult
|
|
30392
|
+
| Promise<undefined | string | EmbeddedSourceResult>,
|
|
30393
|
+
hole: { source: string; type: string; hostType: string; as?: string },
|
|
30394
|
+
reported: EmbeddedSourceResult[]
|
|
30395
|
+
) => Promise<undefined | string | EmbeddedSourceResult>;
|
|
30396
|
+
export let buildSkipSet: (nodeTypes: number[]) => Uint8Array;
|
|
30397
|
+
export let collectEmbeddedDiagnostics: (
|
|
30398
|
+
reported: {
|
|
30399
|
+
warnings?: (string | Error)[];
|
|
30400
|
+
errors?: (string | Error)[];
|
|
30401
|
+
}[]
|
|
30402
|
+
) => { warnings?: (string | Error)[]; errors?: (string | Error)[] };
|
|
30403
|
+
export let embeddedText: (
|
|
30404
|
+
answer?: string | { code?: string }
|
|
30405
|
+
) => undefined | string;
|
|
30406
|
+
export let equalsLowerCase: (s: string, lit: string) => boolean;
|
|
30407
|
+
export let escapeIdentifier: MakeCacheableResult<string> & {
|
|
30408
|
+
bindCache: BindCache<string>;
|
|
30409
|
+
};
|
|
30410
|
+
export let isDashedIdentifier: (identifier: string) => boolean;
|
|
30411
|
+
export let isWhitespace: (cc: number) => boolean;
|
|
30412
|
+
export let normalizeUrl: (str: string, isString: boolean) => string;
|
|
30413
|
+
export let parseABlocksContents: (
|
|
30414
|
+
input: string | TokenStream,
|
|
30415
|
+
pos?: number,
|
|
30416
|
+
options?: ParseOptionsSyntax
|
|
30417
|
+
) => { decls: DeclarationSyntax[]; rules: RuleSyntax[] };
|
|
30418
|
+
export let parseACommaSeparatedListOfComponentValues: (
|
|
30419
|
+
input: string | TokenStream,
|
|
30420
|
+
pos?: number,
|
|
30421
|
+
options?: ParseOptionsSyntax
|
|
30422
|
+
) => ComponentValue[][];
|
|
30423
|
+
export let parseAComponentValue: (
|
|
30424
|
+
input: string | TokenStream,
|
|
30425
|
+
pos?: number,
|
|
30426
|
+
options?: ParseOptionsSyntax
|
|
30427
|
+
) => undefined | Token | FunctionNode | SimpleBlock;
|
|
30428
|
+
export let parseADeclaration: (
|
|
30429
|
+
input: string | TokenStream,
|
|
30430
|
+
pos?: number,
|
|
30431
|
+
options?: ParseOptionsSyntax
|
|
30432
|
+
) => undefined | DeclarationSyntax;
|
|
30433
|
+
export let parseAListOfComponentValues: (
|
|
30434
|
+
input: string | TokenStream,
|
|
30435
|
+
pos?: number,
|
|
30436
|
+
options?: ParseOptionsSyntax
|
|
30437
|
+
) => ComponentValue[];
|
|
30438
|
+
export let parseARule: (
|
|
30439
|
+
input: string | TokenStream,
|
|
30440
|
+
pos?: number,
|
|
30441
|
+
options?: ParseOptionsSyntax
|
|
30442
|
+
) => undefined | AtRule | QualifiedRule;
|
|
30443
|
+
export let parseAStylesheet: (
|
|
30444
|
+
input: string | TokenStream,
|
|
30445
|
+
pos?: number,
|
|
30446
|
+
options?: ParseOptionsSyntax
|
|
30447
|
+
) => Stylesheet;
|
|
30448
|
+
export let parseAStylesheetsContents: (
|
|
30449
|
+
input: string | TokenStream,
|
|
30450
|
+
pos?: number,
|
|
30451
|
+
options?: ParseOptionsSyntax
|
|
30452
|
+
) => RuleSyntax[];
|
|
30453
|
+
export let pickTransforms: (
|
|
30454
|
+
options: object
|
|
30455
|
+
) => undefined | CssTransformOptions;
|
|
30456
|
+
export let printer: (
|
|
30457
|
+
path: {
|
|
30458
|
+
get node(): NodeSyntax;
|
|
30459
|
+
get parent(): null | NodeSyntax;
|
|
30460
|
+
get index(): number;
|
|
30461
|
+
/**
|
|
30462
|
+
* Stop the walk descending into the current node (enter only).
|
|
30463
|
+
*/
|
|
30464
|
+
skipChildren(): void;
|
|
30465
|
+
inValue(): boolean;
|
|
30466
|
+
type(n?: NodeSyntax): number;
|
|
30467
|
+
start(n?: NodeSyntax): number;
|
|
30468
|
+
end(n?: NodeSyntax): number;
|
|
30469
|
+
range(n?: NodeSyntax): [number, number];
|
|
30470
|
+
loc(n?: NodeSyntax): {
|
|
30471
|
+
start: { line: number; column: number };
|
|
30472
|
+
end: { line: number; column: number };
|
|
30473
|
+
};
|
|
30474
|
+
source(n?: NodeSyntax): string;
|
|
30475
|
+
value(n?: NodeSyntax): string;
|
|
30476
|
+
unescaped(n?: NodeSyntax): string;
|
|
30477
|
+
typeFlag(n?: NodeSyntax): string;
|
|
30478
|
+
contentStart(n?: NodeSyntax): number;
|
|
30479
|
+
contentEnd(n?: NodeSyntax): number;
|
|
30480
|
+
name(n?: NodeSyntax): string;
|
|
30481
|
+
nameStart(n?: NodeSyntax): number;
|
|
30482
|
+
nameEnd(n?: NodeSyntax): number;
|
|
30483
|
+
unescapedName(n?: NodeSyntax): string;
|
|
30484
|
+
children(n?: NodeSyntax): ComponentValue[];
|
|
30485
|
+
prelude(n?: NodeSyntax): ComponentValue[];
|
|
30486
|
+
childCount(n?: NodeSyntax): number;
|
|
30487
|
+
childAt(n: NodeSyntax, i: number): ComponentValue;
|
|
30488
|
+
/**
|
|
30489
|
+
* A block big enough to stream hands its children to the visitors as each one
|
|
30490
|
+
* finishes rather than collecting them, so both lists read as an empty block
|
|
30491
|
+
* on it — `null`, which means no block at all, is still only for the `@…;`
|
|
30492
|
+
* forms. Read a block's children from the walk, not from here.
|
|
30493
|
+
*/
|
|
30494
|
+
declarations(n?: NodeSyntax): null | DeclarationSyntax[];
|
|
30495
|
+
/**
|
|
30496
|
+
* Reads as an empty block on a streamed rule; see {@link declarations }.
|
|
30497
|
+
*/
|
|
30498
|
+
childRules(n?: NodeSyntax): null | RuleSyntax[];
|
|
30499
|
+
blockStart(n?: NodeSyntax): number;
|
|
30500
|
+
blockEnd(n?: NodeSyntax): number;
|
|
30501
|
+
important(n?: NodeSyntax): boolean;
|
|
30502
|
+
blockToken(n?: NodeSyntax): SimpleBlockToken;
|
|
30503
|
+
setEnd(n: NodeSyntax, v: number): void;
|
|
30504
|
+
setBlockEnd(n: NodeSyntax, v: number): void;
|
|
30505
|
+
},
|
|
30506
|
+
writer: PrintContext<
|
|
30507
|
+
{
|
|
30508
|
+
get node(): NodeSyntax;
|
|
30509
|
+
get parent(): null | NodeSyntax;
|
|
30510
|
+
get index(): number;
|
|
30511
|
+
/**
|
|
30512
|
+
* Stop the walk descending into the current node (enter only).
|
|
30513
|
+
*/
|
|
30514
|
+
skipChildren(): void;
|
|
30515
|
+
inValue(): boolean;
|
|
30516
|
+
type(n?: NodeSyntax): number;
|
|
30517
|
+
start(n?: NodeSyntax): number;
|
|
30518
|
+
end(n?: NodeSyntax): number;
|
|
30519
|
+
range(n?: NodeSyntax): [number, number];
|
|
30520
|
+
loc(n?: NodeSyntax): {
|
|
30521
|
+
start: { line: number; column: number };
|
|
30522
|
+
end: { line: number; column: number };
|
|
30523
|
+
};
|
|
30524
|
+
source(n?: NodeSyntax): string;
|
|
30525
|
+
value(n?: NodeSyntax): string;
|
|
30526
|
+
unescaped(n?: NodeSyntax): string;
|
|
30527
|
+
typeFlag(n?: NodeSyntax): string;
|
|
30528
|
+
contentStart(n?: NodeSyntax): number;
|
|
30529
|
+
contentEnd(n?: NodeSyntax): number;
|
|
30530
|
+
name(n?: NodeSyntax): string;
|
|
30531
|
+
nameStart(n?: NodeSyntax): number;
|
|
30532
|
+
nameEnd(n?: NodeSyntax): number;
|
|
30533
|
+
unescapedName(n?: NodeSyntax): string;
|
|
30534
|
+
children(n?: NodeSyntax): ComponentValue[];
|
|
30535
|
+
prelude(n?: NodeSyntax): ComponentValue[];
|
|
30536
|
+
childCount(n?: NodeSyntax): number;
|
|
30537
|
+
childAt(n: NodeSyntax, i: number): ComponentValue;
|
|
30538
|
+
/**
|
|
30539
|
+
* A block big enough to stream hands its children to the visitors as each one
|
|
30540
|
+
* finishes rather than collecting them, so both lists read as an empty block
|
|
30541
|
+
* on it — `null`, which means no block at all, is still only for the `@…;`
|
|
30542
|
+
* forms. Read a block's children from the walk, not from here.
|
|
30543
|
+
*/
|
|
30544
|
+
declarations(n?: NodeSyntax): null | DeclarationSyntax[];
|
|
30545
|
+
/**
|
|
30546
|
+
* Reads as an empty block on a streamed rule; see {@link declarations }.
|
|
30547
|
+
*/
|
|
30548
|
+
childRules(n?: NodeSyntax): null | RuleSyntax[];
|
|
30549
|
+
blockStart(n?: NodeSyntax): number;
|
|
30550
|
+
blockEnd(n?: NodeSyntax): number;
|
|
30551
|
+
important(n?: NodeSyntax): boolean;
|
|
30552
|
+
blockToken(n?: NodeSyntax): SimpleBlockToken;
|
|
30553
|
+
setEnd(n: NodeSyntax, v: number): void;
|
|
30554
|
+
setBlockEnd(n: NodeSyntax, v: number): void;
|
|
30555
|
+
},
|
|
30556
|
+
NodeSyntax,
|
|
30557
|
+
CssPrintOptions
|
|
30558
|
+
>
|
|
30559
|
+
) => string;
|
|
30560
|
+
export let rangeEquals: (
|
|
30561
|
+
input: string,
|
|
30562
|
+
start: number,
|
|
30563
|
+
end: number,
|
|
30564
|
+
lit: string
|
|
30565
|
+
) => boolean;
|
|
30566
|
+
export let rangeEqualsLowerCase: (
|
|
30567
|
+
input: string,
|
|
30568
|
+
start: number,
|
|
30569
|
+
end: number,
|
|
30570
|
+
lit: string
|
|
30571
|
+
) => boolean;
|
|
30572
|
+
export let readToken: (
|
|
30573
|
+
input: string,
|
|
30574
|
+
pos: number,
|
|
30575
|
+
out: MutableToken
|
|
30576
|
+
) => undefined | MutableToken;
|
|
30577
|
+
export let skipEscape: (input: string, pos: number) => number;
|
|
30578
|
+
export let toLowerCaseIfNeeded: (s: string) => string;
|
|
30579
|
+
export let unescapeIdentifier: MakeCacheableResult<string> & {
|
|
30580
|
+
bindCache: BindCache<string>;
|
|
30581
|
+
};
|
|
30582
|
+
export { SourceProcessorSyntaxClass_2 as SourceProcessor, TokenStream };
|
|
30583
|
+
}
|
|
28187
30584
|
export { CssModulesPlugin };
|
|
28188
30585
|
}
|
|
28189
30586
|
export namespace html {
|
|
30587
|
+
export namespace syntax {
|
|
30588
|
+
export let A: {
|
|
30589
|
+
get node(): number;
|
|
30590
|
+
get parent(): null | number;
|
|
30591
|
+
/**
|
|
30592
|
+
* Stop the walk descending into the current node (enter only).
|
|
30593
|
+
*/
|
|
30594
|
+
skipChildren(): void;
|
|
30595
|
+
type(n?: number): number;
|
|
30596
|
+
start(n?: number): number;
|
|
30597
|
+
end(n?: number): number;
|
|
30598
|
+
/**
|
|
30599
|
+
* Raw source slice `[start, end)` — valid only during the walk (the printer's
|
|
30600
|
+
* window), before `parseHtml` releases `_htmlSource`.
|
|
30601
|
+
*/
|
|
30602
|
+
source(n?: number): string;
|
|
30603
|
+
sourceSpanAt(from: number, to: number): string;
|
|
30604
|
+
tagName(n?: number): string;
|
|
30605
|
+
namespace(n?: number): number;
|
|
30606
|
+
selfClosing(n?: number): boolean;
|
|
30607
|
+
attributes(n?: number): HtmlAttribute[];
|
|
30608
|
+
attributeCount(n?: number): number;
|
|
30609
|
+
/**
|
|
30610
|
+
* The i-th attribute of an element, as an id for the `attribute*` reads.
|
|
30611
|
+
*/
|
|
30612
|
+
attributeAt(i: number, n?: number): number;
|
|
30613
|
+
/**
|
|
30614
|
+
* Linear lookup by (lowercased) name.
|
|
30615
|
+
*/
|
|
30616
|
+
findAttribute(name: string, n?: number): number;
|
|
30617
|
+
attributeName(a: number): string;
|
|
30618
|
+
attributeValue(a: number): string;
|
|
30619
|
+
attributeNameStart(a: number): number;
|
|
30620
|
+
attributeNameEnd(a: number): number;
|
|
30621
|
+
attributeValueStart(a: number): number;
|
|
30622
|
+
attributeValueEnd(a: number): number;
|
|
30623
|
+
tagEnd(n?: number): number;
|
|
30624
|
+
nameEnd(n?: number): number;
|
|
30625
|
+
/**
|
|
30626
|
+
* Whether the source wrote this element's end tag rather than the parser
|
|
30627
|
+
* popping it for an implied close. Read back off the range instead of marked
|
|
30628
|
+
* during the parse: an element's end spans the token that closed it, so its
|
|
30629
|
+
* own end tag is the last thing in it — and only the few elements around a
|
|
30630
|
+
* region printed from source ever ask.
|
|
30631
|
+
*/
|
|
30632
|
+
sourceClosed(n?: number): boolean;
|
|
30633
|
+
openTag(n?: number): string;
|
|
30634
|
+
/**
|
|
30635
|
+
* An element's end tag, generated as `</name>` from the opening tag's own name
|
|
30636
|
+
* (exact source casing, correct for foreign camelCase elements). Generated, not
|
|
30637
|
+
* sliced: element `end` offsets don't span the end tag, and an omitted optional
|
|
30638
|
+
* end tag (`<li>`, `<p>`, …) still serializes to the same DOM. `""` when the
|
|
30639
|
+
* parser inserted the element, as {@link openTag } does — it has no name in the
|
|
30640
|
+
* source to echo, and slicing one would spell `</>`.
|
|
30641
|
+
*/
|
|
30642
|
+
closeTag(n?: number): string;
|
|
30643
|
+
contentEnd(n?: number): number;
|
|
30644
|
+
templateContent(n?: number): number;
|
|
30645
|
+
data(n?: number): string;
|
|
30646
|
+
piTarget(n?: number): string;
|
|
30647
|
+
doctypeName(n?: number): string;
|
|
30648
|
+
doctypePublicId(_n?: number): null | string;
|
|
30649
|
+
doctypeSystemId(_n?: number): null | string;
|
|
30650
|
+
firstChild(n?: number): number;
|
|
30651
|
+
nextSibling(n?: number): number;
|
|
30652
|
+
parentOf(n?: number): number;
|
|
30653
|
+
children(n?: number): number[];
|
|
30654
|
+
};
|
|
30655
|
+
export let EMBEDDED_LANGUAGES: string[];
|
|
30656
|
+
export let NS_HTML: 0;
|
|
30657
|
+
export let NS_MATHML: 1;
|
|
30658
|
+
export let NS_SVG: 2;
|
|
30659
|
+
export namespace NodeType {
|
|
30660
|
+
export let Document: 1;
|
|
30661
|
+
export let DocumentFragment: 2;
|
|
30662
|
+
export let Element: 3;
|
|
30663
|
+
export let Text: 4;
|
|
30664
|
+
export let Comment: 5;
|
|
30665
|
+
export let Doctype: 6;
|
|
30666
|
+
export let ProcessingInstruction: 7;
|
|
30667
|
+
}
|
|
30668
|
+
export let QUOTE_DOUBLE: 1;
|
|
30669
|
+
export let QUOTE_NONE: 0;
|
|
30670
|
+
export let QUOTE_SINGLE: 2;
|
|
30671
|
+
export let SVG_TAG_ADJUST: Record<string, string>;
|
|
30672
|
+
export let askEmbeddedRenderer: (
|
|
30673
|
+
render: (
|
|
30674
|
+
source: string,
|
|
30675
|
+
info: { type: string; hostType: string; as?: string }
|
|
30676
|
+
) =>
|
|
30677
|
+
| undefined
|
|
30678
|
+
| string
|
|
30679
|
+
| EmbeddedSourceResult
|
|
30680
|
+
| Promise<undefined | string | EmbeddedSourceResult>,
|
|
30681
|
+
hole: { source: string; type: string; hostType: string; as?: string },
|
|
30682
|
+
reported: EmbeddedSourceResult[]
|
|
30683
|
+
) => Promise<undefined | string | EmbeddedSourceResult>;
|
|
30684
|
+
export let baseTag: (
|
|
30685
|
+
base:
|
|
30686
|
+
| string
|
|
30687
|
+
| {
|
|
30688
|
+
/**
|
|
30689
|
+
* Value for the `href` attribute of the `<base>` element.
|
|
30690
|
+
*/
|
|
30691
|
+
href: string;
|
|
30692
|
+
/**
|
|
30693
|
+
* Value for the `target` attribute of the `<base>` element (e.g. `"_blank"`).
|
|
30694
|
+
*/
|
|
30695
|
+
target?: string;
|
|
30696
|
+
}
|
|
30697
|
+
) => string;
|
|
30698
|
+
export let buildHeadTags: (opts: OutputHtmlOptions) => string;
|
|
30699
|
+
export let collectEmbeddedDiagnostics: (
|
|
30700
|
+
reported: {
|
|
30701
|
+
warnings?: (string | Error)[];
|
|
30702
|
+
errors?: (string | Error)[];
|
|
30703
|
+
}[]
|
|
30704
|
+
) => { warnings?: (string | Error)[]; errors?: (string | Error)[] };
|
|
30705
|
+
export let decodeEntities: _functionSyntax;
|
|
30706
|
+
export let embeddedText: (
|
|
30707
|
+
answer?: string | { code?: string }
|
|
30708
|
+
) => undefined | string;
|
|
30709
|
+
export let escapeAttribute: (
|
|
30710
|
+
s: string,
|
|
30711
|
+
delimiter?: number,
|
|
30712
|
+
minimal?: boolean
|
|
30713
|
+
) => string;
|
|
30714
|
+
export let escapeText: (s: string) => string;
|
|
30715
|
+
export let isAsciiWhitespace: (cc: number) => boolean;
|
|
30716
|
+
export let metaTag: (name: string, content: string) => string;
|
|
30717
|
+
export let parseCssUrls: (input: string) => [string, number, number][];
|
|
30718
|
+
export let parseHtml: (
|
|
30719
|
+
input: string,
|
|
30720
|
+
pos?: number,
|
|
30721
|
+
options?: HtmlParseOptions
|
|
30722
|
+
) => number;
|
|
30723
|
+
export let parseMsapplicationTask: (
|
|
30724
|
+
input: string
|
|
30725
|
+
) => [string, number, number][];
|
|
30726
|
+
export let parseSrc: (input: string) => [string, number, number][];
|
|
30727
|
+
export let parseSrcset: (input: string) => [string, number, number][];
|
|
30728
|
+
export let pickTransforms: (
|
|
30729
|
+
options: object
|
|
30730
|
+
) => undefined | HtmlTransformOptions;
|
|
30731
|
+
export let printer: (
|
|
30732
|
+
path: {
|
|
30733
|
+
get node(): number;
|
|
30734
|
+
get parent(): null | number;
|
|
30735
|
+
/**
|
|
30736
|
+
* Stop the walk descending into the current node (enter only).
|
|
30737
|
+
*/
|
|
30738
|
+
skipChildren(): void;
|
|
30739
|
+
type(n?: number): number;
|
|
30740
|
+
start(n?: number): number;
|
|
30741
|
+
end(n?: number): number;
|
|
30742
|
+
/**
|
|
30743
|
+
* Raw source slice `[start, end)` — valid only during the walk (the printer's
|
|
30744
|
+
* window), before `parseHtml` releases `_htmlSource`.
|
|
30745
|
+
*/
|
|
30746
|
+
source(n?: number): string;
|
|
30747
|
+
sourceSpanAt(from: number, to: number): string;
|
|
30748
|
+
tagName(n?: number): string;
|
|
30749
|
+
namespace(n?: number): number;
|
|
30750
|
+
selfClosing(n?: number): boolean;
|
|
30751
|
+
attributes(n?: number): HtmlAttribute[];
|
|
30752
|
+
attributeCount(n?: number): number;
|
|
30753
|
+
/**
|
|
30754
|
+
* The i-th attribute of an element, as an id for the `attribute*` reads.
|
|
30755
|
+
*/
|
|
30756
|
+
attributeAt(i: number, n?: number): number;
|
|
30757
|
+
/**
|
|
30758
|
+
* Linear lookup by (lowercased) name.
|
|
30759
|
+
*/
|
|
30760
|
+
findAttribute(name: string, n?: number): number;
|
|
30761
|
+
attributeName(a: number): string;
|
|
30762
|
+
attributeValue(a: number): string;
|
|
30763
|
+
attributeNameStart(a: number): number;
|
|
30764
|
+
attributeNameEnd(a: number): number;
|
|
30765
|
+
attributeValueStart(a: number): number;
|
|
30766
|
+
attributeValueEnd(a: number): number;
|
|
30767
|
+
tagEnd(n?: number): number;
|
|
30768
|
+
nameEnd(n?: number): number;
|
|
30769
|
+
/**
|
|
30770
|
+
* Whether the source wrote this element's end tag rather than the parser
|
|
30771
|
+
* popping it for an implied close. Read back off the range instead of marked
|
|
30772
|
+
* during the parse: an element's end spans the token that closed it, so its
|
|
30773
|
+
* own end tag is the last thing in it — and only the few elements around a
|
|
30774
|
+
* region printed from source ever ask.
|
|
30775
|
+
*/
|
|
30776
|
+
sourceClosed(n?: number): boolean;
|
|
30777
|
+
openTag(n?: number): string;
|
|
30778
|
+
/**
|
|
30779
|
+
* An element's end tag, generated as `</name>` from the opening tag's own name
|
|
30780
|
+
* (exact source casing, correct for foreign camelCase elements). Generated, not
|
|
30781
|
+
* sliced: element `end` offsets don't span the end tag, and an omitted optional
|
|
30782
|
+
* end tag (`<li>`, `<p>`, …) still serializes to the same DOM. `""` when the
|
|
30783
|
+
* parser inserted the element, as {@link openTag } does — it has no name in the
|
|
30784
|
+
* source to echo, and slicing one would spell `</>`.
|
|
30785
|
+
*/
|
|
30786
|
+
closeTag(n?: number): string;
|
|
30787
|
+
contentEnd(n?: number): number;
|
|
30788
|
+
templateContent(n?: number): number;
|
|
30789
|
+
data(n?: number): string;
|
|
30790
|
+
piTarget(n?: number): string;
|
|
30791
|
+
doctypeName(n?: number): string;
|
|
30792
|
+
doctypePublicId(_n?: number): null | string;
|
|
30793
|
+
doctypeSystemId(_n?: number): null | string;
|
|
30794
|
+
firstChild(n?: number): number;
|
|
30795
|
+
nextSibling(n?: number): number;
|
|
30796
|
+
parentOf(n?: number): number;
|
|
30797
|
+
children(n?: number): number[];
|
|
30798
|
+
},
|
|
30799
|
+
writer: PrintContext<
|
|
30800
|
+
{
|
|
30801
|
+
get node(): number;
|
|
30802
|
+
get parent(): null | number;
|
|
30803
|
+
/**
|
|
30804
|
+
* Stop the walk descending into the current node (enter only).
|
|
30805
|
+
*/
|
|
30806
|
+
skipChildren(): void;
|
|
30807
|
+
type(n?: number): number;
|
|
30808
|
+
start(n?: number): number;
|
|
30809
|
+
end(n?: number): number;
|
|
30810
|
+
/**
|
|
30811
|
+
* Raw source slice `[start, end)` — valid only during the walk (the printer's
|
|
30812
|
+
* window), before `parseHtml` releases `_htmlSource`.
|
|
30813
|
+
*/
|
|
30814
|
+
source(n?: number): string;
|
|
30815
|
+
sourceSpanAt(from: number, to: number): string;
|
|
30816
|
+
tagName(n?: number): string;
|
|
30817
|
+
namespace(n?: number): number;
|
|
30818
|
+
selfClosing(n?: number): boolean;
|
|
30819
|
+
attributes(n?: number): HtmlAttribute[];
|
|
30820
|
+
attributeCount(n?: number): number;
|
|
30821
|
+
/**
|
|
30822
|
+
* The i-th attribute of an element, as an id for the `attribute*` reads.
|
|
30823
|
+
*/
|
|
30824
|
+
attributeAt(i: number, n?: number): number;
|
|
30825
|
+
/**
|
|
30826
|
+
* Linear lookup by (lowercased) name.
|
|
30827
|
+
*/
|
|
30828
|
+
findAttribute(name: string, n?: number): number;
|
|
30829
|
+
attributeName(a: number): string;
|
|
30830
|
+
attributeValue(a: number): string;
|
|
30831
|
+
attributeNameStart(a: number): number;
|
|
30832
|
+
attributeNameEnd(a: number): number;
|
|
30833
|
+
attributeValueStart(a: number): number;
|
|
30834
|
+
attributeValueEnd(a: number): number;
|
|
30835
|
+
tagEnd(n?: number): number;
|
|
30836
|
+
nameEnd(n?: number): number;
|
|
30837
|
+
/**
|
|
30838
|
+
* Whether the source wrote this element's end tag rather than the parser
|
|
30839
|
+
* popping it for an implied close. Read back off the range instead of marked
|
|
30840
|
+
* during the parse: an element's end spans the token that closed it, so its
|
|
30841
|
+
* own end tag is the last thing in it — and only the few elements around a
|
|
30842
|
+
* region printed from source ever ask.
|
|
30843
|
+
*/
|
|
30844
|
+
sourceClosed(n?: number): boolean;
|
|
30845
|
+
openTag(n?: number): string;
|
|
30846
|
+
/**
|
|
30847
|
+
* An element's end tag, generated as `</name>` from the opening tag's own name
|
|
30848
|
+
* (exact source casing, correct for foreign camelCase elements). Generated, not
|
|
30849
|
+
* sliced: element `end` offsets don't span the end tag, and an omitted optional
|
|
30850
|
+
* end tag (`<li>`, `<p>`, …) still serializes to the same DOM. `""` when the
|
|
30851
|
+
* parser inserted the element, as {@link openTag } does — it has no name in the
|
|
30852
|
+
* source to echo, and slicing one would spell `</>`.
|
|
30853
|
+
*/
|
|
30854
|
+
closeTag(n?: number): string;
|
|
30855
|
+
contentEnd(n?: number): number;
|
|
30856
|
+
templateContent(n?: number): number;
|
|
30857
|
+
data(n?: number): string;
|
|
30858
|
+
piTarget(n?: number): string;
|
|
30859
|
+
doctypeName(n?: number): string;
|
|
30860
|
+
doctypePublicId(_n?: number): null | string;
|
|
30861
|
+
doctypeSystemId(_n?: number): null | string;
|
|
30862
|
+
firstChild(n?: number): number;
|
|
30863
|
+
nextSibling(n?: number): number;
|
|
30864
|
+
parentOf(n?: number): number;
|
|
30865
|
+
children(n?: number): number[];
|
|
30866
|
+
},
|
|
30867
|
+
number,
|
|
30868
|
+
HtmlPrintOptions
|
|
30869
|
+
>
|
|
30870
|
+
) => string;
|
|
30871
|
+
export let tokenize: (
|
|
30872
|
+
input: string,
|
|
30873
|
+
pos?: number,
|
|
30874
|
+
callbacks?: HtmlTokenCallbacks
|
|
30875
|
+
) => number;
|
|
30876
|
+
export { SourceProcessorSyntaxClass_1 as SourceProcessor };
|
|
30877
|
+
}
|
|
28190
30878
|
export { HtmlModulesPlugin };
|
|
28191
30879
|
}
|
|
28192
30880
|
export namespace library {
|
|
@@ -28233,6 +30921,7 @@ declare namespace exports {
|
|
|
28233
30921
|
export let compareChunksNatural: (
|
|
28234
30922
|
chunkGraph: ChunkGraph
|
|
28235
30923
|
) => Comparator<Chunk>;
|
|
30924
|
+
export let compareErrors: Comparator<Error>;
|
|
28236
30925
|
export let compareIds: (
|
|
28237
30926
|
a: string | number,
|
|
28238
30927
|
b: string | number
|
|
@@ -28449,7 +31138,8 @@ declare namespace exports {
|
|
|
28449
31138
|
| string
|
|
28450
31139
|
| boolean
|
|
28451
31140
|
| string[]
|
|
28452
|
-
|
|
|
31141
|
+
| ExternalItemValueObject
|
|
31142
|
+
| ExternalItemValueWithOptions
|
|
28453
31143
|
) => void
|
|
28454
31144
|
) => void;
|
|
28455
31145
|
export type ExternalItemFunctionDataGetResolve = (
|
|
@@ -28486,9 +31176,9 @@ declare namespace exports {
|
|
|
28486
31176
|
argv: Record<string, any>
|
|
28487
31177
|
) => MaybePromise<Configuration | MultiConfiguration>;
|
|
28488
31178
|
export type ObjectSerializerContext =
|
|
28489
|
-
typeof
|
|
31179
|
+
typeof ObjectSerializerContextObjectMiddlewareObject_2;
|
|
28490
31180
|
export type ObjectDeserializerContext =
|
|
28491
|
-
typeof
|
|
31181
|
+
typeof ObjectDeserializerContextObjectMiddlewareObject_1;
|
|
28492
31182
|
export {
|
|
28493
31183
|
AutomaticPrefetchPlugin,
|
|
28494
31184
|
AsyncDependenciesBlock,
|