xhs-mp-pack 1.1.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/Compilation.d.ts +239 -0
- package/dist/Compilation.js +3513 -0
- package/dist/Compiler.d.ts +76 -0
- package/dist/Compiler.js +845 -0
- package/dist/ConcatenationScope.d.ts +37 -0
- package/dist/ConcatenationScope.js +69 -0
- package/dist/FileSystemInfo.d.ts +183 -0
- package/dist/FileSystemInfo.js +2896 -0
- package/dist/MPPack.d.ts +33 -0
- package/dist/MPPack.js +163 -0
- package/dist/MPPackSetting.d.ts +52 -0
- package/dist/MPPackSetting.js +85 -0
- package/dist/MultiCompiler.d.ts +25 -0
- package/dist/MultiCompiler.js +387 -0
- package/dist/MultiWatching.d.ts +11 -0
- package/dist/MultiWatching.js +54 -0
- package/dist/PluginManager.d.ts +9 -0
- package/dist/PluginManager.js +359 -0
- package/dist/ResolverFactory.d.ts +7 -0
- package/dist/ResolverFactory.js +84 -0
- package/dist/Watching.d.ts +41 -0
- package/dist/Watching.js +359 -0
- package/dist/base/ArrayHelpers.d.ts +6 -0
- package/dist/base/ArrayHelpers.js +21 -0
- package/dist/base/ArrayQueue.d.ts +29 -0
- package/dist/base/ArrayQueue.js +87 -0
- package/dist/base/AsyncQueue.d.ts +37 -0
- package/dist/base/AsyncQueue.js +263 -0
- package/dist/base/ChunkHelpers.d.ts +3 -0
- package/dist/base/ChunkHelpers.js +26 -0
- package/dist/base/ConditionalInitFragment.d.ts +9 -0
- package/dist/base/ConditionalInitFragment.js +64 -0
- package/dist/base/GraphHelpers.d.ts +6 -0
- package/dist/base/GraphHelpers.js +32 -0
- package/dist/base/Hash.d.ts +6 -0
- package/dist/base/Hash.js +13 -0
- package/dist/base/InitFragment.d.ts +22 -0
- package/dist/base/InitFragment.js +113 -0
- package/dist/base/IterableHelpers.d.ts +4 -0
- package/dist/base/IterableHelpers.js +26 -0
- package/dist/base/LazyBucketSortedSet.d.ts +34 -0
- package/dist/base/LazyBucketSortedSet.js +188 -0
- package/dist/base/LazySet.d.ts +35 -0
- package/dist/base/LazySet.js +155 -0
- package/dist/base/MapHelpers.d.ts +14 -0
- package/dist/base/MapHelpers.js +27 -0
- package/dist/base/ModuleFilenameHelpers.d.ts +95 -0
- package/dist/base/ModuleFilenameHelpers.js +314 -0
- package/dist/base/NodeWatchFileSystem.d.ts +23 -0
- package/dist/base/NodeWatchFileSystem.js +135 -0
- package/dist/base/ParallelismFactorCalculator.d.ts +8 -0
- package/dist/base/ParallelismFactorCalculator.js +52 -0
- package/dist/base/Queue.d.ts +12 -0
- package/dist/base/Queue.js +25 -0
- package/dist/base/RequestShortener.d.ts +6 -0
- package/dist/base/RequestShortener.js +15 -0
- package/dist/base/Semaphore.d.ts +12 -0
- package/dist/base/Semaphore.js +37 -0
- package/dist/base/SetHelpers.d.ts +36 -0
- package/dist/base/SetHelpers.js +94 -0
- package/dist/base/SizeFormatHelpers.d.ts +2 -0
- package/dist/base/SizeFormatHelpers.js +15 -0
- package/dist/base/SizeOnlySource.d.ts +14 -0
- package/dist/base/SizeOnlySource.js +34 -0
- package/dist/base/SortableSet.d.ts +18 -0
- package/dist/base/SortableSet.js +90 -0
- package/dist/base/StackedCacheMap.d.ts +20 -0
- package/dist/base/StackedCacheMap.js +73 -0
- package/dist/base/StackedMap.d.ts +17 -0
- package/dist/base/StackedMap.js +103 -0
- package/dist/base/StartupHelpers.d.ts +4 -0
- package/dist/base/StartupHelpers.js +94 -0
- package/dist/base/StringXor.d.ts +53 -0
- package/dist/base/StringXor.js +94 -0
- package/dist/base/TupleQueue.d.ts +10 -0
- package/dist/base/TupleQueue.js +33 -0
- package/dist/base/TupleSet.d.ts +18 -0
- package/dist/base/TupleSet.js +115 -0
- package/dist/base/URLAbsoluteSpecifier.d.ts +3 -0
- package/dist/base/URLAbsoluteSpecifier.js +57 -0
- package/dist/base/WeakTupleMap.d.ts +20 -0
- package/dist/base/WeakTupleMap.js +124 -0
- package/dist/base/binarySearchBounds.d.ts +23 -0
- package/dist/base/binarySearchBounds.js +105 -0
- package/dist/base/cleverMerge.d.ts +27 -0
- package/dist/base/cleverMerge.js +450 -0
- package/dist/base/common.d.ts +7 -0
- package/dist/base/common.js +25 -0
- package/dist/base/commonjs.d.ts +1 -0
- package/dist/base/commonjs.js +48 -0
- package/dist/base/comparators.d.ts +22 -0
- package/dist/base/comparators.js +279 -0
- package/dist/base/compileBooleanMatcher.d.ts +6 -0
- package/dist/base/compileBooleanMatcher.js +162 -0
- package/dist/base/const.d.ts +29 -0
- package/dist/base/const.js +49 -0
- package/dist/base/copyPatterns.d.ts +14 -0
- package/dist/base/copyPatterns.js +501 -0
- package/dist/base/createHash.d.ts +3 -0
- package/dist/base/createHash.js +131 -0
- package/dist/base/defaults.d.ts +3 -0
- package/dist/base/defaults.js +671 -0
- package/dist/base/deprecation.d.ts +21 -0
- package/dist/base/deprecation.js +165 -0
- package/dist/base/deterministicGrouping.d.ts +8 -0
- package/dist/base/deterministicGrouping.js +395 -0
- package/dist/base/errors/AbstractMethodError.d.ts +5 -0
- package/dist/base/errors/AbstractMethodError.js +23 -0
- package/dist/base/errors/AsyncDependencyToInitialChunkError.d.ts +8 -0
- package/dist/base/errors/AsyncDependencyToInitialChunkError.js +18 -0
- package/dist/base/errors/BaseError.d.ts +17 -0
- package/dist/base/errors/BaseError.js +39 -0
- package/dist/base/errors/BuildCycleError.d.ts +8 -0
- package/dist/base/errors/BuildCycleError.js +17 -0
- package/dist/base/errors/CaseSensitiveModulesWarning.d.ts +5 -0
- package/dist/base/errors/CaseSensitiveModulesWarning.js +42 -0
- package/dist/base/errors/ChunkRenderError.d.ts +6 -0
- package/dist/base/errors/ChunkRenderError.js +18 -0
- package/dist/base/errors/CodeGenerationError.d.ts +8 -0
- package/dist/base/errors/CodeGenerationError.js +20 -0
- package/dist/base/errors/CommentCompilationWarning.d.ts +5 -0
- package/dist/base/errors/CommentCompilationWarning.js +16 -0
- package/dist/base/errors/ConcurrentCompilationError.d.ts +4 -0
- package/dist/base/errors/ConcurrentCompilationError.js +15 -0
- package/dist/base/errors/CriticalDependencyWarning.d.ts +5 -0
- package/dist/base/errors/CriticalDependencyWarning.js +16 -0
- package/dist/base/errors/ErrorHelpers.d.ts +8 -0
- package/dist/base/errors/ErrorHelpers.js +51 -0
- package/dist/base/errors/HarmonyLinkingError.d.ts +4 -0
- package/dist/base/errors/HarmonyLinkingError.js +14 -0
- package/dist/base/errors/HookBaseError.d.ts +10 -0
- package/dist/base/errors/HookBaseError.js +51 -0
- package/dist/base/errors/InvalidDependenciesModuleWarning.d.ts +5 -0
- package/dist/base/errors/InvalidDependenciesModuleWarning.js +26 -0
- package/dist/base/errors/MinMaxSizeWarning.d.ts +5 -0
- package/dist/base/errors/MinMaxSizeWarning.js +45 -0
- package/dist/base/errors/ModuleBuildError.d.ts +9 -0
- package/dist/base/errors/ModuleBuildError.js +62 -0
- package/dist/base/errors/ModuleDependencyError.d.ts +8 -0
- package/dist/base/errors/ModuleDependencyError.js +24 -0
- package/dist/base/errors/ModuleDependencyWarning.d.ts +6 -0
- package/dist/base/errors/ModuleDependencyWarning.js +23 -0
- package/dist/base/errors/ModuleError.d.ts +10 -0
- package/dist/base/errors/ModuleError.js +42 -0
- package/dist/base/errors/ModuleHashingError.d.ts +5 -0
- package/dist/base/errors/ModuleHashingError.js +17 -0
- package/dist/base/errors/ModuleNotFoundError.d.ts +5 -0
- package/dist/base/errors/ModuleNotFoundError.js +69 -0
- package/dist/base/errors/ModuleParseError.d.ts +8 -0
- package/dist/base/errors/ModuleParseError.js +77 -0
- package/dist/base/errors/ModuleRestoreError.d.ts +5 -0
- package/dist/base/errors/ModuleRestoreError.js +33 -0
- package/dist/base/errors/ModuleStoreError.d.ts +5 -0
- package/dist/base/errors/ModuleStoreError.js +33 -0
- package/dist/base/errors/ModuleWarning.d.ts +10 -0
- package/dist/base/errors/ModuleWarning.js +44 -0
- package/dist/base/errors/NodeStuffInWebError.d.ts +5 -0
- package/dist/base/errors/NodeStuffInWebError.js +17 -0
- package/dist/base/errors/UnhandledSchemeError.d.ts +5 -0
- package/dist/base/errors/UnhandledSchemeError.js +18 -0
- package/dist/base/errors/UnsupportedFeatureWarning.d.ts +5 -0
- package/dist/base/errors/UnsupportedFeatureWarning.js +17 -0
- package/dist/base/extractUrlAndGlobal.d.ts +1 -0
- package/dist/base/extractUrlAndGlobal.js +10 -0
- package/dist/base/findGraphRoots.d.ts +2 -0
- package/dist/base/findGraphRoots.js +183 -0
- package/dist/base/formatLocation.d.ts +2 -0
- package/dist/base/formatLocation.js +47 -0
- package/dist/base/fs.d.ts +94 -0
- package/dist/base/fs.js +218 -0
- package/dist/base/hash/BatchedHash.d.ts +11 -0
- package/dist/base/hash/BatchedHash.js +47 -0
- package/dist/base/hash/md4.d.ts +2 -0
- package/dist/base/hash/md4.js +10 -0
- package/dist/base/hash/wasm-hash.d.ts +3 -0
- package/dist/base/hash/wasm-hash.js +138 -0
- package/dist/base/hash/xxhash64.d.ts +2 -0
- package/dist/base/hash/xxhash64.js +10 -0
- package/dist/base/identifier.d.ts +30 -0
- package/dist/base/identifier.js +237 -0
- package/dist/base/logging/Logger.d.ts +40 -0
- package/dist/base/logging/Logger.js +128 -0
- package/dist/base/logging/createConsoleLogger.d.ts +6 -0
- package/dist/base/logging/createConsoleLogger.js +161 -0
- package/dist/base/logging/nodeConsole.d.ts +21 -0
- package/dist/base/logging/nodeConsole.js +109 -0
- package/dist/base/logging/runtime.d.ts +8 -0
- package/dist/base/logging/runtime.js +30 -0
- package/dist/base/logging/truncateArgs.d.ts +2 -0
- package/dist/base/logging/truncateArgs.js +66 -0
- package/dist/base/memoize.d.ts +2 -0
- package/dist/base/memoize.js +18 -0
- package/dist/base/missingModule.d.ts +4 -0
- package/dist/base/missingModule.js +16 -0
- package/dist/base/moduleAlias.d.ts +1 -0
- package/dist/base/moduleAlias.js +8 -0
- package/dist/base/nonNumericOnlyHash.d.ts +7 -0
- package/dist/base/nonNumericOnlyHash.js +16 -0
- package/dist/base/normalization.d.ts +32 -0
- package/dist/base/normalization.js +320 -0
- package/dist/base/numberHash.d.ts +17 -0
- package/dist/base/numberHash.js +72 -0
- package/dist/base/objectToMap.d.ts +1 -0
- package/dist/base/objectToMap.js +6 -0
- package/dist/base/processAsyncTree.d.ts +2 -0
- package/dist/base/processAsyncTree.js +45 -0
- package/dist/base/propertyAccess.d.ts +2 -0
- package/dist/base/propertyAccess.js +20 -0
- package/dist/base/propertyName.d.ts +9 -0
- package/dist/base/propertyName.js +71 -0
- package/dist/base/semver.d.ts +25 -0
- package/dist/base/semver.js +425 -0
- package/dist/base/singletontask.d.ts +27 -0
- package/dist/base/singletontask.js +124 -0
- package/dist/base/smartGrouping.d.ts +2 -0
- package/dist/base/smartGrouping.js +138 -0
- package/dist/base/source.d.ts +2 -0
- package/dist/base/source.js +48 -0
- package/dist/base/stats/MultiStats.d.ts +19 -0
- package/dist/base/stats/MultiStats.js +142 -0
- package/dist/base/stats/Stats.d.ts +13 -0
- package/dist/base/stats/Stats.js +49 -0
- package/dist/base/stats/StatsFactory.d.ts +26 -0
- package/dist/base/stats/StatsFactory.js +163 -0
- package/dist/base/stats/StatsPrinter.d.ts +12 -0
- package/dist/base/stats/StatsPrinter.js +104 -0
- package/dist/base/utils.d.ts +5 -0
- package/dist/base/utils.js +35 -0
- package/dist/cache/AddBuildDependenciesPlugin.d.ts +6 -0
- package/dist/cache/AddBuildDependenciesPlugin.js +13 -0
- package/dist/cache/AddManagedPathsPlugin.d.ts +7 -0
- package/dist/cache/AddManagedPathsPlugin.js +17 -0
- package/dist/cache/Cache.d.ts +15 -0
- package/dist/cache/Cache.js +69 -0
- package/dist/cache/CacheFacade.d.ts +37 -0
- package/dist/cache/CacheFacade.js +187 -0
- package/dist/cache/IdleFileCachePlugin.d.ts +9 -0
- package/dist/cache/IdleFileCachePlugin.js +165 -0
- package/dist/cache/MemoryCachePlugin.d.ts +4 -0
- package/dist/cache/MemoryCachePlugin.js +36 -0
- package/dist/cache/MemoryWithGcCachePlugin.d.ts +8 -0
- package/dist/cache/MemoryWithGcCachePlugin.js +104 -0
- package/dist/cache/PackFileCacheStrategy.d.ts +47 -0
- package/dist/cache/PackFileCacheStrategy.js +1085 -0
- package/dist/cache/ResolverCachePlugin.d.ts +4 -0
- package/dist/cache/ResolverCachePlugin.js +248 -0
- package/dist/cache/getLazyHashedEtag.d.ts +2 -0
- package/dist/cache/getLazyHashedEtag.js +53 -0
- package/dist/cache/mergeEtags.d.ts +2 -0
- package/dist/cache/mergeEtags.js +50 -0
- package/dist/chunk/Chunk.d.ts +75 -0
- package/dist/chunk/Chunk.js +445 -0
- package/dist/chunk/ChunkGraph.d.ts +102 -0
- package/dist/chunk/ChunkGraph.js +1037 -0
- package/dist/chunk/ChunkGroup.d.ts +62 -0
- package/dist/chunk/ChunkGroup.js +341 -0
- package/dist/chunk/CodeGenerationResults.d.ts +13 -0
- package/dist/chunk/CodeGenerationResults.js +82 -0
- package/dist/chunk/Entrypoint.d.ts +22 -0
- package/dist/chunk/Entrypoint.js +56 -0
- package/dist/chunk/GraphHelpers.d.ts +3 -0
- package/dist/chunk/GraphHelpers.js +15 -0
- package/dist/chunk/buildChunkGraph.d.ts +2 -0
- package/dist/chunk/buildChunkGraph.js +1067 -0
- package/dist/chunk/chunkFormat/ArrayPushCallbackChunkFormatPlugin.d.ts +4 -0
- package/dist/chunk/chunkFormat/ArrayPushCallbackChunkFormatPlugin.js +101 -0
- package/dist/chunk/chunkLoading/JsonpChunkLoadingPlugin.d.ts +4 -0
- package/dist/chunk/chunkLoading/JsonpChunkLoadingPlugin.js +98 -0
- package/dist/chunk/chunkLoading/JsonpChunkLoadingRuntimeModule.d.ts +15 -0
- package/dist/chunk/chunkLoading/JsonpChunkLoadingRuntimeModule.js +272 -0
- package/dist/dependencies/AsyncDependenciesBlock.d.ts +14 -0
- package/dist/dependencies/AsyncDependenciesBlock.js +64 -0
- package/dist/dependencies/CreateScriptUrlDependency.d.ts +9 -0
- package/dist/dependencies/CreateScriptUrlDependency.js +60 -0
- package/dist/dependencies/DelegatedSourceDependency.d.ts +7 -0
- package/dist/dependencies/DelegatedSourceDependency.js +20 -0
- package/dist/dependencies/DependenciesBlock.d.ts +29 -0
- package/dist/dependencies/DependenciesBlock.js +66 -0
- package/dist/dependencies/Dependency.d.ts +44 -0
- package/dist/dependencies/Dependency.js +171 -0
- package/dist/dependencies/DependencyTemplate.d.ts +4 -0
- package/dist/dependencies/DependencyTemplate.js +9 -0
- package/dist/dependencies/DependencyTemplates.d.ts +12 -0
- package/dist/dependencies/DependencyTemplates.js +34 -0
- package/dist/dependencies/DynamicExports.d.ts +6 -0
- package/dist/dependencies/DynamicExports.js +48 -0
- package/dist/dependencies/ExportsInfoDependency.d.ts +10 -0
- package/dist/dependencies/ExportsInfoDependency.js +80 -0
- package/dist/dependencies/LocalModule.d.ts +11 -0
- package/dist/dependencies/LocalModule.js +33 -0
- package/dist/dependencies/LocalModuleDependency.d.ts +10 -0
- package/dist/dependencies/LocalModuleDependency.js +42 -0
- package/dist/dependencies/LocalModulesHelpers.d.ts +4 -0
- package/dist/dependencies/LocalModulesHelpers.js +48 -0
- package/dist/dependencies/ModuleDecoratorDependency.d.ts +15 -0
- package/dist/dependencies/ModuleDecoratorDependency.js +85 -0
- package/dist/dependencies/ModuleDependency.d.ts +16 -0
- package/dist/dependencies/ModuleDependency.js +53 -0
- package/dist/dependencies/ModuleDependencyTemplateAsId.d.ts +9 -0
- package/dist/dependencies/ModuleDependencyTemplateAsId.js +21 -0
- package/dist/dependencies/ModuleDependencyTemplateAsRequireId.d.ts +10 -0
- package/dist/dependencies/ModuleDependencyTemplateAsRequireId.js +22 -0
- package/dist/dependencies/NullDependency.d.ts +7 -0
- package/dist/dependencies/NullDependency.js +19 -0
- package/dist/dependencies/PureExpressionDependency.d.ts +12 -0
- package/dist/dependencies/PureExpressionDependency.js +73 -0
- package/dist/dependencies/RequireHeaderDependency.d.ts +8 -0
- package/dist/dependencies/RequireHeaderDependency.js +58 -0
- package/dist/dependencies/RequireResolveContextDependency.d.ts +8 -0
- package/dist/dependencies/RequireResolveContextDependency.js +33 -0
- package/dist/dependencies/RequireResolveDependency.d.ts +10 -0
- package/dist/dependencies/RequireResolveDependency.js +29 -0
- package/dist/dependencies/RequireResolveHeaderDependency.d.ts +8 -0
- package/dist/dependencies/RequireResolveHeaderDependency.js +36 -0
- package/dist/dependencies/RuntimeRequirementsDependency.d.ts +10 -0
- package/dist/dependencies/RuntimeRequirementsDependency.js +40 -0
- package/dist/dependencies/StaticExportsDependency.d.ts +15 -0
- package/dist/dependencies/StaticExportsDependency.js +38 -0
- package/dist/dependencies/URLDependency.d.ts +16 -0
- package/dist/dependencies/URLDependency.js +103 -0
- package/dist/dependencies/URLPlugin.d.ts +4 -0
- package/dist/dependencies/URLPlugin.js +107 -0
- package/dist/dependencies/UnsupportedDependency.d.ts +9 -0
- package/dist/dependencies/UnsupportedDependency.js +36 -0
- package/dist/dependencies/commonjs/CommonJsDependencyHelpers.d.ts +2 -0
- package/dist/dependencies/commonjs/CommonJsDependencyHelpers.js +67 -0
- package/dist/dependencies/commonjs/CommonJsExportRequireDependency.d.ts +46 -0
- package/dist/dependencies/commonjs/CommonJsExportRequireDependency.js +260 -0
- package/dist/dependencies/commonjs/CommonJsExportsDependency.d.ts +19 -0
- package/dist/dependencies/commonjs/CommonJsExportsDependency.js +82 -0
- package/dist/dependencies/commonjs/CommonJsExportsParserPlugin.d.ts +6 -0
- package/dist/dependencies/commonjs/CommonJsExportsParserPlugin.js +314 -0
- package/dist/dependencies/commonjs/CommonJsFullRequireDependency.d.ts +13 -0
- package/dist/dependencies/commonjs/CommonJsFullRequireDependency.js +77 -0
- package/dist/dependencies/commonjs/CommonJsImportsParserPlugin.d.ts +6 -0
- package/dist/dependencies/commonjs/CommonJsImportsParserPlugin.js +500 -0
- package/dist/dependencies/commonjs/CommonJsPlugin.d.ts +4 -0
- package/dist/dependencies/commonjs/CommonJsPlugin.js +170 -0
- package/dist/dependencies/commonjs/CommonJsRequireContextDependency.d.ts +8 -0
- package/dist/dependencies/commonjs/CommonJsRequireContextDependency.js +37 -0
- package/dist/dependencies/commonjs/CommonJsRequireDependency.d.ts +7 -0
- package/dist/dependencies/commonjs/CommonJsRequireDependency.js +24 -0
- package/dist/dependencies/commonjs/CommonJsSelfReferenceDependency.d.ts +15 -0
- package/dist/dependencies/commonjs/CommonJsSelfReferenceDependency.js +112 -0
- package/dist/dependencies/const/CachedConstDependency.d.ts +12 -0
- package/dist/dependencies/const/CachedConstDependency.js +50 -0
- package/dist/dependencies/const/ConstDependency.d.ts +13 -0
- package/dist/dependencies/const/ConstDependency.js +63 -0
- package/dist/dependencies/context/ContextDependency.d.ts +26 -0
- package/dist/dependencies/context/ContextDependency.js +91 -0
- package/dist/dependencies/context/ContextDependencyHelpers.d.ts +2 -0
- package/dist/dependencies/context/ContextDependencyHelpers.js +128 -0
- package/dist/dependencies/context/ContextDependencyTemplateAsId.d.ts +10 -0
- package/dist/dependencies/context/ContextDependencyTemplateAsId.js +37 -0
- package/dist/dependencies/context/ContextDependencyTemplateAsRequireCall.d.ts +10 -0
- package/dist/dependencies/context/ContextDependencyTemplateAsRequireCall.js +39 -0
- package/dist/dependencies/context/ContextElementDependency.d.ts +13 -0
- package/dist/dependencies/context/ContextElementDependency.js +53 -0
- package/dist/dependencies/css/CssExportDependency.d.ts +17 -0
- package/dist/dependencies/css/CssExportDependency.js +49 -0
- package/dist/dependencies/css/CssImportDependency.d.ts +14 -0
- package/dist/dependencies/css/CssImportDependency.js +60 -0
- package/dist/dependencies/css/CssLocalIdentifierDependency.d.ts +12 -0
- package/dist/dependencies/css/CssLocalIdentifierDependency.js +69 -0
- package/dist/dependencies/css/CssSelfLocalIdentifierDependency.d.ts +13 -0
- package/dist/dependencies/css/CssSelfLocalIdentifierDependency.js +53 -0
- package/dist/dependencies/css/CssUrlDependency.d.ts +12 -0
- package/dist/dependencies/css/CssUrlDependency.js +89 -0
- package/dist/dependencies/entry/DynamicEntryPlugin.d.ts +22 -0
- package/dist/dependencies/entry/DynamicEntryPlugin.js +62 -0
- package/dist/dependencies/entry/EntryDependency.d.ts +7 -0
- package/dist/dependencies/entry/EntryDependency.js +20 -0
- package/dist/dependencies/getFunctionExpression.d.ts +10 -0
- package/dist/dependencies/getFunctionExpression.js +42 -0
- package/dist/dependencies/harmony/HarmonyAcceptDependency.d.ts +11 -0
- package/dist/dependencies/harmony/HarmonyAcceptDependency.js +81 -0
- package/dist/dependencies/harmony/HarmonyAcceptImportDependency.d.ts +6 -0
- package/dist/dependencies/harmony/HarmonyAcceptImportDependency.js +20 -0
- package/dist/dependencies/harmony/HarmonyCompatibilityDependency.d.ts +5 -0
- package/dist/dependencies/harmony/HarmonyCompatibilityDependency.js +61 -0
- package/dist/dependencies/harmony/HarmonyDetectionParserPlugin.d.ts +5 -0
- package/dist/dependencies/harmony/HarmonyDetectionParserPlugin.js +102 -0
- package/dist/dependencies/harmony/HarmonyEvaluatedImportSpecifierDependency.d.ts +16 -0
- package/dist/dependencies/harmony/HarmonyEvaluatedImportSpecifierDependency.js +84 -0
- package/dist/dependencies/harmony/HarmonyExportDependencyParserPlugin.d.ts +5 -0
- package/dist/dependencies/harmony/HarmonyExportDependencyParserPlugin.js +143 -0
- package/dist/dependencies/harmony/HarmonyExportExpressionDependency.d.ts +23 -0
- package/dist/dependencies/harmony/HarmonyExportExpressionDependency.js +148 -0
- package/dist/dependencies/harmony/HarmonyExportHeaderDependency.d.ts +10 -0
- package/dist/dependencies/harmony/HarmonyExportHeaderDependency.js +39 -0
- package/dist/dependencies/harmony/HarmonyExportImportedSpecifierDependency.d.ts +140 -0
- package/dist/dependencies/harmony/HarmonyExportImportedSpecifierDependency.js +763 -0
- package/dist/dependencies/harmony/HarmonyExportInitFragment.d.ts +14 -0
- package/dist/dependencies/harmony/HarmonyExportInitFragment.js +147 -0
- package/dist/dependencies/harmony/HarmonyExportSpecifierDependency.d.ts +17 -0
- package/dist/dependencies/harmony/HarmonyExportSpecifierDependency.js +62 -0
- package/dist/dependencies/harmony/HarmonyExports.d.ts +3 -0
- package/dist/dependencies/harmony/HarmonyExports.js +51 -0
- package/dist/dependencies/harmony/HarmonyImportDependency.d.ts +30 -0
- package/dist/dependencies/harmony/HarmonyImportDependency.js +217 -0
- package/dist/dependencies/harmony/HarmonyImportDependencyParserPlugin.d.ts +9 -0
- package/dist/dependencies/harmony/HarmonyImportDependencyParserPlugin.js +202 -0
- package/dist/dependencies/harmony/HarmonyImportSideEffectDependency.d.ts +8 -0
- package/dist/dependencies/harmony/HarmonyImportSideEffectDependency.js +43 -0
- package/dist/dependencies/harmony/HarmonyImportSpecifierDependency.d.ts +33 -0
- package/dist/dependencies/harmony/HarmonyImportSpecifierDependency.js +272 -0
- package/dist/dependencies/harmony/HarmonyModulesPlugin.d.ts +6 -0
- package/dist/dependencies/harmony/HarmonyModulesPlugin.js +57 -0
- package/dist/dependencies/harmony/HarmonyTopLevelThisParserPlugin.d.ts +4 -0
- package/dist/dependencies/harmony/HarmonyTopLevelThisParserPlugin.js +45 -0
- package/dist/dependencies/import/ImportContextDependency.d.ts +9 -0
- package/dist/dependencies/import/ImportContextDependency.js +34 -0
- package/dist/dependencies/import/ImportDependency.d.ts +11 -0
- package/dist/dependencies/import/ImportDependency.js +57 -0
- package/dist/dependencies/import/ImportEagerDependency.d.ts +7 -0
- package/dist/dependencies/import/ImportEagerDependency.js +34 -0
- package/dist/dependencies/import/ImportMetaContextDependency.d.ts +7 -0
- package/dist/dependencies/import/ImportMetaContextDependency.js +23 -0
- package/dist/dependencies/import/ImportMetaContextDependencyParserPlugin.d.ts +3 -0
- package/dist/dependencies/import/ImportMetaContextDependencyParserPlugin.js +207 -0
- package/dist/dependencies/import/ImportMetaContextPlugin.d.ts +4 -0
- package/dist/dependencies/import/ImportMetaContextPlugin.js +27 -0
- package/dist/dependencies/import/ImportMetaHotAcceptDependency.d.ts +7 -0
- package/dist/dependencies/import/ImportMetaHotAcceptDependency.js +24 -0
- package/dist/dependencies/import/ImportMetaHotDeclineDependency.d.ts +7 -0
- package/dist/dependencies/import/ImportMetaHotDeclineDependency.js +24 -0
- package/dist/dependencies/import/ImportMetaPlugin.d.ts +4 -0
- package/dist/dependencies/import/ImportMetaPlugin.js +129 -0
- package/dist/dependencies/import/ImportParserPlugin.d.ts +6 -0
- package/dist/dependencies/import/ImportParserPlugin.js +207 -0
- package/dist/dependencies/import/ImportPlugin.d.ts +4 -0
- package/dist/dependencies/import/ImportPlugin.js +37 -0
- package/dist/dependencies/import/ImportWeakDependency.d.ts +6 -0
- package/dist/dependencies/import/ImportWeakDependency.js +33 -0
- package/dist/dependencies/json/JsonExportsDependency.d.ts +14 -0
- package/dist/dependencies/json/JsonExportsDependency.js +61 -0
- package/dist/dependencies/loader/LoaderDependency.d.ts +8 -0
- package/dist/dependencies/loader/LoaderDependency.js +21 -0
- package/dist/dependencies/loader/LoaderImportDependency.d.ts +8 -0
- package/dist/dependencies/loader/LoaderImportDependency.js +22 -0
- package/dist/dependencies/loader/LoaderPlugin.d.ts +5 -0
- package/dist/dependencies/loader/LoaderPlugin.js +164 -0
- package/dist/dependencies/processExportInfo.d.ts +2 -0
- package/dist/dependencies/processExportInfo.js +32 -0
- package/dist/ids/DeterministicChunkIdsPlugin.d.ts +10 -0
- package/dist/ids/DeterministicChunkIdsPlugin.js +30 -0
- package/dist/ids/DeterministicModuleIdsPlugin.d.ts +6 -0
- package/dist/ids/DeterministicModuleIdsPlugin.js +38 -0
- package/dist/ids/IdHelpers.d.ts +16 -0
- package/dist/ids/IdHelpers.js +259 -0
- package/dist/ids/NamedChunkIdsPlugin.d.ts +11 -0
- package/dist/ids/NamedChunkIdsPlugin.js +34 -0
- package/dist/ids/NamedModuleIdsPlugin.d.ts +6 -0
- package/dist/ids/NamedModuleIdsPlugin.js +25 -0
- package/dist/ids/NaturalChunkIdsPlugin.d.ts +4 -0
- package/dist/ids/NaturalChunkIdsPlugin.js +17 -0
- package/dist/ids/NaturalModuleIdsPlugin.d.ts +4 -0
- package/dist/ids/NaturalModuleIdsPlugin.js +16 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +58 -0
- package/dist/library/AbstractLibraryPlugin.d.ts +21 -0
- package/dist/library/AbstractLibraryPlugin.js +177 -0
- package/dist/library/AssignLibraryPlugin.d.ts +53 -0
- package/dist/library/AssignLibraryPlugin.js +201 -0
- package/dist/library/EnableLibraryPlugin.d.ts +8 -0
- package/dist/library/EnableLibraryPlugin.js +174 -0
- package/dist/library/ExportPropertyLibraryPlugin.d.ts +22 -0
- package/dist/library/ExportPropertyLibraryPlugin.js +74 -0
- package/dist/library/JsonpLibraryPlugin.d.ts +19 -0
- package/dist/library/JsonpLibraryPlugin.js +35 -0
- package/dist/library/ModuleLibraryPlugin.d.ts +16 -0
- package/dist/library/ModuleLibraryPlugin.js +73 -0
- package/dist/library/UmdLibraryPlugin.d.ts +22 -0
- package/dist/library/UmdLibraryPlugin.js +161 -0
- package/dist/module/ContextExclusionPlugin.d.ts +6 -0
- package/dist/module/ContextExclusionPlugin.js +13 -0
- package/dist/module/ContextModule.d.ts +75 -0
- package/dist/module/ContextModule.js +844 -0
- package/dist/module/ContextModuleFactory.d.ts +8 -0
- package/dist/module/ContextModuleFactory.js +292 -0
- package/dist/module/ContextReplacementPlugin.d.ts +11 -0
- package/dist/module/ContextReplacementPlugin.js +128 -0
- package/dist/module/CssModule.d.ts +20 -0
- package/dist/module/CssModule.js +105 -0
- package/dist/module/ExportsInfo.d.ts +135 -0
- package/dist/module/ExportsInfo.js +1171 -0
- package/dist/module/ExportsInfoApiPlugin.d.ts +4 -0
- package/dist/module/ExportsInfoApiPlugin.js +38 -0
- package/dist/module/ExternalModule.d.ts +47 -0
- package/dist/module/ExternalModule.js +458 -0
- package/dist/module/ExternalModuleFactoryPlugin.d.ts +7 -0
- package/dist/module/ExternalModuleFactoryPlugin.js +176 -0
- package/dist/module/ExternalsPlugin.d.ts +7 -0
- package/dist/module/ExternalsPlugin.js +18 -0
- package/dist/module/Generator.d.ts +40 -0
- package/dist/module/Generator.js +49 -0
- package/dist/module/IgnoreErrorModuleFactory.d.ts +7 -0
- package/dist/module/IgnoreErrorModuleFactory.js +16 -0
- package/dist/module/JavascriptMetaInfoPlugin.d.ts +4 -0
- package/dist/module/JavascriptMetaInfoPlugin.js +65 -0
- package/dist/module/LazyModuleFactoryPlugin.d.ts +6 -0
- package/dist/module/LazyModuleFactoryPlugin.js +171 -0
- package/dist/module/Module.d.ts +175 -0
- package/dist/module/Module.js +550 -0
- package/dist/module/ModuleFactory.d.ts +25 -0
- package/dist/module/ModuleFactory.js +10 -0
- package/dist/module/ModuleGraph.d.ts +74 -0
- package/dist/module/ModuleGraph.js +470 -0
- package/dist/module/ModuleGraphConnection.d.ts +33 -0
- package/dist/module/ModuleGraphConnection.js +113 -0
- package/dist/module/ModuleProfile.d.ts +40 -0
- package/dist/module/ModuleProfile.js +77 -0
- package/dist/module/ModuleTypeConstants.d.ts +22 -0
- package/dist/module/ModuleTypeConstants.js +45 -0
- package/dist/module/NormalModule.d.ts +104 -0
- package/dist/module/NormalModule.js +904 -0
- package/dist/module/NormalModuleFactory.d.ts +36 -0
- package/dist/module/NormalModuleFactory.js +761 -0
- package/dist/module/Parser.d.ts +4 -0
- package/dist/module/Parser.js +9 -0
- package/dist/module/RawModule.d.ts +29 -0
- package/dist/module/RawModule.js +74 -0
- package/dist/module/RuntimeGlobals.d.ts +310 -0
- package/dist/module/RuntimeGlobals.js +316 -0
- package/dist/module/RuntimeHelpers.d.ts +43 -0
- package/dist/module/RuntimeHelpers.js +548 -0
- package/dist/module/RuntimeModule.d.ts +39 -0
- package/dist/module/RuntimeModule.js +114 -0
- package/dist/module/RuntimePlugin.d.ts +4 -0
- package/dist/module/RuntimePlugin.js +332 -0
- package/dist/module/SelfModuleFactory.d.ts +6 -0
- package/dist/module/SelfModuleFactory.js +14 -0
- package/dist/module/asset/AssetGenerator.d.ts +30 -0
- package/dist/module/asset/AssetGenerator.js +364 -0
- package/dist/module/asset/AssetModulesPlugin.d.ts +4 -0
- package/dist/module/asset/AssetModulesPlugin.js +98 -0
- package/dist/module/asset/AssetParser.d.ts +12 -0
- package/dist/module/asset/AssetParser.js +44 -0
- package/dist/module/asset/AssetSourceGenerator.d.ts +14 -0
- package/dist/module/asset/AssetSourceGenerator.js +74 -0
- package/dist/module/asset/AssetSourceParser.d.ts +5 -0
- package/dist/module/asset/AssetSourceParser.js +19 -0
- package/dist/module/asset/RawDataUrlModule.d.ts +27 -0
- package/dist/module/asset/RawDataUrlModule.js +102 -0
- package/dist/module/async-modules/AwaitDependenciesInitFragment.d.ts +10 -0
- package/dist/module/async-modules/AwaitDependenciesInitFragment.js +68 -0
- package/dist/module/async-modules/InferAsyncModulesPlugin.d.ts +4 -0
- package/dist/module/async-modules/InferAsyncModulesPlugin.js +28 -0
- package/dist/module/javascript/BasicEvaluatedExpression.d.ts +139 -0
- package/dist/module/javascript/BasicEvaluatedExpression.js +481 -0
- package/dist/module/javascript/JavascriptGenerator.d.ts +11 -0
- package/dist/module/javascript/JavascriptGenerator.js +103 -0
- package/dist/module/javascript/JavascriptModulesPlugin.d.ts +17 -0
- package/dist/module/javascript/JavascriptModulesPlugin.js +821 -0
- package/dist/module/javascript/JavascriptParser.d.ts +598 -0
- package/dist/module/javascript/JavascriptParser.js +3579 -0
- package/dist/module/javascript/JavascriptParserHelpers.d.ts +10 -0
- package/dist/module/javascript/JavascriptParserHelpers.js +61 -0
- package/dist/module/json/JsonData.d.ts +9 -0
- package/dist/module/json/JsonData.js +43 -0
- package/dist/module/json/JsonGenerator.d.ts +15 -0
- package/dist/module/json/JsonGenerator.js +137 -0
- package/dist/module/json/JsonModulesPlugin.d.ts +4 -0
- package/dist/module/json/JsonModulesPlugin.js +20 -0
- package/dist/module/json/JsonParser.d.ts +7 -0
- package/dist/module/json/JsonParser.js +41 -0
- package/dist/module/runtime/AsyncModuleRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/AsyncModuleRuntimeModule.js +115 -0
- package/dist/module/runtime/AutoPublicPathRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/AutoPublicPathRuntimeModule.js +81 -0
- package/dist/module/runtime/BaseUriRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/BaseUriRuntimeModule.js +41 -0
- package/dist/module/runtime/ChunkNameRuntimeModule.d.ts +7 -0
- package/dist/module/runtime/ChunkNameRuntimeModule.js +40 -0
- package/dist/module/runtime/CompatGetDefaultExportRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/CompatGetDefaultExportRuntimeModule.js +54 -0
- package/dist/module/runtime/CompatRuntimeModule.d.ts +7 -0
- package/dist/module/runtime/CompatRuntimeModule.js +59 -0
- package/dist/module/runtime/CreateFakeNamespaceObjectRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/CreateFakeNamespaceObjectRuntimeModule.js +77 -0
- package/dist/module/runtime/CreateScriptRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/CreateScriptRuntimeModule.js +44 -0
- package/dist/module/runtime/CreateScriptUrlRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/CreateScriptUrlRuntimeModule.js +44 -0
- package/dist/module/runtime/DefinePropertyGettersRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/DefinePropertyGettersRuntimeModule.js +56 -0
- package/dist/module/runtime/EnsureChunkRuntimeModule.d.ts +7 -0
- package/dist/module/runtime/EnsureChunkRuntimeModule.js +66 -0
- package/dist/module/runtime/GetChunkFilenameRuntimeModule.d.ts +10 -0
- package/dist/module/runtime/GetChunkFilenameRuntimeModule.js +220 -0
- package/dist/module/runtime/GetFullHashRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/GetFullHashRuntimeModule.js +42 -0
- package/dist/module/runtime/GetMainFilenameRuntimeModule.d.ts +8 -0
- package/dist/module/runtime/GetMainFilenameRuntimeModule.js +52 -0
- package/dist/module/runtime/GetTrustedTypesPolicyRuntimeModule.d.ts +7 -0
- package/dist/module/runtime/GetTrustedTypesPolicyRuntimeModule.js +89 -0
- package/dist/module/runtime/GlobalRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/GlobalRuntimeModule.js +61 -0
- package/dist/module/runtime/HasOwnPropertyRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/HasOwnPropertyRuntimeModule.js +44 -0
- package/dist/module/runtime/HelperRuntimeModule.d.ts +5 -0
- package/dist/module/runtime/HelperRuntimeModule.js +12 -0
- package/dist/module/runtime/LoadScriptRuntimeModule.d.ts +9 -0
- package/dist/module/runtime/LoadScriptRuntimeModule.js +129 -0
- package/dist/module/runtime/MakeNamespaceObjectRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/MakeNamespaceObjectRuntimeModule.js +53 -0
- package/dist/module/runtime/NonceRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/NonceRuntimeModule.js +39 -0
- package/dist/module/runtime/OnChunksLoadedRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/OnChunksLoadedRuntimeModule.js +81 -0
- package/dist/module/runtime/PublicPathRuntimeModule.d.ts +7 -0
- package/dist/module/runtime/PublicPathRuntimeModule.js +44 -0
- package/dist/module/runtime/RelativeUrlRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/RelativeUrlRuntimeModule.js +56 -0
- package/dist/module/runtime/RuntimeIdRuntimeModule.d.ts +6 -0
- package/dist/module/runtime/RuntimeIdRuntimeModule.js +45 -0
- package/dist/module/runtime/StartupChunkDependenciesPlugin.d.ts +11 -0
- package/dist/module/runtime/StartupChunkDependenciesPlugin.js +69 -0
- package/dist/module/runtime/StartupChunkDependenciesRuntimeModule.d.ts +7 -0
- package/dist/module/runtime/StartupChunkDependenciesRuntimeModule.js +67 -0
- package/dist/module/runtime/StartupEntrypointRuntimeModule.d.ts +7 -0
- package/dist/module/runtime/StartupEntrypointRuntimeModule.js +58 -0
- package/dist/module/uri/DataUriPlugin.d.ts +4 -0
- package/dist/module/uri/DataUriPlugin.js +46 -0
- package/dist/module/uri/FileUriPlugin.d.ts +4 -0
- package/dist/module/uri/FileUriPlugin.js +31 -0
- package/dist/plugins/APIPlugin.d.ts +9 -0
- package/dist/plugins/APIPlugin.js +230 -0
- package/dist/plugins/CleanPlugin.d.ts +7 -0
- package/dist/plugins/CleanPlugin.js +295 -0
- package/dist/plugins/CompatibilityPlugin.d.ts +4 -0
- package/dist/plugins/CompatibilityPlugin.js +142 -0
- package/dist/plugins/ConstPlugin.d.ts +4 -0
- package/dist/plugins/ConstPlugin.js +409 -0
- package/dist/plugins/DefaultStatsFactoryPlugin.d.ts +4 -0
- package/dist/plugins/DefaultStatsFactoryPlugin.js +1552 -0
- package/dist/plugins/DefaultStatsPresetPlugin.d.ts +4 -0
- package/dist/plugins/DefaultStatsPresetPlugin.js +306 -0
- package/dist/plugins/DefaultStatsPrinterPlugin.d.ts +4 -0
- package/dist/plugins/DefaultStatsPrinterPlugin.js +986 -0
- package/dist/plugins/DefinePlugin.d.ts +15 -0
- package/dist/plugins/DefinePlugin.js +400 -0
- package/dist/plugins/NodeStuffPlugin.d.ts +6 -0
- package/dist/plugins/NodeStuffPlugin.js +134 -0
- package/dist/plugins/ProgressPlugin.d.ts +20 -0
- package/dist/plugins/ProgressPlugin.js +494 -0
- package/dist/plugins/RecordIdsPlugin.d.ts +9 -0
- package/dist/plugins/RecordIdsPlugin.js +175 -0
- package/dist/plugins/UseStrictPlugin.d.ts +4 -0
- package/dist/plugins/UseStrictPlugin.js +35 -0
- package/dist/plugins/WarnCaseSensitiveModulesPlugin.d.ts +4 -0
- package/dist/plugins/WarnCaseSensitiveModulesPlugin.js +37 -0
- package/dist/plugins/WarnDeprecatedOptionPlugin.d.ts +8 -0
- package/dist/plugins/WarnDeprecatedOptionPlugin.js +29 -0
- package/dist/plugins/cssMinimizer/CssMinimizerMinify.js +73 -0
- package/dist/plugins/cssMinimizer/CssMinimizerPlugin.d.ts +11 -0
- package/dist/plugins/cssMinimizer/CssMinimizerPlugin.js +329 -0
- package/dist/plugins/cssMinimizer/CssMinimizerUtils.js +147 -0
- package/dist/plugins/miniCssExtractPlugin/MiniCssExtractLoader.d.ts +1 -0
- package/dist/plugins/miniCssExtractPlugin/MiniCssExtractLoader.js +177 -0
- package/dist/plugins/miniCssExtractPlugin/MiniCssExtractPlugin.d.ts +22 -0
- package/dist/plugins/miniCssExtractPlugin/MiniCssExtractPlugin.js +780 -0
- package/dist/plugins/miniCssExtractPlugin/MiniCssUtils.d.ts +14 -0
- package/dist/plugins/miniCssExtractPlugin/MiniCssUtils.js +132 -0
- package/dist/plugins/optimize/AggressiveMergingPlugin.d.ts +6 -0
- package/dist/plugins/optimize/AggressiveMergingPlugin.js +62 -0
- package/dist/plugins/optimize/AggressiveSplittingPlugin.d.ts +7 -0
- package/dist/plugins/optimize/AggressiveSplittingPlugin.js +247 -0
- package/dist/plugins/optimize/ConcatenatedModule.d.ts +47 -0
- package/dist/plugins/optimize/ConcatenatedModule.js +1221 -0
- package/dist/plugins/optimize/EnsureChunkConditionsPlugin.d.ts +4 -0
- package/dist/plugins/optimize/EnsureChunkConditionsPlugin.js +61 -0
- package/dist/plugins/optimize/FlagAllModulesAsUsedPlugin.d.ts +6 -0
- package/dist/plugins/optimize/FlagAllModulesAsUsedPlugin.js +30 -0
- package/dist/plugins/optimize/FlagDependencyExportsPlugin.d.ts +4 -0
- package/dist/plugins/optimize/FlagDependencyExportsPlugin.js +275 -0
- package/dist/plugins/optimize/FlagDependencyUsagePlugin.d.ts +6 -0
- package/dist/plugins/optimize/FlagDependencyUsagePlugin.js +243 -0
- package/dist/plugins/optimize/FlagEntryExportAsUsedPlugin.d.ts +7 -0
- package/dist/plugins/optimize/FlagEntryExportAsUsedPlugin.js +34 -0
- package/dist/plugins/optimize/FlagIncludedChunksPlugin.d.ts +4 -0
- package/dist/plugins/optimize/FlagIncludedChunksPlugin.js +85 -0
- package/dist/plugins/optimize/InnerGraph.d.ts +20 -0
- package/dist/plugins/optimize/InnerGraph.js +234 -0
- package/dist/plugins/optimize/InnerGraphPlugin.d.ts +4 -0
- package/dist/plugins/optimize/InnerGraphPlugin.js +289 -0
- package/dist/plugins/optimize/LimitChunkCountPlugin.d.ts +6 -0
- package/dist/plugins/optimize/LimitChunkCountPlugin.js +200 -0
- package/dist/plugins/optimize/MangleExportsPlugin.d.ts +6 -0
- package/dist/plugins/optimize/MangleExportsPlugin.js +124 -0
- package/dist/plugins/optimize/MergeDuplicateChunksPlugin.d.ts +4 -0
- package/dist/plugins/optimize/MergeDuplicateChunksPlugin.js +84 -0
- package/dist/plugins/optimize/MinChunkSizePlugin.d.ts +6 -0
- package/dist/plugins/optimize/MinChunkSizePlugin.js +71 -0
- package/dist/plugins/optimize/ModuleConcatenationPlugin.d.ts +8 -0
- package/dist/plugins/optimize/ModuleConcatenationPlugin.js +525 -0
- package/dist/plugins/optimize/ModuleInfoHeaderPlugin.d.ts +6 -0
- package/dist/plugins/optimize/ModuleInfoHeaderPlugin.js +145 -0
- package/dist/plugins/optimize/NoEmitOnErrorsPlugin.d.ts +4 -0
- package/dist/plugins/optimize/NoEmitOnErrorsPlugin.js +17 -0
- package/dist/plugins/optimize/OptimizationStages.d.ts +4 -0
- package/dist/plugins/optimize/OptimizationStages.js +9 -0
- package/dist/plugins/optimize/RealContentHashPlugin.d.ts +11 -0
- package/dist/plugins/optimize/RealContentHashPlugin.js +295 -0
- package/dist/plugins/optimize/RemoveEmptyChunksPlugin.d.ts +4 -0
- package/dist/plugins/optimize/RemoveEmptyChunksPlugin.js +30 -0
- package/dist/plugins/optimize/RemoveParentModulesPlugin.d.ts +4 -0
- package/dist/plugins/optimize/RemoveParentModulesPlugin.js +103 -0
- package/dist/plugins/optimize/RuntimeChunkPlugin.d.ts +6 -0
- package/dist/plugins/optimize/RuntimeChunkPlugin.js +25 -0
- package/dist/plugins/optimize/SideEffectsFlagPlugin.d.ts +7 -0
- package/dist/plugins/optimize/SideEffectsFlagPlugin.js +211 -0
- package/dist/plugins/optimize/SplitChunksPlugin.d.ts +7 -0
- package/dist/plugins/optimize/SplitChunksPlugin.js +1113 -0
- package/dist/rules/BasicEffectRulePlugin.d.ts +7 -0
- package/dist/rules/BasicEffectRulePlugin.js +21 -0
- package/dist/rules/BasicMatcherRulePlugin.d.ts +8 -0
- package/dist/rules/BasicMatcherRulePlugin.js +25 -0
- package/dist/rules/ObjectMatcherRulePlugin.d.ts +7 -0
- package/dist/rules/ObjectMatcherRulePlugin.js +27 -0
- package/dist/rules/RuleSetCompiler.d.ts +20 -0
- package/dist/rules/RuleSetCompiler.js +242 -0
- package/dist/rules/UseEffectRulePlugin.d.ts +5 -0
- package/dist/rules/UseEffectRulePlugin.js +117 -0
- package/dist/serialization/Serialization.d.ts +11 -0
- package/dist/serialization/Serialization.js +95 -0
- package/dist/serialization/Serializer.d.ts +9 -0
- package/dist/serialization/Serializer.js +43 -0
- package/dist/serialization/SerializerMiddleware.d.ts +13 -0
- package/dist/serialization/SerializerMiddleware.js +86 -0
- package/dist/serialization/internalSerializables.d.ts +82 -0
- package/dist/serialization/internalSerializables.js +94 -0
- package/dist/serialization/makeSerializable.d.ts +2 -0
- package/dist/serialization/makeSerializable.js +25 -0
- package/dist/serialization/middlewares/BinaryMiddleware.d.ts +12 -0
- package/dist/serialization/middlewares/BinaryMiddleware.js +955 -0
- package/dist/serialization/middlewares/FileMiddleware.d.ts +9 -0
- package/dist/serialization/middlewares/FileMiddleware.js +546 -0
- package/dist/serialization/middlewares/ObjectMiddleware.d.ts +15 -0
- package/dist/serialization/middlewares/ObjectMiddleware.js +602 -0
- package/dist/serialization/middlewares/SingleItemMiddleware.d.ts +6 -0
- package/dist/serialization/middlewares/SingleItemMiddleware.js +15 -0
- package/dist/serialization/registerExternalSerializer.d.ts +1 -0
- package/dist/serialization/registerExternalSerializer.js +154 -0
- package/dist/serialization/serializers/ArraySerializer.d.ts +5 -0
- package/dist/serialization/serializers/ArraySerializer.js +18 -0
- package/dist/serialization/serializers/DateObjectSerializer.d.ts +5 -0
- package/dist/serialization/serializers/DateObjectSerializer.js +11 -0
- package/dist/serialization/serializers/ErrorObjectSerializer.d.ts +7 -0
- package/dist/serialization/serializers/ErrorObjectSerializer.js +20 -0
- package/dist/serialization/serializers/MapObjectSerializer.d.ts +5 -0
- package/dist/serialization/serializers/MapObjectSerializer.js +26 -0
- package/dist/serialization/serializers/NullPrototypeObjectSerializer.d.ts +5 -0
- package/dist/serialization/serializers/NullPrototypeObjectSerializer.js +28 -0
- package/dist/serialization/serializers/PlainObjectSerializer.d.ts +5 -0
- package/dist/serialization/serializers/PlainObjectSerializer.js +77 -0
- package/dist/serialization/serializers/RegExpObjectSerializer.d.ts +5 -0
- package/dist/serialization/serializers/RegExpObjectSerializer.js +12 -0
- package/dist/serialization/serializers/SetObjectSerializer.d.ts +5 -0
- package/dist/serialization/serializers/SetObjectSerializer.js +19 -0
- package/dist/sourcemap/EvalDevToolModulePlugin.d.ts +8 -0
- package/dist/sourcemap/EvalDevToolModulePlugin.js +97 -0
- package/dist/sourcemap/EvalSourceMapDevToolPlugin.d.ts +9 -0
- package/dist/sourcemap/EvalSourceMapDevToolPlugin.js +167 -0
- package/dist/sourcemap/SourceMapDevToolModuleOptionsPlugin.d.ts +6 -0
- package/dist/sourcemap/SourceMapDevToolModuleOptionsPlugin.js +29 -0
- package/dist/sourcemap/SourceMapDevToolPlugin.d.ts +11 -0
- package/dist/sourcemap/SourceMapDevToolPlugin.js +364 -0
- package/dist/template/ChunkTemplate.d.ts +6 -0
- package/dist/template/ChunkTemplate.js +69 -0
- package/dist/template/LibraryTemplatePlugin.d.ts +6 -0
- package/dist/template/LibraryTemplatePlugin.js +23 -0
- package/dist/template/MainTemplate.d.ts +10 -0
- package/dist/template/MainTemplate.js +177 -0
- package/dist/template/ModuleTemplate.d.ts +7 -0
- package/dist/template/ModuleTemplate.js +46 -0
- package/dist/template/RuntimeTemplate.d.ts +158 -0
- package/dist/template/RuntimeTemplate.js +663 -0
- package/dist/template/Template.d.ts +25 -0
- package/dist/template/Template.js +269 -0
- package/dist/template/TemplatedPathPlugin.d.ts +4 -0
- package/dist/template/TemplatedPathPlugin.js +228 -0
- package/dist/thread/WorkerError.d.ts +4 -0
- package/dist/thread/WorkerError.js +21 -0
- package/dist/thread/WorkerPool.d.ts +52 -0
- package/dist/thread/WorkerPool.js +370 -0
- package/dist/thread/readBuffer.d.ts +1 -0
- package/dist/thread/readBuffer.js +37 -0
- package/dist/thread/serializer.d.ts +2 -0
- package/dist/thread/serializer.js +24 -0
- package/dist/thread/worker.d.ts +1 -0
- package/dist/thread/worker.js +185 -0
- package/dist/thread/workerPools.d.ts +2 -0
- package/dist/thread/workerPools.js +31 -0
- package/dist/types/index.d.ts +58 -0
- package/dist/types/index.js +8 -0
- package/package.json +96 -0
|
@@ -0,0 +1,986 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const SizeFormatHelpers_1 = require("@/base/SizeFormatHelpers");
|
|
4
|
+
const DATA_URI_CONTENT_LENGTH = 16;
|
|
5
|
+
const MAX_MODULE_IDENTIFIER_LENGTH = 80;
|
|
6
|
+
const plural = (n, singular, plural) => (n === 1 ? singular : plural);
|
|
7
|
+
const printSizes = (sizes, { formatSize = n => `${n}` }) => {
|
|
8
|
+
const keys = Object.keys(sizes);
|
|
9
|
+
if (keys.length > 1) {
|
|
10
|
+
return keys.map(key => `${formatSize(sizes[key])} (${key})`).join(' ');
|
|
11
|
+
}
|
|
12
|
+
if (keys.length === 1) {
|
|
13
|
+
return formatSize(sizes[keys[0]]);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
const getResourceName = (resource) => {
|
|
17
|
+
const dataUrl = /^data:[^,]+,/.exec(resource);
|
|
18
|
+
if (!dataUrl)
|
|
19
|
+
return resource;
|
|
20
|
+
const len = dataUrl[0].length + DATA_URI_CONTENT_LENGTH;
|
|
21
|
+
if (resource.length < len)
|
|
22
|
+
return resource;
|
|
23
|
+
return `${resource.slice(0, Math.min(resource.length - /* '..'.length */ 2, len))}..`;
|
|
24
|
+
};
|
|
25
|
+
const getModuleName = (name) => {
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
const [, prefix, resource] = /^(.*!)?([^!]*)$/.exec(name);
|
|
28
|
+
if (resource.length > MAX_MODULE_IDENTIFIER_LENGTH) {
|
|
29
|
+
const truncatedResource = `${resource.slice(0, Math.min(resource.length - /* '...(truncated)'.length */ 14, MAX_MODULE_IDENTIFIER_LENGTH))}...(truncated)`;
|
|
30
|
+
return [prefix, getResourceName(truncatedResource)];
|
|
31
|
+
}
|
|
32
|
+
return [prefix, getResourceName(resource)];
|
|
33
|
+
};
|
|
34
|
+
const mapLines = (str, fn) => str.split('\n').map(fn).join('\n');
|
|
35
|
+
const twoDigit = n => (n >= 10 ? `${n}` : `0${n}`);
|
|
36
|
+
const isValidId = id => typeof id === 'number' || id;
|
|
37
|
+
const moreCount = (list, count) => list && list.length > 0 ? `+ ${count}` : `${count}`;
|
|
38
|
+
const SIMPLE_PRINTERS = {
|
|
39
|
+
'compilation.summary!': (_, { type, bold, green, red, yellow, formatDateTime, formatTime, compilation: { name, hash, version, time, builtAt, errorsCount, warningsCount }, }) => {
|
|
40
|
+
const root = type === 'compilation.summary!';
|
|
41
|
+
const warningsMessage = warningsCount > 0
|
|
42
|
+
? yellow(`${warningsCount} ${plural(warningsCount, 'warning', 'warnings')}`)
|
|
43
|
+
: '';
|
|
44
|
+
const errorsMessage = errorsCount > 0 ? red(`${errorsCount} ${plural(errorsCount, 'error', 'errors')}`) : '';
|
|
45
|
+
const timeMessage = root && time ? ` in ${formatTime(time)}` : '';
|
|
46
|
+
const hashMessage = hash ? ` (${hash})` : '';
|
|
47
|
+
const builtAtMessage = root && builtAt ? `${formatDateTime(builtAt)}: ` : '';
|
|
48
|
+
const versionMessage = root && version ? `webpack ${version}` : '';
|
|
49
|
+
const nameMessage = root && name ? bold(name) : name ? `Child ${bold(name)}` : root ? '' : 'Child';
|
|
50
|
+
const subjectMessage = nameMessage && versionMessage
|
|
51
|
+
? `${nameMessage} (${versionMessage})`
|
|
52
|
+
: versionMessage || nameMessage || 'webpack';
|
|
53
|
+
let statusMessage;
|
|
54
|
+
if (errorsMessage && warningsMessage) {
|
|
55
|
+
statusMessage = `compiled with ${errorsMessage} and ${warningsMessage}`;
|
|
56
|
+
}
|
|
57
|
+
else if (errorsMessage) {
|
|
58
|
+
statusMessage = `compiled with ${errorsMessage}`;
|
|
59
|
+
}
|
|
60
|
+
else if (warningsMessage) {
|
|
61
|
+
statusMessage = `compiled with ${warningsMessage}`;
|
|
62
|
+
}
|
|
63
|
+
else if (errorsCount === 0 && warningsCount === 0) {
|
|
64
|
+
statusMessage = `compiled ${green('successfully')}`;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
statusMessage = `compiled`;
|
|
68
|
+
}
|
|
69
|
+
if (builtAtMessage ||
|
|
70
|
+
versionMessage ||
|
|
71
|
+
errorsMessage ||
|
|
72
|
+
warningsMessage ||
|
|
73
|
+
(errorsCount === 0 && warningsCount === 0) ||
|
|
74
|
+
timeMessage ||
|
|
75
|
+
hashMessage)
|
|
76
|
+
return `${builtAtMessage}${subjectMessage} ${statusMessage}${timeMessage}${hashMessage}`;
|
|
77
|
+
},
|
|
78
|
+
'compilation.filteredWarningDetailsCount': count => count
|
|
79
|
+
? `${count} ${plural(count, 'warning has', 'warnings have')} detailed information that is not shown.\nUse 'stats.errorDetails: true' resp. '--stats-error-details' to show it.`
|
|
80
|
+
: undefined,
|
|
81
|
+
'compilation.filteredErrorDetailsCount': (count, { yellow }) => count
|
|
82
|
+
? yellow(`${count} ${plural(count, 'error has', 'errors have')} detailed information that is not shown.\nUse 'stats.errorDetails: true' resp. '--stats-error-details' to show it.`)
|
|
83
|
+
: undefined,
|
|
84
|
+
'compilation.env': (env, { bold }) => env ? `Environment (--env): ${bold(JSON.stringify(env, null, 2))}` : undefined,
|
|
85
|
+
'compilation.publicPath': (publicPath, { bold }) => `PublicPath: ${bold(publicPath || '(none)')}`,
|
|
86
|
+
'compilation.entrypoints': (entrypoints, context, printer) => Array.isArray(entrypoints)
|
|
87
|
+
? undefined
|
|
88
|
+
: printer.print(context.type, Object.values(entrypoints), Object.assign(Object.assign({}, context), { chunkGroupKind: 'Entrypoint' })),
|
|
89
|
+
'compilation.namedChunkGroups': (namedChunkGroups, context, printer) => {
|
|
90
|
+
if (!Array.isArray(namedChunkGroups)) {
|
|
91
|
+
const { compilation: { entrypoints }, } = context;
|
|
92
|
+
let chunkGroups = Object.values(namedChunkGroups);
|
|
93
|
+
if (entrypoints) {
|
|
94
|
+
chunkGroups = chunkGroups.filter((group) => !Object.prototype.hasOwnProperty.call(entrypoints, group.name));
|
|
95
|
+
}
|
|
96
|
+
return printer.print(context.type, chunkGroups, Object.assign(Object.assign({}, context), { chunkGroupKind: 'Chunk Group' }));
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
'compilation.assetsByChunkName': () => '',
|
|
100
|
+
'compilation.filteredModules': (filteredModules, { compilation: { modules } }) => filteredModules > 0
|
|
101
|
+
? `${moreCount(modules, filteredModules)} ${plural(filteredModules, 'module', 'modules')}`
|
|
102
|
+
: undefined,
|
|
103
|
+
'compilation.filteredAssets': (filteredAssets, { compilation: { assets } }) => filteredAssets > 0
|
|
104
|
+
? `${moreCount(assets, filteredAssets)} ${plural(filteredAssets, 'asset', 'assets')}`
|
|
105
|
+
: undefined,
|
|
106
|
+
'compilation.logging': (logging, context, printer) => Array.isArray(logging)
|
|
107
|
+
? undefined
|
|
108
|
+
: printer.print(context.type,
|
|
109
|
+
// @ts-ignore
|
|
110
|
+
Object.entries(logging).map(([name, value]) => (Object.assign(Object.assign({}, value), { name }))), context),
|
|
111
|
+
'compilation.warningsInChildren!': (_, { yellow, compilation }) => {
|
|
112
|
+
if (!compilation.children && compilation.warningsCount > 0 && compilation.warnings) {
|
|
113
|
+
const childWarnings = compilation.warningsCount - compilation.warnings.length;
|
|
114
|
+
if (childWarnings > 0) {
|
|
115
|
+
return yellow(`${childWarnings} ${plural(childWarnings, 'WARNING', 'WARNINGS')} in child compilations${compilation.children
|
|
116
|
+
? ''
|
|
117
|
+
: " (Use 'stats.children: true' resp. '--stats-children' for more details)"}`);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
'compilation.errorsInChildren!': (_, { red, compilation }) => {
|
|
122
|
+
if (!compilation.children && compilation.errorsCount > 0 && compilation.errors) {
|
|
123
|
+
const childErrors = compilation.errorsCount - compilation.errors.length;
|
|
124
|
+
if (childErrors > 0) {
|
|
125
|
+
return red(`${childErrors} ${plural(childErrors, 'ERROR', 'ERRORS')} in child compilations${compilation.children
|
|
126
|
+
? ''
|
|
127
|
+
: " (Use 'stats.children: true' resp. '--stats-children' for more details)"}`);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
'asset.type': type => type,
|
|
132
|
+
'asset.name': (name, { formatFilename, asset: { isOverSizeLimit } }) => formatFilename(name, isOverSizeLimit),
|
|
133
|
+
'asset.size': (size, { asset: { isOverSizeLimit }, yellow, green, formatSize }) => isOverSizeLimit ? yellow(formatSize(size)) : formatSize(size),
|
|
134
|
+
'asset.emitted': (emitted, { green, formatFlag }) => emitted ? green(formatFlag('emitted')) : undefined,
|
|
135
|
+
'asset.comparedForEmit': (comparedForEmit, { yellow, formatFlag }) => comparedForEmit ? yellow(formatFlag('compared for emit')) : undefined,
|
|
136
|
+
'asset.cached': (cached, { green, formatFlag }) => cached ? green(formatFlag('cached')) : undefined,
|
|
137
|
+
'asset.isOverSizeLimit': (isOverSizeLimit, { yellow, formatFlag }) => isOverSizeLimit ? yellow(formatFlag('big')) : undefined,
|
|
138
|
+
'asset.info.immutable': (immutable, { green, formatFlag }) => immutable ? green(formatFlag('immutable')) : undefined,
|
|
139
|
+
'asset.info.javascriptModule': (javascriptModule, { formatFlag }) => javascriptModule ? formatFlag('javascript module') : undefined,
|
|
140
|
+
'asset.info.sourceFilename': (sourceFilename, { formatFlag }) => sourceFilename
|
|
141
|
+
? formatFlag(sourceFilename === true ? 'from source file' : `from: ${sourceFilename}`)
|
|
142
|
+
: undefined,
|
|
143
|
+
'asset.info.development': (development, { green, formatFlag }) => development ? green(formatFlag('dev')) : undefined,
|
|
144
|
+
'asset.info.hotModuleReplacement': (hotModuleReplacement, { green, formatFlag }) => hotModuleReplacement ? green(formatFlag('hmr')) : undefined,
|
|
145
|
+
'asset.separator!': () => '\n',
|
|
146
|
+
'asset.filteredRelated': (filteredRelated, { asset: { related } }) => filteredRelated > 0
|
|
147
|
+
? `${moreCount(related, filteredRelated)} related ${plural(filteredRelated, 'asset', 'assets')}`
|
|
148
|
+
: undefined,
|
|
149
|
+
'asset.filteredChildren': (filteredChildren, { asset: { children } }) => filteredChildren > 0
|
|
150
|
+
? `${moreCount(children, filteredChildren)} ${plural(filteredChildren, 'asset', 'assets')}`
|
|
151
|
+
: undefined,
|
|
152
|
+
assetChunk: (id, { formatChunkId }) => formatChunkId(id),
|
|
153
|
+
assetChunkName: name => name,
|
|
154
|
+
assetChunkIdHint: name => name,
|
|
155
|
+
'module.type': type => (type !== 'module' ? type : undefined),
|
|
156
|
+
'module.id': (id, { formatModuleId }) => (isValidId(id) ? formatModuleId(id) : undefined),
|
|
157
|
+
'module.name': (name, { bold }) => {
|
|
158
|
+
const [prefix, resource] = getModuleName(name);
|
|
159
|
+
return `${prefix || ''}${bold(resource || '')}`;
|
|
160
|
+
},
|
|
161
|
+
'module.identifier': identifier => undefined,
|
|
162
|
+
'module.layer': (layer, { formatLayer }) => (layer ? formatLayer(layer) : undefined),
|
|
163
|
+
'module.sizes': printSizes,
|
|
164
|
+
'module.chunks[]': (id, { formatChunkId }) => formatChunkId(id),
|
|
165
|
+
'module.depth': (depth, { formatFlag }) => depth !== null ? formatFlag(`depth ${depth}`) : undefined,
|
|
166
|
+
'module.cacheable': (cacheable, { formatFlag, red }) => cacheable === false ? red(formatFlag('not cacheable')) : undefined,
|
|
167
|
+
'module.orphan': (orphan, { formatFlag, yellow }) => orphan ? yellow(formatFlag('orphan')) : undefined,
|
|
168
|
+
'module.runtime': (runtime, { formatFlag, yellow }) => runtime ? yellow(formatFlag('runtime')) : undefined,
|
|
169
|
+
'module.optional': (optional, { formatFlag, yellow }) => optional ? yellow(formatFlag('optional')) : undefined,
|
|
170
|
+
'module.dependent': (dependent, { formatFlag, cyan }) => dependent ? cyan(formatFlag('dependent')) : undefined,
|
|
171
|
+
'module.built': (built, { formatFlag, yellow }) => built ? yellow(formatFlag('built')) : undefined,
|
|
172
|
+
'module.codeGenerated': (codeGenerated, { formatFlag, yellow }) => codeGenerated ? yellow(formatFlag('code generated')) : undefined,
|
|
173
|
+
'module.buildTimeExecuted': (buildTimeExecuted, { formatFlag, green }) => buildTimeExecuted ? green(formatFlag('build time executed')) : undefined,
|
|
174
|
+
'module.cached': (cached, { formatFlag, green }) => cached ? green(formatFlag('cached')) : undefined,
|
|
175
|
+
'module.assets': (assets, { formatFlag, magenta }) => (assets === null || assets === void 0 ? void 0 : assets.length)
|
|
176
|
+
? magenta(formatFlag(`${assets.length} ${plural(assets.length, 'asset', 'assets')}`))
|
|
177
|
+
: undefined,
|
|
178
|
+
'module.warnings': (warnings, { formatFlag, yellow }) => warnings === true
|
|
179
|
+
? yellow(formatFlag('warnings'))
|
|
180
|
+
: warnings
|
|
181
|
+
? yellow(formatFlag(`${warnings} ${plural(warnings, 'warning', 'warnings')}`))
|
|
182
|
+
: undefined,
|
|
183
|
+
'module.errors': (errors, { formatFlag, red }) => errors === true
|
|
184
|
+
? red(formatFlag('errors'))
|
|
185
|
+
: errors
|
|
186
|
+
? red(formatFlag(`${errors} ${plural(errors, 'error', 'errors')}`))
|
|
187
|
+
: undefined,
|
|
188
|
+
'module.providedExports': (providedExports, { formatFlag, cyan }) => {
|
|
189
|
+
if (Array.isArray(providedExports)) {
|
|
190
|
+
if (providedExports.length === 0)
|
|
191
|
+
return cyan(formatFlag('no exports'));
|
|
192
|
+
return cyan(formatFlag(`exports: ${providedExports.join(', ')}`));
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
'module.usedExports': (usedExports, { formatFlag, cyan, module }) => {
|
|
196
|
+
if (usedExports !== true) {
|
|
197
|
+
if (usedExports === null)
|
|
198
|
+
return cyan(formatFlag('used exports unknown'));
|
|
199
|
+
if (usedExports === false)
|
|
200
|
+
return cyan(formatFlag('module unused'));
|
|
201
|
+
if (Array.isArray(usedExports)) {
|
|
202
|
+
if (usedExports.length === 0)
|
|
203
|
+
return cyan(formatFlag('no exports used'));
|
|
204
|
+
const providedExportsCount = Array.isArray(module.providedExports)
|
|
205
|
+
? module.providedExports.length
|
|
206
|
+
: null;
|
|
207
|
+
if (providedExportsCount !== null && providedExportsCount === usedExports.length) {
|
|
208
|
+
return cyan(formatFlag('all exports used'));
|
|
209
|
+
}
|
|
210
|
+
return cyan(formatFlag(`only some exports used: ${usedExports.join(', ')}`));
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
'module.optimizationBailout[]': (optimizationBailout, { yellow }) => yellow(optimizationBailout),
|
|
215
|
+
'module.issuerPath': (issuerPath, { module }) => (module.profile ? undefined : ''),
|
|
216
|
+
'module.profile': profile => undefined,
|
|
217
|
+
'module.filteredModules': (filteredModules, { module: { modules } }) => filteredModules > 0
|
|
218
|
+
? `${moreCount(modules, filteredModules)} nested ${plural(filteredModules, 'module', 'modules')}`
|
|
219
|
+
: undefined,
|
|
220
|
+
'module.filteredReasons': (filteredReasons, { module: { reasons } }) => filteredReasons > 0
|
|
221
|
+
? `${moreCount(reasons, filteredReasons)} ${plural(filteredReasons, 'reason', 'reasons')}`
|
|
222
|
+
: undefined,
|
|
223
|
+
'module.filteredChildren': (filteredChildren, { module: { children } }) => filteredChildren > 0
|
|
224
|
+
? `${moreCount(children, filteredChildren)} ${plural(filteredChildren, 'module', 'modules')}`
|
|
225
|
+
: undefined,
|
|
226
|
+
'module.separator!': () => '\n',
|
|
227
|
+
'moduleIssuer.id': (id, { formatModuleId }) => formatModuleId(id),
|
|
228
|
+
'moduleIssuer.profile.total': (value, { formatTime }) => formatTime(value),
|
|
229
|
+
'moduleReason.type': type => type,
|
|
230
|
+
'moduleReason.userRequest': (userRequest, { cyan }) => cyan(getResourceName(userRequest)),
|
|
231
|
+
'moduleReason.moduleId': (moduleId, { formatModuleId }) => isValidId(moduleId) ? formatModuleId(moduleId) : undefined,
|
|
232
|
+
'moduleReason.module': (module, { magenta }) => magenta(module),
|
|
233
|
+
'moduleReason.loc': loc => loc,
|
|
234
|
+
'moduleReason.explanation': (explanation, { cyan }) => cyan(explanation),
|
|
235
|
+
'moduleReason.active': (active, { formatFlag }) => (active ? undefined : formatFlag('inactive')),
|
|
236
|
+
'moduleReason.resolvedModule': (module, { magenta }) => magenta(module),
|
|
237
|
+
'moduleReason.filteredChildren': (filteredChildren, { moduleReason: { children } }) => filteredChildren > 0
|
|
238
|
+
? `${moreCount(children, filteredChildren)} ${plural(filteredChildren, 'reason', 'reasons')}`
|
|
239
|
+
: undefined,
|
|
240
|
+
'module.profile.total': (value, { formatTime }) => formatTime(value),
|
|
241
|
+
'module.profile.resolving': (value, { formatTime }) => `resolving: ${formatTime(value)}`,
|
|
242
|
+
'module.profile.restoring': (value, { formatTime }) => `restoring: ${formatTime(value)}`,
|
|
243
|
+
'module.profile.integration': (value, { formatTime }) => `integration: ${formatTime(value)}`,
|
|
244
|
+
'module.profile.building': (value, { formatTime }) => `building: ${formatTime(value)}`,
|
|
245
|
+
'module.profile.storing': (value, { formatTime }) => `storing: ${formatTime(value)}`,
|
|
246
|
+
'module.profile.additionalResolving': (value, { formatTime }) => value ? `additional resolving: ${formatTime(value)}` : undefined,
|
|
247
|
+
'module.profile.additionalIntegration': (value, { formatTime }) => value ? `additional integration: ${formatTime(value)}` : undefined,
|
|
248
|
+
'chunkGroup.kind!': (_, { chunkGroupKind }) => chunkGroupKind,
|
|
249
|
+
'chunkGroup.separator!': () => '\n',
|
|
250
|
+
'chunkGroup.name': (name, { bold }) => bold(name),
|
|
251
|
+
'chunkGroup.isOverSizeLimit': (isOverSizeLimit, { formatFlag, yellow }) => isOverSizeLimit ? yellow(formatFlag('big')) : undefined,
|
|
252
|
+
'chunkGroup.assetsSize': (size, { formatSize }) => (size ? formatSize(size) : undefined),
|
|
253
|
+
'chunkGroup.auxiliaryAssetsSize': (size, { formatSize }) => size ? `(${formatSize(size)})` : undefined,
|
|
254
|
+
'chunkGroup.filteredAssets': (n, { chunkGroup: { assets } }) => n > 0 ? `${moreCount(assets, n)} ${plural(n, 'asset', 'assets')}` : undefined,
|
|
255
|
+
'chunkGroup.filteredAuxiliaryAssets': (n, { chunkGroup: { auxiliaryAssets } }) => n > 0
|
|
256
|
+
? `${moreCount(auxiliaryAssets, n)} auxiliary ${plural(n, 'asset', 'assets')}`
|
|
257
|
+
: undefined,
|
|
258
|
+
'chunkGroup.is!': () => '=',
|
|
259
|
+
'chunkGroupAsset.name': (asset, { green }) => green(asset),
|
|
260
|
+
'chunkGroupAsset.size': (size, { formatSize, chunkGroup }) => chunkGroup.assets.length > 1 ||
|
|
261
|
+
(chunkGroup.auxiliaryAssets && chunkGroup.auxiliaryAssets.length > 0)
|
|
262
|
+
? formatSize(size)
|
|
263
|
+
: undefined,
|
|
264
|
+
'chunkGroup.children': (children, context, printer) => Array.isArray(children)
|
|
265
|
+
? undefined
|
|
266
|
+
: printer.print(context.type, Object.keys(children).map(key => ({
|
|
267
|
+
type: key,
|
|
268
|
+
children: children[key],
|
|
269
|
+
})), context),
|
|
270
|
+
'chunkGroupChildGroup.type': type => `${type}:`,
|
|
271
|
+
'chunkGroupChild.assets[]': (file, { formatFilename }) => formatFilename(file),
|
|
272
|
+
'chunkGroupChild.chunks[]': (id, { formatChunkId }) => formatChunkId(id),
|
|
273
|
+
'chunkGroupChild.name': name => (name ? `(name: ${name})` : undefined),
|
|
274
|
+
'chunk.id': (id, { formatChunkId }) => formatChunkId(id),
|
|
275
|
+
'chunk.files[]': (file, { formatFilename }) => formatFilename(file),
|
|
276
|
+
'chunk.names[]': name => name,
|
|
277
|
+
'chunk.idHints[]': name => name,
|
|
278
|
+
'chunk.runtime[]': name => name,
|
|
279
|
+
'chunk.sizes': (sizes, context) => printSizes(sizes, context),
|
|
280
|
+
'chunk.parents[]': (parents, context) => context.formatChunkId(parents, 'parent'),
|
|
281
|
+
'chunk.siblings[]': (siblings, context) => context.formatChunkId(siblings, 'sibling'),
|
|
282
|
+
'chunk.children[]': (children, context) => context.formatChunkId(children, 'child'),
|
|
283
|
+
'chunk.childrenByOrder': (childrenByOrder, context, printer) => Array.isArray(childrenByOrder)
|
|
284
|
+
? undefined
|
|
285
|
+
: printer.print(context.type, Object.keys(childrenByOrder).map(key => ({
|
|
286
|
+
type: key,
|
|
287
|
+
children: childrenByOrder[key],
|
|
288
|
+
})), context),
|
|
289
|
+
'chunk.childrenByOrder[].type': type => `${type}:`,
|
|
290
|
+
'chunk.childrenByOrder[].children[]': (id, { formatChunkId }) => isValidId(id) ? formatChunkId(id) : undefined,
|
|
291
|
+
'chunk.entry': (entry, { formatFlag, yellow }) => entry ? yellow(formatFlag('entry')) : undefined,
|
|
292
|
+
'chunk.initial': (initial, { formatFlag, yellow }) => initial ? yellow(formatFlag('initial')) : undefined,
|
|
293
|
+
'chunk.rendered': (rendered, { formatFlag, green }) => rendered ? green(formatFlag('rendered')) : undefined,
|
|
294
|
+
'chunk.recorded': (recorded, { formatFlag, green }) => recorded ? green(formatFlag('recorded')) : undefined,
|
|
295
|
+
'chunk.reason': (reason, { yellow }) => (reason ? yellow(reason) : undefined),
|
|
296
|
+
'chunk.filteredModules': (filteredModules, { chunk: { modules } }) => filteredModules > 0
|
|
297
|
+
? `${moreCount(modules, filteredModules)} chunk ${plural(filteredModules, 'module', 'modules')}`
|
|
298
|
+
: undefined,
|
|
299
|
+
'chunk.separator!': () => '\n',
|
|
300
|
+
'chunkOrigin.request': request => request,
|
|
301
|
+
'chunkOrigin.moduleId': (moduleId, { formatModuleId }) => isValidId(moduleId) ? formatModuleId(moduleId) : undefined,
|
|
302
|
+
'chunkOrigin.moduleName': (moduleName, { bold }) => bold(moduleName),
|
|
303
|
+
'chunkOrigin.loc': loc => loc,
|
|
304
|
+
'error.compilerPath': (compilerPath, { bold }) => compilerPath ? bold(`(${compilerPath})`) : undefined,
|
|
305
|
+
'error.chunkId': (chunkId, { formatChunkId }) => isValidId(chunkId) ? formatChunkId(chunkId) : undefined,
|
|
306
|
+
'error.chunkEntry': (chunkEntry, { formatFlag }) => chunkEntry ? formatFlag('entry') : undefined,
|
|
307
|
+
'error.chunkInitial': (chunkInitial, { formatFlag }) => chunkInitial ? formatFlag('initial') : undefined,
|
|
308
|
+
'error.file': (file, { bold }) => bold(file),
|
|
309
|
+
'error.moduleName': (moduleName, { bold }) => moduleName.includes('!')
|
|
310
|
+
? `${bold(moduleName.replace(/^(\s|\S)*!/, ''))} (${moduleName})`
|
|
311
|
+
: `${bold(moduleName)}`,
|
|
312
|
+
'error.loc': (loc, { green }) => green(loc),
|
|
313
|
+
'error.message': (message, { bold, formatError }) => message.includes('\u001b[') ? message : bold(formatError(message)),
|
|
314
|
+
'error.details': (details, { formatError }) => formatError(details),
|
|
315
|
+
'error.filteredDetails': filteredDetails => filteredDetails ? `+ ${filteredDetails} hidden lines` : undefined,
|
|
316
|
+
'error.stack': stack => stack,
|
|
317
|
+
'error.moduleTrace': moduleTrace => undefined,
|
|
318
|
+
'error.separator!': () => '\n',
|
|
319
|
+
'loggingEntry(error).loggingEntry.message': (message, { red }) => mapLines(message, x => `<e> ${red(x)}`),
|
|
320
|
+
'loggingEntry(warn).loggingEntry.message': (message, { yellow }) => mapLines(message, x => `<w> ${yellow(x)}`),
|
|
321
|
+
'loggingEntry(info).loggingEntry.message': (message, { green }) => mapLines(message, x => `<i> ${green(x)}`),
|
|
322
|
+
'loggingEntry(log).loggingEntry.message': (message, { bold }) => mapLines(message, x => ` ${bold(x)}`),
|
|
323
|
+
'loggingEntry(debug).loggingEntry.message': message => mapLines(message, x => ` ${x}`),
|
|
324
|
+
'loggingEntry(trace).loggingEntry.message': message => mapLines(message, x => ` ${x}`),
|
|
325
|
+
'loggingEntry(status).loggingEntry.message': (message, { magenta }) => mapLines(message, x => `<s> ${magenta(x)}`),
|
|
326
|
+
'loggingEntry(profile).loggingEntry.message': (message, { magenta }) => mapLines(message, x => `<p> ${magenta(x)}`),
|
|
327
|
+
'loggingEntry(profileEnd).loggingEntry.message': (message, { magenta }) => mapLines(message, x => `</p> ${magenta(x)}`),
|
|
328
|
+
'loggingEntry(time).loggingEntry.message': (message, { magenta }) => mapLines(message, x => `<t> ${magenta(x)}`),
|
|
329
|
+
'loggingEntry(group).loggingEntry.message': (message, { cyan }) => mapLines(message, x => `<-> ${cyan(x)}`),
|
|
330
|
+
'loggingEntry(groupCollapsed).loggingEntry.message': (message, { cyan }) => mapLines(message, x => `<+> ${cyan(x)}`),
|
|
331
|
+
'loggingEntry(clear).loggingEntry': () => ' -------',
|
|
332
|
+
'loggingEntry(groupCollapsed).loggingEntry.children': () => '',
|
|
333
|
+
'loggingEntry.trace[]': trace => (trace ? mapLines(trace, x => `| ${x}`) : undefined),
|
|
334
|
+
'moduleTraceItem.originName': originName => originName,
|
|
335
|
+
loggingGroup: loggingGroup => (loggingGroup.entries.length === 0 ? '' : undefined),
|
|
336
|
+
'loggingGroup.debug': (flag, { red }) => (flag ? red('DEBUG') : undefined),
|
|
337
|
+
'loggingGroup.name': (name, { bold }) => bold(`LOG from ${name}`),
|
|
338
|
+
'loggingGroup.separator!': () => '\n',
|
|
339
|
+
'loggingGroup.filteredEntries': filteredEntries => filteredEntries > 0 ? `+ ${filteredEntries} hidden lines` : undefined,
|
|
340
|
+
'moduleTraceDependency.loc': loc => loc,
|
|
341
|
+
};
|
|
342
|
+
const ITEM_NAMES = {
|
|
343
|
+
'compilation.assets[]': 'asset',
|
|
344
|
+
'compilation.modules[]': 'module',
|
|
345
|
+
'compilation.chunks[]': 'chunk',
|
|
346
|
+
'compilation.entrypoints[]': 'chunkGroup',
|
|
347
|
+
'compilation.namedChunkGroups[]': 'chunkGroup',
|
|
348
|
+
'compilation.errors[]': 'error',
|
|
349
|
+
'compilation.warnings[]': 'error',
|
|
350
|
+
'compilation.logging[]': 'loggingGroup',
|
|
351
|
+
'compilation.children[]': 'compilation',
|
|
352
|
+
'asset.related[]': 'asset',
|
|
353
|
+
'asset.children[]': 'asset',
|
|
354
|
+
'asset.chunks[]': 'assetChunk',
|
|
355
|
+
'asset.auxiliaryChunks[]': 'assetChunk',
|
|
356
|
+
'asset.chunkNames[]': 'assetChunkName',
|
|
357
|
+
'asset.chunkIdHints[]': 'assetChunkIdHint',
|
|
358
|
+
'asset.auxiliaryChunkNames[]': 'assetChunkName',
|
|
359
|
+
'asset.auxiliaryChunkIdHints[]': 'assetChunkIdHint',
|
|
360
|
+
'chunkGroup.assets[]': 'chunkGroupAsset',
|
|
361
|
+
'chunkGroup.auxiliaryAssets[]': 'chunkGroupAsset',
|
|
362
|
+
'chunkGroupChild.assets[]': 'chunkGroupAsset',
|
|
363
|
+
'chunkGroupChild.auxiliaryAssets[]': 'chunkGroupAsset',
|
|
364
|
+
'chunkGroup.children[]': 'chunkGroupChildGroup',
|
|
365
|
+
'chunkGroupChildGroup.children[]': 'chunkGroupChild',
|
|
366
|
+
'module.modules[]': 'module',
|
|
367
|
+
'module.children[]': 'module',
|
|
368
|
+
'module.reasons[]': 'moduleReason',
|
|
369
|
+
'moduleReason.children[]': 'moduleReason',
|
|
370
|
+
'module.issuerPath[]': 'moduleIssuer',
|
|
371
|
+
'chunk.origins[]': 'chunkOrigin',
|
|
372
|
+
'chunk.modules[]': 'module',
|
|
373
|
+
'loggingGroup.entries[]': logEntry => `loggingEntry(${logEntry.type}).loggingEntry`,
|
|
374
|
+
'loggingEntry.children[]': logEntry => `loggingEntry(${logEntry.type}).loggingEntry`,
|
|
375
|
+
'error.moduleTrace[]': 'moduleTraceItem',
|
|
376
|
+
'moduleTraceItem.dependencies[]': 'moduleTraceDependency',
|
|
377
|
+
};
|
|
378
|
+
const ERROR_PREFERRED_ORDER = [
|
|
379
|
+
'compilerPath',
|
|
380
|
+
'chunkId',
|
|
381
|
+
'chunkEntry',
|
|
382
|
+
'chunkInitial',
|
|
383
|
+
'file',
|
|
384
|
+
'separator!',
|
|
385
|
+
'moduleName',
|
|
386
|
+
'loc',
|
|
387
|
+
'separator!',
|
|
388
|
+
'message',
|
|
389
|
+
'separator!',
|
|
390
|
+
'details',
|
|
391
|
+
'separator!',
|
|
392
|
+
'filteredDetails',
|
|
393
|
+
'separator!',
|
|
394
|
+
'stack',
|
|
395
|
+
'separator!',
|
|
396
|
+
'missing',
|
|
397
|
+
'separator!',
|
|
398
|
+
'moduleTrace',
|
|
399
|
+
];
|
|
400
|
+
const PREFERRED_ORDERS = {
|
|
401
|
+
compilation: [
|
|
402
|
+
'name',
|
|
403
|
+
'hash',
|
|
404
|
+
'version',
|
|
405
|
+
'time',
|
|
406
|
+
'builtAt',
|
|
407
|
+
'env',
|
|
408
|
+
'publicPath',
|
|
409
|
+
'assets',
|
|
410
|
+
'filteredAssets',
|
|
411
|
+
'entrypoints',
|
|
412
|
+
'namedChunkGroups',
|
|
413
|
+
'chunks',
|
|
414
|
+
'modules',
|
|
415
|
+
'filteredModules',
|
|
416
|
+
'children',
|
|
417
|
+
'logging',
|
|
418
|
+
'warnings',
|
|
419
|
+
'warningsInChildren!',
|
|
420
|
+
'filteredWarningDetailsCount',
|
|
421
|
+
'errors',
|
|
422
|
+
'errorsInChildren!',
|
|
423
|
+
'filteredErrorDetailsCount',
|
|
424
|
+
'summary!',
|
|
425
|
+
'needAdditionalPass',
|
|
426
|
+
],
|
|
427
|
+
asset: [
|
|
428
|
+
'type',
|
|
429
|
+
'name',
|
|
430
|
+
'size',
|
|
431
|
+
'chunks',
|
|
432
|
+
'auxiliaryChunks',
|
|
433
|
+
'emitted',
|
|
434
|
+
'comparedForEmit',
|
|
435
|
+
'cached',
|
|
436
|
+
'info',
|
|
437
|
+
'isOverSizeLimit',
|
|
438
|
+
'chunkNames',
|
|
439
|
+
'auxiliaryChunkNames',
|
|
440
|
+
'chunkIdHints',
|
|
441
|
+
'auxiliaryChunkIdHints',
|
|
442
|
+
'related',
|
|
443
|
+
'filteredRelated',
|
|
444
|
+
'children',
|
|
445
|
+
'filteredChildren',
|
|
446
|
+
],
|
|
447
|
+
'asset.info': [
|
|
448
|
+
'immutable',
|
|
449
|
+
'sourceFilename',
|
|
450
|
+
'javascriptModule',
|
|
451
|
+
'development',
|
|
452
|
+
'hotModuleReplacement',
|
|
453
|
+
],
|
|
454
|
+
chunkGroup: [
|
|
455
|
+
'kind!',
|
|
456
|
+
'name',
|
|
457
|
+
'isOverSizeLimit',
|
|
458
|
+
'assetsSize',
|
|
459
|
+
'auxiliaryAssetsSize',
|
|
460
|
+
'is!',
|
|
461
|
+
'assets',
|
|
462
|
+
'filteredAssets',
|
|
463
|
+
'auxiliaryAssets',
|
|
464
|
+
'filteredAuxiliaryAssets',
|
|
465
|
+
'separator!',
|
|
466
|
+
'children',
|
|
467
|
+
],
|
|
468
|
+
chunkGroupAsset: ['name', 'size'],
|
|
469
|
+
chunkGroupChildGroup: ['type', 'children'],
|
|
470
|
+
chunkGroupChild: ['assets', 'chunks', 'name'],
|
|
471
|
+
module: [
|
|
472
|
+
'type',
|
|
473
|
+
'name',
|
|
474
|
+
'identifier',
|
|
475
|
+
'id',
|
|
476
|
+
'layer',
|
|
477
|
+
'sizes',
|
|
478
|
+
'chunks',
|
|
479
|
+
'depth',
|
|
480
|
+
'cacheable',
|
|
481
|
+
'orphan',
|
|
482
|
+
'runtime',
|
|
483
|
+
'optional',
|
|
484
|
+
'dependent',
|
|
485
|
+
'built',
|
|
486
|
+
'codeGenerated',
|
|
487
|
+
'cached',
|
|
488
|
+
'assets',
|
|
489
|
+
'failed',
|
|
490
|
+
'warnings',
|
|
491
|
+
'errors',
|
|
492
|
+
'children',
|
|
493
|
+
'filteredChildren',
|
|
494
|
+
'providedExports',
|
|
495
|
+
'usedExports',
|
|
496
|
+
'optimizationBailout',
|
|
497
|
+
'reasons',
|
|
498
|
+
'filteredReasons',
|
|
499
|
+
'issuerPath',
|
|
500
|
+
'profile',
|
|
501
|
+
'modules',
|
|
502
|
+
'filteredModules',
|
|
503
|
+
],
|
|
504
|
+
moduleReason: [
|
|
505
|
+
'active',
|
|
506
|
+
'type',
|
|
507
|
+
'userRequest',
|
|
508
|
+
'moduleId',
|
|
509
|
+
'module',
|
|
510
|
+
'resolvedModule',
|
|
511
|
+
'loc',
|
|
512
|
+
'explanation',
|
|
513
|
+
'children',
|
|
514
|
+
'filteredChildren',
|
|
515
|
+
],
|
|
516
|
+
'module.profile': [
|
|
517
|
+
'total',
|
|
518
|
+
'separator!',
|
|
519
|
+
'resolving',
|
|
520
|
+
'restoring',
|
|
521
|
+
'integration',
|
|
522
|
+
'building',
|
|
523
|
+
'storing',
|
|
524
|
+
'additionalResolving',
|
|
525
|
+
'additionalIntegration',
|
|
526
|
+
],
|
|
527
|
+
chunk: [
|
|
528
|
+
'id',
|
|
529
|
+
'runtime',
|
|
530
|
+
'files',
|
|
531
|
+
'names',
|
|
532
|
+
'idHints',
|
|
533
|
+
'sizes',
|
|
534
|
+
'parents',
|
|
535
|
+
'siblings',
|
|
536
|
+
'children',
|
|
537
|
+
'childrenByOrder',
|
|
538
|
+
'entry',
|
|
539
|
+
'initial',
|
|
540
|
+
'rendered',
|
|
541
|
+
'recorded',
|
|
542
|
+
'reason',
|
|
543
|
+
'separator!',
|
|
544
|
+
'origins',
|
|
545
|
+
'separator!',
|
|
546
|
+
'modules',
|
|
547
|
+
'separator!',
|
|
548
|
+
'filteredModules',
|
|
549
|
+
],
|
|
550
|
+
chunkOrigin: ['request', 'moduleId', 'moduleName', 'loc'],
|
|
551
|
+
error: ERROR_PREFERRED_ORDER,
|
|
552
|
+
warning: ERROR_PREFERRED_ORDER,
|
|
553
|
+
'chunk.childrenByOrder[]': ['type', 'children'],
|
|
554
|
+
loggingGroup: ['debug', 'name', 'separator!', 'entries', 'separator!', 'filteredEntries'],
|
|
555
|
+
loggingEntry: ['message', 'trace', 'children'],
|
|
556
|
+
};
|
|
557
|
+
const itemsJoinOneLine = items => items.filter(Boolean).join(' ');
|
|
558
|
+
const itemsJoinOneLineBrackets = items => items.length > 0 ? `(${items.filter(Boolean).join(' ')})` : undefined;
|
|
559
|
+
const itemsJoinMoreSpacing = items => items.filter(Boolean).join('\n\n');
|
|
560
|
+
const itemsJoinComma = items => items.filter(Boolean).join(', ');
|
|
561
|
+
const itemsJoinCommaBrackets = items => items.length > 0 ? `(${items.filter(Boolean).join(', ')})` : undefined;
|
|
562
|
+
const itemsJoinCommaBracketsWithName = name => items => items.length > 0 ? `(${name}: ${items.filter(Boolean).join(', ')})` : undefined;
|
|
563
|
+
const SIMPLE_ITEMS_JOINER = {
|
|
564
|
+
'chunk.parents': itemsJoinOneLine,
|
|
565
|
+
'chunk.siblings': itemsJoinOneLine,
|
|
566
|
+
'chunk.children': itemsJoinOneLine,
|
|
567
|
+
'chunk.names': itemsJoinCommaBrackets,
|
|
568
|
+
'chunk.idHints': itemsJoinCommaBracketsWithName('id hint'),
|
|
569
|
+
'chunk.runtime': itemsJoinCommaBracketsWithName('runtime'),
|
|
570
|
+
'chunk.files': itemsJoinComma,
|
|
571
|
+
'chunk.childrenByOrder': itemsJoinOneLine,
|
|
572
|
+
'chunk.childrenByOrder[].children': itemsJoinOneLine,
|
|
573
|
+
'chunkGroup.assets': itemsJoinOneLine,
|
|
574
|
+
'chunkGroup.auxiliaryAssets': itemsJoinOneLineBrackets,
|
|
575
|
+
'chunkGroupChildGroup.children': itemsJoinComma,
|
|
576
|
+
'chunkGroupChild.assets': itemsJoinOneLine,
|
|
577
|
+
'chunkGroupChild.auxiliaryAssets': itemsJoinOneLineBrackets,
|
|
578
|
+
'asset.chunks': itemsJoinComma,
|
|
579
|
+
'asset.auxiliaryChunks': itemsJoinCommaBrackets,
|
|
580
|
+
'asset.chunkNames': itemsJoinCommaBracketsWithName('name'),
|
|
581
|
+
'asset.auxiliaryChunkNames': itemsJoinCommaBracketsWithName('auxiliary name'),
|
|
582
|
+
'asset.chunkIdHints': itemsJoinCommaBracketsWithName('id hint'),
|
|
583
|
+
'asset.auxiliaryChunkIdHints': itemsJoinCommaBracketsWithName('auxiliary id hint'),
|
|
584
|
+
'module.chunks': itemsJoinOneLine,
|
|
585
|
+
'module.issuerPath': items => items
|
|
586
|
+
.filter(Boolean)
|
|
587
|
+
.map(item => `${item} ->`)
|
|
588
|
+
.join(' '),
|
|
589
|
+
'compilation.errors': itemsJoinMoreSpacing,
|
|
590
|
+
'compilation.warnings': itemsJoinMoreSpacing,
|
|
591
|
+
'compilation.logging': itemsJoinMoreSpacing,
|
|
592
|
+
'compilation.children': items => indent(itemsJoinMoreSpacing(items), ' '),
|
|
593
|
+
'moduleTraceItem.dependencies': itemsJoinOneLine,
|
|
594
|
+
'loggingEntry.children': items => indent(items.filter(Boolean).join('\n'), ' ', false),
|
|
595
|
+
};
|
|
596
|
+
const joinOneLine = items => items
|
|
597
|
+
.map(item => item.content)
|
|
598
|
+
.filter(Boolean)
|
|
599
|
+
.join(' ');
|
|
600
|
+
const joinInBrackets = items => {
|
|
601
|
+
const res = [];
|
|
602
|
+
let mode = 0;
|
|
603
|
+
for (const item of items) {
|
|
604
|
+
if (item.element === 'separator!') {
|
|
605
|
+
switch (mode) {
|
|
606
|
+
case 0:
|
|
607
|
+
case 1:
|
|
608
|
+
mode += 2;
|
|
609
|
+
break;
|
|
610
|
+
case 4:
|
|
611
|
+
res.push(')');
|
|
612
|
+
mode = 3;
|
|
613
|
+
break;
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
if (!item.content)
|
|
617
|
+
continue;
|
|
618
|
+
switch (mode) {
|
|
619
|
+
case 0:
|
|
620
|
+
mode = 1;
|
|
621
|
+
break;
|
|
622
|
+
case 1:
|
|
623
|
+
res.push(' ');
|
|
624
|
+
break;
|
|
625
|
+
case 2:
|
|
626
|
+
res.push('(');
|
|
627
|
+
mode = 4;
|
|
628
|
+
break;
|
|
629
|
+
case 3:
|
|
630
|
+
res.push(' (');
|
|
631
|
+
mode = 4;
|
|
632
|
+
break;
|
|
633
|
+
case 4:
|
|
634
|
+
res.push(', ');
|
|
635
|
+
break;
|
|
636
|
+
}
|
|
637
|
+
res.push(item.content);
|
|
638
|
+
}
|
|
639
|
+
if (mode === 4)
|
|
640
|
+
res.push(')');
|
|
641
|
+
return res.join('');
|
|
642
|
+
};
|
|
643
|
+
const indent = (str, prefix, noPrefixInFirstLine) => {
|
|
644
|
+
const rem = str.replace(/\n([^\n])/g, `\n${prefix}$1`);
|
|
645
|
+
if (noPrefixInFirstLine)
|
|
646
|
+
return rem;
|
|
647
|
+
const ind = str[0] === '\n' ? '' : prefix;
|
|
648
|
+
return ind + rem;
|
|
649
|
+
};
|
|
650
|
+
const joinExplicitNewLine = (items, indenter) => {
|
|
651
|
+
let firstInLine = true;
|
|
652
|
+
let first = true;
|
|
653
|
+
return items
|
|
654
|
+
.map(item => {
|
|
655
|
+
if (!item || !item.content)
|
|
656
|
+
return;
|
|
657
|
+
let content = indent(item.content, first ? '' : indenter, !firstInLine);
|
|
658
|
+
if (firstInLine) {
|
|
659
|
+
content = content.replace(/^\n+/, '');
|
|
660
|
+
}
|
|
661
|
+
if (!content)
|
|
662
|
+
return;
|
|
663
|
+
first = false;
|
|
664
|
+
const noJoiner = firstInLine || content.startsWith('\n');
|
|
665
|
+
firstInLine = content.endsWith('\n');
|
|
666
|
+
return noJoiner ? content : ` ${content}`;
|
|
667
|
+
})
|
|
668
|
+
.filter(Boolean)
|
|
669
|
+
.join('')
|
|
670
|
+
.trim();
|
|
671
|
+
};
|
|
672
|
+
const joinError = error => (items, { red, yellow }) => `${error ? red('ERROR') : yellow('WARNING')} in ${joinExplicitNewLine(items, '')}`;
|
|
673
|
+
const SIMPLE_ELEMENT_JOINERS = {
|
|
674
|
+
compilation: items => {
|
|
675
|
+
const result = [];
|
|
676
|
+
let lastNeedMore = false;
|
|
677
|
+
for (const item of items) {
|
|
678
|
+
if (!item.content)
|
|
679
|
+
continue;
|
|
680
|
+
const needMoreSpace = item.element === 'warnings' ||
|
|
681
|
+
item.element === 'filteredWarningDetailsCount' ||
|
|
682
|
+
item.element === 'errors' ||
|
|
683
|
+
item.element === 'filteredErrorDetailsCount' ||
|
|
684
|
+
item.element === 'logging';
|
|
685
|
+
if (result.length !== 0) {
|
|
686
|
+
result.push(needMoreSpace || lastNeedMore ? '\n\n' : '\n');
|
|
687
|
+
}
|
|
688
|
+
result.push(item.content);
|
|
689
|
+
lastNeedMore = needMoreSpace;
|
|
690
|
+
}
|
|
691
|
+
if (lastNeedMore)
|
|
692
|
+
result.push('\n');
|
|
693
|
+
return result.join('');
|
|
694
|
+
},
|
|
695
|
+
asset: items => joinExplicitNewLine(items.map(item => {
|
|
696
|
+
if ((item.element === 'related' || item.element === 'children') && item.content) {
|
|
697
|
+
return Object.assign(Object.assign({}, item), { content: `\n${item.content}\n` });
|
|
698
|
+
}
|
|
699
|
+
return item;
|
|
700
|
+
}), ' '),
|
|
701
|
+
'asset.info': joinOneLine,
|
|
702
|
+
module: (items, { module }) => {
|
|
703
|
+
let hasName = false;
|
|
704
|
+
return joinExplicitNewLine(items.map(item => {
|
|
705
|
+
switch (item.element) {
|
|
706
|
+
case 'id':
|
|
707
|
+
if (module.id === module.name) {
|
|
708
|
+
if (hasName)
|
|
709
|
+
return false;
|
|
710
|
+
if (item.content)
|
|
711
|
+
hasName = true;
|
|
712
|
+
}
|
|
713
|
+
break;
|
|
714
|
+
case 'name':
|
|
715
|
+
if (hasName)
|
|
716
|
+
return false;
|
|
717
|
+
if (item.content)
|
|
718
|
+
hasName = true;
|
|
719
|
+
break;
|
|
720
|
+
case 'providedExports':
|
|
721
|
+
case 'usedExports':
|
|
722
|
+
case 'optimizationBailout':
|
|
723
|
+
case 'reasons':
|
|
724
|
+
case 'issuerPath':
|
|
725
|
+
case 'profile':
|
|
726
|
+
case 'children':
|
|
727
|
+
case 'modules':
|
|
728
|
+
if (item.content) {
|
|
729
|
+
return Object.assign(Object.assign({}, item), { content: `\n${item.content}\n` });
|
|
730
|
+
}
|
|
731
|
+
break;
|
|
732
|
+
}
|
|
733
|
+
return item;
|
|
734
|
+
}), ' ');
|
|
735
|
+
},
|
|
736
|
+
chunk: items => {
|
|
737
|
+
let hasEntry = false;
|
|
738
|
+
return (`chunk ${joinExplicitNewLine(items.filter(item => {
|
|
739
|
+
switch (item.element) {
|
|
740
|
+
case 'entry':
|
|
741
|
+
if (item.content)
|
|
742
|
+
hasEntry = true;
|
|
743
|
+
break;
|
|
744
|
+
case 'initial':
|
|
745
|
+
if (hasEntry)
|
|
746
|
+
return false;
|
|
747
|
+
break;
|
|
748
|
+
}
|
|
749
|
+
return true;
|
|
750
|
+
}), ' ')}`);
|
|
751
|
+
},
|
|
752
|
+
'chunk.childrenByOrder[]': items => `(${joinOneLine(items)})`,
|
|
753
|
+
chunkGroup: items => joinExplicitNewLine(items, ' '),
|
|
754
|
+
chunkGroupAsset: joinOneLine,
|
|
755
|
+
chunkGroupChildGroup: joinOneLine,
|
|
756
|
+
chunkGroupChild: joinOneLine,
|
|
757
|
+
// moduleReason: (items, { moduleReason }) => {
|
|
758
|
+
// let hasName = false;
|
|
759
|
+
// return joinOneLine(
|
|
760
|
+
// items.filter(item => {
|
|
761
|
+
// switch (item.element) {
|
|
762
|
+
// case "moduleId":
|
|
763
|
+
// if (moduleReason.moduleId === moduleReason.module && item.content)
|
|
764
|
+
// hasName = true;
|
|
765
|
+
// break;
|
|
766
|
+
// case "module":
|
|
767
|
+
// if (hasName) return false;
|
|
768
|
+
// break;
|
|
769
|
+
// case "resolvedModule":
|
|
770
|
+
// return (
|
|
771
|
+
// moduleReason.module !== moduleReason.resolvedModule &&
|
|
772
|
+
// item.content
|
|
773
|
+
// );
|
|
774
|
+
// }
|
|
775
|
+
// return true;
|
|
776
|
+
// })
|
|
777
|
+
// );
|
|
778
|
+
// },
|
|
779
|
+
moduleReason: (items, { moduleReason }) => {
|
|
780
|
+
let hasName = false;
|
|
781
|
+
return joinExplicitNewLine(items.map(item => {
|
|
782
|
+
switch (item.element) {
|
|
783
|
+
case 'moduleId':
|
|
784
|
+
if (moduleReason.moduleId === moduleReason.module && item.content)
|
|
785
|
+
hasName = true;
|
|
786
|
+
break;
|
|
787
|
+
case 'module':
|
|
788
|
+
if (hasName)
|
|
789
|
+
return false;
|
|
790
|
+
break;
|
|
791
|
+
case 'resolvedModule':
|
|
792
|
+
if (moduleReason.module === moduleReason.resolvedModule)
|
|
793
|
+
return false;
|
|
794
|
+
break;
|
|
795
|
+
case 'children':
|
|
796
|
+
if (item.content) {
|
|
797
|
+
return Object.assign(Object.assign({}, item), { content: `\n${item.content}\n` });
|
|
798
|
+
}
|
|
799
|
+
break;
|
|
800
|
+
}
|
|
801
|
+
return item;
|
|
802
|
+
}), ' ');
|
|
803
|
+
},
|
|
804
|
+
'module.profile': joinInBrackets,
|
|
805
|
+
moduleIssuer: joinOneLine,
|
|
806
|
+
chunkOrigin: items => `> ${joinOneLine(items)}`,
|
|
807
|
+
'errors[].error': joinError(true),
|
|
808
|
+
'warnings[].error': joinError(false),
|
|
809
|
+
loggingGroup: items => joinExplicitNewLine(items, '').trimEnd(),
|
|
810
|
+
moduleTraceItem: items => ` @ ${joinOneLine(items)}`,
|
|
811
|
+
moduleTraceDependency: joinOneLine,
|
|
812
|
+
};
|
|
813
|
+
const AVAILABLE_COLORS = {
|
|
814
|
+
bold: '\u001b[1m',
|
|
815
|
+
yellow: '\u001b[1m\u001b[33m',
|
|
816
|
+
red: '\u001b[1m\u001b[31m',
|
|
817
|
+
green: '\u001b[1m\u001b[32m',
|
|
818
|
+
cyan: '\u001b[1m\u001b[36m',
|
|
819
|
+
magenta: '\u001b[1m\u001b[35m',
|
|
820
|
+
};
|
|
821
|
+
const AVAILABLE_FORMATS = {
|
|
822
|
+
formatChunkId: (id, { yellow }, direction) => {
|
|
823
|
+
switch (direction) {
|
|
824
|
+
case 'parent':
|
|
825
|
+
return `<{${yellow(id)}}>`;
|
|
826
|
+
case 'sibling':
|
|
827
|
+
return `={${yellow(id)}}=`;
|
|
828
|
+
case 'child':
|
|
829
|
+
return `>{${yellow(id)}}<`;
|
|
830
|
+
default:
|
|
831
|
+
return `{${yellow(id)}}`;
|
|
832
|
+
}
|
|
833
|
+
},
|
|
834
|
+
formatModuleId: id => `[${id}]`,
|
|
835
|
+
formatFilename: (filename, { green, yellow }, oversize) => (oversize ? yellow : green)(filename),
|
|
836
|
+
formatFlag: flag => `[${flag}]`,
|
|
837
|
+
formatLayer: layer => `(in ${layer})`,
|
|
838
|
+
formatSize: SizeFormatHelpers_1.formatSize,
|
|
839
|
+
formatDateTime: (dateTime, { bold }) => {
|
|
840
|
+
const d = new Date(dateTime);
|
|
841
|
+
const x = twoDigit;
|
|
842
|
+
const date = `${d.getFullYear()}-${x(d.getMonth() + 1)}-${x(d.getDate())}`;
|
|
843
|
+
const time = `${x(d.getHours())}:${x(d.getMinutes())}:${x(d.getSeconds())}`;
|
|
844
|
+
return `${date} ${bold(time)}`;
|
|
845
|
+
},
|
|
846
|
+
formatTime: (time, { timeReference, bold, green, yellow, red }, boldQuantity) => {
|
|
847
|
+
const unit = ' ms';
|
|
848
|
+
if (timeReference && time !== timeReference) {
|
|
849
|
+
const times = [timeReference / 2, timeReference / 4, timeReference / 8, timeReference / 16];
|
|
850
|
+
if (time < times[3])
|
|
851
|
+
return `${time}${unit}`;
|
|
852
|
+
if (time < times[2])
|
|
853
|
+
return bold(`${time}${unit}`);
|
|
854
|
+
if (time < times[1])
|
|
855
|
+
return green(`${time}${unit}`);
|
|
856
|
+
if (time < times[0])
|
|
857
|
+
return yellow(`${time}${unit}`);
|
|
858
|
+
return red(`${time}${unit}`);
|
|
859
|
+
}
|
|
860
|
+
return `${boldQuantity ? bold(time) : time}${unit}`;
|
|
861
|
+
},
|
|
862
|
+
formatError: (message, { green, yellow, red }) => {
|
|
863
|
+
if (message.includes('\u001b['))
|
|
864
|
+
return message;
|
|
865
|
+
const highlights = [
|
|
866
|
+
{ regExp: /(Did you mean .+)/g, format: green },
|
|
867
|
+
{
|
|
868
|
+
regExp: /(Set 'mode' option to 'development' or 'production')/g,
|
|
869
|
+
format: green,
|
|
870
|
+
},
|
|
871
|
+
{ regExp: /(\(module has no exports\))/g, format: red },
|
|
872
|
+
{ regExp: /\(possible exports: (.+)\)/g, format: green },
|
|
873
|
+
{ regExp: /(?:^|\n)(.* doesn't exist)/g, format: red },
|
|
874
|
+
{ regExp: /('\w+' option has not been set)/g, format: red },
|
|
875
|
+
{
|
|
876
|
+
regExp: /(Emitted value instead of an instance of Error)/g,
|
|
877
|
+
format: yellow,
|
|
878
|
+
},
|
|
879
|
+
{ regExp: /(Used? .+ instead)/gi, format: yellow },
|
|
880
|
+
{ regExp: /\b(deprecated|must|required)\b/g, format: yellow },
|
|
881
|
+
{
|
|
882
|
+
regExp: /\b(BREAKING CHANGE)\b/gi,
|
|
883
|
+
format: red,
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
regExp: /\b(error|failed|unexpected|invalid|not found|not supported|not available|not possible|not implemented|doesn't support|conflict|conflicting|not existing|duplicate)\b/gi,
|
|
887
|
+
format: red,
|
|
888
|
+
},
|
|
889
|
+
];
|
|
890
|
+
for (const { regExp, format } of highlights) {
|
|
891
|
+
message = message.replace(regExp, (match, content) => match.replace(content, format(content)));
|
|
892
|
+
}
|
|
893
|
+
return message;
|
|
894
|
+
},
|
|
895
|
+
};
|
|
896
|
+
const RESULT_MODIFIER = {
|
|
897
|
+
'module.modules': result => indent(result, '| '),
|
|
898
|
+
};
|
|
899
|
+
const createOrder = (array, preferredOrder) => {
|
|
900
|
+
const originalArray = array.slice();
|
|
901
|
+
const set = new Set(array);
|
|
902
|
+
const usedSet = new Set();
|
|
903
|
+
array.length = 0;
|
|
904
|
+
for (const element of preferredOrder) {
|
|
905
|
+
if (element.endsWith('!') || set.has(element)) {
|
|
906
|
+
array.push(element);
|
|
907
|
+
usedSet.add(element);
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
for (const element of originalArray) {
|
|
911
|
+
if (!usedSet.has(element)) {
|
|
912
|
+
array.push(element);
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
return array;
|
|
916
|
+
};
|
|
917
|
+
class DefaultStatsPrinterPlugin {
|
|
918
|
+
apply(compiler) {
|
|
919
|
+
compiler.hooks.compilation.tap('DefaultStatsPrinterPlugin', compilation => {
|
|
920
|
+
compilation.hooks.statsPrinter.tap('DefaultStatsPrinterPlugin', (stats, options, context) => {
|
|
921
|
+
// Put colors into context
|
|
922
|
+
stats.hooks.print
|
|
923
|
+
.for('compilation')
|
|
924
|
+
.tap('DefaultStatsPrinterPlugin', (compilation, context) => {
|
|
925
|
+
for (const color of Object.keys(AVAILABLE_COLORS)) {
|
|
926
|
+
let start;
|
|
927
|
+
if (options.colors) {
|
|
928
|
+
if (typeof options.colors === 'object' &&
|
|
929
|
+
typeof options.colors[color] === 'string') {
|
|
930
|
+
start = options.colors[color];
|
|
931
|
+
}
|
|
932
|
+
else {
|
|
933
|
+
start = AVAILABLE_COLORS[color];
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
if (start) {
|
|
937
|
+
context[color] = str => `${start}${typeof str === 'string'
|
|
938
|
+
// eslint-disable-next-line no-control-regex
|
|
939
|
+
? str.replace(/((\u001b\[39m|\u001b\[22m|\u001b\[0m)+)/g, `$1${start}`)
|
|
940
|
+
: str}\u001b[39m\u001b[22m`;
|
|
941
|
+
}
|
|
942
|
+
else {
|
|
943
|
+
context[color] = str => str;
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
for (const format of Object.keys(AVAILABLE_FORMATS)) {
|
|
947
|
+
context[format] = (content, ...args) => AVAILABLE_FORMATS[format](content, context, ...args);
|
|
948
|
+
}
|
|
949
|
+
context.timeReference = compilation.time;
|
|
950
|
+
});
|
|
951
|
+
for (const key of Object.keys(SIMPLE_PRINTERS)) {
|
|
952
|
+
stats.hooks.print
|
|
953
|
+
.for(key)
|
|
954
|
+
.tap('DefaultStatsPrinterPlugin', (obj, ctx) => SIMPLE_PRINTERS[key](obj, ctx, stats));
|
|
955
|
+
}
|
|
956
|
+
for (const key of Object.keys(PREFERRED_ORDERS)) {
|
|
957
|
+
const preferredOrder = PREFERRED_ORDERS[key];
|
|
958
|
+
stats.hooks.sortElements
|
|
959
|
+
.for(key)
|
|
960
|
+
.tap('DefaultStatsPrinterPlugin', (elements, context) => {
|
|
961
|
+
createOrder(elements, preferredOrder);
|
|
962
|
+
});
|
|
963
|
+
}
|
|
964
|
+
for (const key of Object.keys(ITEM_NAMES)) {
|
|
965
|
+
const itemName = ITEM_NAMES[key];
|
|
966
|
+
stats.hooks.getItemName
|
|
967
|
+
.for(key)
|
|
968
|
+
.tap('DefaultStatsPrinterPlugin', typeof itemName === 'string' ? () => itemName : itemName);
|
|
969
|
+
}
|
|
970
|
+
for (const key of Object.keys(SIMPLE_ITEMS_JOINER)) {
|
|
971
|
+
const joiner = SIMPLE_ITEMS_JOINER[key];
|
|
972
|
+
stats.hooks.printItems.for(key).tap('DefaultStatsPrinterPlugin', joiner);
|
|
973
|
+
}
|
|
974
|
+
for (const key of Object.keys(SIMPLE_ELEMENT_JOINERS)) {
|
|
975
|
+
const joiner = SIMPLE_ELEMENT_JOINERS[key];
|
|
976
|
+
stats.hooks.printElements.for(key).tap('DefaultStatsPrinterPlugin', joiner);
|
|
977
|
+
}
|
|
978
|
+
for (const key of Object.keys(RESULT_MODIFIER)) {
|
|
979
|
+
const modifier = RESULT_MODIFIER[key];
|
|
980
|
+
stats.hooks.result.for(key).tap('DefaultStatsPrinterPlugin', modifier);
|
|
981
|
+
}
|
|
982
|
+
});
|
|
983
|
+
});
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
exports.default = DefaultStatsPrinterPlugin;
|