webpack 5.76.1 → 5.88.2
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.
Potentially problematic release.
This version of webpack might be problematic. Click here for more details.
- package/README.md +10 -4
- package/bin/webpack.js +26 -2
- package/hot/dev-server.js +2 -1
- package/hot/lazy-compilation-node.js +10 -0
- package/hot/lazy-compilation-web.js +9 -0
- package/hot/log-apply-result.js +5 -0
- package/hot/log.js +22 -0
- package/hot/only-dev-server.js +2 -1
- package/hot/poll.js +3 -0
- package/hot/signal.js +4 -0
- package/lib/APIPlugin.js +174 -116
- package/lib/AsyncDependenciesBlock.js +13 -5
- package/lib/AutomaticPrefetchPlugin.js +1 -0
- package/lib/BannerPlugin.js +6 -1
- package/lib/CacheFacade.js +4 -0
- package/lib/CaseSensitiveModulesWarning.js +3 -1
- package/lib/Chunk.js +36 -18
- package/lib/ChunkGraph.js +4 -4
- package/lib/ChunkGroup.js +25 -10
- package/lib/CleanPlugin.js +30 -7
- package/lib/CodeGenerationResults.js +2 -2
- package/lib/CompatibilityPlugin.js +85 -46
- package/lib/Compilation.js +17 -8
- package/lib/Compiler.js +18 -14
- package/lib/ConcatenationScope.js +2 -2
- package/lib/ConditionalInitFragment.js +11 -1
- package/lib/ConstPlugin.js +95 -47
- package/lib/ContextModule.js +20 -6
- package/lib/ContextModuleFactory.js +2 -1
- package/lib/ContextReplacementPlugin.js +13 -0
- package/lib/CssModule.js +169 -0
- package/lib/DefinePlugin.js +152 -86
- package/lib/DelegatedModule.js +22 -4
- package/lib/DelegatedModuleFactoryPlugin.js +6 -0
- package/lib/DependenciesBlock.js +17 -1
- package/lib/Dependency.js +19 -5
- package/lib/DependencyTemplates.js +1 -1
- package/lib/DllEntryPlugin.js +16 -1
- package/lib/DllModule.js +17 -2
- package/lib/DllModuleFactory.js +1 -1
- package/lib/DllReferencePlugin.js +13 -1
- package/lib/Entrypoint.js +1 -1
- package/lib/ErrorHelpers.js +62 -22
- package/lib/EvalSourceMapDevToolPlugin.js +9 -2
- package/lib/ExportsInfo.js +25 -4
- package/lib/ExportsInfoApiPlugin.js +30 -14
- package/lib/ExternalModule.js +30 -9
- package/lib/FileSystemInfo.js +61 -25
- package/lib/FlagAllModulesAsUsedPlugin.js +27 -27
- package/lib/FlagDependencyExportsPlugin.js +336 -348
- package/lib/FlagDependencyUsagePlugin.js +9 -9
- package/lib/FlagEntryExportAsUsedPlugin.js +26 -23
- package/lib/Generator.js +7 -0
- package/lib/HookWebpackError.js +1 -1
- package/lib/HotModuleReplacementPlugin.js +60 -46
- package/lib/IgnoreErrorModuleFactory.js +1 -1
- package/lib/InitFragment.js +28 -5
- package/lib/JavascriptMetaInfoPlugin.js +27 -15
- package/lib/LibManifestPlugin.js +22 -5
- package/lib/LoaderOptionsPlugin.js +12 -2
- package/lib/MainTemplate.js +2 -2
- package/lib/Module.js +44 -12
- package/lib/ModuleBuildError.js +9 -0
- package/lib/ModuleDependencyError.js +4 -2
- package/lib/ModuleDependencyWarning.js +4 -2
- package/lib/ModuleError.js +9 -0
- package/lib/ModuleFactory.js +1 -1
- package/lib/ModuleFilenameHelpers.js +114 -4
- package/lib/ModuleGraph.js +33 -23
- package/lib/ModuleGraphConnection.js +19 -6
- package/lib/ModuleInfoHeaderPlugin.js +9 -2
- package/lib/ModuleNotFoundError.js +5 -2
- package/lib/ModuleParseError.js +9 -0
- package/lib/ModuleProfile.js +1 -0
- package/lib/ModuleRestoreError.js +2 -0
- package/lib/ModuleStoreError.js +2 -1
- package/lib/ModuleTypeConstants.js +169 -0
- package/lib/ModuleWarning.js +9 -0
- package/lib/MultiWatching.js +4 -0
- package/lib/NodeStuffPlugin.js +65 -35
- package/lib/NormalModule.js +12 -2
- package/lib/NormalModuleFactory.js +56 -8
- package/lib/NormalModuleReplacementPlugin.js +5 -3
- package/lib/NullFactory.js +1 -1
- package/lib/PrefetchPlugin.js +4 -0
- package/lib/ProgressPlugin.js +71 -15
- package/lib/ProvidePlugin.js +30 -14
- package/lib/RawModule.js +13 -2
- package/lib/RecordIdsPlugin.js +4 -4
- package/lib/RequireJsStuffPlugin.js +22 -15
- package/lib/RuntimeGlobals.js +5 -0
- package/lib/RuntimeModule.js +12 -11
- package/lib/RuntimePlugin.js +10 -3
- package/lib/RuntimeTemplate.js +29 -11
- package/lib/SelfModuleFactory.js +12 -0
- package/lib/SourceMapDevToolModuleOptionsPlugin.js +4 -0
- package/lib/SourceMapDevToolPlugin.js +47 -11
- package/lib/Template.js +5 -3
- package/lib/UseStrictPlugin.js +29 -11
- package/lib/WarnCaseSensitiveModulesPlugin.js +12 -0
- package/lib/WarnDeprecatedOptionPlugin.js +7 -0
- package/lib/WatchIgnorePlugin.js +4 -0
- package/lib/Watching.js +62 -25
- package/lib/WebpackError.js +14 -5
- package/lib/WebpackIsIncludedPlugin.js +22 -13
- package/lib/WebpackOptionsApply.js +41 -44
- package/lib/WebpackOptionsDefaulter.js +10 -3
- package/lib/asset/AssetGenerator.js +24 -9
- package/lib/asset/AssetModulesPlugin.js +28 -12
- package/lib/asset/AssetParser.js +15 -7
- package/lib/asset/AssetSourceParser.js +8 -3
- package/lib/asset/RawDataUrlModule.js +15 -4
- package/lib/async-modules/AwaitDependenciesInitFragment.js +4 -0
- package/lib/async-modules/InferAsyncModulesPlugin.js +1 -1
- package/lib/buildChunkGraph.js +37 -21
- package/lib/cache/IdleFileCachePlugin.js +2 -1
- package/lib/cache/MemoryWithGcCachePlugin.js +2 -0
- package/lib/cache/PackFileCacheStrategy.js +59 -22
- package/lib/cache/ResolverCachePlugin.js +3 -0
- package/lib/config/browserslistTargetHandler.js +10 -10
- package/lib/config/defaults.js +306 -105
- package/lib/config/normalization.js +110 -71
- package/lib/config/target.js +37 -10
- package/lib/container/ContainerEntryModule.js +11 -1
- package/lib/container/ContainerEntryModuleFactory.js +1 -1
- package/lib/container/ContainerExposedDependency.js +9 -0
- package/lib/container/ContainerPlugin.js +3 -1
- package/lib/container/FallbackDependency.js +13 -0
- package/lib/container/FallbackItemDependency.js +3 -0
- package/lib/container/FallbackModule.js +12 -2
- package/lib/container/FallbackModuleFactory.js +1 -1
- package/lib/container/RemoteModule.js +11 -1
- package/lib/container/RemoteRuntimeModule.js +3 -2
- package/lib/container/RemoteToExternalDependency.js +3 -0
- package/lib/css/CssExportsGenerator.js +9 -0
- package/lib/css/CssGenerator.js +5 -1
- package/lib/css/CssLoadingRuntimeModule.js +53 -22
- package/lib/css/CssModulesPlugin.js +253 -74
- package/lib/css/CssParser.js +697 -282
- package/lib/css/walkCssTokens.js +269 -138
- package/lib/debug/ProfilingPlugin.js +33 -12
- package/lib/dependencies/AMDDefineDependency.js +54 -10
- package/lib/dependencies/AMDDefineDependencyParserPlugin.js +13 -2
- package/lib/dependencies/AMDPlugin.js +33 -20
- package/lib/dependencies/AMDRequireArrayDependency.js +13 -0
- package/lib/dependencies/AMDRequireContextDependency.js +15 -0
- package/lib/dependencies/AMDRequireDependenciesBlock.js +6 -0
- package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +8 -2
- package/lib/dependencies/AMDRequireDependency.js +16 -1
- package/lib/dependencies/AMDRequireItemDependency.js +6 -0
- package/lib/dependencies/AMDRuntimeModules.js +2 -2
- package/lib/dependencies/CachedConstDependency.js +14 -0
- package/lib/dependencies/CommonJsDependencyHelpers.js +9 -0
- package/lib/dependencies/CommonJsExportRequireDependency.js +19 -0
- package/lib/dependencies/CommonJsExportsDependency.js +16 -0
- package/lib/dependencies/CommonJsExportsParserPlugin.js +77 -5
- package/lib/dependencies/CommonJsFullRequireDependency.js +10 -1
- package/lib/dependencies/CommonJsImportsParserPlugin.js +174 -63
- package/lib/dependencies/CommonJsPlugin.js +51 -26
- package/lib/dependencies/CommonJsRequireContextDependency.js +17 -0
- package/lib/dependencies/CommonJsRequireDependency.js +7 -0
- package/lib/dependencies/CommonJsSelfReferenceDependency.js +16 -0
- package/lib/dependencies/ConstDependency.js +11 -2
- package/lib/dependencies/ContextDependency.js +15 -2
- package/lib/dependencies/ContextDependencyHelpers.js +3 -3
- package/lib/dependencies/ContextElementDependency.js +8 -0
- package/lib/dependencies/CreateScriptUrlDependency.js +10 -1
- package/lib/dependencies/CriticalDependencyWarning.js +3 -0
- package/lib/dependencies/CssExportDependency.js +8 -0
- package/lib/dependencies/CssImportDependency.js +55 -3
- package/lib/dependencies/CssLocalIdentifierDependency.js +18 -1
- package/lib/dependencies/CssSelfLocalIdentifierDependency.js +10 -1
- package/lib/dependencies/CssUrlDependency.js +46 -16
- package/lib/dependencies/DelegatedSourceDependency.js +3 -0
- package/lib/dependencies/DllEntryDependency.js +14 -0
- package/lib/dependencies/DynamicExports.js +10 -6
- package/lib/dependencies/ExportsInfoDependency.js +25 -4
- package/lib/dependencies/HarmonyAcceptDependency.js +10 -1
- package/lib/dependencies/HarmonyAcceptImportDependency.js +3 -0
- package/lib/dependencies/HarmonyCompatibilityDependency.js +2 -1
- package/lib/dependencies/HarmonyDetectionParserPlugin.js +22 -2
- package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +32 -6
- package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +5 -0
- package/lib/dependencies/HarmonyExportExpressionDependency.js +20 -3
- package/lib/dependencies/HarmonyExportHeaderDependency.js +13 -0
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +22 -6
- package/lib/dependencies/HarmonyExportInitFragment.js +2 -1
- package/lib/dependencies/HarmonyExportSpecifierDependency.js +12 -0
- package/lib/dependencies/HarmonyExports.js +11 -5
- package/lib/dependencies/HarmonyImportDependency.js +10 -1
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +53 -22
- package/lib/dependencies/HarmonyImportSideEffectDependency.js +7 -2
- package/lib/dependencies/HarmonyImportSpecifierDependency.js +139 -16
- package/lib/dependencies/HarmonyModulesPlugin.js +23 -5
- package/lib/dependencies/HarmonyTopLevelThisParserPlugin.js +15 -3
- package/lib/dependencies/ImportContextDependency.js +15 -0
- package/lib/dependencies/ImportDependency.js +15 -4
- package/lib/dependencies/ImportEagerDependency.js +7 -4
- package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +51 -13
- package/lib/dependencies/ImportMetaContextPlugin.js +18 -5
- package/lib/dependencies/ImportMetaHotAcceptDependency.js +6 -0
- package/lib/dependencies/ImportMetaHotDeclineDependency.js +6 -0
- package/lib/dependencies/ImportMetaPlugin.js +103 -51
- package/lib/dependencies/ImportParserPlugin.js +83 -25
- package/lib/dependencies/ImportPlugin.js +21 -7
- package/lib/dependencies/ImportWeakDependency.js +7 -4
- package/lib/dependencies/JsonExportsDependency.js +9 -1
- package/lib/dependencies/LocalModule.js +16 -0
- package/lib/dependencies/LocalModuleDependency.js +15 -0
- package/lib/dependencies/LocalModulesHelpers.js +18 -0
- package/lib/dependencies/ModuleDecoratorDependency.js +8 -0
- package/lib/dependencies/ModuleDependency.js +9 -1
- package/lib/dependencies/ModuleDependencyTemplateAsId.js +2 -1
- package/lib/dependencies/ModuleHotAcceptDependency.js +6 -0
- package/lib/dependencies/ModuleHotDeclineDependency.js +6 -0
- package/lib/dependencies/PrefetchDependency.js +3 -0
- package/lib/dependencies/ProvidedDependency.js +14 -2
- package/lib/dependencies/PureExpressionDependency.js +10 -1
- package/lib/dependencies/RequireContextDependency.js +6 -0
- package/lib/dependencies/RequireContextDependencyParserPlugin.js +13 -5
- package/lib/dependencies/RequireContextPlugin.js +19 -6
- package/lib/dependencies/RequireEnsureDependenciesBlock.js +7 -0
- package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +6 -1
- package/lib/dependencies/RequireEnsureDependency.js +16 -2
- package/lib/dependencies/RequireEnsureItemDependency.js +3 -0
- package/lib/dependencies/RequireEnsurePlugin.js +27 -7
- package/lib/dependencies/RequireHeaderDependency.js +14 -1
- package/lib/dependencies/RequireIncludeDependency.js +5 -0
- package/lib/dependencies/RequireIncludeDependencyParserPlugin.js +29 -5
- package/lib/dependencies/RequireIncludePlugin.js +25 -5
- package/lib/dependencies/RequireResolveContextDependency.js +17 -0
- package/lib/dependencies/RequireResolveDependency.js +6 -0
- package/lib/dependencies/RequireResolveHeaderDependency.js +18 -0
- package/lib/dependencies/RuntimeRequirementsDependency.js +8 -0
- package/lib/dependencies/StaticExportsDependency.js +8 -0
- package/lib/dependencies/SystemPlugin.js +48 -21
- package/lib/dependencies/SystemRuntimeModule.js +1 -1
- package/lib/dependencies/URLDependency.js +13 -4
- package/lib/dependencies/URLPlugin.js +31 -18
- package/lib/dependencies/UnsupportedDependency.js +13 -0
- package/lib/dependencies/WebAssemblyExportImportedDependency.js +14 -0
- package/lib/dependencies/WebAssemblyImportDependency.js +9 -1
- package/lib/dependencies/WebpackIsIncludedDependency.js +5 -0
- package/lib/dependencies/WorkerDependency.js +47 -3
- package/lib/dependencies/WorkerPlugin.js +105 -32
- package/lib/dependencies/getFunctionExpression.js +7 -0
- package/lib/esm/ExportWebpackRequireRuntimeModule.js +3 -2
- package/lib/esm/ModuleChunkFormatPlugin.js +21 -8
- package/lib/esm/ModuleChunkLoadingPlugin.js +9 -0
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +19 -12
- package/lib/hmr/HotModuleReplacementRuntimeModule.js +1 -1
- package/lib/hmr/LazyCompilationPlugin.js +14 -5
- package/lib/ids/ChunkModuleIdRangePlugin.js +11 -0
- package/lib/ids/DeterministicChunkIdsPlugin.js +11 -2
- package/lib/ids/DeterministicModuleIdsPlugin.js +11 -7
- package/lib/ids/HashedModuleIdsPlugin.js +9 -2
- package/lib/ids/IdHelpers.js +6 -0
- package/lib/ids/NamedChunkIdsPlugin.js +13 -1
- package/lib/ids/NamedModuleIdsPlugin.js +14 -3
- package/lib/ids/OccurrenceChunkIdsPlugin.js +6 -2
- package/lib/ids/OccurrenceModuleIdsPlugin.js +1 -1
- package/lib/ids/SyncModuleIdsPlugin.js +3 -2
- package/lib/index.js +8 -0
- package/lib/javascript/ArrayPushCallbackChunkFormatPlugin.js +3 -3
- package/lib/javascript/BasicEvaluatedExpression.js +137 -11
- package/lib/javascript/ChunkHelpers.js +2 -2
- package/lib/javascript/CommonJsChunkFormatPlugin.js +7 -3
- package/lib/javascript/EnableChunkLoadingPlugin.js +4 -0
- package/lib/javascript/JavascriptModulesPlugin.js +217 -198
- package/lib/javascript/JavascriptParser.js +941 -256
- package/lib/javascript/JavascriptParserHelpers.js +37 -15
- package/lib/javascript/StartupHelpers.js +2 -2
- package/lib/json/JsonData.js +26 -1
- package/lib/json/JsonGenerator.js +21 -7
- package/lib/json/JsonModulesPlugin.js +14 -5
- package/lib/json/JsonParser.js +27 -13
- package/lib/library/AbstractLibraryPlugin.js +4 -0
- package/lib/library/AmdLibraryPlugin.js +22 -6
- package/lib/library/AssignLibraryPlugin.js +19 -5
- package/lib/library/EnableLibraryPlugin.js +4 -0
- package/lib/library/ExportPropertyLibraryPlugin.js +4 -1
- package/lib/library/ModuleLibraryPlugin.js +8 -4
- package/lib/library/SystemLibraryPlugin.js +2 -1
- package/lib/library/UmdLibraryPlugin.js +24 -2
- package/lib/logging/runtime.js +1 -1
- package/lib/logging/truncateArgs.js +4 -0
- package/lib/node/CommonJsChunkLoadingPlugin.js +17 -2
- package/lib/node/NodeTargetPlugin.js +3 -0
- package/lib/node/NodeTemplatePlugin.js +10 -2
- package/lib/node/NodeWatchFileSystem.js +1 -1
- package/lib/node/ReadFileChunkLoadingRuntimeModule.js +18 -9
- package/lib/node/ReadFileCompileAsyncWasmPlugin.js +12 -2
- package/lib/node/ReadFileCompileWasmPlugin.js +21 -3
- package/lib/node/RequireChunkLoadingRuntimeModule.js +15 -8
- package/lib/node/nodeConsole.js +2 -4
- package/lib/optimize/AggressiveMergingPlugin.js +8 -0
- package/lib/optimize/AggressiveSplittingPlugin.js +9 -2
- package/lib/optimize/ConcatenatedModule.js +8 -6
- package/lib/optimize/EnsureChunkConditionsPlugin.js +3 -0
- package/lib/optimize/FlagIncludedChunksPlugin.js +11 -5
- package/lib/optimize/InnerGraph.js +5 -5
- package/lib/optimize/InnerGraphPlugin.js +57 -48
- package/lib/optimize/LimitChunkCountPlugin.js +29 -4
- package/lib/optimize/MangleExportsPlugin.js +1 -1
- package/lib/optimize/MinMaxSizeWarning.js +5 -0
- package/lib/optimize/ModuleConcatenationPlugin.js +59 -2
- package/lib/optimize/RealContentHashPlugin.js +86 -30
- package/lib/optimize/RemoveParentModulesPlugin.js +6 -0
- package/lib/optimize/RuntimeChunkPlugin.js +9 -1
- package/lib/optimize/SideEffectsFlagPlugin.js +53 -44
- package/lib/optimize/SplitChunksPlugin.js +71 -31
- package/lib/performance/SizeLimitsPlugin.js +7 -4
- package/lib/prefetch/ChunkPrefetchFunctionRuntimeModule.js +4 -2
- package/lib/prefetch/ChunkPrefetchPreloadPlugin.js +3 -1
- package/lib/prefetch/ChunkPrefetchStartupRuntimeModule.js +6 -3
- package/lib/prefetch/ChunkPrefetchTriggerRuntimeModule.js +4 -2
- package/lib/prefetch/ChunkPreloadTriggerRuntimeModule.js +4 -2
- package/lib/rules/BasicEffectRulePlugin.js +4 -0
- package/lib/rules/BasicMatcherRulePlugin.js +5 -0
- package/lib/rules/RuleSetCompiler.js +3 -3
- package/lib/rules/UseEffectRulePlugin.js +6 -4
- package/lib/runtime/AsyncModuleRuntimeModule.js +9 -6
- package/lib/runtime/AutoPublicPathRuntimeModule.js +16 -5
- package/lib/runtime/BaseUriRuntimeModule.js +8 -4
- package/lib/runtime/ChunkNameRuntimeModule.js +1 -1
- package/lib/runtime/CompatGetDefaultExportRuntimeModule.js +5 -2
- package/lib/runtime/CompatRuntimeModule.js +7 -2
- package/lib/runtime/CreateFakeNamespaceObjectRuntimeModule.js +5 -2
- package/lib/runtime/CreateScriptRuntimeModule.js +4 -2
- package/lib/runtime/CreateScriptUrlRuntimeModule.js +4 -2
- package/lib/runtime/DefinePropertyGettersRuntimeModule.js +5 -2
- package/lib/runtime/EnsureChunkRuntimeModule.js +18 -4
- package/lib/runtime/GetChunkFilenameRuntimeModule.js +45 -26
- package/lib/runtime/GetFullHashRuntimeModule.js +4 -3
- package/lib/runtime/GetMainFilenameRuntimeModule.js +5 -2
- package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +27 -6
- package/lib/runtime/GlobalRuntimeModule.js +1 -1
- package/lib/runtime/HasOwnPropertyRuntimeModule.js +5 -2
- package/lib/runtime/LoadScriptRuntimeModule.js +65 -50
- package/lib/runtime/MakeNamespaceObjectRuntimeModule.js +5 -2
- package/lib/runtime/NonceRuntimeModule.js +1 -1
- package/lib/runtime/OnChunksLoadedRuntimeModule.js +4 -2
- package/lib/runtime/PublicPathRuntimeModule.js +9 -2
- package/lib/runtime/RelativeUrlRuntimeModule.js +5 -2
- package/lib/runtime/RuntimeIdRuntimeModule.js +6 -2
- package/lib/runtime/StartupChunkDependenciesPlugin.js +15 -0
- package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +13 -4
- package/lib/runtime/StartupEntrypointRuntimeModule.js +11 -7
- package/lib/runtime/SystemContextRuntimeModule.js +1 -1
- package/lib/schemes/DataUriPlugin.js +16 -3
- package/lib/schemes/HttpUriPlugin.js +38 -0
- package/lib/serialization/ArraySerializer.js +22 -6
- package/lib/serialization/BinaryMiddleware.js +164 -1
- package/lib/serialization/DateObjectSerializer.js +15 -4
- package/lib/serialization/ErrorObjectSerializer.js +23 -8
- package/lib/serialization/FileMiddleware.js +17 -0
- package/lib/serialization/MapObjectSerializer.js +24 -8
- package/lib/serialization/NullPrototypeObjectSerializer.js +25 -8
- package/lib/serialization/ObjectMiddleware.js +33 -2
- package/lib/serialization/PlainObjectSerializer.js +23 -12
- package/lib/serialization/RegExpObjectSerializer.js +16 -5
- package/lib/serialization/SetObjectSerializer.js +21 -6
- package/lib/serialization/types.js +1 -1
- package/lib/sharing/ConsumeSharedFallbackDependency.js +3 -0
- package/lib/sharing/ConsumeSharedModule.js +13 -2
- package/lib/sharing/ConsumeSharedPlugin.js +4 -0
- package/lib/sharing/ConsumeSharedRuntimeModule.js +22 -7
- package/lib/sharing/ProvideSharedDependency.js +17 -0
- package/lib/sharing/ProvideSharedModule.js +11 -1
- package/lib/sharing/ProvideSharedModuleFactory.js +1 -1
- package/lib/sharing/ProvideSharedPlugin.js +22 -21
- package/lib/sharing/ShareRuntimeModule.js +19 -9
- package/lib/sharing/resolveMatchedConfigs.js +1 -1
- package/lib/sharing/utils.js +320 -7
- package/lib/stats/DefaultStatsFactoryPlugin.js +105 -29
- package/lib/stats/DefaultStatsPresetPlugin.js +9 -0
- package/lib/stats/DefaultStatsPrinterPlugin.js +43 -0
- package/lib/util/AsyncQueue.js +4 -2
- package/lib/util/LazySet.js +10 -2
- package/lib/util/MapHelpers.js +19 -5
- package/lib/util/ParallelismFactorCalculator.js +10 -0
- package/lib/util/Semaphore.js +1 -1
- package/lib/util/StackedCacheMap.js +7 -1
- package/lib/util/StringXor.js +51 -0
- package/lib/util/URLAbsoluteSpecifier.js +1 -1
- package/lib/util/binarySearchBounds.js +49 -0
- package/lib/util/compileBooleanMatcher.js +31 -0
- package/lib/util/createHash.js +35 -13
- package/lib/util/deprecation.js +18 -3
- package/lib/util/deterministicGrouping.js +50 -11
- package/lib/util/findGraphRoots.js +4 -2
- package/lib/util/hash/md4.js +2 -2
- package/lib/util/hash/xxhash64.js +1 -1
- package/lib/util/identifier.js +4 -0
- package/lib/util/internalSerializables.js +1 -0
- package/lib/util/makeSerializable.js +7 -0
- package/lib/util/memoize.js +3 -3
- package/lib/util/numberHash.js +75 -21
- package/lib/util/processAsyncTree.js +7 -1
- package/lib/util/propertyAccess.js +9 -54
- package/lib/util/propertyName.js +79 -0
- package/lib/util/registerExternalSerializer.js +1 -1
- package/lib/util/runtime.js +84 -21
- package/lib/util/semver.js +2 -1
- package/lib/util/serialization.js +10 -0
- package/lib/util/smartGrouping.js +1 -1
- package/lib/validateSchema.js +6 -2
- package/lib/wasm/EnableWasmLoadingPlugin.js +4 -0
- package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +15 -2
- package/lib/wasm-async/AsyncWebAssemblyGenerator.js +9 -1
- package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +14 -3
- package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +28 -8
- package/lib/wasm-async/AsyncWebAssemblyParser.js +11 -4
- package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +39 -8
- package/lib/wasm-sync/WasmFinalizeExportsPlugin.js +17 -6
- package/lib/wasm-sync/WebAssemblyGenerator.js +19 -5
- package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +1 -1
- package/lib/wasm-sync/WebAssemblyModulesPlugin.js +53 -43
- package/lib/wasm-sync/WebAssemblyParser.js +15 -4
- package/lib/wasm-sync/WebAssemblyUtils.js +1 -1
- package/lib/web/FetchCompileAsyncWasmPlugin.js +11 -1
- package/lib/web/FetchCompileWasmPlugin.js +59 -42
- package/lib/web/JsonpChunkLoadingPlugin.js +9 -0
- package/lib/web/JsonpChunkLoadingRuntimeModule.js +26 -9
- package/lib/webpack.js +12 -3
- package/lib/webworker/ImportScriptsChunkLoadingPlugin.js +9 -0
- package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +20 -17
- package/module.d.ts +55 -37
- package/package.json +59 -56
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +133 -6
- package/schemas/plugins/ProgressPlugin.check.js +1 -1
- package/schemas/plugins/SourceMapDevToolPlugin.check.js +1 -1
- package/schemas/plugins/SourceMapDevToolPlugin.json +4 -0
- package/schemas/plugins/container/ContainerPlugin.check.js +1 -1
- package/schemas/plugins/container/ContainerPlugin.json +8 -0
- package/schemas/plugins/container/ModuleFederationPlugin.check.js +1 -1
- package/schemas/plugins/container/ModuleFederationPlugin.json +8 -0
- package/schemas/plugins/css/CssGeneratorOptions.json +1 -1
- package/schemas/plugins/css/CssParserOptions.json +1 -1
- package/schemas/plugins/sharing/SharePlugin.check.js +1 -1
- package/types.d.ts +1629 -683
package/types.d.ts
CHANGED
@@ -26,6 +26,7 @@ import {
|
|
26
26
|
ConditionalExpression,
|
27
27
|
ContinueStatement,
|
28
28
|
DebuggerStatement,
|
29
|
+
Directive,
|
29
30
|
DoWhileStatement,
|
30
31
|
EmptyStatement,
|
31
32
|
ExportAllDeclaration,
|
@@ -82,7 +83,12 @@ import {
|
|
82
83
|
WithStatement,
|
83
84
|
YieldExpression
|
84
85
|
} from "estree";
|
85
|
-
import {
|
86
|
+
import { Dirent } from "fs";
|
87
|
+
import {
|
88
|
+
IncomingMessage,
|
89
|
+
ServerOptions as ServerOptionsImport,
|
90
|
+
ServerResponse
|
91
|
+
} from "http";
|
86
92
|
import { ListenOptions, Server } from "net";
|
87
93
|
import { validate as validateFunction } from "schema-utils";
|
88
94
|
import { default as ValidationError } from "schema-utils/declarations/ValidationError";
|
@@ -161,14 +167,20 @@ declare interface AdditionalData {
|
|
161
167
|
webpackAST: object;
|
162
168
|
}
|
163
169
|
declare class AggressiveMergingPlugin {
|
164
|
-
constructor(options?:
|
165
|
-
options:
|
170
|
+
constructor(options?: AggressiveMergingPluginOptions);
|
171
|
+
options: AggressiveMergingPluginOptions;
|
166
172
|
|
167
173
|
/**
|
168
174
|
* Apply the plugin
|
169
175
|
*/
|
170
176
|
apply(compiler: Compiler): void;
|
171
177
|
}
|
178
|
+
declare interface AggressiveMergingPluginOptions {
|
179
|
+
/**
|
180
|
+
* minimal size reduction to trigger merging
|
181
|
+
*/
|
182
|
+
minSizeReduce?: number;
|
183
|
+
}
|
172
184
|
declare class AggressiveSplittingPlugin {
|
173
185
|
constructor(options?: AggressiveSplittingPluginOptions);
|
174
186
|
options: AggressiveSplittingPluginOptions;
|
@@ -200,8 +212,9 @@ declare interface AggressiveSplittingPluginOptions {
|
|
200
212
|
*/
|
201
213
|
minSize?: number;
|
202
214
|
}
|
215
|
+
type Alias = string | false | string[];
|
203
216
|
declare interface AliasOption {
|
204
|
-
alias:
|
217
|
+
alias: Alias;
|
205
218
|
name: string;
|
206
219
|
onlyModule?: boolean;
|
207
220
|
}
|
@@ -223,6 +236,9 @@ declare interface ArgumentConfig {
|
|
223
236
|
type: "string" | "number" | "boolean" | "path" | "enum" | "RegExp" | "reset";
|
224
237
|
values?: any[];
|
225
238
|
}
|
239
|
+
declare interface Assertions {
|
240
|
+
[index: string]: any;
|
241
|
+
}
|
226
242
|
declare interface Asset {
|
227
243
|
/**
|
228
244
|
* the filename of the asset
|
@@ -335,18 +351,20 @@ declare interface AssetResourceGeneratorOptions {
|
|
335
351
|
}
|
336
352
|
declare class AsyncDependenciesBlock extends DependenciesBlock {
|
337
353
|
constructor(
|
338
|
-
groupOptions:
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
354
|
+
groupOptions:
|
355
|
+
| null
|
356
|
+
| (RawChunkGroupOptions & { name?: string } & {
|
357
|
+
entryOptions?: EntryOptions;
|
358
|
+
}),
|
359
|
+
loc?: null | SyntheticDependencyLocation | RealDependencyLocation,
|
360
|
+
request?: null | string
|
343
361
|
);
|
344
362
|
groupOptions: RawChunkGroupOptions & { name?: string } & {
|
345
363
|
entryOptions?: EntryOptions;
|
346
364
|
};
|
347
|
-
loc?: SyntheticDependencyLocation | RealDependencyLocation;
|
348
|
-
request?: string;
|
349
|
-
chunkName
|
365
|
+
loc?: null | SyntheticDependencyLocation | RealDependencyLocation;
|
366
|
+
request?: null | string;
|
367
|
+
chunkName?: string;
|
350
368
|
module: any;
|
351
369
|
}
|
352
370
|
declare abstract class AsyncQueue<T, K, R> {
|
@@ -373,18 +391,28 @@ declare abstract class AsyncQueue<T, K, R> {
|
|
373
391
|
clear(): void;
|
374
392
|
}
|
375
393
|
declare class AsyncWebAssemblyModulesPlugin {
|
376
|
-
constructor(options
|
377
|
-
options:
|
394
|
+
constructor(options: AsyncWebAssemblyModulesPluginOptions);
|
395
|
+
options: AsyncWebAssemblyModulesPluginOptions;
|
378
396
|
|
379
397
|
/**
|
380
398
|
* Apply the plugin
|
381
399
|
*/
|
382
400
|
apply(compiler: Compiler): void;
|
383
|
-
renderModule(
|
401
|
+
renderModule(
|
402
|
+
module: Module,
|
403
|
+
renderContext: WebAssemblyRenderContext,
|
404
|
+
hooks: CompilationHooksAsyncWebAssemblyModulesPlugin
|
405
|
+
): Source;
|
384
406
|
static getCompilationHooks(
|
385
407
|
compilation: Compilation
|
386
408
|
): CompilationHooksAsyncWebAssemblyModulesPlugin;
|
387
409
|
}
|
410
|
+
declare interface AsyncWebAssemblyModulesPluginOptions {
|
411
|
+
/**
|
412
|
+
* mangle imports
|
413
|
+
*/
|
414
|
+
mangleImports?: boolean;
|
415
|
+
}
|
388
416
|
declare class AutomaticPrefetchPlugin {
|
389
417
|
constructor();
|
390
418
|
|
@@ -452,16 +480,20 @@ declare interface BannerPluginOptions {
|
|
452
480
|
}
|
453
481
|
declare interface BaseResolveRequest {
|
454
482
|
path: string | false;
|
483
|
+
context?: object;
|
455
484
|
descriptionFilePath?: string;
|
456
485
|
descriptionFileRoot?: string;
|
457
|
-
descriptionFileData?:
|
486
|
+
descriptionFileData?: JsonObject;
|
458
487
|
relativePath?: string;
|
459
488
|
ignoreSymlinks?: boolean;
|
460
489
|
fullySpecified?: boolean;
|
490
|
+
__innerRequest?: string;
|
491
|
+
__innerRequest_request?: string;
|
492
|
+
__innerRequest_relativePath?: string;
|
461
493
|
}
|
462
494
|
declare abstract class BasicEvaluatedExpression {
|
463
495
|
type: number;
|
464
|
-
range
|
496
|
+
range?: [number, number];
|
465
497
|
falsy: boolean;
|
466
498
|
truthy: boolean;
|
467
499
|
nullish?: boolean;
|
@@ -476,14 +508,89 @@ declare abstract class BasicEvaluatedExpression {
|
|
476
508
|
array?: any[];
|
477
509
|
items?: BasicEvaluatedExpression[];
|
478
510
|
options?: BasicEvaluatedExpression[];
|
479
|
-
prefix?: BasicEvaluatedExpression;
|
480
|
-
postfix?: BasicEvaluatedExpression;
|
481
|
-
wrappedInnerExpressions
|
511
|
+
prefix?: null | BasicEvaluatedExpression;
|
512
|
+
postfix?: null | BasicEvaluatedExpression;
|
513
|
+
wrappedInnerExpressions?: BasicEvaluatedExpression[];
|
482
514
|
identifier?: string | VariableInfoInterface;
|
483
|
-
rootInfo
|
484
|
-
getMembers
|
485
|
-
getMembersOptionals
|
486
|
-
|
515
|
+
rootInfo?: string | VariableInfoInterface;
|
516
|
+
getMembers?: () => string[];
|
517
|
+
getMembersOptionals?: () => boolean[];
|
518
|
+
getMemberRanges?: () => [number, number][];
|
519
|
+
expression?:
|
520
|
+
| UnaryExpression
|
521
|
+
| ArrayExpression
|
522
|
+
| ArrowFunctionExpression
|
523
|
+
| AssignmentExpression
|
524
|
+
| AwaitExpression
|
525
|
+
| BinaryExpression
|
526
|
+
| SimpleCallExpression
|
527
|
+
| NewExpression
|
528
|
+
| ChainExpression
|
529
|
+
| ClassExpression
|
530
|
+
| ConditionalExpression
|
531
|
+
| FunctionExpression
|
532
|
+
| Identifier
|
533
|
+
| ImportExpression
|
534
|
+
| SimpleLiteral
|
535
|
+
| RegExpLiteral
|
536
|
+
| BigIntLiteral
|
537
|
+
| LogicalExpression
|
538
|
+
| MemberExpression
|
539
|
+
| MetaProperty
|
540
|
+
| ObjectExpression
|
541
|
+
| SequenceExpression
|
542
|
+
| TaggedTemplateExpression
|
543
|
+
| TemplateLiteral
|
544
|
+
| ThisExpression
|
545
|
+
| UpdateExpression
|
546
|
+
| YieldExpression
|
547
|
+
| FunctionDeclaration
|
548
|
+
| VariableDeclaration
|
549
|
+
| ClassDeclaration
|
550
|
+
| PrivateIdentifier
|
551
|
+
| ExpressionStatement
|
552
|
+
| BlockStatement
|
553
|
+
| StaticBlock
|
554
|
+
| EmptyStatement
|
555
|
+
| DebuggerStatement
|
556
|
+
| WithStatement
|
557
|
+
| ReturnStatement
|
558
|
+
| LabeledStatement
|
559
|
+
| BreakStatement
|
560
|
+
| ContinueStatement
|
561
|
+
| IfStatement
|
562
|
+
| SwitchStatement
|
563
|
+
| ThrowStatement
|
564
|
+
| TryStatement
|
565
|
+
| WhileStatement
|
566
|
+
| DoWhileStatement
|
567
|
+
| ForStatement
|
568
|
+
| ForInStatement
|
569
|
+
| ForOfStatement
|
570
|
+
| ImportDeclaration
|
571
|
+
| ExportNamedDeclaration
|
572
|
+
| ExportDefaultDeclaration
|
573
|
+
| ExportAllDeclaration
|
574
|
+
| MethodDefinition
|
575
|
+
| PropertyDefinition
|
576
|
+
| VariableDeclarator
|
577
|
+
| Program
|
578
|
+
| SwitchCase
|
579
|
+
| CatchClause
|
580
|
+
| ObjectPattern
|
581
|
+
| ArrayPattern
|
582
|
+
| RestElement
|
583
|
+
| AssignmentPattern
|
584
|
+
| SpreadElement
|
585
|
+
| Property
|
586
|
+
| AssignmentProperty
|
587
|
+
| ClassBody
|
588
|
+
| ImportSpecifier
|
589
|
+
| ImportDefaultSpecifier
|
590
|
+
| ImportNamespaceSpecifier
|
591
|
+
| ExportSpecifier
|
592
|
+
| Super
|
593
|
+
| TemplateElement;
|
487
594
|
isUnknown(): boolean;
|
488
595
|
isNull(): boolean;
|
489
596
|
isUndefined(): boolean;
|
@@ -521,47 +628,200 @@ declare abstract class BasicEvaluatedExpression {
|
|
521
628
|
* Can this expression have side effects?
|
522
629
|
*/
|
523
630
|
couldHaveSideEffects(): boolean;
|
524
|
-
|
631
|
+
|
632
|
+
/**
|
633
|
+
* Creates a boolean representation of this evaluated expression.
|
634
|
+
*/
|
635
|
+
asBool(): undefined | boolean;
|
636
|
+
|
637
|
+
/**
|
638
|
+
* Creates a nullish coalescing representation of this evaluated expression.
|
639
|
+
*/
|
525
640
|
asNullish(): undefined | boolean;
|
526
|
-
|
527
|
-
|
641
|
+
|
642
|
+
/**
|
643
|
+
* Creates a string representation of this evaluated expression.
|
644
|
+
*/
|
645
|
+
asString(): undefined | string;
|
646
|
+
setString(string: string): BasicEvaluatedExpression;
|
528
647
|
setUndefined(): BasicEvaluatedExpression;
|
529
648
|
setNull(): BasicEvaluatedExpression;
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
649
|
+
|
650
|
+
/**
|
651
|
+
* Set's the value of this expression to a number
|
652
|
+
*/
|
653
|
+
setNumber(number: number): BasicEvaluatedExpression;
|
654
|
+
|
655
|
+
/**
|
656
|
+
* Set's the value of this expression to a BigInt
|
657
|
+
*/
|
658
|
+
setBigInt(bigint: bigint): BasicEvaluatedExpression;
|
659
|
+
|
660
|
+
/**
|
661
|
+
* Set's the value of this expression to a boolean
|
662
|
+
*/
|
663
|
+
setBoolean(bool: boolean): BasicEvaluatedExpression;
|
664
|
+
|
665
|
+
/**
|
666
|
+
* Set's the value of this expression to a regular expression
|
667
|
+
*/
|
668
|
+
setRegExp(regExp: RegExp): BasicEvaluatedExpression;
|
669
|
+
|
670
|
+
/**
|
671
|
+
* Set's the value of this expression to a particular identifier and its members.
|
672
|
+
*/
|
534
673
|
setIdentifier(
|
535
|
-
identifier
|
536
|
-
rootInfo
|
537
|
-
getMembers
|
538
|
-
getMembersOptionals?:
|
674
|
+
identifier: string | VariableInfoInterface,
|
675
|
+
rootInfo: string | VariableInfoInterface,
|
676
|
+
getMembers: () => string[],
|
677
|
+
getMembersOptionals?: () => boolean[],
|
678
|
+
getMemberRanges?: () => [number, number][]
|
539
679
|
): BasicEvaluatedExpression;
|
680
|
+
|
681
|
+
/**
|
682
|
+
* Wraps an array of expressions with a prefix and postfix expression.
|
683
|
+
*/
|
540
684
|
setWrapped(
|
541
|
-
prefix
|
542
|
-
postfix
|
543
|
-
innerExpressions
|
685
|
+
prefix: undefined | null | BasicEvaluatedExpression,
|
686
|
+
postfix: undefined | null | BasicEvaluatedExpression,
|
687
|
+
innerExpressions: BasicEvaluatedExpression[]
|
544
688
|
): BasicEvaluatedExpression;
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
689
|
+
|
690
|
+
/**
|
691
|
+
* Stores the options of a conditional expression.
|
692
|
+
*/
|
693
|
+
setOptions(options: BasicEvaluatedExpression[]): BasicEvaluatedExpression;
|
694
|
+
|
695
|
+
/**
|
696
|
+
* Adds options to a conditional expression.
|
697
|
+
*/
|
698
|
+
addOptions(options: BasicEvaluatedExpression[]): BasicEvaluatedExpression;
|
699
|
+
|
700
|
+
/**
|
701
|
+
* Set's the value of this expression to an array of expressions.
|
702
|
+
*/
|
703
|
+
setItems(items: BasicEvaluatedExpression[]): BasicEvaluatedExpression;
|
704
|
+
|
705
|
+
/**
|
706
|
+
* Set's the value of this expression to an array of strings.
|
707
|
+
*/
|
708
|
+
setArray(array: string[]): BasicEvaluatedExpression;
|
709
|
+
|
710
|
+
/**
|
711
|
+
* Set's the value of this expression to a processed/unprocessed template string. Used
|
712
|
+
* for evaluating TemplateLiteral expressions in the JavaScript Parser.
|
713
|
+
*/
|
549
714
|
setTemplateString(
|
550
|
-
quasis
|
551
|
-
parts
|
552
|
-
kind
|
715
|
+
quasis: BasicEvaluatedExpression[],
|
716
|
+
parts: BasicEvaluatedExpression[],
|
717
|
+
kind: "raw" | "cooked"
|
553
718
|
): BasicEvaluatedExpression;
|
554
|
-
templateStringKind
|
719
|
+
templateStringKind?: "raw" | "cooked";
|
555
720
|
setTruthy(): BasicEvaluatedExpression;
|
556
721
|
setFalsy(): BasicEvaluatedExpression;
|
557
|
-
|
558
|
-
|
722
|
+
|
723
|
+
/**
|
724
|
+
* Set's the value of the expression to nullish.
|
725
|
+
*/
|
726
|
+
setNullish(value: boolean): BasicEvaluatedExpression;
|
727
|
+
|
728
|
+
/**
|
729
|
+
* Set's the range for the expression.
|
730
|
+
*/
|
731
|
+
setRange(range: [number, number]): BasicEvaluatedExpression;
|
732
|
+
|
733
|
+
/**
|
734
|
+
* Set whether or not the expression has side effects.
|
735
|
+
*/
|
559
736
|
setSideEffects(sideEffects?: boolean): BasicEvaluatedExpression;
|
560
|
-
|
737
|
+
|
738
|
+
/**
|
739
|
+
* Set the expression node for the expression.
|
740
|
+
*/
|
741
|
+
setExpression(
|
742
|
+
expression?:
|
743
|
+
| UnaryExpression
|
744
|
+
| ArrayExpression
|
745
|
+
| ArrowFunctionExpression
|
746
|
+
| AssignmentExpression
|
747
|
+
| AwaitExpression
|
748
|
+
| BinaryExpression
|
749
|
+
| SimpleCallExpression
|
750
|
+
| NewExpression
|
751
|
+
| ChainExpression
|
752
|
+
| ClassExpression
|
753
|
+
| ConditionalExpression
|
754
|
+
| FunctionExpression
|
755
|
+
| Identifier
|
756
|
+
| ImportExpression
|
757
|
+
| SimpleLiteral
|
758
|
+
| RegExpLiteral
|
759
|
+
| BigIntLiteral
|
760
|
+
| LogicalExpression
|
761
|
+
| MemberExpression
|
762
|
+
| MetaProperty
|
763
|
+
| ObjectExpression
|
764
|
+
| SequenceExpression
|
765
|
+
| TaggedTemplateExpression
|
766
|
+
| TemplateLiteral
|
767
|
+
| ThisExpression
|
768
|
+
| UpdateExpression
|
769
|
+
| YieldExpression
|
770
|
+
| FunctionDeclaration
|
771
|
+
| VariableDeclaration
|
772
|
+
| ClassDeclaration
|
773
|
+
| PrivateIdentifier
|
774
|
+
| ExpressionStatement
|
775
|
+
| BlockStatement
|
776
|
+
| StaticBlock
|
777
|
+
| EmptyStatement
|
778
|
+
| DebuggerStatement
|
779
|
+
| WithStatement
|
780
|
+
| ReturnStatement
|
781
|
+
| LabeledStatement
|
782
|
+
| BreakStatement
|
783
|
+
| ContinueStatement
|
784
|
+
| IfStatement
|
785
|
+
| SwitchStatement
|
786
|
+
| ThrowStatement
|
787
|
+
| TryStatement
|
788
|
+
| WhileStatement
|
789
|
+
| DoWhileStatement
|
790
|
+
| ForStatement
|
791
|
+
| ForInStatement
|
792
|
+
| ForOfStatement
|
793
|
+
| ImportDeclaration
|
794
|
+
| ExportNamedDeclaration
|
795
|
+
| ExportDefaultDeclaration
|
796
|
+
| ExportAllDeclaration
|
797
|
+
| MethodDefinition
|
798
|
+
| PropertyDefinition
|
799
|
+
| VariableDeclarator
|
800
|
+
| Program
|
801
|
+
| SwitchCase
|
802
|
+
| CatchClause
|
803
|
+
| ObjectPattern
|
804
|
+
| ArrayPattern
|
805
|
+
| RestElement
|
806
|
+
| AssignmentPattern
|
807
|
+
| SpreadElement
|
808
|
+
| Property
|
809
|
+
| AssignmentProperty
|
810
|
+
| ClassBody
|
811
|
+
| ImportSpecifier
|
812
|
+
| ImportDefaultSpecifier
|
813
|
+
| ImportNamespaceSpecifier
|
814
|
+
| ExportSpecifier
|
815
|
+
| Super
|
816
|
+
| TemplateElement
|
817
|
+
): BasicEvaluatedExpression;
|
818
|
+
}
|
819
|
+
declare interface BuildInfo {
|
820
|
+
[index: string]: any;
|
561
821
|
}
|
562
822
|
type BuildMeta = KnownBuildMeta & Record<string, any>;
|
563
823
|
declare abstract class ByTypeGenerator extends Generator {
|
564
|
-
map:
|
824
|
+
map: Record<string, Generator>;
|
565
825
|
}
|
566
826
|
declare const CIRCULAR_CONNECTION: unique symbol;
|
567
827
|
declare class Cache {
|
@@ -650,7 +910,7 @@ declare interface CacheGroupSource {
|
|
650
910
|
chunks?: Chunk[],
|
651
911
|
key?: string
|
652
912
|
) => undefined | string;
|
653
|
-
chunksFilter?: (chunk: Chunk) => boolean;
|
913
|
+
chunksFilter?: (chunk: Chunk) => undefined | boolean;
|
654
914
|
enforce?: boolean;
|
655
915
|
minSize: SplitChunksSizes;
|
656
916
|
minSizeReduction: SplitChunksSizes;
|
@@ -663,7 +923,7 @@ declare interface CacheGroupSource {
|
|
663
923
|
maxInitialRequests?: number;
|
664
924
|
filename?: string | ((arg0: PathData, arg1?: AssetInfo) => string);
|
665
925
|
idHint?: string;
|
666
|
-
automaticNameDelimiter
|
926
|
+
automaticNameDelimiter?: string;
|
667
927
|
reuseExistingChunk?: boolean;
|
668
928
|
usedExports?: boolean;
|
669
929
|
}
|
@@ -689,6 +949,7 @@ declare interface CallExpressionInfo {
|
|
689
949
|
name: string;
|
690
950
|
getMembers: () => string[];
|
691
951
|
getMembersOptionals: () => boolean[];
|
952
|
+
getMemberRanges: () => [number, number][];
|
692
953
|
}
|
693
954
|
declare interface CallbackAsyncQueue<T> {
|
694
955
|
(err?: null | WebpackError, result?: T): any;
|
@@ -709,19 +970,13 @@ type Cell<T> = undefined | T;
|
|
709
970
|
declare class Chunk {
|
710
971
|
constructor(name?: string, backCompat?: boolean);
|
711
972
|
id: null | string | number;
|
712
|
-
ids: null |
|
973
|
+
ids: null | ChunkId[];
|
713
974
|
debugId: number;
|
714
|
-
name
|
975
|
+
name?: string;
|
715
976
|
idNameHints: SortableSet<string>;
|
716
977
|
preventIntegration: boolean;
|
717
|
-
filenameTemplate:
|
718
|
-
|
719
|
-
| string
|
720
|
-
| ((arg0: PathData, arg1?: AssetInfo) => string);
|
721
|
-
cssFilenameTemplate:
|
722
|
-
| null
|
723
|
-
| string
|
724
|
-
| ((arg0: PathData, arg1?: AssetInfo) => string);
|
978
|
+
filenameTemplate?: string | ((arg0: PathData, arg1?: AssetInfo) => string);
|
979
|
+
cssFilenameTemplate?: string | ((arg0: PathData, arg1?: AssetInfo) => string);
|
725
980
|
runtime: RuntimeSpec;
|
726
981
|
files: Set<string>;
|
727
982
|
auxiliaryFiles: Set<string>;
|
@@ -762,7 +1017,7 @@ declare class Chunk {
|
|
762
1017
|
removeGroup(chunkGroup: ChunkGroup): void;
|
763
1018
|
isInGroup(chunkGroup: ChunkGroup): boolean;
|
764
1019
|
getNumberOfGroups(): number;
|
765
|
-
get groupsIterable():
|
1020
|
+
get groupsIterable(): SortableSet<ChunkGroup>;
|
766
1021
|
disconnectFromGroups(): void;
|
767
1022
|
split(newChunk: Chunk): void;
|
768
1023
|
updateHash(hash: Hash, chunkGraph: ChunkGraph): void;
|
@@ -778,7 +1033,7 @@ declare class Chunk {
|
|
778
1033
|
getChildrenOfTypeInOrder(
|
779
1034
|
chunkGraph: ChunkGraph,
|
780
1035
|
type: string
|
781
|
-
): { onChunks: Chunk[]; chunks: Set<Chunk> }[];
|
1036
|
+
): undefined | { onChunks: Chunk[]; chunks: Set<Chunk> }[];
|
782
1037
|
getChildIdsByOrdersMap(
|
783
1038
|
chunkGraph: ChunkGraph,
|
784
1039
|
includeDirectChildren?: boolean,
|
@@ -966,7 +1221,7 @@ declare abstract class ChunkGroup {
|
|
966
1221
|
options: ChunkGroupOptions;
|
967
1222
|
chunks: Chunk[];
|
968
1223
|
origins: OriginRecord[];
|
969
|
-
index
|
1224
|
+
index?: number;
|
970
1225
|
|
971
1226
|
/**
|
972
1227
|
* when a new chunk is added to a chunkGroup, addingOptions will occur.
|
@@ -1019,9 +1274,9 @@ declare abstract class ChunkGroup {
|
|
1019
1274
|
removeParent(chunkGroup: ChunkGroup): boolean;
|
1020
1275
|
addAsyncEntrypoint(entrypoint: Entrypoint): boolean;
|
1021
1276
|
get asyncEntrypointsIterable(): SortableSet<ChunkGroup>;
|
1022
|
-
getBlocks():
|
1277
|
+
getBlocks(): AsyncDependenciesBlock[];
|
1023
1278
|
getNumberOfBlocks(): number;
|
1024
|
-
hasBlock(block
|
1279
|
+
hasBlock(block: AsyncDependenciesBlock): boolean;
|
1025
1280
|
get blocksIterable(): Iterable<AsyncDependenciesBlock>;
|
1026
1281
|
addBlock(block: AsyncDependenciesBlock): boolean;
|
1027
1282
|
addOrigin(module: Module, loc: DependencyLocation, request: string): void;
|
@@ -1047,7 +1302,7 @@ declare abstract class ChunkGroup {
|
|
1047
1302
|
/**
|
1048
1303
|
* Gets the top-down index of a module in this ChunkGroup
|
1049
1304
|
*/
|
1050
|
-
getModulePreOrderIndex(module: Module): number;
|
1305
|
+
getModulePreOrderIndex(module: Module): undefined | number;
|
1051
1306
|
|
1052
1307
|
/**
|
1053
1308
|
* Sets the bottom-up index of a module in this ChunkGroup
|
@@ -1057,10 +1312,10 @@ declare abstract class ChunkGroup {
|
|
1057
1312
|
/**
|
1058
1313
|
* Gets the bottom-up index of a module in this ChunkGroup
|
1059
1314
|
*/
|
1060
|
-
getModulePostOrderIndex(module: Module): number;
|
1315
|
+
getModulePostOrderIndex(module: Module): undefined | number;
|
1061
1316
|
checkConstraints(): void;
|
1062
|
-
getModuleIndex: (module: Module) => number;
|
1063
|
-
getModuleIndex2: (module: Module) => number;
|
1317
|
+
getModuleIndex: (module: Module) => undefined | number;
|
1318
|
+
getModuleIndex2: (module: Module) => undefined | number;
|
1064
1319
|
}
|
1065
1320
|
type ChunkGroupOptions = RawChunkGroupOptions & { name?: string };
|
1066
1321
|
declare interface ChunkHashContext {
|
@@ -1084,20 +1339,42 @@ declare interface ChunkHashContext {
|
|
1084
1339
|
*/
|
1085
1340
|
chunkGraph: ChunkGraph;
|
1086
1341
|
}
|
1342
|
+
type ChunkId = string | number;
|
1087
1343
|
declare interface ChunkMaps {
|
1088
1344
|
hash: Record<string | number, string>;
|
1089
1345
|
contentHash: Record<string | number, Record<string, string>>;
|
1090
1346
|
name: Record<string | number, string>;
|
1091
1347
|
}
|
1092
1348
|
declare class ChunkModuleIdRangePlugin {
|
1093
|
-
constructor(options
|
1094
|
-
options:
|
1349
|
+
constructor(options: ChunkModuleIdRangePluginOptions);
|
1350
|
+
options: ChunkModuleIdRangePluginOptions;
|
1095
1351
|
|
1096
1352
|
/**
|
1097
1353
|
* Apply the plugin
|
1098
1354
|
*/
|
1099
1355
|
apply(compiler: Compiler): void;
|
1100
1356
|
}
|
1357
|
+
declare interface ChunkModuleIdRangePluginOptions {
|
1358
|
+
/**
|
1359
|
+
* the chunk name
|
1360
|
+
*/
|
1361
|
+
name: string;
|
1362
|
+
|
1363
|
+
/**
|
1364
|
+
* order
|
1365
|
+
*/
|
1366
|
+
order?: "index" | "index2" | "preOrderIndex" | "postOrderIndex";
|
1367
|
+
|
1368
|
+
/**
|
1369
|
+
* start id
|
1370
|
+
*/
|
1371
|
+
start?: number;
|
1372
|
+
|
1373
|
+
/**
|
1374
|
+
* end id
|
1375
|
+
*/
|
1376
|
+
end?: number;
|
1377
|
+
}
|
1101
1378
|
declare interface ChunkModuleMaps {
|
1102
1379
|
id: Record<string | number, (string | number)[]>;
|
1103
1380
|
hash: Record<string | number, string>;
|
@@ -1375,6 +1652,11 @@ declare class Compilation {
|
|
1375
1652
|
unseal: SyncHook<[]>;
|
1376
1653
|
seal: SyncHook<[]>;
|
1377
1654
|
beforeChunks: SyncHook<[]>;
|
1655
|
+
/**
|
1656
|
+
* The `afterChunks` hook is called directly after the chunks and module graph have
|
1657
|
+
* been created and before the chunks and modules have been optimized. This hook is useful to
|
1658
|
+
* inspect, analyze, and/or modify the chunk graph.
|
1659
|
+
*/
|
1378
1660
|
afterChunks: SyncHook<[Iterable<Chunk>]>;
|
1379
1661
|
optimizeDependencies: SyncBailHook<[Iterable<Module>], any>;
|
1380
1662
|
afterOptimizeDependencies: SyncHook<[Iterable<Module>]>;
|
@@ -1390,7 +1672,7 @@ declare class Compilation {
|
|
1390
1672
|
any
|
1391
1673
|
>;
|
1392
1674
|
afterOptimizeChunkModules: SyncHook<[Iterable<Chunk>, Iterable<Module>]>;
|
1393
|
-
shouldRecord: SyncBailHook<[], boolean>;
|
1675
|
+
shouldRecord: SyncBailHook<[], undefined | boolean>;
|
1394
1676
|
additionalChunkRuntimeRequirements: SyncHook<
|
1395
1677
|
[Chunk, Set<string>, RuntimeRequirementsContext]
|
1396
1678
|
>;
|
@@ -1898,8 +2180,8 @@ declare interface CompilationHooksJavascriptModulesPlugin {
|
|
1898
2180
|
[Module, RenderBootstrapContext],
|
1899
2181
|
string
|
1900
2182
|
>;
|
1901
|
-
embedInRuntimeBailout: SyncBailHook<[Module, RenderContext], string>;
|
1902
|
-
strictRuntimeBailout: SyncBailHook<[RenderContext], string>;
|
2183
|
+
embedInRuntimeBailout: SyncBailHook<[Module, RenderContext], string | void>;
|
2184
|
+
strictRuntimeBailout: SyncBailHook<[RenderContext], string | void>;
|
1903
2185
|
chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
|
1904
2186
|
useSourceMap: SyncBailHook<[Chunk, RenderContext], boolean>;
|
1905
2187
|
}
|
@@ -1914,7 +2196,7 @@ declare class Compiler {
|
|
1914
2196
|
constructor(context: string, options?: WebpackOptionsNormalized);
|
1915
2197
|
hooks: Readonly<{
|
1916
2198
|
initialize: SyncHook<[]>;
|
1917
|
-
shouldEmit: SyncBailHook<[Compilation], boolean>;
|
2199
|
+
shouldEmit: SyncBailHook<[Compilation], undefined | boolean>;
|
1918
2200
|
done: AsyncSeriesHook<[Stats]>;
|
1919
2201
|
afterDone: SyncHook<[Stats]>;
|
1920
2202
|
additionalPass: AsyncSeriesHook<[]>;
|
@@ -1951,7 +2233,7 @@ declare class Compiler {
|
|
1951
2233
|
parentCompilation?: Compilation;
|
1952
2234
|
root: Compiler;
|
1953
2235
|
outputPath: string;
|
1954
|
-
watching
|
2236
|
+
watching?: Watching;
|
1955
2237
|
outputFileSystem: OutputFileSystem;
|
1956
2238
|
intermediateFileSystem: IntermediateFileSystem;
|
1957
2239
|
inputFileSystem: InputFileSystem;
|
@@ -1961,11 +2243,14 @@ declare class Compiler {
|
|
1961
2243
|
records: object;
|
1962
2244
|
managedPaths: Set<string | RegExp>;
|
1963
2245
|
immutablePaths: Set<string | RegExp>;
|
1964
|
-
modifiedFiles
|
1965
|
-
removedFiles
|
1966
|
-
fileTimestamps
|
1967
|
-
contextTimestamps
|
1968
|
-
|
2246
|
+
modifiedFiles?: ReadonlySet<string>;
|
2247
|
+
removedFiles?: ReadonlySet<string>;
|
2248
|
+
fileTimestamps?: ReadonlyMap<string, null | FileSystemInfoEntry | "ignore">;
|
2249
|
+
contextTimestamps?: ReadonlyMap<
|
2250
|
+
string,
|
2251
|
+
null | FileSystemInfoEntry | "ignore"
|
2252
|
+
>;
|
2253
|
+
fsStartTime?: number;
|
1969
2254
|
resolverFactory: ResolverFactory;
|
1970
2255
|
infrastructureLogger: any;
|
1971
2256
|
options: WebpackOptionsNormalized;
|
@@ -2066,7 +2351,7 @@ declare class ConcatenationScope {
|
|
2066
2351
|
static isModuleReference(name: string): boolean;
|
2067
2352
|
static matchModuleReference(
|
2068
2353
|
name: string
|
2069
|
-
): ModuleReferenceOptions & { index: number };
|
2354
|
+
): null | (ModuleReferenceOptions & { index: number });
|
2070
2355
|
static DEFAULT_EXPORT: string;
|
2071
2356
|
static NAMESPACE_OBJECT_EXPORT: string;
|
2072
2357
|
}
|
@@ -2119,6 +2404,11 @@ declare interface Configuration {
|
|
2119
2404
|
*/
|
2120
2405
|
experiments?: Experiments;
|
2121
2406
|
|
2407
|
+
/**
|
2408
|
+
* Extend configuration from another configuration (only works when using webpack-cli).
|
2409
|
+
*/
|
2410
|
+
extends?: string | string[];
|
2411
|
+
|
2122
2412
|
/**
|
2123
2413
|
* Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.
|
2124
2414
|
*/
|
@@ -2130,7 +2420,7 @@ declare interface Configuration {
|
|
2130
2420
|
| ((
|
2131
2421
|
data: ExternalItemFunctionData,
|
2132
2422
|
callback: (
|
2133
|
-
err?: Error,
|
2423
|
+
err?: null | Error,
|
2134
2424
|
result?: string | boolean | string[] | { [index: string]: any }
|
2135
2425
|
) => void
|
2136
2426
|
) => void)
|
@@ -2243,6 +2533,11 @@ declare interface Configuration {
|
|
2243
2533
|
* Add additional plugins to the compiler.
|
2244
2534
|
*/
|
2245
2535
|
plugins?: (
|
2536
|
+
| undefined
|
2537
|
+
| null
|
2538
|
+
| false
|
2539
|
+
| ""
|
2540
|
+
| 0
|
2246
2541
|
| ((this: Compiler, compiler: Compiler) => void)
|
2247
2542
|
| WebpackPluginInstance
|
2248
2543
|
)[];
|
@@ -2280,7 +2575,7 @@ declare interface Configuration {
|
|
2280
2575
|
/**
|
2281
2576
|
* Options affecting how file system snapshots are created and validated.
|
2282
2577
|
*/
|
2283
|
-
snapshot?:
|
2578
|
+
snapshot?: SnapshotOptionsWebpackOptions;
|
2284
2579
|
|
2285
2580
|
/**
|
2286
2581
|
* Stats options object or preset name.
|
@@ -2320,7 +2615,7 @@ declare class ConstDependency extends NullDependency {
|
|
2320
2615
|
constructor(
|
2321
2616
|
expression: string,
|
2322
2617
|
range: number | [number, number],
|
2323
|
-
runtimeRequirements?: string[]
|
2618
|
+
runtimeRequirements?: null | string[]
|
2324
2619
|
);
|
2325
2620
|
expression: string;
|
2326
2621
|
range: number | [number, number];
|
@@ -2550,7 +2845,8 @@ declare interface ContextModuleOptions {
|
|
2550
2845
|
/**
|
2551
2846
|
* exports referenced from modules (won't be mangled)
|
2552
2847
|
*/
|
2553
|
-
referencedExports?: string[][];
|
2848
|
+
referencedExports?: null | string[][];
|
2849
|
+
layer?: string;
|
2554
2850
|
resource: string | false | string[];
|
2555
2851
|
resourceQuery?: string;
|
2556
2852
|
resourceFragment?: string;
|
@@ -2558,18 +2854,22 @@ declare interface ContextModuleOptions {
|
|
2558
2854
|
}
|
2559
2855
|
declare class ContextReplacementPlugin {
|
2560
2856
|
constructor(
|
2561
|
-
resourceRegExp
|
2857
|
+
resourceRegExp: RegExp,
|
2562
2858
|
newContentResource?: any,
|
2563
2859
|
newContentRecursive?: any,
|
2564
2860
|
newContentRegExp?: any
|
2565
2861
|
);
|
2566
|
-
resourceRegExp:
|
2862
|
+
resourceRegExp: RegExp;
|
2567
2863
|
newContentCallback: any;
|
2568
2864
|
newContentResource: any;
|
2569
2865
|
newContentCreateContextMap: any;
|
2570
2866
|
newContentRecursive: any;
|
2571
2867
|
newContentRegExp: any;
|
2572
|
-
|
2868
|
+
|
2869
|
+
/**
|
2870
|
+
* Apply the plugin
|
2871
|
+
*/
|
2872
|
+
apply(compiler: Compiler): void;
|
2573
2873
|
}
|
2574
2874
|
declare interface ContextTimestampAndHash {
|
2575
2875
|
safeTime: number;
|
@@ -2626,7 +2926,7 @@ declare interface DepConstructor {
|
|
2626
2926
|
declare abstract class DependenciesBlock {
|
2627
2927
|
dependencies: Dependency[];
|
2628
2928
|
blocks: AsyncDependenciesBlock[];
|
2629
|
-
parent
|
2929
|
+
parent?: DependenciesBlock;
|
2630
2930
|
getRootBlock(): DependenciesBlock;
|
2631
2931
|
|
2632
2932
|
/**
|
@@ -2642,8 +2942,8 @@ declare abstract class DependenciesBlock {
|
|
2642
2942
|
*/
|
2643
2943
|
clearDependenciesAndBlocks(): void;
|
2644
2944
|
updateHash(hash: Hash, context: UpdateHashContextDependency): void;
|
2645
|
-
serialize(__0:
|
2646
|
-
deserialize(__0:
|
2945
|
+
serialize(__0: ObjectSerializerContext): void;
|
2946
|
+
deserialize(__0: ObjectDeserializerContext): void;
|
2647
2947
|
}
|
2648
2948
|
declare interface DependenciesBlockLike {
|
2649
2949
|
dependencies: Dependency[];
|
@@ -2657,10 +2957,10 @@ declare class Dependency {
|
|
2657
2957
|
get category(): string;
|
2658
2958
|
loc: DependencyLocation;
|
2659
2959
|
setLoc(
|
2660
|
-
startLine
|
2661
|
-
startColumn
|
2662
|
-
endLine
|
2663
|
-
endColumn
|
2960
|
+
startLine: number,
|
2961
|
+
startColumn: number,
|
2962
|
+
endLine: number,
|
2963
|
+
endColumn: number
|
2664
2964
|
): void;
|
2665
2965
|
getContext(): undefined | string;
|
2666
2966
|
getResourceIdentifier(): null | string;
|
@@ -2693,12 +2993,12 @@ declare class Dependency {
|
|
2693
2993
|
/**
|
2694
2994
|
* Returns warnings
|
2695
2995
|
*/
|
2696
|
-
getWarnings(moduleGraph: ModuleGraph): WebpackError[];
|
2996
|
+
getWarnings(moduleGraph: ModuleGraph): undefined | null | WebpackError[];
|
2697
2997
|
|
2698
2998
|
/**
|
2699
2999
|
* Returns errors
|
2700
3000
|
*/
|
2701
|
-
getErrors(moduleGraph: ModuleGraph): WebpackError[];
|
3001
|
+
getErrors(moduleGraph: ModuleGraph): undefined | null | WebpackError[];
|
2702
3002
|
|
2703
3003
|
/**
|
2704
3004
|
* Update the hash
|
@@ -2712,9 +3012,9 @@ declare class Dependency {
|
|
2712
3012
|
getModuleEvaluationSideEffectsState(
|
2713
3013
|
moduleGraph: ModuleGraph
|
2714
3014
|
): ConnectionState;
|
2715
|
-
createIgnoredModule(context: string): Module;
|
2716
|
-
serialize(__0:
|
2717
|
-
deserialize(__0:
|
3015
|
+
createIgnoredModule(context: string): null | Module;
|
3016
|
+
serialize(__0: ObjectSerializerContext): void;
|
3017
|
+
deserialize(__0: ObjectDeserializerContext): void;
|
2718
3018
|
module: any;
|
2719
3019
|
get disconnect(): any;
|
2720
3020
|
static NO_EXPORTS_REFERENCED: string[][];
|
@@ -2785,7 +3085,7 @@ declare interface DependencyTemplateContext {
|
|
2785
3085
|
codeGenerationResults: CodeGenerationResults;
|
2786
3086
|
}
|
2787
3087
|
declare abstract class DependencyTemplates {
|
2788
|
-
get(dependency: DependencyConstructor): DependencyTemplate;
|
3088
|
+
get(dependency: DependencyConstructor): undefined | DependencyTemplate;
|
2789
3089
|
set(
|
2790
3090
|
dependency: DependencyConstructor,
|
2791
3091
|
dependencyTemplate: DependencyTemplate
|
@@ -2795,82 +3095,74 @@ declare abstract class DependencyTemplates {
|
|
2795
3095
|
clone(): DependencyTemplates;
|
2796
3096
|
}
|
2797
3097
|
declare class DeterministicChunkIdsPlugin {
|
2798
|
-
constructor(options?:
|
2799
|
-
options:
|
3098
|
+
constructor(options?: DeterministicChunkIdsPluginOptions);
|
3099
|
+
options: DeterministicChunkIdsPluginOptions;
|
2800
3100
|
|
2801
3101
|
/**
|
2802
3102
|
* Apply the plugin
|
2803
3103
|
*/
|
2804
3104
|
apply(compiler: Compiler): void;
|
2805
3105
|
}
|
3106
|
+
declare interface DeterministicChunkIdsPluginOptions {
|
3107
|
+
/**
|
3108
|
+
* context for ids
|
3109
|
+
*/
|
3110
|
+
context?: string;
|
3111
|
+
|
3112
|
+
/**
|
3113
|
+
* maximum length of ids
|
3114
|
+
*/
|
3115
|
+
maxLength?: number;
|
3116
|
+
}
|
2806
3117
|
declare class DeterministicModuleIdsPlugin {
|
2807
|
-
constructor(options?:
|
2808
|
-
|
2809
|
-
* context relative to which module identifiers are computed
|
2810
|
-
*/
|
2811
|
-
context?: string;
|
2812
|
-
/**
|
2813
|
-
* selector function for modules
|
2814
|
-
*/
|
2815
|
-
test?: (arg0: Module) => boolean;
|
2816
|
-
/**
|
2817
|
-
* maximum id length in digits (used as starting point)
|
2818
|
-
*/
|
2819
|
-
maxLength?: number;
|
2820
|
-
/**
|
2821
|
-
* hash salt for ids
|
2822
|
-
*/
|
2823
|
-
salt?: number;
|
2824
|
-
/**
|
2825
|
-
* do not increase the maxLength to find an optimal id space size
|
2826
|
-
*/
|
2827
|
-
fixedLength?: boolean;
|
2828
|
-
/**
|
2829
|
-
* throw an error when id conflicts occur (instead of rehashing)
|
2830
|
-
*/
|
2831
|
-
failOnConflict?: boolean;
|
2832
|
-
});
|
2833
|
-
options: {
|
2834
|
-
/**
|
2835
|
-
* context relative to which module identifiers are computed
|
2836
|
-
*/
|
2837
|
-
context?: string;
|
2838
|
-
/**
|
2839
|
-
* selector function for modules
|
2840
|
-
*/
|
2841
|
-
test?: (arg0: Module) => boolean;
|
2842
|
-
/**
|
2843
|
-
* maximum id length in digits (used as starting point)
|
2844
|
-
*/
|
2845
|
-
maxLength?: number;
|
2846
|
-
/**
|
2847
|
-
* hash salt for ids
|
2848
|
-
*/
|
2849
|
-
salt?: number;
|
2850
|
-
/**
|
2851
|
-
* do not increase the maxLength to find an optimal id space size
|
2852
|
-
*/
|
2853
|
-
fixedLength?: boolean;
|
2854
|
-
/**
|
2855
|
-
* throw an error when id conflicts occur (instead of rehashing)
|
2856
|
-
*/
|
2857
|
-
failOnConflict?: boolean;
|
2858
|
-
};
|
3118
|
+
constructor(options?: DeterministicModuleIdsPluginOptions);
|
3119
|
+
options: DeterministicModuleIdsPluginOptions;
|
2859
3120
|
|
2860
3121
|
/**
|
2861
3122
|
* Apply the plugin
|
2862
3123
|
*/
|
2863
3124
|
apply(compiler: Compiler): void;
|
2864
3125
|
}
|
3126
|
+
declare interface DeterministicModuleIdsPluginOptions {
|
3127
|
+
/**
|
3128
|
+
* context relative to which module identifiers are computed
|
3129
|
+
*/
|
3130
|
+
context?: string;
|
2865
3131
|
|
2866
|
-
/**
|
2867
|
-
|
2868
|
-
|
2869
|
-
|
2870
|
-
|
2871
|
-
|
2872
|
-
|
2873
|
-
|
3132
|
+
/**
|
3133
|
+
* selector function for modules
|
3134
|
+
*/
|
3135
|
+
test?: (arg0: Module) => boolean;
|
3136
|
+
|
3137
|
+
/**
|
3138
|
+
* maximum id length in digits (used as starting point)
|
3139
|
+
*/
|
3140
|
+
maxLength?: number;
|
3141
|
+
|
3142
|
+
/**
|
3143
|
+
* hash salt for ids
|
3144
|
+
*/
|
3145
|
+
salt?: number;
|
3146
|
+
|
3147
|
+
/**
|
3148
|
+
* do not increase the maxLength to find an optimal id space size
|
3149
|
+
*/
|
3150
|
+
fixedLength?: boolean;
|
3151
|
+
|
3152
|
+
/**
|
3153
|
+
* throw an error when id conflicts occur (instead of rehashing)
|
3154
|
+
*/
|
3155
|
+
failOnConflict?: boolean;
|
3156
|
+
}
|
3157
|
+
|
3158
|
+
/**
|
3159
|
+
* Options for the webpack-dev-server.
|
3160
|
+
*/
|
3161
|
+
declare interface DevServer {
|
3162
|
+
[index: string]: any;
|
3163
|
+
}
|
3164
|
+
declare class DllPlugin {
|
3165
|
+
constructor(options: DllPluginOptions);
|
2874
3166
|
options: {
|
2875
3167
|
entryOnly: boolean;
|
2876
3168
|
/**
|
@@ -2934,7 +3226,11 @@ declare interface DllPluginOptions {
|
|
2934
3226
|
declare class DllReferencePlugin {
|
2935
3227
|
constructor(options: DllReferencePluginOptions);
|
2936
3228
|
options: DllReferencePluginOptions;
|
2937
|
-
|
3229
|
+
|
3230
|
+
/**
|
3231
|
+
* Apply the plugin
|
3232
|
+
*/
|
3233
|
+
apply(compiler: Compiler): void;
|
2938
3234
|
}
|
2939
3235
|
type DllReferencePluginOptions =
|
2940
3236
|
| {
|
@@ -3394,11 +3690,21 @@ declare interface Environment {
|
|
3394
3690
|
*/
|
3395
3691
|
dynamicImport?: boolean;
|
3396
3692
|
|
3693
|
+
/**
|
3694
|
+
* The environment supports an async import() is available when creating a worker.
|
3695
|
+
*/
|
3696
|
+
dynamicImportInWorker?: boolean;
|
3697
|
+
|
3397
3698
|
/**
|
3398
3699
|
* The environment supports 'for of' iteration ('for (const x of array) { ... }').
|
3399
3700
|
*/
|
3400
3701
|
forOf?: boolean;
|
3401
3702
|
|
3703
|
+
/**
|
3704
|
+
* The environment supports 'globalThis'.
|
3705
|
+
*/
|
3706
|
+
globalThis?: boolean;
|
3707
|
+
|
3402
3708
|
/**
|
3403
3709
|
* The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from '...').
|
3404
3710
|
*/
|
@@ -3424,6 +3730,7 @@ declare class EnvironmentPlugin {
|
|
3424
3730
|
*/
|
3425
3731
|
apply(compiler: Compiler): void;
|
3426
3732
|
}
|
3733
|
+
type ErrorWithDetail = Error & { details?: string };
|
3427
3734
|
declare interface Etag {
|
3428
3735
|
toString: () => string;
|
3429
3736
|
}
|
@@ -3825,38 +4132,39 @@ declare interface ExposesObject {
|
|
3825
4132
|
}
|
3826
4133
|
type Expression =
|
3827
4134
|
| UnaryExpression
|
3828
|
-
| ThisExpression
|
3829
4135
|
| ArrayExpression
|
3830
|
-
| ObjectExpression
|
3831
|
-
| FunctionExpression
|
3832
4136
|
| ArrowFunctionExpression
|
3833
|
-
|
|
4137
|
+
| AssignmentExpression
|
4138
|
+
| AwaitExpression
|
4139
|
+
| BinaryExpression
|
4140
|
+
| SimpleCallExpression
|
4141
|
+
| NewExpression
|
4142
|
+
| ChainExpression
|
4143
|
+
| ClassExpression
|
4144
|
+
| ConditionalExpression
|
4145
|
+
| FunctionExpression
|
4146
|
+
| Identifier
|
4147
|
+
| ImportExpression
|
3834
4148
|
| SimpleLiteral
|
3835
4149
|
| RegExpLiteral
|
3836
4150
|
| BigIntLiteral
|
3837
|
-
| UpdateExpression
|
3838
|
-
| BinaryExpression
|
3839
|
-
| AssignmentExpression
|
3840
4151
|
| LogicalExpression
|
3841
4152
|
| MemberExpression
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
| NewExpression
|
4153
|
+
| MetaProperty
|
4154
|
+
| ObjectExpression
|
3845
4155
|
| SequenceExpression
|
3846
|
-
| TemplateLiteral
|
3847
4156
|
| TaggedTemplateExpression
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
| ImportExpression
|
3853
|
-
| ChainExpression;
|
4157
|
+
| TemplateLiteral
|
4158
|
+
| ThisExpression
|
4159
|
+
| UpdateExpression
|
4160
|
+
| YieldExpression;
|
3854
4161
|
declare interface ExpressionExpressionInfo {
|
3855
4162
|
type: "expression";
|
3856
4163
|
rootInfo: string | VariableInfo;
|
3857
4164
|
name: string;
|
3858
4165
|
getMembers: () => string[];
|
3859
4166
|
getMembersOptionals: () => boolean[];
|
4167
|
+
getMemberRanges: () => [number, number][];
|
3860
4168
|
}
|
3861
4169
|
declare interface ExtensionAliasOption {
|
3862
4170
|
alias: string | string[];
|
@@ -3872,7 +4180,7 @@ type ExternalItem =
|
|
3872
4180
|
| ((
|
3873
4181
|
data: ExternalItemFunctionData,
|
3874
4182
|
callback: (
|
3875
|
-
err?: Error,
|
4183
|
+
err?: null | Error,
|
3876
4184
|
result?: string | boolean | string[] | { [index: string]: any }
|
3877
4185
|
) => void
|
3878
4186
|
) => void)
|
@@ -3936,7 +4244,11 @@ declare interface ExternalItemObjectUnknown {
|
|
3936
4244
|
}
|
3937
4245
|
type ExternalItemValue = string | boolean | string[] | { [index: string]: any };
|
3938
4246
|
declare class ExternalModule extends Module {
|
3939
|
-
constructor(
|
4247
|
+
constructor(
|
4248
|
+
request: string | string[] | Record<string, string | string[]>,
|
4249
|
+
type: any,
|
4250
|
+
userRequest: string
|
4251
|
+
);
|
3940
4252
|
request: string | string[] | Record<string, string | string[]>;
|
3941
4253
|
externalType: string;
|
3942
4254
|
userRequest: string;
|
@@ -3957,7 +4269,7 @@ type Externals =
|
|
3957
4269
|
| ((
|
3958
4270
|
data: ExternalItemFunctionData,
|
3959
4271
|
callback: (
|
3960
|
-
err?: Error,
|
4272
|
+
err?: null | Error,
|
3961
4273
|
result?: string | boolean | string[] | { [index: string]: any }
|
3962
4274
|
) => void
|
3963
4275
|
) => void)
|
@@ -4052,10 +4364,13 @@ declare interface FactorizeModuleOptions {
|
|
4052
4364
|
contextInfo?: Partial<ModuleFactoryCreateDataContextInfo>;
|
4053
4365
|
context?: string;
|
4054
4366
|
}
|
4367
|
+
declare interface FactoryMeta {
|
4368
|
+
sideEffectFree?: boolean;
|
4369
|
+
}
|
4055
4370
|
type FakeHook<T> = T & FakeHookMarker;
|
4056
4371
|
declare interface FakeHookMarker {}
|
4057
4372
|
declare interface FallbackCacheGroup {
|
4058
|
-
chunksFilter: (chunk: Chunk) => boolean;
|
4373
|
+
chunksFilter: (chunk: Chunk) => undefined | boolean;
|
4059
4374
|
minSize: SplitChunksSizes;
|
4060
4375
|
maxAsyncSize: SplitChunksSizes;
|
4061
4376
|
maxInitialSize: SplitChunksSizes;
|
@@ -4070,14 +4385,20 @@ declare class FetchCompileAsyncWasmPlugin {
|
|
4070
4385
|
apply(compiler: Compiler): void;
|
4071
4386
|
}
|
4072
4387
|
declare class FetchCompileWasmPlugin {
|
4073
|
-
constructor(options?:
|
4074
|
-
options:
|
4388
|
+
constructor(options?: FetchCompileWasmPluginOptions);
|
4389
|
+
options: FetchCompileWasmPluginOptions;
|
4075
4390
|
|
4076
4391
|
/**
|
4077
4392
|
* Apply the plugin
|
4078
4393
|
*/
|
4079
4394
|
apply(compiler: Compiler): void;
|
4080
4395
|
}
|
4396
|
+
declare interface FetchCompileWasmPluginOptions {
|
4397
|
+
/**
|
4398
|
+
* mangle imports
|
4399
|
+
*/
|
4400
|
+
mangleImports?: boolean;
|
4401
|
+
}
|
4081
4402
|
|
4082
4403
|
/**
|
4083
4404
|
* Options object for persistent file-based caching.
|
@@ -4163,6 +4484,11 @@ declare interface FileCacheOptions {
|
|
4163
4484
|
*/
|
4164
4485
|
profile?: boolean;
|
4165
4486
|
|
4487
|
+
/**
|
4488
|
+
* Enable/disable readonly mode.
|
4489
|
+
*/
|
4490
|
+
readonly?: boolean;
|
4491
|
+
|
4166
4492
|
/**
|
4167
4493
|
* When to store data to the filesystem. (pack: Store data when compiler is idle in a single file).
|
4168
4494
|
*/
|
@@ -4187,17 +4513,32 @@ declare interface FileSystem {
|
|
4187
4513
|
arg2: FileSystemCallback<string | Buffer>
|
4188
4514
|
): void;
|
4189
4515
|
};
|
4190
|
-
readdir:
|
4191
|
-
|
4192
|
-
|
4193
|
-
|
4194
|
-
|
4195
|
-
|
4196
|
-
|
4197
|
-
|
4198
|
-
|
4199
|
-
|
4200
|
-
|
4516
|
+
readdir: (
|
4517
|
+
arg0: string,
|
4518
|
+
arg1?:
|
4519
|
+
| null
|
4520
|
+
| "ascii"
|
4521
|
+
| "utf8"
|
4522
|
+
| "utf16le"
|
4523
|
+
| "ucs2"
|
4524
|
+
| "latin1"
|
4525
|
+
| "binary"
|
4526
|
+
| ((
|
4527
|
+
arg0?: null | NodeJS.ErrnoException,
|
4528
|
+
arg1?: (string | Buffer)[] | (typeof Dirent)[]
|
4529
|
+
) => void)
|
4530
|
+
| ReaddirOptions
|
4531
|
+
| "utf-8"
|
4532
|
+
| "ucs-2"
|
4533
|
+
| "base64"
|
4534
|
+
| "base64url"
|
4535
|
+
| "hex"
|
4536
|
+
| "buffer",
|
4537
|
+
arg2?: (
|
4538
|
+
arg0?: null | NodeJS.ErrnoException,
|
4539
|
+
arg1?: (string | Buffer)[] | (typeof Dirent)[]
|
4540
|
+
) => void
|
4541
|
+
) => void;
|
4201
4542
|
readJson?: {
|
4202
4543
|
(arg0: string, arg1: FileSystemCallback<object>): void;
|
4203
4544
|
(arg0: string, arg1: object, arg2: FileSystemCallback<object>): void;
|
@@ -4230,11 +4571,6 @@ declare interface FileSystem {
|
|
4230
4571
|
declare interface FileSystemCallback<T> {
|
4231
4572
|
(err?: null | (PossibleFileSystemError & Error), result?: T): any;
|
4232
4573
|
}
|
4233
|
-
declare interface FileSystemDirent {
|
4234
|
-
name: string | Buffer;
|
4235
|
-
isDirectory: () => boolean;
|
4236
|
-
isFile: () => boolean;
|
4237
|
-
}
|
4238
4574
|
declare abstract class FileSystemInfo {
|
4239
4575
|
fs: InputFileSystem;
|
4240
4576
|
logger?: WebpackLogger;
|
@@ -4281,7 +4617,7 @@ declare abstract class FileSystemInfo {
|
|
4281
4617
|
): void;
|
4282
4618
|
getFileHash(
|
4283
4619
|
path: string,
|
4284
|
-
callback: (arg0?: null | WebpackError, arg1?: string) => void
|
4620
|
+
callback: (arg0?: null | WebpackError, arg1?: null | string) => void
|
4285
4621
|
): void;
|
4286
4622
|
getContextHash(
|
4287
4623
|
path: string,
|
@@ -4307,20 +4643,11 @@ declare abstract class FileSystemInfo {
|
|
4307
4643
|
callback: (arg0?: null | Error, arg1?: boolean) => void
|
4308
4644
|
): void;
|
4309
4645
|
createSnapshot(
|
4310
|
-
startTime: number,
|
4646
|
+
startTime: undefined | null | number,
|
4311
4647
|
files: Iterable<string>,
|
4312
4648
|
directories: Iterable<string>,
|
4313
4649
|
missing: Iterable<string>,
|
4314
|
-
options:
|
4315
|
-
/**
|
4316
|
-
* Use hashes of the content of the files/directories to determine invalidation.
|
4317
|
-
*/
|
4318
|
-
hash?: boolean;
|
4319
|
-
/**
|
4320
|
-
* Use timestamps of the files/directories to determine invalidation.
|
4321
|
-
*/
|
4322
|
-
timestamp?: boolean;
|
4323
|
-
},
|
4650
|
+
options: undefined | null | SnapshotOptionsFileSystemInfo,
|
4324
4651
|
callback: (arg0?: null | WebpackError, arg1?: null | Snapshot) => void
|
4325
4652
|
): void;
|
4326
4653
|
mergeSnapshots(snapshot1: Snapshot, snapshot2: Snapshot): Snapshot;
|
@@ -4401,7 +4728,7 @@ declare class Generator {
|
|
4401
4728
|
context: ConcatenationBailoutReasonContext
|
4402
4729
|
): undefined | string;
|
4403
4730
|
updateHash(hash: Hash, __1: UpdateHashContextGenerator): void;
|
4404
|
-
static byType(map
|
4731
|
+
static byType(map: Record<string, Generator>): ByTypeGenerator;
|
4405
4732
|
}
|
4406
4733
|
type GeneratorOptionsByModuleType = GeneratorOptionsByModuleTypeKnown &
|
4407
4734
|
GeneratorOptionsByModuleTypeUnknown;
|
@@ -4521,11 +4848,7 @@ declare interface HandleModuleCreationOptions {
|
|
4521
4848
|
connectOrigin?: boolean;
|
4522
4849
|
}
|
4523
4850
|
declare class HarmonyImportDependency extends ModuleDependency {
|
4524
|
-
constructor(
|
4525
|
-
request: string,
|
4526
|
-
sourceOrder: number,
|
4527
|
-
assertions?: Record<string, any>
|
4528
|
-
);
|
4851
|
+
constructor(request: string, sourceOrder: number, assertions?: Assertions);
|
4529
4852
|
sourceOrder: number;
|
4530
4853
|
getImportVar(moduleGraph: ModuleGraph): string;
|
4531
4854
|
getImportStatement(
|
@@ -4575,7 +4898,11 @@ declare interface HashableObject {
|
|
4575
4898
|
declare class HashedModuleIdsPlugin {
|
4576
4899
|
constructor(options?: HashedModuleIdsPluginOptions);
|
4577
4900
|
options: HashedModuleIdsPluginOptions;
|
4578
|
-
|
4901
|
+
|
4902
|
+
/**
|
4903
|
+
* Apply the plugin
|
4904
|
+
*/
|
4905
|
+
apply(compiler: Compiler): void;
|
4579
4906
|
}
|
4580
4907
|
declare interface HashedModuleIdsPluginOptions {
|
4581
4908
|
/**
|
@@ -4586,7 +4913,7 @@ declare interface HashedModuleIdsPluginOptions {
|
|
4586
4913
|
/**
|
4587
4914
|
* The encoding to use when generating the hash, defaults to 'base64'. All encodings from Node.JS' hash.digest are supported.
|
4588
4915
|
*/
|
4589
|
-
hashDigest?: "latin1" | "
|
4916
|
+
hashDigest?: "latin1" | "base64" | "hex";
|
4590
4917
|
|
4591
4918
|
/**
|
4592
4919
|
* The prefix length of the hash digest to use, defaults to 4.
|
@@ -4802,8 +5129,8 @@ declare abstract class InitFragment<Context> {
|
|
4802
5129
|
endContent?: string | Source;
|
4803
5130
|
getContent(context: Context): string | Source;
|
4804
5131
|
getEndContent(context: Context): undefined | string | Source;
|
4805
|
-
serialize(context
|
4806
|
-
deserialize(context
|
5132
|
+
serialize(context: ObjectSerializerContext): void;
|
5133
|
+
deserialize(context: ObjectDeserializerContext): void;
|
4807
5134
|
merge: any;
|
4808
5135
|
}
|
4809
5136
|
declare interface InputFileSystem {
|
@@ -4946,13 +5273,13 @@ declare class JavascriptParser extends Parser {
|
|
4946
5273
|
>;
|
4947
5274
|
evaluateIdentifier: HookMap<
|
4948
5275
|
SyncBailHook<
|
4949
|
-
[
|
5276
|
+
[Identifier | MemberExpression | MetaProperty | ThisExpression],
|
4950
5277
|
undefined | null | BasicEvaluatedExpression
|
4951
5278
|
>
|
4952
5279
|
>;
|
4953
5280
|
evaluateDefinedIdentifier: HookMap<
|
4954
5281
|
SyncBailHook<
|
4955
|
-
[
|
5282
|
+
[Identifier | MemberExpression | ThisExpression],
|
4956
5283
|
undefined | null | BasicEvaluatedExpression
|
4957
5284
|
>
|
4958
5285
|
>;
|
@@ -4976,32 +5303,32 @@ declare class JavascriptParser extends Parser {
|
|
4976
5303
|
[
|
4977
5304
|
(
|
4978
5305
|
| UnaryExpression
|
4979
|
-
| ThisExpression
|
4980
5306
|
| ArrayExpression
|
4981
|
-
| ObjectExpression
|
4982
|
-
| FunctionExpression
|
4983
5307
|
| ArrowFunctionExpression
|
4984
|
-
|
|
5308
|
+
| AssignmentExpression
|
5309
|
+
| AwaitExpression
|
5310
|
+
| BinaryExpression
|
5311
|
+
| SimpleCallExpression
|
5312
|
+
| NewExpression
|
5313
|
+
| ChainExpression
|
5314
|
+
| ClassExpression
|
5315
|
+
| ConditionalExpression
|
5316
|
+
| FunctionExpression
|
5317
|
+
| Identifier
|
5318
|
+
| ImportExpression
|
4985
5319
|
| SimpleLiteral
|
4986
5320
|
| RegExpLiteral
|
4987
5321
|
| BigIntLiteral
|
4988
|
-
| UpdateExpression
|
4989
|
-
| BinaryExpression
|
4990
|
-
| AssignmentExpression
|
4991
5322
|
| LogicalExpression
|
4992
5323
|
| MemberExpression
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
| NewExpression
|
5324
|
+
| MetaProperty
|
5325
|
+
| ObjectExpression
|
4996
5326
|
| SequenceExpression
|
4997
|
-
| TemplateLiteral
|
4998
5327
|
| TaggedTemplateExpression
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
| ImportExpression
|
5004
|
-
| ChainExpression
|
5328
|
+
| TemplateLiteral
|
5329
|
+
| ThisExpression
|
5330
|
+
| UpdateExpression
|
5331
|
+
| YieldExpression
|
5005
5332
|
| FunctionDeclaration
|
5006
5333
|
| VariableDeclaration
|
5007
5334
|
| ClassDeclaration
|
@@ -5112,7 +5439,7 @@ declare class JavascriptParser extends Parser {
|
|
5112
5439
|
>;
|
5113
5440
|
classBodyElement: SyncBailHook<
|
5114
5441
|
[
|
5115
|
-
MethodDefinition | PropertyDefinition,
|
5442
|
+
StaticBlock | MethodDefinition | PropertyDefinition,
|
5116
5443
|
ClassExpression | ClassDeclaration
|
5117
5444
|
],
|
5118
5445
|
boolean | void
|
@@ -5183,11 +5510,14 @@ declare class JavascriptParser extends Parser {
|
|
5183
5510
|
SyncBailHook<[AssignmentExpression, string[]], boolean | void>
|
5184
5511
|
>;
|
5185
5512
|
typeof: HookMap<SyncBailHook<[Expression], boolean | void>>;
|
5186
|
-
importCall: SyncBailHook<[
|
5513
|
+
importCall: SyncBailHook<[ImportExpression], boolean | void>;
|
5187
5514
|
topLevelAwait: SyncBailHook<[Expression], boolean | void>;
|
5188
|
-
call: HookMap<SyncBailHook<[
|
5515
|
+
call: HookMap<SyncBailHook<[CallExpression], boolean | void>>;
|
5189
5516
|
callMemberChain: HookMap<
|
5190
|
-
SyncBailHook<
|
5517
|
+
SyncBailHook<
|
5518
|
+
[CallExpression, string[], boolean[], [number, number][]],
|
5519
|
+
boolean | void
|
5520
|
+
>
|
5191
5521
|
>;
|
5192
5522
|
memberChainOfCallMemberChain: HookMap<
|
5193
5523
|
SyncBailHook<
|
@@ -5197,7 +5527,7 @@ declare class JavascriptParser extends Parser {
|
|
5197
5527
|
>;
|
5198
5528
|
callMemberChainOfCallMemberChain: HookMap<
|
5199
5529
|
SyncBailHook<
|
5200
|
-
[
|
5530
|
+
[CallExpression, string[], CallExpression, string[]],
|
5201
5531
|
boolean | void
|
5202
5532
|
>
|
5203
5533
|
>;
|
@@ -5206,13 +5536,22 @@ declare class JavascriptParser extends Parser {
|
|
5206
5536
|
binaryExpression: SyncBailHook<[BinaryExpression], boolean | void>;
|
5207
5537
|
expression: HookMap<SyncBailHook<[Expression], boolean | void>>;
|
5208
5538
|
expressionMemberChain: HookMap<
|
5209
|
-
SyncBailHook<
|
5539
|
+
SyncBailHook<
|
5540
|
+
[MemberExpression, string[], boolean[], [number, number][]],
|
5541
|
+
boolean | void
|
5542
|
+
>
|
5210
5543
|
>;
|
5211
5544
|
unhandledExpressionMemberChain: HookMap<
|
5212
|
-
SyncBailHook<[
|
5545
|
+
SyncBailHook<[MemberExpression, string[]], boolean | void>
|
5546
|
+
>;
|
5547
|
+
expressionConditionalOperator: SyncBailHook<
|
5548
|
+
[ConditionalExpression],
|
5549
|
+
boolean | void
|
5550
|
+
>;
|
5551
|
+
expressionLogicalOperator: SyncBailHook<
|
5552
|
+
[LogicalExpression],
|
5553
|
+
boolean | void
|
5213
5554
|
>;
|
5214
|
-
expressionConditionalOperator: SyncBailHook<[Expression], boolean | void>;
|
5215
|
-
expressionLogicalOperator: SyncBailHook<[Expression], boolean | void>;
|
5216
5555
|
program: SyncBailHook<[Program, Comment[]], boolean | void>;
|
5217
5556
|
finish: SyncBailHook<[Program, Comment[]], boolean | void>;
|
5218
5557
|
}>;
|
@@ -5223,32 +5562,87 @@ declare class JavascriptParser extends Parser {
|
|
5223
5562
|
semicolons: any;
|
5224
5563
|
statementPath: (
|
5225
5564
|
| UnaryExpression
|
5226
|
-
| ThisExpression
|
5227
5565
|
| ArrayExpression
|
5228
|
-
| ObjectExpression
|
5229
|
-
| FunctionExpression
|
5230
5566
|
| ArrowFunctionExpression
|
5231
|
-
|
|
5567
|
+
| AssignmentExpression
|
5568
|
+
| AwaitExpression
|
5569
|
+
| BinaryExpression
|
5570
|
+
| SimpleCallExpression
|
5571
|
+
| NewExpression
|
5572
|
+
| ChainExpression
|
5573
|
+
| ClassExpression
|
5574
|
+
| ConditionalExpression
|
5575
|
+
| FunctionExpression
|
5576
|
+
| Identifier
|
5577
|
+
| ImportExpression
|
5232
5578
|
| SimpleLiteral
|
5233
5579
|
| RegExpLiteral
|
5234
5580
|
| BigIntLiteral
|
5235
|
-
| UpdateExpression
|
5236
|
-
| BinaryExpression
|
5237
|
-
| AssignmentExpression
|
5238
5581
|
| LogicalExpression
|
5239
5582
|
| MemberExpression
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
| NewExpression
|
5583
|
+
| MetaProperty
|
5584
|
+
| ObjectExpression
|
5243
5585
|
| SequenceExpression
|
5244
|
-
| TemplateLiteral
|
5245
5586
|
| TaggedTemplateExpression
|
5587
|
+
| TemplateLiteral
|
5588
|
+
| ThisExpression
|
5589
|
+
| UpdateExpression
|
5590
|
+
| YieldExpression
|
5591
|
+
| FunctionDeclaration
|
5592
|
+
| VariableDeclaration
|
5593
|
+
| ClassDeclaration
|
5594
|
+
| ExpressionStatement
|
5595
|
+
| BlockStatement
|
5596
|
+
| StaticBlock
|
5597
|
+
| EmptyStatement
|
5598
|
+
| DebuggerStatement
|
5599
|
+
| WithStatement
|
5600
|
+
| ReturnStatement
|
5601
|
+
| LabeledStatement
|
5602
|
+
| BreakStatement
|
5603
|
+
| ContinueStatement
|
5604
|
+
| IfStatement
|
5605
|
+
| SwitchStatement
|
5606
|
+
| ThrowStatement
|
5607
|
+
| TryStatement
|
5608
|
+
| WhileStatement
|
5609
|
+
| DoWhileStatement
|
5610
|
+
| ForStatement
|
5611
|
+
| ForInStatement
|
5612
|
+
| ForOfStatement
|
5613
|
+
| ImportDeclaration
|
5614
|
+
| ExportNamedDeclaration
|
5615
|
+
| ExportDefaultDeclaration
|
5616
|
+
| ExportAllDeclaration
|
5617
|
+
)[];
|
5618
|
+
prevStatement?:
|
5619
|
+
| UnaryExpression
|
5620
|
+
| ArrayExpression
|
5621
|
+
| ArrowFunctionExpression
|
5622
|
+
| AssignmentExpression
|
5623
|
+
| AwaitExpression
|
5624
|
+
| BinaryExpression
|
5625
|
+
| SimpleCallExpression
|
5626
|
+
| NewExpression
|
5627
|
+
| ChainExpression
|
5246
5628
|
| ClassExpression
|
5247
|
-
|
|
5629
|
+
| ConditionalExpression
|
5630
|
+
| FunctionExpression
|
5248
5631
|
| Identifier
|
5249
|
-
| AwaitExpression
|
5250
5632
|
| ImportExpression
|
5251
|
-
|
|
5633
|
+
| SimpleLiteral
|
5634
|
+
| RegExpLiteral
|
5635
|
+
| BigIntLiteral
|
5636
|
+
| LogicalExpression
|
5637
|
+
| MemberExpression
|
5638
|
+
| MetaProperty
|
5639
|
+
| ObjectExpression
|
5640
|
+
| SequenceExpression
|
5641
|
+
| TaggedTemplateExpression
|
5642
|
+
| TemplateLiteral
|
5643
|
+
| ThisExpression
|
5644
|
+
| UpdateExpression
|
5645
|
+
| YieldExpression
|
5252
5646
|
| FunctionDeclaration
|
5253
5647
|
| VariableDeclaration
|
5254
5648
|
| ClassDeclaration
|
@@ -5271,17 +5665,212 @@ declare class JavascriptParser extends Parser {
|
|
5271
5665
|
| ForStatement
|
5272
5666
|
| ForInStatement
|
5273
5667
|
| ForOfStatement
|
5274
|
-
|
5275
|
-
|
5668
|
+
| ImportDeclaration
|
5669
|
+
| ExportNamedDeclaration
|
5670
|
+
| ExportDefaultDeclaration
|
5671
|
+
| ExportAllDeclaration;
|
5672
|
+
destructuringAssignmentProperties: WeakMap<Expression, Set<string>>;
|
5276
5673
|
currentTagData: any;
|
5277
|
-
|
5674
|
+
destructuringAssignmentPropertiesFor(
|
5675
|
+
node: Expression
|
5676
|
+
): undefined | Set<string>;
|
5677
|
+
getRenameIdentifier(
|
5678
|
+
expr: Expression
|
5679
|
+
): undefined | string | VariableInfoInterface;
|
5278
5680
|
walkClass(classy: ClassExpression | ClassDeclaration): void;
|
5279
|
-
|
5280
|
-
|
5281
|
-
|
5282
|
-
|
5283
|
-
|
5284
|
-
|
5681
|
+
|
5682
|
+
/**
|
5683
|
+
* Pre walking iterates the scope for variable declarations
|
5684
|
+
*/
|
5685
|
+
preWalkStatements(
|
5686
|
+
statements: (
|
5687
|
+
| FunctionDeclaration
|
5688
|
+
| VariableDeclaration
|
5689
|
+
| ClassDeclaration
|
5690
|
+
| ExpressionStatement
|
5691
|
+
| BlockStatement
|
5692
|
+
| StaticBlock
|
5693
|
+
| EmptyStatement
|
5694
|
+
| DebuggerStatement
|
5695
|
+
| WithStatement
|
5696
|
+
| ReturnStatement
|
5697
|
+
| LabeledStatement
|
5698
|
+
| BreakStatement
|
5699
|
+
| ContinueStatement
|
5700
|
+
| IfStatement
|
5701
|
+
| SwitchStatement
|
5702
|
+
| ThrowStatement
|
5703
|
+
| TryStatement
|
5704
|
+
| WhileStatement
|
5705
|
+
| DoWhileStatement
|
5706
|
+
| ForStatement
|
5707
|
+
| ForInStatement
|
5708
|
+
| ForOfStatement
|
5709
|
+
| ImportDeclaration
|
5710
|
+
| ExportNamedDeclaration
|
5711
|
+
| ExportDefaultDeclaration
|
5712
|
+
| ExportAllDeclaration
|
5713
|
+
)[]
|
5714
|
+
): void;
|
5715
|
+
|
5716
|
+
/**
|
5717
|
+
* Block pre walking iterates the scope for block variable declarations
|
5718
|
+
*/
|
5719
|
+
blockPreWalkStatements(
|
5720
|
+
statements: (
|
5721
|
+
| FunctionDeclaration
|
5722
|
+
| VariableDeclaration
|
5723
|
+
| ClassDeclaration
|
5724
|
+
| ExpressionStatement
|
5725
|
+
| BlockStatement
|
5726
|
+
| StaticBlock
|
5727
|
+
| EmptyStatement
|
5728
|
+
| DebuggerStatement
|
5729
|
+
| WithStatement
|
5730
|
+
| ReturnStatement
|
5731
|
+
| LabeledStatement
|
5732
|
+
| BreakStatement
|
5733
|
+
| ContinueStatement
|
5734
|
+
| IfStatement
|
5735
|
+
| SwitchStatement
|
5736
|
+
| ThrowStatement
|
5737
|
+
| TryStatement
|
5738
|
+
| WhileStatement
|
5739
|
+
| DoWhileStatement
|
5740
|
+
| ForStatement
|
5741
|
+
| ForInStatement
|
5742
|
+
| ForOfStatement
|
5743
|
+
| ImportDeclaration
|
5744
|
+
| ExportNamedDeclaration
|
5745
|
+
| ExportDefaultDeclaration
|
5746
|
+
| ExportAllDeclaration
|
5747
|
+
)[]
|
5748
|
+
): void;
|
5749
|
+
|
5750
|
+
/**
|
5751
|
+
* Walking iterates the statements and expressions and processes them
|
5752
|
+
*/
|
5753
|
+
walkStatements(
|
5754
|
+
statements: (
|
5755
|
+
| FunctionDeclaration
|
5756
|
+
| VariableDeclaration
|
5757
|
+
| ClassDeclaration
|
5758
|
+
| ExpressionStatement
|
5759
|
+
| BlockStatement
|
5760
|
+
| StaticBlock
|
5761
|
+
| EmptyStatement
|
5762
|
+
| DebuggerStatement
|
5763
|
+
| WithStatement
|
5764
|
+
| ReturnStatement
|
5765
|
+
| LabeledStatement
|
5766
|
+
| BreakStatement
|
5767
|
+
| ContinueStatement
|
5768
|
+
| IfStatement
|
5769
|
+
| SwitchStatement
|
5770
|
+
| ThrowStatement
|
5771
|
+
| TryStatement
|
5772
|
+
| WhileStatement
|
5773
|
+
| DoWhileStatement
|
5774
|
+
| ForStatement
|
5775
|
+
| ForInStatement
|
5776
|
+
| ForOfStatement
|
5777
|
+
| ImportDeclaration
|
5778
|
+
| ExportNamedDeclaration
|
5779
|
+
| ExportDefaultDeclaration
|
5780
|
+
| ExportAllDeclaration
|
5781
|
+
)[]
|
5782
|
+
): void;
|
5783
|
+
|
5784
|
+
/**
|
5785
|
+
* Walking iterates the statements and expressions and processes them
|
5786
|
+
*/
|
5787
|
+
preWalkStatement(
|
5788
|
+
statement:
|
5789
|
+
| FunctionDeclaration
|
5790
|
+
| VariableDeclaration
|
5791
|
+
| ClassDeclaration
|
5792
|
+
| ExpressionStatement
|
5793
|
+
| BlockStatement
|
5794
|
+
| StaticBlock
|
5795
|
+
| EmptyStatement
|
5796
|
+
| DebuggerStatement
|
5797
|
+
| WithStatement
|
5798
|
+
| ReturnStatement
|
5799
|
+
| LabeledStatement
|
5800
|
+
| BreakStatement
|
5801
|
+
| ContinueStatement
|
5802
|
+
| IfStatement
|
5803
|
+
| SwitchStatement
|
5804
|
+
| ThrowStatement
|
5805
|
+
| TryStatement
|
5806
|
+
| WhileStatement
|
5807
|
+
| DoWhileStatement
|
5808
|
+
| ForStatement
|
5809
|
+
| ForInStatement
|
5810
|
+
| ForOfStatement
|
5811
|
+
| ImportDeclaration
|
5812
|
+
| ExportNamedDeclaration
|
5813
|
+
| ExportDefaultDeclaration
|
5814
|
+
| ExportAllDeclaration
|
5815
|
+
): void;
|
5816
|
+
blockPreWalkStatement(
|
5817
|
+
statement:
|
5818
|
+
| FunctionDeclaration
|
5819
|
+
| VariableDeclaration
|
5820
|
+
| ClassDeclaration
|
5821
|
+
| ExpressionStatement
|
5822
|
+
| BlockStatement
|
5823
|
+
| StaticBlock
|
5824
|
+
| EmptyStatement
|
5825
|
+
| DebuggerStatement
|
5826
|
+
| WithStatement
|
5827
|
+
| ReturnStatement
|
5828
|
+
| LabeledStatement
|
5829
|
+
| BreakStatement
|
5830
|
+
| ContinueStatement
|
5831
|
+
| IfStatement
|
5832
|
+
| SwitchStatement
|
5833
|
+
| ThrowStatement
|
5834
|
+
| TryStatement
|
5835
|
+
| WhileStatement
|
5836
|
+
| DoWhileStatement
|
5837
|
+
| ForStatement
|
5838
|
+
| ForInStatement
|
5839
|
+
| ForOfStatement
|
5840
|
+
| ImportDeclaration
|
5841
|
+
| ExportNamedDeclaration
|
5842
|
+
| ExportDefaultDeclaration
|
5843
|
+
| ExportAllDeclaration
|
5844
|
+
): void;
|
5845
|
+
walkStatement(
|
5846
|
+
statement:
|
5847
|
+
| FunctionDeclaration
|
5848
|
+
| VariableDeclaration
|
5849
|
+
| ClassDeclaration
|
5850
|
+
| ExpressionStatement
|
5851
|
+
| BlockStatement
|
5852
|
+
| StaticBlock
|
5853
|
+
| EmptyStatement
|
5854
|
+
| DebuggerStatement
|
5855
|
+
| WithStatement
|
5856
|
+
| ReturnStatement
|
5857
|
+
| LabeledStatement
|
5858
|
+
| BreakStatement
|
5859
|
+
| ContinueStatement
|
5860
|
+
| IfStatement
|
5861
|
+
| SwitchStatement
|
5862
|
+
| ThrowStatement
|
5863
|
+
| TryStatement
|
5864
|
+
| WhileStatement
|
5865
|
+
| DoWhileStatement
|
5866
|
+
| ForStatement
|
5867
|
+
| ForInStatement
|
5868
|
+
| ForOfStatement
|
5869
|
+
| ImportDeclaration
|
5870
|
+
| ExportNamedDeclaration
|
5871
|
+
| ExportDefaultDeclaration
|
5872
|
+
| ExportAllDeclaration
|
5873
|
+
): void;
|
5285
5874
|
|
5286
5875
|
/**
|
5287
5876
|
* Walks a statements that is nested within a parent statement
|
@@ -5289,81 +5878,118 @@ declare class JavascriptParser extends Parser {
|
|
5289
5878
|
* This enforces the nested statement to never be in ASI position.
|
5290
5879
|
*/
|
5291
5880
|
walkNestedStatement(statement: Statement): void;
|
5292
|
-
preWalkBlockStatement(statement
|
5293
|
-
walkBlockStatement(statement
|
5294
|
-
walkExpressionStatement(statement
|
5295
|
-
preWalkIfStatement(statement
|
5296
|
-
walkIfStatement(statement
|
5297
|
-
preWalkLabeledStatement(statement
|
5298
|
-
walkLabeledStatement(statement
|
5299
|
-
preWalkWithStatement(statement
|
5300
|
-
walkWithStatement(statement
|
5301
|
-
preWalkSwitchStatement(statement
|
5302
|
-
walkSwitchStatement(statement
|
5303
|
-
walkTerminatingStatement(statement
|
5304
|
-
walkReturnStatement(statement
|
5305
|
-
walkThrowStatement(statement
|
5306
|
-
preWalkTryStatement(statement
|
5307
|
-
walkTryStatement(statement
|
5308
|
-
preWalkWhileStatement(statement
|
5309
|
-
walkWhileStatement(statement
|
5310
|
-
preWalkDoWhileStatement(statement
|
5311
|
-
walkDoWhileStatement(statement
|
5312
|
-
preWalkForStatement(statement
|
5313
|
-
walkForStatement(statement
|
5314
|
-
preWalkForInStatement(statement
|
5315
|
-
walkForInStatement(statement
|
5881
|
+
preWalkBlockStatement(statement: BlockStatement): void;
|
5882
|
+
walkBlockStatement(statement: BlockStatement): void;
|
5883
|
+
walkExpressionStatement(statement: ExpressionStatement): void;
|
5884
|
+
preWalkIfStatement(statement: IfStatement): void;
|
5885
|
+
walkIfStatement(statement: IfStatement): void;
|
5886
|
+
preWalkLabeledStatement(statement: LabeledStatement): void;
|
5887
|
+
walkLabeledStatement(statement: LabeledStatement): void;
|
5888
|
+
preWalkWithStatement(statement: WithStatement): void;
|
5889
|
+
walkWithStatement(statement: WithStatement): void;
|
5890
|
+
preWalkSwitchStatement(statement: SwitchStatement): void;
|
5891
|
+
walkSwitchStatement(statement: SwitchStatement): void;
|
5892
|
+
walkTerminatingStatement(statement: ReturnStatement | ThrowStatement): void;
|
5893
|
+
walkReturnStatement(statement: ReturnStatement): void;
|
5894
|
+
walkThrowStatement(statement: ThrowStatement): void;
|
5895
|
+
preWalkTryStatement(statement: TryStatement): void;
|
5896
|
+
walkTryStatement(statement: TryStatement): void;
|
5897
|
+
preWalkWhileStatement(statement: WhileStatement): void;
|
5898
|
+
walkWhileStatement(statement: WhileStatement): void;
|
5899
|
+
preWalkDoWhileStatement(statement: DoWhileStatement): void;
|
5900
|
+
walkDoWhileStatement(statement: DoWhileStatement): void;
|
5901
|
+
preWalkForStatement(statement: ForStatement): void;
|
5902
|
+
walkForStatement(statement: ForStatement): void;
|
5903
|
+
preWalkForInStatement(statement: ForInStatement): void;
|
5904
|
+
walkForInStatement(statement: ForInStatement): void;
|
5316
5905
|
preWalkForOfStatement(statement?: any): void;
|
5317
|
-
walkForOfStatement(statement
|
5318
|
-
preWalkFunctionDeclaration(statement
|
5319
|
-
walkFunctionDeclaration(statement
|
5906
|
+
walkForOfStatement(statement: ForOfStatement): void;
|
5907
|
+
preWalkFunctionDeclaration(statement: FunctionDeclaration): void;
|
5908
|
+
walkFunctionDeclaration(statement: FunctionDeclaration): void;
|
5909
|
+
blockPreWalkExpressionStatement(statement: ExpressionStatement): void;
|
5910
|
+
preWalkAssignmentExpression(expression: AssignmentExpression): void;
|
5320
5911
|
blockPreWalkImportDeclaration(statement?: any): void;
|
5321
5912
|
enterDeclaration(declaration?: any, onIdent?: any): void;
|
5322
5913
|
blockPreWalkExportNamedDeclaration(statement?: any): void;
|
5323
|
-
walkExportNamedDeclaration(statement
|
5914
|
+
walkExportNamedDeclaration(statement: ExportNamedDeclaration): void;
|
5324
5915
|
blockPreWalkExportDefaultDeclaration(statement?: any): void;
|
5325
5916
|
walkExportDefaultDeclaration(statement?: any): void;
|
5326
5917
|
blockPreWalkExportAllDeclaration(statement?: any): void;
|
5327
|
-
preWalkVariableDeclaration(statement
|
5328
|
-
blockPreWalkVariableDeclaration(statement
|
5329
|
-
|
5330
|
-
|
5331
|
-
|
5332
|
-
|
5333
|
-
|
5334
|
-
|
5335
|
-
|
5336
|
-
|
5337
|
-
|
5918
|
+
preWalkVariableDeclaration(statement: VariableDeclaration): void;
|
5919
|
+
blockPreWalkVariableDeclaration(statement: VariableDeclaration): void;
|
5920
|
+
preWalkVariableDeclarator(declarator: VariableDeclarator): void;
|
5921
|
+
walkVariableDeclaration(statement: VariableDeclaration): void;
|
5922
|
+
blockPreWalkClassDeclaration(statement: ClassDeclaration): void;
|
5923
|
+
walkClassDeclaration(statement: ClassDeclaration): void;
|
5924
|
+
preWalkSwitchCases(switchCases: SwitchCase[]): void;
|
5925
|
+
walkSwitchCases(switchCases: SwitchCase[]): void;
|
5926
|
+
preWalkCatchClause(catchClause: CatchClause): void;
|
5927
|
+
walkCatchClause(catchClause: CatchClause): void;
|
5928
|
+
walkPattern(pattern: Pattern): void;
|
5929
|
+
walkAssignmentPattern(pattern: AssignmentPattern): void;
|
5338
5930
|
walkObjectPattern(pattern?: any): void;
|
5339
|
-
walkArrayPattern(pattern
|
5340
|
-
walkRestElement(pattern
|
5341
|
-
walkExpressions(
|
5931
|
+
walkArrayPattern(pattern: ArrayPattern): void;
|
5932
|
+
walkRestElement(pattern: RestElement): void;
|
5933
|
+
walkExpressions(
|
5934
|
+
expressions: (
|
5935
|
+
| null
|
5936
|
+
| UnaryExpression
|
5937
|
+
| ArrayExpression
|
5938
|
+
| ArrowFunctionExpression
|
5939
|
+
| AssignmentExpression
|
5940
|
+
| AwaitExpression
|
5941
|
+
| BinaryExpression
|
5942
|
+
| SimpleCallExpression
|
5943
|
+
| NewExpression
|
5944
|
+
| ChainExpression
|
5945
|
+
| ClassExpression
|
5946
|
+
| ConditionalExpression
|
5947
|
+
| FunctionExpression
|
5948
|
+
| Identifier
|
5949
|
+
| ImportExpression
|
5950
|
+
| SimpleLiteral
|
5951
|
+
| RegExpLiteral
|
5952
|
+
| BigIntLiteral
|
5953
|
+
| LogicalExpression
|
5954
|
+
| MemberExpression
|
5955
|
+
| MetaProperty
|
5956
|
+
| ObjectExpression
|
5957
|
+
| SequenceExpression
|
5958
|
+
| TaggedTemplateExpression
|
5959
|
+
| TemplateLiteral
|
5960
|
+
| ThisExpression
|
5961
|
+
| UpdateExpression
|
5962
|
+
| YieldExpression
|
5963
|
+
| SpreadElement
|
5964
|
+
)[]
|
5965
|
+
): void;
|
5342
5966
|
walkExpression(expression?: any): void;
|
5343
|
-
walkAwaitExpression(expression
|
5344
|
-
walkArrayExpression(expression
|
5345
|
-
walkSpreadElement(expression
|
5346
|
-
walkObjectExpression(expression
|
5347
|
-
walkProperty(prop
|
5348
|
-
walkFunctionExpression(expression
|
5349
|
-
walkArrowFunctionExpression(expression
|
5967
|
+
walkAwaitExpression(expression: AwaitExpression): void;
|
5968
|
+
walkArrayExpression(expression: ArrayExpression): void;
|
5969
|
+
walkSpreadElement(expression: SpreadElement): void;
|
5970
|
+
walkObjectExpression(expression: ObjectExpression): void;
|
5971
|
+
walkProperty(prop: SpreadElement | Property): void;
|
5972
|
+
walkFunctionExpression(expression: FunctionExpression): void;
|
5973
|
+
walkArrowFunctionExpression(expression: ArrowFunctionExpression): void;
|
5350
5974
|
walkSequenceExpression(expression: SequenceExpression): void;
|
5351
|
-
walkUpdateExpression(expression
|
5352
|
-
walkUnaryExpression(expression
|
5353
|
-
walkLeftRightExpression(
|
5354
|
-
|
5355
|
-
|
5356
|
-
|
5357
|
-
|
5358
|
-
|
5359
|
-
|
5360
|
-
|
5361
|
-
|
5362
|
-
|
5975
|
+
walkUpdateExpression(expression: UpdateExpression): void;
|
5976
|
+
walkUnaryExpression(expression: UnaryExpression): void;
|
5977
|
+
walkLeftRightExpression(
|
5978
|
+
expression: BinaryExpression | LogicalExpression
|
5979
|
+
): void;
|
5980
|
+
walkBinaryExpression(expression: BinaryExpression): void;
|
5981
|
+
walkLogicalExpression(expression: LogicalExpression): void;
|
5982
|
+
walkAssignmentExpression(expression: AssignmentExpression): void;
|
5983
|
+
walkConditionalExpression(expression: ConditionalExpression): void;
|
5984
|
+
walkNewExpression(expression: NewExpression): void;
|
5985
|
+
walkYieldExpression(expression: YieldExpression): void;
|
5986
|
+
walkTemplateLiteral(expression: TemplateLiteral): void;
|
5987
|
+
walkTaggedTemplateExpression(expression: TaggedTemplateExpression): void;
|
5988
|
+
walkClassExpression(expression: ClassExpression): void;
|
5363
5989
|
walkChainExpression(expression: ChainExpression): void;
|
5364
|
-
walkImportExpression(expression
|
5990
|
+
walkImportExpression(expression: ImportExpression): void;
|
5365
5991
|
walkCallExpression(expression?: any): void;
|
5366
|
-
walkMemberExpression(expression
|
5992
|
+
walkMemberExpression(expression: MemberExpression): void;
|
5367
5993
|
walkMemberExpressionWithExpressionName(
|
5368
5994
|
expression?: any,
|
5369
5995
|
name?: any,
|
@@ -5371,58 +5997,91 @@ declare class JavascriptParser extends Parser {
|
|
5371
5997
|
members?: any,
|
5372
5998
|
onUnhandled?: any
|
5373
5999
|
): void;
|
5374
|
-
walkThisExpression(expression
|
5375
|
-
walkIdentifier(expression
|
6000
|
+
walkThisExpression(expression: ThisExpression): void;
|
6001
|
+
walkIdentifier(expression: Identifier): void;
|
5376
6002
|
walkMetaProperty(metaProperty: MetaProperty): void;
|
5377
6003
|
callHooksForExpression(hookMap: any, expr: any, ...args: any[]): any;
|
5378
6004
|
callHooksForExpressionWithFallback<T, R>(
|
5379
6005
|
hookMap: HookMap<SyncBailHook<T, R>>,
|
5380
6006
|
expr: MemberExpression,
|
5381
|
-
fallback:
|
5382
|
-
|
5383
|
-
|
5384
|
-
|
5385
|
-
|
5386
|
-
|
6007
|
+
fallback:
|
6008
|
+
| undefined
|
6009
|
+
| ((
|
6010
|
+
arg0: string,
|
6011
|
+
arg1: string | ScopeInfo | VariableInfo,
|
6012
|
+
arg2: () => string[]
|
6013
|
+
) => any),
|
6014
|
+
defined: undefined | ((arg0: string) => any),
|
5387
6015
|
...args: AsArray<T>
|
5388
|
-
): R;
|
6016
|
+
): undefined | R;
|
5389
6017
|
callHooksForName<T, R>(
|
5390
6018
|
hookMap: HookMap<SyncBailHook<T, R>>,
|
5391
6019
|
name: string,
|
5392
6020
|
...args: AsArray<T>
|
5393
|
-
): R;
|
6021
|
+
): undefined | R;
|
5394
6022
|
callHooksForInfo<T, R>(
|
5395
6023
|
hookMap: HookMap<SyncBailHook<T, R>>,
|
5396
6024
|
info: ExportedVariableInfo,
|
5397
6025
|
...args: AsArray<T>
|
5398
|
-
): R;
|
6026
|
+
): undefined | R;
|
5399
6027
|
callHooksForInfoWithFallback<T, R>(
|
5400
6028
|
hookMap: HookMap<SyncBailHook<T, R>>,
|
5401
6029
|
info: ExportedVariableInfo,
|
5402
|
-
fallback: (arg0: string) => any,
|
5403
|
-
defined: () => any,
|
6030
|
+
fallback: undefined | ((arg0: string) => any),
|
6031
|
+
defined: undefined | (() => any),
|
5404
6032
|
...args: AsArray<T>
|
5405
|
-
): R;
|
6033
|
+
): undefined | R;
|
5406
6034
|
callHooksForNameWithFallback<T, R>(
|
5407
6035
|
hookMap: HookMap<SyncBailHook<T, R>>,
|
5408
6036
|
name: string,
|
5409
|
-
fallback: (arg0: string) => any,
|
5410
|
-
defined: () => any,
|
6037
|
+
fallback: undefined | ((arg0: string) => any),
|
6038
|
+
defined: undefined | (() => any),
|
5411
6039
|
...args: AsArray<T>
|
5412
|
-
): R;
|
6040
|
+
): undefined | R;
|
5413
6041
|
inScope(params: any, fn: () => void): void;
|
5414
|
-
|
5415
|
-
|
5416
|
-
|
6042
|
+
inClassScope(hasThis: boolean, params: any, fn: () => void): void;
|
6043
|
+
inFunctionScope(hasThis: boolean, params: any, fn: () => void): void;
|
6044
|
+
inBlockScope(fn: () => void): void;
|
6045
|
+
detectMode(
|
6046
|
+
statements: (
|
6047
|
+
| FunctionDeclaration
|
6048
|
+
| VariableDeclaration
|
6049
|
+
| ClassDeclaration
|
6050
|
+
| ExpressionStatement
|
6051
|
+
| BlockStatement
|
6052
|
+
| StaticBlock
|
6053
|
+
| EmptyStatement
|
6054
|
+
| DebuggerStatement
|
6055
|
+
| WithStatement
|
6056
|
+
| ReturnStatement
|
6057
|
+
| LabeledStatement
|
6058
|
+
| BreakStatement
|
6059
|
+
| ContinueStatement
|
6060
|
+
| IfStatement
|
6061
|
+
| SwitchStatement
|
6062
|
+
| ThrowStatement
|
6063
|
+
| TryStatement
|
6064
|
+
| WhileStatement
|
6065
|
+
| DoWhileStatement
|
6066
|
+
| ForStatement
|
6067
|
+
| ForInStatement
|
6068
|
+
| ForOfStatement
|
6069
|
+
| ImportDeclaration
|
6070
|
+
| ExportNamedDeclaration
|
6071
|
+
| ExportDefaultDeclaration
|
6072
|
+
| ExportAllDeclaration
|
6073
|
+
| Directive
|
6074
|
+
)[]
|
6075
|
+
): void;
|
5417
6076
|
enterPatterns(patterns?: any, onIdent?: any): void;
|
5418
6077
|
enterPattern(pattern?: any, onIdent?: any): void;
|
5419
|
-
enterIdentifier(pattern
|
5420
|
-
enterObjectPattern(pattern
|
5421
|
-
enterArrayPattern(pattern
|
5422
|
-
enterRestElement(pattern
|
5423
|
-
enterAssignmentPattern(pattern
|
5424
|
-
evaluateExpression(expression
|
5425
|
-
parseString(expression
|
6078
|
+
enterIdentifier(pattern: Identifier, onIdent?: any): void;
|
6079
|
+
enterObjectPattern(pattern: ObjectPattern, onIdent?: any): void;
|
6080
|
+
enterArrayPattern(pattern: ArrayPattern, onIdent?: any): void;
|
6081
|
+
enterRestElement(pattern: RestElement, onIdent?: any): void;
|
6082
|
+
enterAssignmentPattern(pattern: AssignmentPattern, onIdent?: any): void;
|
6083
|
+
evaluateExpression(expression?: any): BasicEvaluatedExpression;
|
6084
|
+
parseString(expression: Expression): string;
|
5426
6085
|
parseCalculatedString(expression?: any): any;
|
5427
6086
|
evaluate(source: string): BasicEvaluatedExpression;
|
5428
6087
|
isPure(
|
@@ -5430,99 +6089,101 @@ declare class JavascriptParser extends Parser {
|
|
5430
6089
|
| undefined
|
5431
6090
|
| null
|
5432
6091
|
| UnaryExpression
|
5433
|
-
| ThisExpression
|
5434
6092
|
| ArrayExpression
|
5435
|
-
| ObjectExpression
|
5436
|
-
| FunctionExpression
|
5437
6093
|
| ArrowFunctionExpression
|
5438
|
-
|
|
6094
|
+
| AssignmentExpression
|
6095
|
+
| AwaitExpression
|
6096
|
+
| BinaryExpression
|
6097
|
+
| SimpleCallExpression
|
6098
|
+
| NewExpression
|
6099
|
+
| ChainExpression
|
6100
|
+
| ClassExpression
|
6101
|
+
| ConditionalExpression
|
6102
|
+
| FunctionExpression
|
6103
|
+
| Identifier
|
6104
|
+
| ImportExpression
|
5439
6105
|
| SimpleLiteral
|
5440
6106
|
| RegExpLiteral
|
5441
6107
|
| BigIntLiteral
|
5442
|
-
| UpdateExpression
|
5443
|
-
| BinaryExpression
|
5444
|
-
| AssignmentExpression
|
5445
6108
|
| LogicalExpression
|
5446
6109
|
| MemberExpression
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
| NewExpression
|
6110
|
+
| MetaProperty
|
6111
|
+
| ObjectExpression
|
5450
6112
|
| SequenceExpression
|
5451
|
-
| TemplateLiteral
|
5452
6113
|
| TaggedTemplateExpression
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
| ImportExpression
|
5458
|
-
| ChainExpression
|
6114
|
+
| TemplateLiteral
|
6115
|
+
| ThisExpression
|
6116
|
+
| UpdateExpression
|
6117
|
+
| YieldExpression
|
5459
6118
|
| FunctionDeclaration
|
5460
6119
|
| VariableDeclaration
|
5461
6120
|
| ClassDeclaration
|
5462
6121
|
| PrivateIdentifier,
|
5463
6122
|
commentsStartPos: number
|
5464
6123
|
): boolean;
|
5465
|
-
getComments(range
|
6124
|
+
getComments(range: [number, number]): any[];
|
5466
6125
|
isAsiPosition(pos: number): boolean;
|
5467
6126
|
unsetAsiPosition(pos: number): void;
|
5468
|
-
isStatementLevelExpression(expr
|
6127
|
+
isStatementLevelExpression(expr: Expression): boolean;
|
5469
6128
|
getTagData(name?: any, tag?: any): any;
|
5470
6129
|
tagVariable(name?: any, tag?: any, data?: any): void;
|
5471
|
-
defineVariable(name
|
5472
|
-
undefineVariable(name
|
5473
|
-
isVariableDefined(name
|
6130
|
+
defineVariable(name: string): void;
|
6131
|
+
undefineVariable(name: string): void;
|
6132
|
+
isVariableDefined(name: string): boolean;
|
5474
6133
|
getVariableInfo(name: string): ExportedVariableInfo;
|
5475
6134
|
setVariable(name: string, variableInfo: ExportedVariableInfo): void;
|
5476
|
-
evaluatedVariable(tagInfo
|
5477
|
-
parseCommentOptions(
|
5478
|
-
range?: any
|
5479
|
-
): { options: null; errors: null } | { options: object; errors: unknown[] };
|
6135
|
+
evaluatedVariable(tagInfo: TagInfo): VariableInfo;
|
6136
|
+
parseCommentOptions(range: [number, number]): any;
|
5480
6137
|
extractMemberExpressionChain(expression: MemberExpression): {
|
5481
6138
|
members: string[];
|
5482
6139
|
object:
|
5483
6140
|
| UnaryExpression
|
5484
|
-
| ThisExpression
|
5485
6141
|
| ArrayExpression
|
5486
|
-
| ObjectExpression
|
5487
|
-
| FunctionExpression
|
5488
6142
|
| ArrowFunctionExpression
|
5489
|
-
|
|
6143
|
+
| AssignmentExpression
|
6144
|
+
| AwaitExpression
|
6145
|
+
| BinaryExpression
|
6146
|
+
| SimpleCallExpression
|
6147
|
+
| NewExpression
|
6148
|
+
| ChainExpression
|
6149
|
+
| ClassExpression
|
6150
|
+
| ConditionalExpression
|
6151
|
+
| FunctionExpression
|
6152
|
+
| Identifier
|
6153
|
+
| ImportExpression
|
5490
6154
|
| SimpleLiteral
|
5491
6155
|
| RegExpLiteral
|
5492
6156
|
| BigIntLiteral
|
5493
|
-
| UpdateExpression
|
5494
|
-
| BinaryExpression
|
5495
|
-
| AssignmentExpression
|
5496
6157
|
| LogicalExpression
|
5497
6158
|
| MemberExpression
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
| NewExpression
|
6159
|
+
| MetaProperty
|
6160
|
+
| ObjectExpression
|
5501
6161
|
| SequenceExpression
|
5502
|
-
| TemplateLiteral
|
5503
6162
|
| TaggedTemplateExpression
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
| ImportExpression
|
5509
|
-
| ChainExpression
|
6163
|
+
| TemplateLiteral
|
6164
|
+
| ThisExpression
|
6165
|
+
| UpdateExpression
|
6166
|
+
| YieldExpression
|
5510
6167
|
| Super;
|
5511
6168
|
membersOptionals: boolean[];
|
6169
|
+
memberRanges: [number, number][];
|
5512
6170
|
};
|
5513
|
-
getFreeInfoFromVariable(
|
5514
|
-
|
5515
|
-
|
5516
|
-
};
|
6171
|
+
getFreeInfoFromVariable(
|
6172
|
+
varName: string
|
6173
|
+
): undefined | { name: string; info: string | VariableInfo };
|
5517
6174
|
getMemberExpressionInfo(
|
5518
6175
|
expression: MemberExpression,
|
5519
6176
|
allowedTypes: number
|
5520
6177
|
): undefined | CallExpressionInfo | ExpressionExpressionInfo;
|
5521
|
-
getNameForExpression(
|
5522
|
-
|
5523
|
-
|
5524
|
-
|
5525
|
-
|
6178
|
+
getNameForExpression(
|
6179
|
+
expression: MemberExpression
|
6180
|
+
):
|
6181
|
+
| undefined
|
6182
|
+
| {
|
6183
|
+
name: string;
|
6184
|
+
rootInfo: ExportedVariableInfo;
|
6185
|
+
getMembers: () => string[];
|
6186
|
+
};
|
5526
6187
|
static ALLOWED_MEMBER_TYPES_ALL: 3;
|
5527
6188
|
static ALLOWED_MEMBER_TYPES_EXPRESSION: 2;
|
5528
6189
|
static ALLOWED_MEMBER_TYPES_CALL_EXPRESSION: 1;
|
@@ -5559,6 +6220,11 @@ declare interface JavascriptParserOptions {
|
|
5559
6220
|
*/
|
5560
6221
|
createRequire?: string | boolean;
|
5561
6222
|
|
6223
|
+
/**
|
6224
|
+
* Specifies global fetchPriority for dynamic import.
|
6225
|
+
*/
|
6226
|
+
dynamicImportFetchPriority?: false | "auto" | "low" | "high";
|
6227
|
+
|
5562
6228
|
/**
|
5563
6229
|
* Specifies global mode for dynamic import.
|
5564
6230
|
*/
|
@@ -5714,8 +6380,19 @@ declare interface JavascriptParserOptions {
|
|
5714
6380
|
*/
|
5715
6381
|
wrappedContextRegExp?: RegExp;
|
5716
6382
|
}
|
6383
|
+
type JsonObject = { [index: string]: JsonValue } & {
|
6384
|
+
[index: string]:
|
6385
|
+
| undefined
|
6386
|
+
| null
|
6387
|
+
| string
|
6388
|
+
| number
|
6389
|
+
| boolean
|
6390
|
+
| JsonObject
|
6391
|
+
| JsonValue[];
|
6392
|
+
};
|
6393
|
+
type JsonValue = null | string | number | boolean | JsonObject | JsonValue[];
|
5717
6394
|
declare class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
|
5718
|
-
constructor(runtimeRequirements
|
6395
|
+
constructor(runtimeRequirements: Set<string>);
|
5719
6396
|
static getCompilationHooks(
|
5720
6397
|
compilation: Compilation
|
5721
6398
|
): JsonpCompilationPluginHooks;
|
@@ -5830,6 +6507,23 @@ declare interface KnownBuildMeta {
|
|
5830
6507
|
declare interface KnownCreateStatsOptionsContext {
|
5831
6508
|
forToString?: boolean;
|
5832
6509
|
}
|
6510
|
+
declare interface KnownHooks {
|
6511
|
+
resolveStep: SyncHook<
|
6512
|
+
[
|
6513
|
+
AsyncSeriesBailHook<
|
6514
|
+
[ResolveRequest, ResolveContext],
|
6515
|
+
null | ResolveRequest
|
6516
|
+
>,
|
6517
|
+
ResolveRequest
|
6518
|
+
]
|
6519
|
+
>;
|
6520
|
+
noResolve: SyncHook<[ResolveRequest, Error]>;
|
6521
|
+
resolve: AsyncSeriesBailHook<
|
6522
|
+
[ResolveRequest, ResolveContext],
|
6523
|
+
null | ResolveRequest
|
6524
|
+
>;
|
6525
|
+
result: AsyncSeriesHook<[ResolveRequest, ResolveContext]>;
|
6526
|
+
}
|
5833
6527
|
declare interface KnownNormalizedStatsOptions {
|
5834
6528
|
context: string;
|
5835
6529
|
requestShortener: RequestShortener;
|
@@ -6133,7 +6827,10 @@ declare interface LazyCompilationDefaultBackendOptions {
|
|
6133
6827
|
/**
|
6134
6828
|
* Specifies how to create the server handling the EventSource requests.
|
6135
6829
|
*/
|
6136
|
-
server?:
|
6830
|
+
server?:
|
6831
|
+
| ServerOptionsImport<typeof IncomingMessage>
|
6832
|
+
| ServerOptionsHttps<typeof IncomingMessage, typeof ServerResponse>
|
6833
|
+
| (() => typeof Server);
|
6137
6834
|
}
|
6138
6835
|
|
6139
6836
|
/**
|
@@ -6181,9 +6878,9 @@ declare class LazySet<T> {
|
|
6181
6878
|
has(item: T): boolean;
|
6182
6879
|
keys(): IterableIterator<T>;
|
6183
6880
|
values(): IterableIterator<T>;
|
6184
|
-
serialize(__0:
|
6881
|
+
serialize(__0: ObjectSerializerContext): void;
|
6185
6882
|
[Symbol.iterator](): IterableIterator<T>;
|
6186
|
-
static deserialize(__0:
|
6883
|
+
static deserialize<T>(__0: ObjectDeserializerContext): LazySet<T>;
|
6187
6884
|
}
|
6188
6885
|
declare interface LibIdentOptions {
|
6189
6886
|
/**
|
@@ -6197,14 +6894,45 @@ declare interface LibIdentOptions {
|
|
6197
6894
|
associatedObjectForCache?: Object;
|
6198
6895
|
}
|
6199
6896
|
declare class LibManifestPlugin {
|
6200
|
-
constructor(options
|
6201
|
-
options:
|
6897
|
+
constructor(options: LibManifestPluginOptions);
|
6898
|
+
options: LibManifestPluginOptions;
|
6202
6899
|
|
6203
6900
|
/**
|
6204
6901
|
* Apply the plugin
|
6205
6902
|
*/
|
6206
6903
|
apply(compiler: Compiler): void;
|
6207
6904
|
}
|
6905
|
+
declare interface LibManifestPluginOptions {
|
6906
|
+
/**
|
6907
|
+
* Context of requests in the manifest file (defaults to the webpack context).
|
6908
|
+
*/
|
6909
|
+
context?: string;
|
6910
|
+
|
6911
|
+
/**
|
6912
|
+
* If true, only entry points will be exposed (default: true).
|
6913
|
+
*/
|
6914
|
+
entryOnly?: boolean;
|
6915
|
+
|
6916
|
+
/**
|
6917
|
+
* If true, manifest json file (output) will be formatted.
|
6918
|
+
*/
|
6919
|
+
format?: boolean;
|
6920
|
+
|
6921
|
+
/**
|
6922
|
+
* Name of the exposed dll function (external name, use value of 'output.library').
|
6923
|
+
*/
|
6924
|
+
name?: string;
|
6925
|
+
|
6926
|
+
/**
|
6927
|
+
* Absolute path to the manifest json file (output).
|
6928
|
+
*/
|
6929
|
+
path: string;
|
6930
|
+
|
6931
|
+
/**
|
6932
|
+
* Type of the dll bundle (external type, use value of 'output.libraryTarget').
|
6933
|
+
*/
|
6934
|
+
type?: string;
|
6935
|
+
}
|
6208
6936
|
declare interface LibraryContext<T> {
|
6209
6937
|
compilation: Compilation;
|
6210
6938
|
chunkGraph: ChunkGraph;
|
@@ -6262,6 +6990,11 @@ type LibraryName = string | string[] | LibraryCustomUmdObject;
|
|
6262
6990
|
* Options for library.
|
6263
6991
|
*/
|
6264
6992
|
declare interface LibraryOptions {
|
6993
|
+
/**
|
6994
|
+
* Add a container for define/require functions in the AMD module.
|
6995
|
+
*/
|
6996
|
+
amdContainer?: string;
|
6997
|
+
|
6265
6998
|
/**
|
6266
6999
|
* Add a comment in the UMD wrapper.
|
6267
7000
|
*/
|
@@ -6333,7 +7066,7 @@ declare interface LoadScriptCompilationHooks {
|
|
6333
7066
|
createScript: SyncWaterfallHook<[string, Chunk]>;
|
6334
7067
|
}
|
6335
7068
|
declare class LoadScriptRuntimeModule extends HelperRuntimeModule {
|
6336
|
-
constructor(withCreateScriptUrl?: boolean);
|
7069
|
+
constructor(withCreateScriptUrl?: boolean, withFetchPriority?: boolean);
|
6337
7070
|
static getCompilationHooks(
|
6338
7071
|
compilation: Compilation
|
6339
7072
|
): LoadScriptCompilationHooks;
|
@@ -6405,8 +7138,8 @@ declare interface LoaderModule<OptionsType = {}, ContextAdditions = {}> {
|
|
6405
7138
|
pitch?: PitchLoaderDefinitionFunction<OptionsType, ContextAdditions>;
|
6406
7139
|
}
|
6407
7140
|
declare class LoaderOptionsPlugin {
|
6408
|
-
constructor(options?: LoaderOptionsPluginOptions);
|
6409
|
-
options: LoaderOptionsPluginOptions;
|
7141
|
+
constructor(options?: LoaderOptionsPluginOptions & MatchObject);
|
7142
|
+
options: LoaderOptionsPluginOptions & MatchObject;
|
6410
7143
|
|
6411
7144
|
/**
|
6412
7145
|
* Apply the plugin
|
@@ -6570,6 +7303,7 @@ declare interface LoaderRunnerLoaderContext<OptionsType> {
|
|
6570
7303
|
data?: object;
|
6571
7304
|
pitchExecuted: boolean;
|
6572
7305
|
normalExecuted: boolean;
|
7306
|
+
type?: "module" | "commonjs";
|
6573
7307
|
}[];
|
6574
7308
|
|
6575
7309
|
/**
|
@@ -6600,7 +7334,13 @@ declare interface LoaderRunnerLoaderContext<OptionsType> {
|
|
6600
7334
|
* Target of compilation.
|
6601
7335
|
* Example: "web"
|
6602
7336
|
*/
|
6603
|
-
target: string;
|
7337
|
+
target: string;
|
7338
|
+
|
7339
|
+
/**
|
7340
|
+
* Tell what kind of ES-features may be used in the generated runtime-code.
|
7341
|
+
* Example: { arrowFunction: true }
|
7342
|
+
*/
|
7343
|
+
environment: Environment;
|
6604
7344
|
}
|
6605
7345
|
declare class LoaderTargetPlugin {
|
6606
7346
|
constructor(target: string);
|
@@ -6704,6 +7444,12 @@ declare interface MapOptions {
|
|
6704
7444
|
columns?: boolean;
|
6705
7445
|
module?: boolean;
|
6706
7446
|
}
|
7447
|
+
declare interface MatchObject {
|
7448
|
+
test?: string | RegExp | (string | RegExp)[];
|
7449
|
+
include?: string | RegExp | (string | RegExp)[];
|
7450
|
+
exclude?: string | RegExp | (string | RegExp)[];
|
7451
|
+
}
|
7452
|
+
type Matcher = string | RegExp | (string | RegExp)[];
|
6707
7453
|
|
6708
7454
|
/**
|
6709
7455
|
* Options object for in-memory caching.
|
@@ -6758,27 +7504,27 @@ declare interface MinChunkSizePluginOptions {
|
|
6758
7504
|
minChunkSize: number;
|
6759
7505
|
}
|
6760
7506
|
declare class Module extends DependenciesBlock {
|
6761
|
-
constructor(type: string, context?: string, layer?: string);
|
7507
|
+
constructor(type: string, context?: null | string, layer?: null | string);
|
6762
7508
|
type: string;
|
6763
7509
|
context: null | string;
|
6764
7510
|
layer: null | string;
|
6765
7511
|
needId: boolean;
|
6766
7512
|
debugId: number;
|
6767
|
-
resolveOptions
|
6768
|
-
factoryMeta?:
|
7513
|
+
resolveOptions?: ResolveOptionsWebpackOptions;
|
7514
|
+
factoryMeta?: FactoryMeta;
|
6769
7515
|
useSourceMap: boolean;
|
6770
7516
|
useSimpleSourceMap: boolean;
|
6771
|
-
buildMeta
|
6772
|
-
buildInfo
|
7517
|
+
buildMeta?: BuildMeta;
|
7518
|
+
buildInfo?: BuildInfo;
|
6773
7519
|
presentationalDependencies?: Dependency[];
|
6774
7520
|
codeGenerationDependencies?: Dependency[];
|
6775
7521
|
id: string | number;
|
6776
7522
|
get hash(): string;
|
6777
7523
|
get renderedHash(): string;
|
6778
7524
|
profile: null | ModuleProfile;
|
6779
|
-
index: number;
|
6780
|
-
index2: number;
|
6781
|
-
depth: number;
|
7525
|
+
index: null | number;
|
7526
|
+
index2: null | number;
|
7527
|
+
depth: null | number;
|
6782
7528
|
issuer: null | Module;
|
6783
7529
|
get usedExports(): null | boolean | SortableSet<string>;
|
6784
7530
|
get optimizationBailout(): (
|
@@ -6786,9 +7532,9 @@ declare class Module extends DependenciesBlock {
|
|
6786
7532
|
| ((requestShortener: RequestShortener) => string)
|
6787
7533
|
)[];
|
6788
7534
|
get optional(): boolean;
|
6789
|
-
addChunk(chunk
|
6790
|
-
removeChunk(chunk
|
6791
|
-
isInChunk(chunk
|
7535
|
+
addChunk(chunk: Chunk): boolean;
|
7536
|
+
removeChunk(chunk: Chunk): void;
|
7537
|
+
isInChunk(chunk: Chunk): boolean;
|
6792
7538
|
isEntryModule(): boolean;
|
6793
7539
|
getChunks(): Chunk[];
|
6794
7540
|
getNumberOfChunks(): number;
|
@@ -6798,7 +7544,7 @@ declare class Module extends DependenciesBlock {
|
|
6798
7544
|
get moduleArgument(): string;
|
6799
7545
|
getExportsType(
|
6800
7546
|
moduleGraph: ModuleGraph,
|
6801
|
-
strict
|
7547
|
+
strict?: boolean
|
6802
7548
|
): "namespace" | "default-only" | "default-with-named" | "dynamic";
|
6803
7549
|
addPresentationalDependency(presentationalDependency: Dependency): void;
|
6804
7550
|
addCodeGenerationDependency(codeGenerationDependency: Dependency): void;
|
@@ -6918,7 +7664,7 @@ declare class ModuleDependency extends Dependency {
|
|
6918
7664
|
declare abstract class ModuleFactory {
|
6919
7665
|
create(
|
6920
7666
|
data: ModuleFactoryCreateData,
|
6921
|
-
callback: (arg0?: Error, arg1?: ModuleFactoryResult) => void
|
7667
|
+
callback: (arg0?: null | Error, arg1?: ModuleFactoryResult) => void
|
6922
7668
|
): void;
|
6923
7669
|
}
|
6924
7670
|
declare interface ModuleFactoryCreateData {
|
@@ -7062,11 +7808,11 @@ declare class ModuleGraph {
|
|
7062
7808
|
filterConnection: (arg0: ModuleGraphConnection) => boolean
|
7063
7809
|
): void;
|
7064
7810
|
addExtraReason(module: Module, explanation: string): void;
|
7065
|
-
getResolvedModule(dependency: Dependency): Module;
|
7811
|
+
getResolvedModule(dependency: Dependency): null | Module;
|
7066
7812
|
getConnection(dependency: Dependency): undefined | ModuleGraphConnection;
|
7067
|
-
getModule(dependency: Dependency): Module;
|
7068
|
-
getOrigin(dependency: Dependency): Module;
|
7069
|
-
getResolvedOrigin(dependency: Dependency): Module;
|
7813
|
+
getModule(dependency: Dependency): null | Module;
|
7814
|
+
getOrigin(dependency: Dependency): null | Module;
|
7815
|
+
getResolvedOrigin(dependency: Dependency): null | Module;
|
7070
7816
|
getIncomingConnections(module: Module): Iterable<ModuleGraphConnection>;
|
7071
7817
|
getOutgoingConnections(module: Module): Iterable<ModuleGraphConnection>;
|
7072
7818
|
getIncomingConnectionsByOriginModule(
|
@@ -7095,19 +7841,19 @@ declare class ModuleGraph {
|
|
7095
7841
|
module: Module,
|
7096
7842
|
runtime: RuntimeSpec
|
7097
7843
|
): null | boolean | SortableSet<string>;
|
7098
|
-
getPreOrderIndex(module: Module): number;
|
7099
|
-
getPostOrderIndex(module: Module): number;
|
7844
|
+
getPreOrderIndex(module: Module): null | number;
|
7845
|
+
getPostOrderIndex(module: Module): null | number;
|
7100
7846
|
setPreOrderIndex(module: Module, index: number): void;
|
7101
7847
|
setPreOrderIndexIfUnset(module: Module, index: number): boolean;
|
7102
7848
|
setPostOrderIndex(module: Module, index: number): void;
|
7103
7849
|
setPostOrderIndexIfUnset(module: Module, index: number): boolean;
|
7104
|
-
getDepth(module: Module): number;
|
7850
|
+
getDepth(module: Module): null | number;
|
7105
7851
|
setDepth(module: Module, depth: number): void;
|
7106
7852
|
setDepthIfLower(module: Module, depth: number): boolean;
|
7107
7853
|
isAsync(module: Module): boolean;
|
7108
7854
|
setAsync(module: Module): void;
|
7109
7855
|
getMeta(thing?: any): Object;
|
7110
|
-
getMetaIfExisting(thing?: any): Object;
|
7856
|
+
getMetaIfExisting(thing?: any): undefined | Object;
|
7111
7857
|
freeze(cacheStage?: string): void;
|
7112
7858
|
unfreeze(): void;
|
7113
7859
|
cached<T extends any[], V>(
|
@@ -7148,11 +7894,11 @@ declare class ModuleGraphConnection {
|
|
7148
7894
|
module: Module;
|
7149
7895
|
weak: boolean;
|
7150
7896
|
conditional: boolean;
|
7151
|
-
condition
|
7897
|
+
condition?: (
|
7152
7898
|
arg0: ModuleGraphConnection,
|
7153
7899
|
arg1: RuntimeSpec
|
7154
7900
|
) => ConnectionState;
|
7155
|
-
explanations
|
7901
|
+
explanations?: Set<string>;
|
7156
7902
|
clone(): ModuleGraphConnection;
|
7157
7903
|
addCondition(
|
7158
7904
|
condition: (
|
@@ -7183,7 +7929,7 @@ declare interface ModuleOptions {
|
|
7183
7929
|
/**
|
7184
7930
|
* An array of rules applied by default for modules.
|
7185
7931
|
*/
|
7186
|
-
defaultRules?: (RuleSetRule | "...")[];
|
7932
|
+
defaultRules?: (undefined | null | false | "" | 0 | RuleSetRule | "...")[];
|
7187
7933
|
|
7188
7934
|
/**
|
7189
7935
|
* Enable warnings for full dynamic dependencies.
|
@@ -7223,7 +7969,7 @@ declare interface ModuleOptions {
|
|
7223
7969
|
/**
|
7224
7970
|
* An array of rules applied for modules.
|
7225
7971
|
*/
|
7226
|
-
rules?: (RuleSetRule | "...")[];
|
7972
|
+
rules?: (undefined | null | false | "" | 0 | RuleSetRule | "...")[];
|
7227
7973
|
|
7228
7974
|
/**
|
7229
7975
|
* Emit errors instead of warnings when imported names don't exist in imported module. Deprecated: This option has moved to 'module.parser.javascript.strictExportPresence'.
|
@@ -7283,7 +8029,7 @@ declare interface ModuleOptionsNormalized {
|
|
7283
8029
|
/**
|
7284
8030
|
* An array of rules applied by default for modules.
|
7285
8031
|
*/
|
7286
|
-
defaultRules: (RuleSetRule | "...")[];
|
8032
|
+
defaultRules: (undefined | null | false | "" | 0 | RuleSetRule | "...")[];
|
7287
8033
|
|
7288
8034
|
/**
|
7289
8035
|
* Specify options for each generator.
|
@@ -7303,7 +8049,7 @@ declare interface ModuleOptionsNormalized {
|
|
7303
8049
|
/**
|
7304
8050
|
* An array of rules applied for modules.
|
7305
8051
|
*/
|
7306
|
-
rules: (RuleSetRule | "...")[];
|
8052
|
+
rules: (undefined | null | false | "" | 0 | RuleSetRule | "...")[];
|
7307
8053
|
|
7308
8054
|
/**
|
7309
8055
|
* Cache the resolving of module requests.
|
@@ -7337,7 +8083,7 @@ declare abstract class ModuleProfile {
|
|
7337
8083
|
storingEndTime: number;
|
7338
8084
|
storing: number;
|
7339
8085
|
storingParallelismFactor: number;
|
7340
|
-
additionalFactoryTimes:
|
8086
|
+
additionalFactoryTimes?: { start: number; end: number }[];
|
7341
8087
|
additionalFactories: number;
|
7342
8088
|
additionalFactoriesParallelismFactor: number;
|
7343
8089
|
additionalIntegration: number;
|
@@ -7475,30 +8221,47 @@ declare abstract class MultiStats {
|
|
7475
8221
|
declare abstract class MultiWatching {
|
7476
8222
|
watchings: Watching[];
|
7477
8223
|
compiler: MultiCompiler;
|
7478
|
-
invalidate(callback?:
|
8224
|
+
invalidate(callback?: CallbackFunction<void>): void;
|
7479
8225
|
suspend(): void;
|
7480
8226
|
resume(): void;
|
7481
8227
|
close(callback: CallbackFunction<void>): void;
|
7482
8228
|
}
|
7483
8229
|
declare class NamedChunkIdsPlugin {
|
7484
|
-
constructor(options?:
|
7485
|
-
delimiter:
|
7486
|
-
context
|
8230
|
+
constructor(options?: NamedChunkIdsPluginOptions);
|
8231
|
+
delimiter: string;
|
8232
|
+
context?: string;
|
7487
8233
|
|
7488
8234
|
/**
|
7489
8235
|
* Apply the plugin
|
7490
8236
|
*/
|
7491
8237
|
apply(compiler: Compiler): void;
|
7492
8238
|
}
|
8239
|
+
declare interface NamedChunkIdsPluginOptions {
|
8240
|
+
/**
|
8241
|
+
* context
|
8242
|
+
*/
|
8243
|
+
context?: string;
|
8244
|
+
|
8245
|
+
/**
|
8246
|
+
* delimiter
|
8247
|
+
*/
|
8248
|
+
delimiter?: string;
|
8249
|
+
}
|
7493
8250
|
declare class NamedModuleIdsPlugin {
|
7494
|
-
constructor(options?:
|
7495
|
-
options:
|
8251
|
+
constructor(options?: NamedModuleIdsPluginOptions);
|
8252
|
+
options: NamedModuleIdsPluginOptions;
|
7496
8253
|
|
7497
8254
|
/**
|
7498
8255
|
* Apply the plugin
|
7499
8256
|
*/
|
7500
8257
|
apply(compiler: Compiler): void;
|
7501
8258
|
}
|
8259
|
+
declare interface NamedModuleIdsPluginOptions {
|
8260
|
+
/**
|
8261
|
+
* context
|
8262
|
+
*/
|
8263
|
+
context?: string;
|
8264
|
+
}
|
7502
8265
|
declare class NaturalModuleIdsPlugin {
|
7503
8266
|
constructor();
|
7504
8267
|
|
@@ -7520,6 +8283,7 @@ declare class NoEmitOnErrorsPlugin {
|
|
7520
8283
|
*/
|
7521
8284
|
apply(compiler: Compiler): void;
|
7522
8285
|
}
|
8286
|
+
type Node = false | NodeOptions;
|
7523
8287
|
declare class NodeEnvironmentPlugin {
|
7524
8288
|
constructor(options: {
|
7525
8289
|
/**
|
@@ -7539,81 +8303,6 @@ declare class NodeEnvironmentPlugin {
|
|
7539
8303
|
*/
|
7540
8304
|
apply(compiler: Compiler): void;
|
7541
8305
|
}
|
7542
|
-
type NodeEstreeIndex =
|
7543
|
-
| UnaryExpression
|
7544
|
-
| ThisExpression
|
7545
|
-
| ArrayExpression
|
7546
|
-
| ObjectExpression
|
7547
|
-
| FunctionExpression
|
7548
|
-
| ArrowFunctionExpression
|
7549
|
-
| YieldExpression
|
7550
|
-
| SimpleLiteral
|
7551
|
-
| RegExpLiteral
|
7552
|
-
| BigIntLiteral
|
7553
|
-
| UpdateExpression
|
7554
|
-
| BinaryExpression
|
7555
|
-
| AssignmentExpression
|
7556
|
-
| LogicalExpression
|
7557
|
-
| MemberExpression
|
7558
|
-
| ConditionalExpression
|
7559
|
-
| SimpleCallExpression
|
7560
|
-
| NewExpression
|
7561
|
-
| SequenceExpression
|
7562
|
-
| TemplateLiteral
|
7563
|
-
| TaggedTemplateExpression
|
7564
|
-
| ClassExpression
|
7565
|
-
| MetaProperty
|
7566
|
-
| Identifier
|
7567
|
-
| AwaitExpression
|
7568
|
-
| ImportExpression
|
7569
|
-
| ChainExpression
|
7570
|
-
| FunctionDeclaration
|
7571
|
-
| VariableDeclaration
|
7572
|
-
| ClassDeclaration
|
7573
|
-
| PrivateIdentifier
|
7574
|
-
| ExpressionStatement
|
7575
|
-
| BlockStatement
|
7576
|
-
| StaticBlock
|
7577
|
-
| EmptyStatement
|
7578
|
-
| DebuggerStatement
|
7579
|
-
| WithStatement
|
7580
|
-
| ReturnStatement
|
7581
|
-
| LabeledStatement
|
7582
|
-
| BreakStatement
|
7583
|
-
| ContinueStatement
|
7584
|
-
| IfStatement
|
7585
|
-
| SwitchStatement
|
7586
|
-
| ThrowStatement
|
7587
|
-
| TryStatement
|
7588
|
-
| WhileStatement
|
7589
|
-
| DoWhileStatement
|
7590
|
-
| ForStatement
|
7591
|
-
| ForInStatement
|
7592
|
-
| ForOfStatement
|
7593
|
-
| ImportDeclaration
|
7594
|
-
| ExportNamedDeclaration
|
7595
|
-
| ExportDefaultDeclaration
|
7596
|
-
| ExportAllDeclaration
|
7597
|
-
| MethodDefinition
|
7598
|
-
| PropertyDefinition
|
7599
|
-
| VariableDeclarator
|
7600
|
-
| Program
|
7601
|
-
| SwitchCase
|
7602
|
-
| CatchClause
|
7603
|
-
| Property
|
7604
|
-
| AssignmentProperty
|
7605
|
-
| Super
|
7606
|
-
| TemplateElement
|
7607
|
-
| SpreadElement
|
7608
|
-
| ObjectPattern
|
7609
|
-
| ArrayPattern
|
7610
|
-
| RestElement
|
7611
|
-
| AssignmentPattern
|
7612
|
-
| ClassBody
|
7613
|
-
| ImportSpecifier
|
7614
|
-
| ImportDefaultSpecifier
|
7615
|
-
| ImportNamespaceSpecifier
|
7616
|
-
| ExportSpecifier;
|
7617
8306
|
|
7618
8307
|
/**
|
7619
8308
|
* Options object for node compatibility features.
|
@@ -7651,14 +8340,19 @@ declare class NodeTargetPlugin {
|
|
7651
8340
|
apply(compiler: Compiler): void;
|
7652
8341
|
}
|
7653
8342
|
declare class NodeTemplatePlugin {
|
7654
|
-
constructor(options?:
|
8343
|
+
constructor(options?: NodeTemplatePluginOptions);
|
7655
8344
|
|
7656
8345
|
/**
|
7657
8346
|
* Apply the plugin
|
7658
8347
|
*/
|
7659
8348
|
apply(compiler: Compiler): void;
|
7660
8349
|
}
|
7661
|
-
|
8350
|
+
declare interface NodeTemplatePluginOptions {
|
8351
|
+
/**
|
8352
|
+
* enable async chunk loading
|
8353
|
+
*/
|
8354
|
+
asyncChunkLoading?: boolean;
|
8355
|
+
}
|
7662
8356
|
declare class NormalModule extends Module {
|
7663
8357
|
constructor(__0: NormalModuleCreateData);
|
7664
8358
|
request: string;
|
@@ -7718,9 +8412,9 @@ declare interface NormalModuleCreateData {
|
|
7718
8412
|
layer?: string;
|
7719
8413
|
|
7720
8414
|
/**
|
7721
|
-
* module type
|
8415
|
+
* module type. When deserializing, this is set to an empty string "".
|
7722
8416
|
*/
|
7723
|
-
type:
|
8417
|
+
type: "" | "javascript/auto" | "javascript/dynamic" | "javascript/esm";
|
7724
8418
|
|
7725
8419
|
/**
|
7726
8420
|
* request string
|
@@ -7818,6 +8512,7 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
7818
8512
|
parser: HookMap<SyncHook<any>>;
|
7819
8513
|
createGenerator: HookMap<SyncBailHook<any, any>>;
|
7820
8514
|
generator: HookMap<SyncHook<any>>;
|
8515
|
+
createModuleClass: HookMap<SyncBailHook<any, any>>;
|
7821
8516
|
}>;
|
7822
8517
|
resolverFactory: ResolverFactory;
|
7823
8518
|
ruleSet: RuleSet;
|
@@ -7863,9 +8558,9 @@ declare interface NormalModuleLoaderContext<OptionsType> {
|
|
7863
8558
|
context: string,
|
7864
8559
|
request: string,
|
7865
8560
|
callback: (
|
7866
|
-
|
7867
|
-
|
7868
|
-
|
8561
|
+
err: null | ErrorWithDetail,
|
8562
|
+
res?: string | false,
|
8563
|
+
req?: ResolveRequest
|
7869
8564
|
) => void
|
7870
8565
|
): any;
|
7871
8566
|
getResolve(options?: ResolveOptionsWithDependencyType): {
|
@@ -7873,9 +8568,9 @@ declare interface NormalModuleLoaderContext<OptionsType> {
|
|
7873
8568
|
context: string,
|
7874
8569
|
request: string,
|
7875
8570
|
callback: (
|
7876
|
-
|
7877
|
-
|
7878
|
-
|
8571
|
+
err: null | ErrorWithDetail,
|
8572
|
+
res?: string | false,
|
8573
|
+
req?: ResolveRequest
|
7879
8574
|
) => void
|
7880
8575
|
): void;
|
7881
8576
|
(context: string, request: string): Promise<string>;
|
@@ -7907,10 +8602,10 @@ declare class NormalModuleReplacementPlugin {
|
|
7907
8602
|
*/
|
7908
8603
|
constructor(
|
7909
8604
|
resourceRegExp: RegExp,
|
7910
|
-
newResource: string | ((arg0
|
8605
|
+
newResource: string | ((arg0: ResolveData) => void)
|
7911
8606
|
);
|
7912
8607
|
resourceRegExp: RegExp;
|
7913
|
-
newResource: string | ((arg0
|
8608
|
+
newResource: string | ((arg0: ResolveData) => void);
|
7914
8609
|
|
7915
8610
|
/**
|
7916
8611
|
* Apply the plugin
|
@@ -7972,6 +8667,7 @@ declare class NullDependencyTemplate extends DependencyTemplate {
|
|
7972
8667
|
}
|
7973
8668
|
declare interface ObjectDeserializerContext {
|
7974
8669
|
read: () => any;
|
8670
|
+
setCircularReference: (arg0?: any) => void;
|
7975
8671
|
}
|
7976
8672
|
declare interface ObjectSerializer {
|
7977
8673
|
serialize: (arg0: any, arg1: ObjectSerializerContext) => void;
|
@@ -7979,6 +8675,7 @@ declare interface ObjectSerializer {
|
|
7979
8675
|
}
|
7980
8676
|
declare interface ObjectSerializerContext {
|
7981
8677
|
write: (arg0?: any) => void;
|
8678
|
+
setCircularReference: (arg0?: any) => void;
|
7982
8679
|
}
|
7983
8680
|
declare class OccurrenceChunkIdsPlugin {
|
7984
8681
|
constructor(options?: OccurrenceChunkIdsPluginOptions);
|
@@ -8075,6 +8772,11 @@ declare interface Optimization {
|
|
8075
8772
|
* Minimizer(s) to use for minimizing the output.
|
8076
8773
|
*/
|
8077
8774
|
minimizer?: (
|
8775
|
+
| undefined
|
8776
|
+
| null
|
8777
|
+
| false
|
8778
|
+
| ""
|
8779
|
+
| 0
|
8078
8780
|
| ((this: Compiler, compiler: Compiler) => void)
|
8079
8781
|
| WebpackPluginInstance
|
8080
8782
|
| "..."
|
@@ -8162,7 +8864,7 @@ declare interface OptimizationSplitChunksCacheGroup {
|
|
8162
8864
|
/**
|
8163
8865
|
* Select chunks for determining cache group content (defaults to "initial", "initial" and "all" requires adding these chunks to the HTML).
|
8164
8866
|
*/
|
8165
|
-
chunks?: "all" | "initial" | "async" | ((chunk: Chunk) => boolean);
|
8867
|
+
chunks?: RegExp | "all" | "initial" | "async" | ((chunk: Chunk) => boolean);
|
8166
8868
|
|
8167
8869
|
/**
|
8168
8870
|
* Ignore minimum size, minimum chunks and maximum requests and always create chunks for this cache group.
|
@@ -8289,7 +8991,7 @@ declare interface OptimizationSplitChunksOptions {
|
|
8289
8991
|
/**
|
8290
8992
|
* Select chunks for determining shared modules (defaults to "async", "initial" and "all" requires adding these chunks to the HTML).
|
8291
8993
|
*/
|
8292
|
-
chunks?: "all" | "initial" | "async" | ((chunk: Chunk) => boolean);
|
8994
|
+
chunks?: RegExp | "all" | "initial" | "async" | ((chunk: Chunk) => boolean);
|
8293
8995
|
|
8294
8996
|
/**
|
8295
8997
|
* Sets the size types which are used when a number is used for sizes.
|
@@ -8312,7 +9014,7 @@ declare interface OptimizationSplitChunksOptions {
|
|
8312
9014
|
/**
|
8313
9015
|
* Select chunks for determining shared modules (defaults to "async", "initial" and "all" requires adding these chunks to the HTML).
|
8314
9016
|
*/
|
8315
|
-
chunks?: "all" | "initial" | "async" | ((chunk: Chunk) => boolean);
|
9017
|
+
chunks?: RegExp | "all" | "initial" | "async" | ((chunk: Chunk) => boolean);
|
8316
9018
|
/**
|
8317
9019
|
* Maximal size hint for the on-demand chunks.
|
8318
9020
|
*/
|
@@ -8417,6 +9119,11 @@ declare class OriginalSource extends Source {
|
|
8417
9119
|
* Options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.
|
8418
9120
|
*/
|
8419
9121
|
declare interface Output {
|
9122
|
+
/**
|
9123
|
+
* Add a container for define/require functions in the AMD module.
|
9124
|
+
*/
|
9125
|
+
amdContainer?: string;
|
9126
|
+
|
8420
9127
|
/**
|
8421
9128
|
* The filename of asset modules as relative path inside the 'output.path' directory.
|
8422
9129
|
*/
|
@@ -8575,6 +9282,11 @@ declare interface Output {
|
|
8575
9282
|
*/
|
8576
9283
|
hotUpdateMainFilename?: string;
|
8577
9284
|
|
9285
|
+
/**
|
9286
|
+
* Ignore warnings in the browser.
|
9287
|
+
*/
|
9288
|
+
ignoreBrowserWarnings?: boolean;
|
9289
|
+
|
8578
9290
|
/**
|
8579
9291
|
* Wrap javascript code into IIFE's to avoid leaking into global scope.
|
8580
9292
|
*/
|
@@ -8680,6 +9392,11 @@ declare interface Output {
|
|
8680
9392
|
*/
|
8681
9393
|
workerChunkLoading?: string | false;
|
8682
9394
|
|
9395
|
+
/**
|
9396
|
+
* Worker public path. Much like the public path, this sets the location where the worker script file is intended to be found. If not set, webpack will use the publicPath. Don't set this option unless your worker scripts are located at a different path from your other script files.
|
9397
|
+
*/
|
9398
|
+
workerPublicPath?: string;
|
9399
|
+
|
8683
9400
|
/**
|
8684
9401
|
* The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
|
8685
9402
|
*/
|
@@ -8884,6 +9601,11 @@ declare interface OutputNormalized {
|
|
8884
9601
|
*/
|
8885
9602
|
hotUpdateMainFilename?: string;
|
8886
9603
|
|
9604
|
+
/**
|
9605
|
+
* Ignore warnings in the browser.
|
9606
|
+
*/
|
9607
|
+
ignoreBrowserWarnings?: boolean;
|
9608
|
+
|
8887
9609
|
/**
|
8888
9610
|
* Wrap javascript code into IIFE's to avoid leaking into global scope.
|
8889
9611
|
*/
|
@@ -8974,6 +9696,11 @@ declare interface OutputNormalized {
|
|
8974
9696
|
*/
|
8975
9697
|
workerChunkLoading?: string | false;
|
8976
9698
|
|
9699
|
+
/**
|
9700
|
+
* Worker public path. Much like the public path, this sets the location where the worker script file is intended to be found. If not set, webpack will use the publicPath. Don't set this option unless your worker scripts are located at a different path from your other script files.
|
9701
|
+
*/
|
9702
|
+
workerPublicPath?: string;
|
9703
|
+
|
8977
9704
|
/**
|
8978
9705
|
* The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
|
8979
9706
|
*/
|
@@ -9076,6 +9803,13 @@ declare interface PathData {
|
|
9076
9803
|
noChunkHash?: boolean;
|
9077
9804
|
url?: string;
|
9078
9805
|
}
|
9806
|
+
type Pattern =
|
9807
|
+
| Identifier
|
9808
|
+
| MemberExpression
|
9809
|
+
| ObjectPattern
|
9810
|
+
| ArrayPattern
|
9811
|
+
| RestElement
|
9812
|
+
| AssignmentPattern;
|
9079
9813
|
|
9080
9814
|
/**
|
9081
9815
|
* Configuration object for web performance recommendations.
|
@@ -9117,6 +9851,11 @@ declare interface PitchLoaderDefinitionFunction<
|
|
9117
9851
|
): string | void | Buffer | Promise<string | Buffer>;
|
9118
9852
|
}
|
9119
9853
|
type Plugin =
|
9854
|
+
| undefined
|
9855
|
+
| null
|
9856
|
+
| false
|
9857
|
+
| ""
|
9858
|
+
| 0
|
9120
9859
|
| { apply: (arg0: Resolver) => void }
|
9121
9860
|
| ((this: Resolver, arg1: Resolver) => void);
|
9122
9861
|
declare interface PnpApiImpl {
|
@@ -9129,9 +9868,9 @@ declare interface PossibleFileSystemError {
|
|
9129
9868
|
syscall?: string;
|
9130
9869
|
}
|
9131
9870
|
declare class PrefetchPlugin {
|
9132
|
-
constructor(context
|
9133
|
-
context:
|
9134
|
-
request:
|
9871
|
+
constructor(context: string, request?: string);
|
9872
|
+
context: null | string;
|
9873
|
+
request: string;
|
9135
9874
|
|
9136
9875
|
/**
|
9137
9876
|
* Apply the plugin
|
@@ -9173,14 +9912,18 @@ declare class Profiler {
|
|
9173
9912
|
inspector: any;
|
9174
9913
|
hasSession(): boolean;
|
9175
9914
|
startProfiling(): Promise<void> | Promise<[any, any, any]>;
|
9176
|
-
sendCommand(method
|
9915
|
+
sendCommand(method: string, params?: object): Promise<any>;
|
9177
9916
|
destroy(): Promise<void>;
|
9178
9917
|
stopProfiling(): Promise<{ profile: any }>;
|
9179
9918
|
}
|
9180
9919
|
declare class ProfilingPlugin {
|
9181
9920
|
constructor(options?: ProfilingPluginOptions);
|
9182
9921
|
outputPath: string;
|
9183
|
-
|
9922
|
+
|
9923
|
+
/**
|
9924
|
+
* Apply the plugin
|
9925
|
+
*/
|
9926
|
+
apply(compiler: Compiler): void;
|
9184
9927
|
static Profiler: typeof Profiler;
|
9185
9928
|
}
|
9186
9929
|
declare interface ProfilingPluginOptions {
|
@@ -9199,11 +9942,11 @@ declare class ProgressPlugin {
|
|
9199
9942
|
showModules?: boolean;
|
9200
9943
|
showDependencies?: boolean;
|
9201
9944
|
showActiveModules?: boolean;
|
9202
|
-
percentBy?: null | "
|
9945
|
+
percentBy?: null | "entries" | "modules" | "dependencies";
|
9203
9946
|
apply(compiler: Compiler | MultiCompiler): void;
|
9204
9947
|
static getReporter(
|
9205
9948
|
compiler: Compiler
|
9206
|
-
): (p: number, ...args: string[]) => void;
|
9949
|
+
): undefined | ((p: number, ...args: string[]) => void);
|
9207
9950
|
static defaultOptions: {
|
9208
9951
|
profile: boolean;
|
9209
9952
|
modulesCount: number;
|
@@ -9213,6 +9956,10 @@ declare class ProgressPlugin {
|
|
9213
9956
|
activeModules: boolean;
|
9214
9957
|
entries: boolean;
|
9215
9958
|
};
|
9959
|
+
static createDefaultHandler: (
|
9960
|
+
profile: undefined | null | boolean,
|
9961
|
+
logger: WebpackLogger
|
9962
|
+
) => (percentage: number, msg: string, ...args: string[]) => void;
|
9216
9963
|
}
|
9217
9964
|
type ProgressPluginArgument =
|
9218
9965
|
| ProgressPluginOptions
|
@@ -9260,7 +10007,7 @@ declare interface ProgressPluginOptions {
|
|
9260
10007
|
/**
|
9261
10008
|
* Collect percent algorithm. By default it calculates by a median from modules, entries and dependencies percent.
|
9262
10009
|
*/
|
9263
|
-
percentBy?: null | "
|
10010
|
+
percentBy?: null | "entries" | "modules" | "dependencies";
|
9264
10011
|
|
9265
10012
|
/**
|
9266
10013
|
* Collect profile data for progress steps. Default: false.
|
@@ -9331,6 +10078,7 @@ declare interface ProvidesObject {
|
|
9331
10078
|
declare interface RawChunkGroupOptions {
|
9332
10079
|
preloadOrder?: number;
|
9333
10080
|
prefetchOrder?: number;
|
10081
|
+
fetchPriority?: "auto" | "low" | "high";
|
9334
10082
|
}
|
9335
10083
|
type RawLoaderDefinition<
|
9336
10084
|
OptionsType = {},
|
@@ -9358,17 +10106,58 @@ declare class RawSource extends Source {
|
|
9358
10106
|
constructor(source: string | Buffer, convertToString?: boolean);
|
9359
10107
|
isBuffer(): boolean;
|
9360
10108
|
}
|
10109
|
+
declare interface RawSourceMap {
|
10110
|
+
version: number;
|
10111
|
+
sources: string[];
|
10112
|
+
names: string[];
|
10113
|
+
sourceRoot?: string;
|
10114
|
+
sourcesContent?: string[];
|
10115
|
+
mappings: string;
|
10116
|
+
file: string;
|
10117
|
+
}
|
9361
10118
|
declare class ReadFileCompileWasmPlugin {
|
9362
|
-
constructor(options?:
|
9363
|
-
options:
|
10119
|
+
constructor(options?: ReadFileCompileWasmPluginOptions);
|
10120
|
+
options: ReadFileCompileWasmPluginOptions;
|
9364
10121
|
|
9365
10122
|
/**
|
9366
10123
|
* Apply the plugin
|
9367
10124
|
*/
|
9368
10125
|
apply(compiler: Compiler): void;
|
9369
10126
|
}
|
10127
|
+
declare interface ReadFileCompileWasmPluginOptions {
|
10128
|
+
/**
|
10129
|
+
* mangle imports
|
10130
|
+
*/
|
10131
|
+
mangleImports?: boolean;
|
10132
|
+
}
|
10133
|
+
declare interface ReaddirOptions {
|
10134
|
+
encoding?:
|
10135
|
+
| null
|
10136
|
+
| "ascii"
|
10137
|
+
| "utf8"
|
10138
|
+
| "utf16le"
|
10139
|
+
| "ucs2"
|
10140
|
+
| "latin1"
|
10141
|
+
| "binary"
|
10142
|
+
| "utf-8"
|
10143
|
+
| "ucs-2"
|
10144
|
+
| "base64"
|
10145
|
+
| "base64url"
|
10146
|
+
| "hex"
|
10147
|
+
| "buffer";
|
10148
|
+
withFileTypes?: boolean;
|
10149
|
+
}
|
9370
10150
|
declare class RealContentHashPlugin {
|
9371
|
-
constructor(__0: {
|
10151
|
+
constructor(__0: {
|
10152
|
+
/**
|
10153
|
+
* the hash function to use
|
10154
|
+
*/
|
10155
|
+
hashFunction: string | typeof Hash;
|
10156
|
+
/**
|
10157
|
+
* the hash digest to use
|
10158
|
+
*/
|
10159
|
+
hashDigest: string;
|
10160
|
+
});
|
9372
10161
|
|
9373
10162
|
/**
|
9374
10163
|
* Apply the plugin
|
@@ -9796,7 +10585,15 @@ declare interface ResolveOptionsWebpackOptions {
|
|
9796
10585
|
/**
|
9797
10586
|
* Plugins for the resolver.
|
9798
10587
|
*/
|
9799
|
-
plugins?: (
|
10588
|
+
plugins?: (
|
10589
|
+
| undefined
|
10590
|
+
| null
|
10591
|
+
| false
|
10592
|
+
| ""
|
10593
|
+
| 0
|
10594
|
+
| ResolvePluginInstance
|
10595
|
+
| "..."
|
10596
|
+
)[];
|
9800
10597
|
|
9801
10598
|
/**
|
9802
10599
|
* Prefer to resolve server-relative URLs (starting with '/') as absolute paths before falling back to resolve in 'resolve.roots'.
|
@@ -9867,23 +10664,7 @@ declare interface ResolvedContextTimestampAndHash {
|
|
9867
10664
|
declare abstract class Resolver {
|
9868
10665
|
fileSystem: FileSystem;
|
9869
10666
|
options: ResolveOptionsTypes;
|
9870
|
-
hooks:
|
9871
|
-
resolveStep: SyncHook<
|
9872
|
-
[
|
9873
|
-
AsyncSeriesBailHook<
|
9874
|
-
[ResolveRequest, ResolveContext],
|
9875
|
-
null | ResolveRequest
|
9876
|
-
>,
|
9877
|
-
ResolveRequest
|
9878
|
-
]
|
9879
|
-
>;
|
9880
|
-
noResolve: SyncHook<[ResolveRequest, Error]>;
|
9881
|
-
resolve: AsyncSeriesBailHook<
|
9882
|
-
[ResolveRequest, ResolveContext],
|
9883
|
-
null | ResolveRequest
|
9884
|
-
>;
|
9885
|
-
result: AsyncSeriesHook<[ResolveRequest, ResolveContext]>;
|
9886
|
-
};
|
10667
|
+
hooks: KnownHooks;
|
9887
10668
|
ensureHook(
|
9888
10669
|
name:
|
9889
10670
|
| string
|
@@ -9913,24 +10694,27 @@ declare abstract class Resolver {
|
|
9913
10694
|
request: string,
|
9914
10695
|
resolveContext: ResolveContext,
|
9915
10696
|
callback: (
|
9916
|
-
|
9917
|
-
|
9918
|
-
|
10697
|
+
err: null | ErrorWithDetail,
|
10698
|
+
res?: string | false,
|
10699
|
+
req?: ResolveRequest
|
9919
10700
|
) => void
|
9920
10701
|
): void;
|
9921
10702
|
doResolve(
|
9922
|
-
hook
|
9923
|
-
|
9924
|
-
|
9925
|
-
|
9926
|
-
|
9927
|
-
|
10703
|
+
hook: AsyncSeriesBailHook<
|
10704
|
+
[ResolveRequest, ResolveContext],
|
10705
|
+
null | ResolveRequest
|
10706
|
+
>,
|
10707
|
+
request: ResolveRequest,
|
10708
|
+
message: null | string,
|
10709
|
+
resolveContext: ResolveContext,
|
10710
|
+
callback: (err?: null | Error, result?: ResolveRequest) => void
|
10711
|
+
): void;
|
9928
10712
|
parse(identifier: string): ParsedIdentifier;
|
9929
|
-
isModule(path
|
9930
|
-
isPrivate(path
|
10713
|
+
isModule(path: string): boolean;
|
10714
|
+
isPrivate(path: string): boolean;
|
9931
10715
|
isDirectory(path: string): boolean;
|
9932
|
-
join(path
|
9933
|
-
normalize(path
|
10716
|
+
join(path: string, request: string): string;
|
10717
|
+
normalize(path: string): string;
|
9934
10718
|
}
|
9935
10719
|
declare interface ResolverCache {
|
9936
10720
|
direct: WeakMap<Object, ResolverWithOptions>;
|
@@ -10149,7 +10933,7 @@ declare interface RuleSetRule {
|
|
10149
10933
|
/**
|
10150
10934
|
* Only execute the first matching rule in this array.
|
10151
10935
|
*/
|
10152
|
-
oneOf?: RuleSetRule[];
|
10936
|
+
oneOf?: (undefined | null | false | "" | 0 | RuleSetRule)[];
|
10153
10937
|
|
10154
10938
|
/**
|
10155
10939
|
* Shortcut for use.options.
|
@@ -10209,7 +10993,7 @@ declare interface RuleSetRule {
|
|
10209
10993
|
/**
|
10210
10994
|
* Match and execute these rules when this rule is matched.
|
10211
10995
|
*/
|
10212
|
-
rules?: RuleSetRule[];
|
10996
|
+
rules?: (undefined | null | false | "" | 0 | RuleSetRule)[];
|
10213
10997
|
|
10214
10998
|
/**
|
10215
10999
|
* Match module scheme.
|
@@ -10246,14 +11030,52 @@ declare interface RuleSetRule {
|
|
10246
11030
|
*/
|
10247
11031
|
use?:
|
10248
11032
|
| string
|
10249
|
-
|
|
11033
|
+
| (
|
11034
|
+
| undefined
|
11035
|
+
| null
|
11036
|
+
| string
|
11037
|
+
| false
|
11038
|
+
| 0
|
11039
|
+
| {
|
11040
|
+
/**
|
11041
|
+
* Unique loader options identifier.
|
11042
|
+
*/
|
11043
|
+
ident?: string;
|
11044
|
+
/**
|
11045
|
+
* Loader name.
|
11046
|
+
*/
|
11047
|
+
loader?: string;
|
11048
|
+
/**
|
11049
|
+
* Loader options.
|
11050
|
+
*/
|
11051
|
+
options?: string | { [index: string]: any };
|
11052
|
+
}
|
11053
|
+
| ((data: object) =>
|
11054
|
+
| string
|
11055
|
+
| {
|
11056
|
+
/**
|
11057
|
+
* Unique loader options identifier.
|
11058
|
+
*/
|
11059
|
+
ident?: string;
|
11060
|
+
/**
|
11061
|
+
* Loader name.
|
11062
|
+
*/
|
11063
|
+
loader?: string;
|
11064
|
+
/**
|
11065
|
+
* Loader options.
|
11066
|
+
*/
|
11067
|
+
options?: string | { [index: string]: any };
|
11068
|
+
}
|
11069
|
+
| __TypeWebpackOptions
|
11070
|
+
| __Type_2[])
|
11071
|
+
)[]
|
10250
11072
|
| ((data: {
|
10251
11073
|
resource: string;
|
10252
11074
|
realResource: string;
|
10253
11075
|
resourceQuery: string;
|
10254
11076
|
issuer: string;
|
10255
11077
|
compiler: string;
|
10256
|
-
}) =>
|
11078
|
+
}) => __Type_2[])
|
10257
11079
|
| {
|
10258
11080
|
/**
|
10259
11081
|
* Unique loader options identifier.
|
@@ -10268,35 +11090,56 @@ declare interface RuleSetRule {
|
|
10268
11090
|
*/
|
10269
11091
|
options?: string | { [index: string]: any };
|
10270
11092
|
}
|
10271
|
-
|
|
10272
|
-
| string
|
10273
|
-
| {
|
10274
|
-
/**
|
10275
|
-
* Unique loader options identifier.
|
10276
|
-
*/
|
10277
|
-
ident?: string;
|
10278
|
-
/**
|
10279
|
-
* Loader name.
|
10280
|
-
*/
|
10281
|
-
loader?: string;
|
10282
|
-
/**
|
10283
|
-
* Loader options.
|
10284
|
-
*/
|
10285
|
-
options?: string | { [index: string]: any };
|
10286
|
-
}
|
10287
|
-
| __TypeWebpackOptions
|
10288
|
-
| RuleSetUseItem[]);
|
11093
|
+
| __TypeWebpackOptions;
|
10289
11094
|
}
|
10290
11095
|
type RuleSetUse =
|
10291
11096
|
| string
|
10292
|
-
|
|
11097
|
+
| (
|
11098
|
+
| undefined
|
11099
|
+
| null
|
11100
|
+
| string
|
11101
|
+
| false
|
11102
|
+
| 0
|
11103
|
+
| {
|
11104
|
+
/**
|
11105
|
+
* Unique loader options identifier.
|
11106
|
+
*/
|
11107
|
+
ident?: string;
|
11108
|
+
/**
|
11109
|
+
* Loader name.
|
11110
|
+
*/
|
11111
|
+
loader?: string;
|
11112
|
+
/**
|
11113
|
+
* Loader options.
|
11114
|
+
*/
|
11115
|
+
options?: string | { [index: string]: any };
|
11116
|
+
}
|
11117
|
+
| ((data: object) =>
|
11118
|
+
| string
|
11119
|
+
| {
|
11120
|
+
/**
|
11121
|
+
* Unique loader options identifier.
|
11122
|
+
*/
|
11123
|
+
ident?: string;
|
11124
|
+
/**
|
11125
|
+
* Loader name.
|
11126
|
+
*/
|
11127
|
+
loader?: string;
|
11128
|
+
/**
|
11129
|
+
* Loader options.
|
11130
|
+
*/
|
11131
|
+
options?: string | { [index: string]: any };
|
11132
|
+
}
|
11133
|
+
| __TypeWebpackOptions
|
11134
|
+
| __Type_2[])
|
11135
|
+
)[]
|
10293
11136
|
| ((data: {
|
10294
11137
|
resource: string;
|
10295
11138
|
realResource: string;
|
10296
11139
|
resourceQuery: string;
|
10297
11140
|
issuer: string;
|
10298
11141
|
compiler: string;
|
10299
|
-
}) =>
|
11142
|
+
}) => __Type_2[])
|
10300
11143
|
| {
|
10301
11144
|
/**
|
10302
11145
|
* Unique loader options identifier.
|
@@ -10343,14 +11186,14 @@ declare class RuntimeModule extends Module {
|
|
10343
11186
|
constructor(name: string, stage?: number);
|
10344
11187
|
name: string;
|
10345
11188
|
stage: number;
|
10346
|
-
compilation
|
10347
|
-
chunk
|
10348
|
-
chunkGraph
|
11189
|
+
compilation?: Compilation;
|
11190
|
+
chunk?: Chunk;
|
11191
|
+
chunkGraph?: ChunkGraph;
|
10349
11192
|
fullHash: boolean;
|
10350
11193
|
dependentHash: boolean;
|
10351
11194
|
attach(compilation: Compilation, chunk: Chunk, chunkGraph?: ChunkGraph): void;
|
10352
|
-
generate(): string;
|
10353
|
-
getGeneratedCode(): string;
|
11195
|
+
generate(): null | string;
|
11196
|
+
getGeneratedCode(): null | string;
|
10354
11197
|
shouldIsolate(): boolean;
|
10355
11198
|
|
10356
11199
|
/**
|
@@ -10387,20 +11230,20 @@ declare interface RuntimeRequirementsContext {
|
|
10387
11230
|
type RuntimeSpec = undefined | string | SortableSet<string>;
|
10388
11231
|
declare class RuntimeSpecMap<T> {
|
10389
11232
|
constructor(clone?: RuntimeSpecMap<T>);
|
10390
|
-
get(runtime: RuntimeSpec): T;
|
11233
|
+
get(runtime: RuntimeSpec): undefined | T;
|
10391
11234
|
has(runtime: RuntimeSpec): boolean;
|
10392
|
-
set(runtime
|
10393
|
-
provide(runtime
|
10394
|
-
delete(runtime
|
10395
|
-
update(runtime
|
11235
|
+
set(runtime: RuntimeSpec, value: T): void;
|
11236
|
+
provide(runtime: RuntimeSpec, computer: () => any): any;
|
11237
|
+
delete(runtime: RuntimeSpec): void;
|
11238
|
+
update(runtime: RuntimeSpec, fn: (arg0?: T) => T): void;
|
10396
11239
|
keys(): RuntimeSpec[];
|
10397
11240
|
values(): IterableIterator<T>;
|
10398
11241
|
get size(): number;
|
10399
11242
|
}
|
10400
11243
|
declare class RuntimeSpecSet {
|
10401
|
-
constructor(iterable?:
|
10402
|
-
add(runtime
|
10403
|
-
has(runtime
|
11244
|
+
constructor(iterable?: Iterable<RuntimeSpec>);
|
11245
|
+
add(runtime: RuntimeSpec): void;
|
11246
|
+
has(runtime: RuntimeSpec): boolean;
|
10404
11247
|
get size(): number;
|
10405
11248
|
[Symbol.iterator](): IterableIterator<RuntimeSpec>;
|
10406
11249
|
}
|
@@ -10530,7 +11373,7 @@ declare abstract class RuntimeTemplate {
|
|
10530
11373
|
/**
|
10531
11374
|
* the module
|
10532
11375
|
*/
|
10533
|
-
module: Module;
|
11376
|
+
module: null | Module;
|
10534
11377
|
/**
|
10535
11378
|
* the chunk graph
|
10536
11379
|
*/
|
@@ -10552,7 +11395,7 @@ declare abstract class RuntimeTemplate {
|
|
10552
11395
|
/**
|
10553
11396
|
* the module
|
10554
11397
|
*/
|
10555
|
-
module: Module;
|
11398
|
+
module: null | Module;
|
10556
11399
|
/**
|
10557
11400
|
* the chunk graph
|
10558
11401
|
*/
|
@@ -10714,7 +11557,7 @@ declare abstract class RuntimeTemplate {
|
|
10714
11557
|
/**
|
10715
11558
|
* when false, call context will not be preserved
|
10716
11559
|
*/
|
10717
|
-
callContext: boolean;
|
11560
|
+
callContext: null | boolean;
|
10718
11561
|
/**
|
10719
11562
|
* when true and accessing the default exports, interop code will be generated
|
10720
11563
|
*/
|
@@ -10841,13 +11684,20 @@ declare interface RuntimeValueOptions {
|
|
10841
11684
|
buildDependencies?: string[];
|
10842
11685
|
version?: string | (() => string);
|
10843
11686
|
}
|
11687
|
+
|
11688
|
+
/**
|
11689
|
+
* Helper function for joining two ranges into a single range. This is useful
|
11690
|
+
* when working with AST nodes, as it allows you to combine the ranges of child nodes
|
11691
|
+
* to create the range of the _parent node_.
|
11692
|
+
*/
|
10844
11693
|
declare interface ScopeInfo {
|
10845
11694
|
definitions: StackedMap<string, ScopeInfo | VariableInfo>;
|
10846
11695
|
topLevelScope: boolean | "arrow";
|
10847
|
-
inShorthand: boolean;
|
11696
|
+
inShorthand: string | boolean;
|
11697
|
+
inTaggedTemplateTag: boolean;
|
11698
|
+
inTry: boolean;
|
10848
11699
|
isStrict: boolean;
|
10849
11700
|
isAsmJs: boolean;
|
10850
|
-
inTry: boolean;
|
10851
11701
|
}
|
10852
11702
|
declare interface Selector<A, B> {
|
10853
11703
|
(input: A): B;
|
@@ -10859,9 +11709,10 @@ declare abstract class Serializer {
|
|
10859
11709
|
serialize(obj?: any, context?: any): any;
|
10860
11710
|
deserialize(value?: any, context?: any): any;
|
10861
11711
|
}
|
10862
|
-
type ServerOptionsHttps
|
10863
|
-
|
10864
|
-
|
11712
|
+
type ServerOptionsHttps<
|
11713
|
+
Request extends typeof IncomingMessage = typeof IncomingMessage,
|
11714
|
+
Response extends typeof ServerResponse = typeof ServerResponse
|
11715
|
+
> = SecureContextOptions & TlsOptions & ServerOptionsImport<Request, Response>;
|
10865
11716
|
declare class SharePlugin {
|
10866
11717
|
constructor(options: SharePluginOptions);
|
10867
11718
|
|
@@ -10951,10 +11802,10 @@ declare class SideEffectsFlagPlugin {
|
|
10951
11802
|
*/
|
10952
11803
|
apply(compiler: Compiler): void;
|
10953
11804
|
static moduleHasSideEffects(
|
10954
|
-
moduleName
|
10955
|
-
flagValue
|
10956
|
-
cache
|
10957
|
-
):
|
11805
|
+
moduleName: string,
|
11806
|
+
flagValue: undefined | string | boolean | string[],
|
11807
|
+
cache: Map<string, RegExp>
|
11808
|
+
): undefined | boolean;
|
10958
11809
|
}
|
10959
11810
|
declare class SizeOnlySource extends Source {
|
10960
11811
|
constructor(size: number);
|
@@ -11001,17 +11852,28 @@ declare abstract class Snapshot {
|
|
11001
11852
|
hasChildren(): boolean;
|
11002
11853
|
setChildren(value?: any): void;
|
11003
11854
|
addChild(child?: any): void;
|
11004
|
-
serialize(__0:
|
11005
|
-
deserialize(__0:
|
11855
|
+
serialize(__0: ObjectSerializerContext): void;
|
11856
|
+
deserialize(__0: ObjectDeserializerContext): void;
|
11006
11857
|
getFileIterable(): Iterable<string>;
|
11007
11858
|
getContextIterable(): Iterable<string>;
|
11008
11859
|
getMissingIterable(): Iterable<string>;
|
11009
11860
|
}
|
11861
|
+
declare interface SnapshotOptionsFileSystemInfo {
|
11862
|
+
/**
|
11863
|
+
* should use hash to snapshot
|
11864
|
+
*/
|
11865
|
+
hash?: boolean;
|
11866
|
+
|
11867
|
+
/**
|
11868
|
+
* should use timestamp to snapshot
|
11869
|
+
*/
|
11870
|
+
timestamp?: boolean;
|
11871
|
+
}
|
11010
11872
|
|
11011
11873
|
/**
|
11012
11874
|
* Options affecting how file system snapshots are created and validated.
|
11013
11875
|
*/
|
11014
|
-
declare interface
|
11876
|
+
declare interface SnapshotOptionsWebpackOptions {
|
11015
11877
|
/**
|
11016
11878
|
* Options for snapshotting build dependencies to determine if the whole cache need to be invalidated.
|
11017
11879
|
*/
|
@@ -11104,7 +11966,7 @@ declare abstract class SortableSet<T> extends Set<T> {
|
|
11104
11966
|
declare class Source {
|
11105
11967
|
constructor();
|
11106
11968
|
size(): number;
|
11107
|
-
map(options?: MapOptions):
|
11969
|
+
map(options?: MapOptions): null | RawSourceMap;
|
11108
11970
|
sourceAndMap(options?: MapOptions): { source: string | Buffer; map: Object };
|
11109
11971
|
updateHash(hash: Hash): void;
|
11110
11972
|
source(): string | Buffer;
|
@@ -11125,7 +11987,10 @@ declare interface SourceMap {
|
|
11125
11987
|
declare class SourceMapDevToolPlugin {
|
11126
11988
|
constructor(options?: SourceMapDevToolPluginOptions);
|
11127
11989
|
sourceMapFilename: string | false;
|
11128
|
-
sourceMappingURLComment:
|
11990
|
+
sourceMappingURLComment:
|
11991
|
+
| string
|
11992
|
+
| false
|
11993
|
+
| ((arg0: PathData, arg1?: AssetInfo) => string);
|
11129
11994
|
moduleFilenameTemplate: string | Function;
|
11130
11995
|
fallbackModuleFilenameTemplate: string | Function;
|
11131
11996
|
namespace: string;
|
@@ -11140,7 +12005,11 @@ declare interface SourceMapDevToolPluginOptions {
|
|
11140
12005
|
/**
|
11141
12006
|
* Appends the given value to the original asset. Usually the #sourceMappingURL comment. [url] is replaced with a URL to the source map file. false disables the appending.
|
11142
12007
|
*/
|
11143
|
-
append?:
|
12008
|
+
append?:
|
12009
|
+
| null
|
12010
|
+
| string
|
12011
|
+
| false
|
12012
|
+
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
11144
12013
|
|
11145
12014
|
/**
|
11146
12015
|
* Indicates whether column mappings should be used (defaults to true).
|
@@ -11230,7 +12099,7 @@ declare interface SourcePosition {
|
|
11230
12099
|
column?: number;
|
11231
12100
|
}
|
11232
12101
|
declare interface SplitChunksOptions {
|
11233
|
-
chunksFilter: (chunk: Chunk) => boolean;
|
12102
|
+
chunksFilter: (chunk: Chunk) => undefined | boolean;
|
11234
12103
|
defaultSizeTypes: string[];
|
11235
12104
|
minSize: SplitChunksSizes;
|
11236
12105
|
minSizeReduction: SplitChunksSizes;
|
@@ -11547,6 +12416,11 @@ declare interface StatsOptions {
|
|
11547
12416
|
*/
|
11548
12417
|
errorsCount?: boolean;
|
11549
12418
|
|
12419
|
+
/**
|
12420
|
+
* Space to display errors (value is in number of lines).
|
12421
|
+
*/
|
12422
|
+
errorsSpace?: number;
|
12423
|
+
|
11550
12424
|
/**
|
11551
12425
|
* Please use excludeModules instead.
|
11552
12426
|
*/
|
@@ -11807,6 +12681,11 @@ declare interface StatsOptions {
|
|
11807
12681
|
| RegExp
|
11808
12682
|
| WarningFilterItemTypes[]
|
11809
12683
|
| ((warning: StatsError, value: string) => boolean);
|
12684
|
+
|
12685
|
+
/**
|
12686
|
+
* Space to display warnings (value is in number of lines).
|
12687
|
+
*/
|
12688
|
+
warningsSpace?: number;
|
11810
12689
|
}
|
11811
12690
|
declare abstract class StatsPrinter {
|
11812
12691
|
hooks: Readonly<{
|
@@ -11867,6 +12746,12 @@ declare interface SyntheticDependencyLocation {
|
|
11867
12746
|
declare const TOMBSTONE: unique symbol;
|
11868
12747
|
declare const TRANSITIVE: unique symbol;
|
11869
12748
|
declare const TRANSITIVE_ONLY: unique symbol;
|
12749
|
+
|
12750
|
+
/**
|
12751
|
+
* Helper function for joining two ranges into a single range. This is useful
|
12752
|
+
* when working with AST nodes, as it allows you to combine the ranges of child nodes
|
12753
|
+
* to create the range of the _parent node_.
|
12754
|
+
*/
|
11870
12755
|
declare interface TagInfo {
|
11871
12756
|
tag: any;
|
11872
12757
|
data: any;
|
@@ -11890,7 +12775,7 @@ declare class Template {
|
|
11890
12775
|
modules: Module[],
|
11891
12776
|
renderModule: (arg0: Module) => Source,
|
11892
12777
|
prefix?: string
|
11893
|
-
): Source;
|
12778
|
+
): null | Source;
|
11894
12779
|
static renderRuntimeModules(
|
11895
12780
|
runtimeModules: RuntimeModule[],
|
11896
12781
|
renderContext: RenderContext & {
|
@@ -11918,6 +12803,11 @@ declare class TopLevelSymbol {
|
|
11918
12803
|
* Use a Trusted Types policy to create urls for chunks.
|
11919
12804
|
*/
|
11920
12805
|
declare interface TrustedTypes {
|
12806
|
+
/**
|
12807
|
+
* If the call to `trustedTypes.createPolicy(...)` fails -- e.g., due to the policy name missing from the CSP `trusted-types` list, or it being a duplicate name, etc. -- controls whether to continue with loading in the hope that `require-trusted-types-for 'script'` isn't enforced yet, versus fail immediately. Default behavior is 'stop'.
|
12808
|
+
*/
|
12809
|
+
onPolicyCreationFailure?: "continue" | "stop";
|
12810
|
+
|
11921
12811
|
/**
|
11922
12812
|
* The name of the Trusted Types policy created by webpack to serve bundle chunks.
|
11923
12813
|
*/
|
@@ -12086,7 +12976,7 @@ declare interface UserResolveOptions {
|
|
12086
12976
|
}
|
12087
12977
|
declare abstract class VariableInfo {
|
12088
12978
|
declaredScope: ScopeInfo;
|
12089
|
-
freeName
|
12979
|
+
freeName?: string | true;
|
12090
12980
|
tagInfo?: TagInfo;
|
12091
12981
|
}
|
12092
12982
|
declare interface VariableInfoInterface {
|
@@ -12314,14 +13204,14 @@ declare class WebpackError extends Error {
|
|
12314
13204
|
* Creates an instance of WebpackError.
|
12315
13205
|
*/
|
12316
13206
|
constructor(message?: string);
|
12317
|
-
details
|
12318
|
-
module
|
12319
|
-
loc
|
12320
|
-
hideStack
|
12321
|
-
chunk
|
12322
|
-
file
|
12323
|
-
serialize(__0:
|
12324
|
-
deserialize(__0:
|
13207
|
+
details?: string;
|
13208
|
+
module?: null | Module;
|
13209
|
+
loc?: SyntheticDependencyLocation | RealDependencyLocation;
|
13210
|
+
hideStack?: boolean;
|
13211
|
+
chunk?: Chunk;
|
13212
|
+
file?: string;
|
13213
|
+
serialize(__0: ObjectSerializerContext): void;
|
13214
|
+
deserialize(__0: ObjectDeserializerContext): void;
|
12325
13215
|
|
12326
13216
|
/**
|
12327
13217
|
* Create .stack property on a target object
|
@@ -12367,7 +13257,7 @@ declare class WebpackOptionsApply extends OptionsApply {
|
|
12367
13257
|
}
|
12368
13258
|
declare class WebpackOptionsDefaulter {
|
12369
13259
|
constructor();
|
12370
|
-
process(options
|
13260
|
+
process(options: Configuration): WebpackOptionsNormalized;
|
12371
13261
|
}
|
12372
13262
|
|
12373
13263
|
/**
|
@@ -12491,7 +13381,7 @@ declare interface WebpackOptionsNormalized {
|
|
12491
13381
|
/**
|
12492
13382
|
* Include polyfills or mocks for various node stuff.
|
12493
13383
|
*/
|
12494
|
-
node:
|
13384
|
+
node: Node;
|
12495
13385
|
|
12496
13386
|
/**
|
12497
13387
|
* Enables/Disables integrated optimizations.
|
@@ -12517,6 +13407,11 @@ declare interface WebpackOptionsNormalized {
|
|
12517
13407
|
* Add additional plugins to the compiler.
|
12518
13408
|
*/
|
12519
13409
|
plugins: (
|
13410
|
+
| undefined
|
13411
|
+
| null
|
13412
|
+
| false
|
13413
|
+
| ""
|
13414
|
+
| 0
|
12520
13415
|
| ((this: Compiler, compiler: Compiler) => void)
|
12521
13416
|
| WebpackPluginInstance
|
12522
13417
|
)[];
|
@@ -12549,7 +13444,7 @@ declare interface WebpackOptionsNormalized {
|
|
12549
13444
|
/**
|
12550
13445
|
* Options affecting how file system snapshots are created and validated.
|
12551
13446
|
*/
|
12552
|
-
snapshot:
|
13447
|
+
snapshot: SnapshotOptionsWebpackOptions;
|
12553
13448
|
|
12554
13449
|
/**
|
12555
13450
|
* Stats options object or preset name.
|
@@ -12595,7 +13490,7 @@ declare interface WithOptions {
|
|
12595
13490
|
) => ResolverWithOptions;
|
12596
13491
|
}
|
12597
13492
|
declare interface WriteOnlySet<T> {
|
12598
|
-
add: (T
|
13493
|
+
add: (item: T) => void;
|
12599
13494
|
}
|
12600
13495
|
type __TypeWebpackOptions = (data: object) =>
|
12601
13496
|
| string
|
@@ -12614,7 +13509,45 @@ type __TypeWebpackOptions = (data: object) =>
|
|
12614
13509
|
options?: string | { [index: string]: any };
|
12615
13510
|
}
|
12616
13511
|
| __TypeWebpackOptions
|
12617
|
-
|
|
13512
|
+
| __Type_2[];
|
13513
|
+
type __Type_2 =
|
13514
|
+
| undefined
|
13515
|
+
| null
|
13516
|
+
| string
|
13517
|
+
| false
|
13518
|
+
| 0
|
13519
|
+
| {
|
13520
|
+
/**
|
13521
|
+
* Unique loader options identifier.
|
13522
|
+
*/
|
13523
|
+
ident?: string;
|
13524
|
+
/**
|
13525
|
+
* Loader name.
|
13526
|
+
*/
|
13527
|
+
loader?: string;
|
13528
|
+
/**
|
13529
|
+
* Loader options.
|
13530
|
+
*/
|
13531
|
+
options?: string | { [index: string]: any };
|
13532
|
+
}
|
13533
|
+
| ((data: object) =>
|
13534
|
+
| string
|
13535
|
+
| {
|
13536
|
+
/**
|
13537
|
+
* Unique loader options identifier.
|
13538
|
+
*/
|
13539
|
+
ident?: string;
|
13540
|
+
/**
|
13541
|
+
* Loader name.
|
13542
|
+
*/
|
13543
|
+
loader?: string;
|
13544
|
+
/**
|
13545
|
+
* Loader options.
|
13546
|
+
*/
|
13547
|
+
options?: string | { [index: string]: any };
|
13548
|
+
}
|
13549
|
+
| __TypeWebpackOptions
|
13550
|
+
| __Type_2[]);
|
12618
13551
|
declare function exports(
|
12619
13552
|
options: Configuration,
|
12620
13553
|
callback?: CallbackWebpack<Stats>
|
@@ -12694,13 +13627,17 @@ declare namespace exports {
|
|
12694
13627
|
hashFunction: string | typeof Hash;
|
12695
13628
|
}
|
12696
13629
|
) => string;
|
12697
|
-
export let replaceDuplicates: (
|
12698
|
-
array
|
12699
|
-
fn
|
12700
|
-
|
12701
|
-
|
12702
|
-
|
12703
|
-
|
13630
|
+
export let replaceDuplicates: <T>(
|
13631
|
+
array: T[],
|
13632
|
+
fn: (
|
13633
|
+
duplicateItem: T,
|
13634
|
+
duplicateItemIndex: number,
|
13635
|
+
numberOfTimesReplaced: number
|
13636
|
+
) => T,
|
13637
|
+
comparator?: (firstElement: T, nextElement: T) => 0 | 1 | -1
|
13638
|
+
) => T[];
|
13639
|
+
export let matchPart: (str: string, test: Matcher) => boolean;
|
13640
|
+
export let matchObject: (obj: MatchObject, str: string) => boolean;
|
12704
13641
|
}
|
12705
13642
|
export namespace RuntimeGlobals {
|
12706
13643
|
export let require: "__webpack_require__";
|
@@ -12738,6 +13675,7 @@ declare namespace exports {
|
|
12738
13675
|
export let createScript: "__webpack_require__.ts";
|
12739
13676
|
export let createScriptUrl: "__webpack_require__.tu";
|
12740
13677
|
export let getTrustedTypesPolicy: "__webpack_require__.tt";
|
13678
|
+
export let hasFetchPriority: "has fetch priority";
|
12741
13679
|
export let chunkName: "__webpack_require__.cn";
|
12742
13680
|
export let runtimeId: "__webpack_require__.j";
|
12743
13681
|
export let getChunkScriptFilename: "__webpack_require__.u";
|
@@ -12841,7 +13779,7 @@ declare namespace exports {
|
|
12841
13779
|
) => void;
|
12842
13780
|
export let setTopLevelSymbol: (
|
12843
13781
|
state: ParserState,
|
12844
|
-
symbol
|
13782
|
+
symbol?: TopLevelSymbol
|
12845
13783
|
) => void;
|
12846
13784
|
export let getTopLevelSymbol: (
|
12847
13785
|
state: ParserState
|
@@ -12849,7 +13787,7 @@ declare namespace exports {
|
|
12849
13787
|
export let tagTopLevelSymbol: (
|
12850
13788
|
parser: JavascriptParser,
|
12851
13789
|
name: string
|
12852
|
-
) => TopLevelSymbol;
|
13790
|
+
) => undefined | TopLevelSymbol;
|
12853
13791
|
export let isDependencyUsedByExports: (
|
12854
13792
|
dependency: Dependency,
|
12855
13793
|
usedByExports: boolean | Set<string>,
|
@@ -12858,7 +13796,7 @@ declare namespace exports {
|
|
12858
13796
|
) => boolean;
|
12859
13797
|
export let getDependencyUsedByExportsCondition: (
|
12860
13798
|
dependency: Dependency,
|
12861
|
-
usedByExports: boolean | Set<string>,
|
13799
|
+
usedByExports: undefined | boolean | Set<string>,
|
12862
13800
|
moduleGraph: ModuleGraph
|
12863
13801
|
) =>
|
12864
13802
|
| null
|
@@ -12935,7 +13873,7 @@ declare namespace exports {
|
|
12935
13873
|
export { ProfilingPlugin };
|
12936
13874
|
}
|
12937
13875
|
export namespace util {
|
12938
|
-
export const createHash: (algorithm
|
13876
|
+
export const createHash: (algorithm?: string | typeof Hash) => Hash;
|
12939
13877
|
export namespace comparators {
|
12940
13878
|
export let compareChunksById: (a: Chunk, b: Chunk) => 0 | 1 | -1;
|
12941
13879
|
export let compareModulesByIdentifier: (
|
@@ -12999,7 +13937,7 @@ declare namespace exports {
|
|
12999
13937
|
) => RuntimeSpec;
|
13000
13938
|
export let forEachRuntime: (
|
13001
13939
|
runtime: RuntimeSpec,
|
13002
|
-
fn: (arg0
|
13940
|
+
fn: (arg0?: string) => void,
|
13003
13941
|
deterministicOrder?: boolean
|
13004
13942
|
) => void;
|
13005
13943
|
export let getRuntimeKey: (runtime: RuntimeSpec) => string;
|
@@ -13048,7 +13986,7 @@ declare namespace exports {
|
|
13048
13986
|
export const register: (
|
13049
13987
|
Constructor: Constructor,
|
13050
13988
|
request: string,
|
13051
|
-
name: string,
|
13989
|
+
name: null | string,
|
13052
13990
|
serializer: ObjectSerializer
|
13053
13991
|
) => void;
|
13054
13992
|
export const registerLoader: (
|
@@ -13059,8 +13997,8 @@ declare namespace exports {
|
|
13059
13997
|
export const NOT_SERIALIZABLE: object;
|
13060
13998
|
export const buffersSerializer: Serializer;
|
13061
13999
|
export let createFileSerializer: (
|
13062
|
-
fs
|
13063
|
-
hashFunction
|
14000
|
+
fs: IntermediateFileSystem,
|
14001
|
+
hashFunction: string | typeof Hash
|
13064
14002
|
) => Serializer;
|
13065
14003
|
export { MEASURE_START_OPERATION, MEASURE_END_OPERATION };
|
13066
14004
|
}
|
@@ -13153,8 +14091,14 @@ declare namespace exports {
|
|
13153
14091
|
Entry,
|
13154
14092
|
EntryNormalized,
|
13155
14093
|
EntryObject,
|
14094
|
+
ExternalItemFunctionData,
|
14095
|
+
ExternalItemObjectKnown,
|
14096
|
+
ExternalItemObjectUnknown,
|
14097
|
+
ExternalItemValue,
|
14098
|
+
Externals,
|
13156
14099
|
FileCacheOptions,
|
13157
14100
|
LibraryOptions,
|
14101
|
+
MemoryCacheOptions,
|
13158
14102
|
ModuleOptions,
|
13159
14103
|
ResolveOptionsWebpackOptions as ResolveOptions,
|
13160
14104
|
RuleSetCondition,
|
@@ -13166,12 +14110,14 @@ declare namespace exports {
|
|
13166
14110
|
Configuration,
|
13167
14111
|
WebpackOptionsNormalized,
|
13168
14112
|
WebpackPluginInstance,
|
14113
|
+
ChunkGroup,
|
13169
14114
|
Asset,
|
13170
14115
|
AssetInfo,
|
13171
14116
|
EntryOptions,
|
13172
14117
|
PathData,
|
13173
14118
|
AssetEmittedInfo,
|
13174
14119
|
MultiStats,
|
14120
|
+
ResolveData,
|
13175
14121
|
ParserState,
|
13176
14122
|
ResolvePluginInstance,
|
13177
14123
|
Resolver,
|