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,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const util_1 = __importDefault(require("util"));
|
|
7
|
+
const truncateArgs_1 = __importDefault(require("@/base/logging/truncateArgs"));
|
|
8
|
+
exports.default = ({ colors, appendOnly, stream }) => {
|
|
9
|
+
let currentStatusMessage;
|
|
10
|
+
let hasStatusMessage = false;
|
|
11
|
+
let currentIndent = '';
|
|
12
|
+
let currentCollapsed = 0;
|
|
13
|
+
const indent = (str, prefix, colorPrefix, colorSuffix) => {
|
|
14
|
+
if (str === '')
|
|
15
|
+
return str;
|
|
16
|
+
prefix = currentIndent + prefix;
|
|
17
|
+
if (colors) {
|
|
18
|
+
return (prefix +
|
|
19
|
+
colorPrefix +
|
|
20
|
+
str.replace(/\n/g, `${colorSuffix}\n${prefix}${colorPrefix}`) +
|
|
21
|
+
colorSuffix);
|
|
22
|
+
}
|
|
23
|
+
return prefix + str.replace(/\n/g, `\n${prefix}`);
|
|
24
|
+
};
|
|
25
|
+
const clearStatusMessage = () => {
|
|
26
|
+
if (hasStatusMessage) {
|
|
27
|
+
stream.write('\x1b[2K\r');
|
|
28
|
+
hasStatusMessage = false;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const writeStatusMessage = () => {
|
|
32
|
+
if (!currentStatusMessage)
|
|
33
|
+
return;
|
|
34
|
+
const l = stream.columns || 40;
|
|
35
|
+
const args = (0, truncateArgs_1.default)(currentStatusMessage, l - 1);
|
|
36
|
+
const str = args.join(' ');
|
|
37
|
+
const coloredStr = `\u001b[1m${str}\u001b[39m\u001b[22m`;
|
|
38
|
+
stream.write(`\x1b[2K\r${coloredStr}`);
|
|
39
|
+
hasStatusMessage = true;
|
|
40
|
+
};
|
|
41
|
+
const writeColored = (prefix, colorPrefix, colorSuffix) => (...args) => {
|
|
42
|
+
if (currentCollapsed > 0)
|
|
43
|
+
return;
|
|
44
|
+
clearStatusMessage();
|
|
45
|
+
const str = indent(util_1.default.format(...args), prefix, colorPrefix, colorSuffix);
|
|
46
|
+
stream.write(`${str}\n`);
|
|
47
|
+
writeStatusMessage();
|
|
48
|
+
};
|
|
49
|
+
const writeGroupMessage = writeColored('<-> ', '\u001b[1m\u001b[36m', '\u001b[39m\u001b[22m');
|
|
50
|
+
const writeGroupCollapsedMessage = writeColored('<+> ', '\u001b[1m\u001b[36m', '\u001b[39m\u001b[22m');
|
|
51
|
+
return {
|
|
52
|
+
log: writeColored(' ', '\u001b[1m', '\u001b[22m'),
|
|
53
|
+
debug: writeColored(' ', '', ''),
|
|
54
|
+
trace: writeColored(' ', '', ''),
|
|
55
|
+
info: writeColored('<i> ', '\u001b[1m\u001b[32m', '\u001b[39m\u001b[22m'),
|
|
56
|
+
warn: writeColored('<w> ', '\u001b[1m\u001b[33m', '\u001b[39m\u001b[22m'),
|
|
57
|
+
error: writeColored('<e> ', '\u001b[1m\u001b[31m', '\u001b[39m\u001b[22m'),
|
|
58
|
+
logTime: writeColored('<t> ', '\u001b[1m\u001b[35m', '\u001b[39m\u001b[22m'),
|
|
59
|
+
group: (...args) => {
|
|
60
|
+
writeGroupMessage(...args);
|
|
61
|
+
if (currentCollapsed > 0) {
|
|
62
|
+
currentCollapsed++;
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
currentIndent += ' ';
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
groupCollapsed: (...args) => {
|
|
69
|
+
writeGroupCollapsedMessage(...args);
|
|
70
|
+
currentCollapsed++;
|
|
71
|
+
},
|
|
72
|
+
groupEnd: () => {
|
|
73
|
+
if (currentCollapsed > 0)
|
|
74
|
+
currentCollapsed--;
|
|
75
|
+
else if (currentIndent.length >= 2)
|
|
76
|
+
currentIndent = currentIndent.slice(0, currentIndent.length - 2);
|
|
77
|
+
},
|
|
78
|
+
profile: console.profile && (name => console.profile(name)),
|
|
79
|
+
profileEnd: console.profileEnd && (name => console.profileEnd(name)),
|
|
80
|
+
clear: !appendOnly &&
|
|
81
|
+
console.clear &&
|
|
82
|
+
(() => {
|
|
83
|
+
clearStatusMessage();
|
|
84
|
+
console.clear();
|
|
85
|
+
writeStatusMessage();
|
|
86
|
+
}),
|
|
87
|
+
status: appendOnly
|
|
88
|
+
? writeColored('<s> ', '', '')
|
|
89
|
+
: (name, ...args) => {
|
|
90
|
+
args = args.filter(Boolean);
|
|
91
|
+
if (name === undefined && args.length === 0) {
|
|
92
|
+
clearStatusMessage();
|
|
93
|
+
currentStatusMessage = undefined;
|
|
94
|
+
}
|
|
95
|
+
else if (typeof name === 'string' && name.startsWith('[webpack.Progress] ')) {
|
|
96
|
+
currentStatusMessage = [name.slice(19), ...args];
|
|
97
|
+
writeStatusMessage();
|
|
98
|
+
}
|
|
99
|
+
else if (name === '[webpack.Progress]') {
|
|
100
|
+
currentStatusMessage = [...args];
|
|
101
|
+
writeStatusMessage();
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
currentStatusMessage = [name, ...args];
|
|
105
|
+
writeStatusMessage();
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SyncBailHook } from 'tapable';
|
|
2
|
+
import { Logger } from './Logger';
|
|
3
|
+
declare const getLogger: (name: any) => Logger;
|
|
4
|
+
declare const configureDefaultLogger: (options: any) => void;
|
|
5
|
+
declare const hooks: {
|
|
6
|
+
log: SyncBailHook<any, string, import("tapable").UnsetAdditionalOptions>;
|
|
7
|
+
};
|
|
8
|
+
export { getLogger, configureDefaultLogger, hooks };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.hooks = exports.configureDefaultLogger = exports.getLogger = void 0;
|
|
7
|
+
const tapable_1 = require("tapable");
|
|
8
|
+
const Logger_1 = require("./Logger");
|
|
9
|
+
const createConsoleLogger_1 = __importDefault(require("./createConsoleLogger"));
|
|
10
|
+
const currentDefaultLoggerOptions = {
|
|
11
|
+
level: 'info',
|
|
12
|
+
debug: false,
|
|
13
|
+
console,
|
|
14
|
+
};
|
|
15
|
+
let currentDefaultLogger = (0, createConsoleLogger_1.default)(currentDefaultLoggerOptions);
|
|
16
|
+
const getLogger = name => new Logger_1.Logger((type, args) => {
|
|
17
|
+
if (hooks.log.call(name, type, args) === undefined) {
|
|
18
|
+
currentDefaultLogger(name, type, args);
|
|
19
|
+
}
|
|
20
|
+
}, childName => getLogger(`${name}/${childName}`));
|
|
21
|
+
exports.getLogger = getLogger;
|
|
22
|
+
const configureDefaultLogger = options => {
|
|
23
|
+
Object.assign(currentDefaultLoggerOptions, options);
|
|
24
|
+
currentDefaultLogger = (0, createConsoleLogger_1.default)(currentDefaultLoggerOptions);
|
|
25
|
+
};
|
|
26
|
+
exports.configureDefaultLogger = configureDefaultLogger;
|
|
27
|
+
const hooks = {
|
|
28
|
+
log: new tapable_1.SyncBailHook(['origin', 'type', 'args']),
|
|
29
|
+
};
|
|
30
|
+
exports.hooks = hooks;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const arraySum = array => {
|
|
4
|
+
let sum = 0;
|
|
5
|
+
for (const item of array)
|
|
6
|
+
sum += item;
|
|
7
|
+
return sum;
|
|
8
|
+
};
|
|
9
|
+
const truncateArgs = (args, maxLength) => {
|
|
10
|
+
const lengths = args.map(a => `${a}`.length);
|
|
11
|
+
const availableLength = maxLength - lengths.length + 1;
|
|
12
|
+
if (availableLength > 0 && args.length === 1) {
|
|
13
|
+
if (availableLength >= args[0].length) {
|
|
14
|
+
return args;
|
|
15
|
+
}
|
|
16
|
+
if (availableLength > 3) {
|
|
17
|
+
return [`...${args[0].slice(-availableLength + 3)}`];
|
|
18
|
+
}
|
|
19
|
+
return [args[0].slice(-availableLength)];
|
|
20
|
+
}
|
|
21
|
+
// Check if there is space for at least 4 chars per arg
|
|
22
|
+
if (availableLength < arraySum(lengths.map(i => Math.min(i, 6)))) {
|
|
23
|
+
// remove args
|
|
24
|
+
if (args.length > 1)
|
|
25
|
+
return truncateArgs(args.slice(0, args.length - 1), maxLength);
|
|
26
|
+
return [];
|
|
27
|
+
}
|
|
28
|
+
let currentLength = arraySum(lengths);
|
|
29
|
+
// Check if all fits into maxLength
|
|
30
|
+
if (currentLength <= availableLength)
|
|
31
|
+
return args;
|
|
32
|
+
// Try to remove chars from the longest items until it fits
|
|
33
|
+
while (currentLength > availableLength) {
|
|
34
|
+
const maxLength = Math.max(...lengths);
|
|
35
|
+
const shorterItems = lengths.filter(l => l !== maxLength);
|
|
36
|
+
const nextToMaxLength = shorterItems.length > 0 ? Math.max(...shorterItems) : 0;
|
|
37
|
+
const maxReduce = maxLength - nextToMaxLength;
|
|
38
|
+
let maxItems = lengths.length - shorterItems.length;
|
|
39
|
+
let overrun = currentLength - availableLength;
|
|
40
|
+
for (let i = 0; i < lengths.length; i++) {
|
|
41
|
+
if (lengths[i] === maxLength) {
|
|
42
|
+
const reduce = Math.min(Math.floor(overrun / maxItems), maxReduce);
|
|
43
|
+
lengths[i] -= reduce;
|
|
44
|
+
currentLength -= reduce;
|
|
45
|
+
overrun -= reduce;
|
|
46
|
+
maxItems--;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
// Return args reduced to length in lengths
|
|
51
|
+
return args.map((a, i) => {
|
|
52
|
+
const str = `${a}`;
|
|
53
|
+
const length = lengths[i];
|
|
54
|
+
if (str.length === length) {
|
|
55
|
+
return str;
|
|
56
|
+
}
|
|
57
|
+
if (length > 5) {
|
|
58
|
+
return `...${str.slice(-length + 3)}`;
|
|
59
|
+
}
|
|
60
|
+
if (length > 0) {
|
|
61
|
+
return str.slice(-length);
|
|
62
|
+
}
|
|
63
|
+
return '';
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
exports.default = truncateArgs;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const memoize = (fn) => {
|
|
4
|
+
let cache = false;
|
|
5
|
+
let result;
|
|
6
|
+
return () => {
|
|
7
|
+
if (cache) {
|
|
8
|
+
return result;
|
|
9
|
+
}
|
|
10
|
+
result = fn();
|
|
11
|
+
cache = true;
|
|
12
|
+
// Allow to clean up memory for fn
|
|
13
|
+
// and all dependent resources
|
|
14
|
+
fn = undefined;
|
|
15
|
+
return result;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
exports.default = memoize;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.moduleCode = exports.promise = exports.missingModule = void 0;
|
|
4
|
+
const toErrorCode = err => `var e = new Error(${JSON.stringify(err)}); e.code = 'MODULE_NOT_FOUND';`;
|
|
5
|
+
const missingModule = request => `!(function webpackMissingModule() { ${moduleCode(request)} }())`;
|
|
6
|
+
exports.missingModule = missingModule;
|
|
7
|
+
const promise = request => {
|
|
8
|
+
const errorCode = toErrorCode(`Cannot find module '${request}'`);
|
|
9
|
+
return `Promise.reject(function webpackMissingModule() { ${errorCode} return e; }())`;
|
|
10
|
+
};
|
|
11
|
+
exports.promise = promise;
|
|
12
|
+
const moduleCode = request => {
|
|
13
|
+
const errorCode = toErrorCode(`Cannot find module '${request}'`);
|
|
14
|
+
return `${errorCode} throw e;`;
|
|
15
|
+
};
|
|
16
|
+
exports.moduleCode = moduleCode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const path_1 = __importDefault(require("path"));
|
|
7
|
+
const moduleAlias = require('module-alias');
|
|
8
|
+
moduleAlias.addAlias('@', path_1.default.join(__dirname, '..'));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const A_CODE = 'a'.charCodeAt(0);
|
|
4
|
+
/**
|
|
5
|
+
* @param {string} hash hash
|
|
6
|
+
* @param {number} hashLength hash length
|
|
7
|
+
* @returns {string} returns hash that has at least one non numeric char
|
|
8
|
+
*/
|
|
9
|
+
exports.default = (hash, hashLength) => {
|
|
10
|
+
if (hashLength < 1)
|
|
11
|
+
return '';
|
|
12
|
+
const slice = hash.slice(0, hashLength);
|
|
13
|
+
if (slice.match(/[^\d]/))
|
|
14
|
+
return slice;
|
|
15
|
+
return `${String.fromCharCode(A_CODE + (parseInt(hash[0], 10) % 6))}${slice.slice(1)}`;
|
|
16
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
declare const getNormalizedWebpackOptions: (config: any) => {
|
|
2
|
+
amd: any;
|
|
3
|
+
bail: any;
|
|
4
|
+
cache: any;
|
|
5
|
+
context: any;
|
|
6
|
+
dependencies: any;
|
|
7
|
+
devServer: any;
|
|
8
|
+
devtool: any;
|
|
9
|
+
entry: {};
|
|
10
|
+
experiments: any;
|
|
11
|
+
externals: any;
|
|
12
|
+
externalsPresets: any;
|
|
13
|
+
externalsType: any;
|
|
14
|
+
ignoreWarnings: any;
|
|
15
|
+
infrastructureLogging: any;
|
|
16
|
+
loader: any;
|
|
17
|
+
mode: any;
|
|
18
|
+
module: any;
|
|
19
|
+
name: any;
|
|
20
|
+
optimization: any;
|
|
21
|
+
output: any;
|
|
22
|
+
parallelism: any;
|
|
23
|
+
plugins: any;
|
|
24
|
+
profile: any;
|
|
25
|
+
recordsInputPath: any;
|
|
26
|
+
recordsOutputPath: any;
|
|
27
|
+
resolve: any;
|
|
28
|
+
resolveLoader: any;
|
|
29
|
+
snapshot: any;
|
|
30
|
+
stats: any;
|
|
31
|
+
};
|
|
32
|
+
export { getNormalizedWebpackOptions };
|
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getNormalizedWebpackOptions = void 0;
|
|
4
|
+
const nestedConfig = (value, fn) => (value === undefined ? fn({}) : fn(value));
|
|
5
|
+
const cloneObject = value => (Object.assign({}, value));
|
|
6
|
+
const optionalNestedConfig = (value, fn) => (value === undefined ? undefined : fn(value));
|
|
7
|
+
const nestedArray = (value, fn) => (Array.isArray(value) ? fn(value) : fn([]));
|
|
8
|
+
const optionalNestedArray = (value, fn) => (Array.isArray(value) ? fn(value) : undefined);
|
|
9
|
+
const keyedNestedConfig = (value, fn, customKeys) => {
|
|
10
|
+
const result = value === undefined
|
|
11
|
+
? {}
|
|
12
|
+
: Object.keys(value).reduce(
|
|
13
|
+
// eslint-disable-next-line no-return-assign
|
|
14
|
+
(obj, key) => (
|
|
15
|
+
// eslint-disable-next-line no-sequences
|
|
16
|
+
(obj[key] = (customKeys && key in customKeys ? customKeys[key] : fn)(value[key])), obj), {});
|
|
17
|
+
if (customKeys) {
|
|
18
|
+
for (const key of Object.keys(customKeys)) {
|
|
19
|
+
if (!(key in result)) {
|
|
20
|
+
result[key] = customKeys[key]({});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return result;
|
|
25
|
+
};
|
|
26
|
+
const getNormalizedWebpackOptions = config => ({
|
|
27
|
+
amd: config.amd,
|
|
28
|
+
bail: config.bail,
|
|
29
|
+
cache: optionalNestedConfig(config.cache, cache => {
|
|
30
|
+
if (cache === false)
|
|
31
|
+
return false;
|
|
32
|
+
if (cache === true) {
|
|
33
|
+
return {
|
|
34
|
+
type: 'memory',
|
|
35
|
+
maxGenerations: undefined,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
switch (cache.type) {
|
|
39
|
+
case 'filesystem':
|
|
40
|
+
return {
|
|
41
|
+
type: 'filesystem',
|
|
42
|
+
allowCollectingMemory: cache.allowCollectingMemory,
|
|
43
|
+
maxMemoryGenerations: cache.maxMemoryGenerations,
|
|
44
|
+
maxAge: cache.maxAge,
|
|
45
|
+
profile: cache.profile,
|
|
46
|
+
buildDependencies: cloneObject(cache.buildDependencies),
|
|
47
|
+
cacheDirectory: cache.cacheDirectory,
|
|
48
|
+
cacheLocation: cache.cacheLocation,
|
|
49
|
+
hashAlgorithm: cache.hashAlgorithm,
|
|
50
|
+
compression: cache.compression,
|
|
51
|
+
idleTimeout: cache.idleTimeout,
|
|
52
|
+
idleTimeoutForInitialStore: cache.idleTimeoutForInitialStore,
|
|
53
|
+
idleTimeoutAfterLargeChanges: cache.idleTimeoutAfterLargeChanges,
|
|
54
|
+
name: cache.name,
|
|
55
|
+
store: cache.store,
|
|
56
|
+
version: cache.version,
|
|
57
|
+
readonly: cache.readonly,
|
|
58
|
+
};
|
|
59
|
+
case undefined:
|
|
60
|
+
case 'memory':
|
|
61
|
+
return {
|
|
62
|
+
type: 'memory',
|
|
63
|
+
maxGenerations: cache.maxGenerations,
|
|
64
|
+
};
|
|
65
|
+
default:
|
|
66
|
+
throw new Error(`Not implemented cache.type ${cache.type}`);
|
|
67
|
+
}
|
|
68
|
+
}),
|
|
69
|
+
context: config.context,
|
|
70
|
+
dependencies: config.dependencies,
|
|
71
|
+
devServer: optionalNestedConfig(config.devServer, devServer => (Object.assign({}, devServer))),
|
|
72
|
+
devtool: config.devtool,
|
|
73
|
+
entry: config.entry === undefined
|
|
74
|
+
? { main: {} }
|
|
75
|
+
: typeof config.entry === 'function'
|
|
76
|
+
? (fn => () => Promise.resolve().then(fn).then(getNormalizedEntryStatic))(config.entry)
|
|
77
|
+
: getNormalizedEntryStatic(config.entry),
|
|
78
|
+
experiments: nestedConfig(config.experiments, experiments => (Object.assign(Object.assign({}, experiments), { buildHttp: optionalNestedConfig(experiments.buildHttp, options => Array.isArray(options) ? { allowedUris: options } : options), lazyCompilation: optionalNestedConfig(experiments.lazyCompilation, options => options === true ? {} : options), css: optionalNestedConfig(experiments.css, options => (options === true ? {} : options)) }))),
|
|
79
|
+
externals: config.externals,
|
|
80
|
+
externalsPresets: cloneObject(config.externalsPresets),
|
|
81
|
+
externalsType: config.externalsType,
|
|
82
|
+
ignoreWarnings: config.ignoreWarnings
|
|
83
|
+
? config.ignoreWarnings.map(ignore => {
|
|
84
|
+
if (typeof ignore === 'function')
|
|
85
|
+
return ignore;
|
|
86
|
+
const i = ignore instanceof RegExp ? { message: ignore } : ignore;
|
|
87
|
+
return (warning, { requestShortener }) => {
|
|
88
|
+
if (!i.message && !i.module && !i.file)
|
|
89
|
+
return false;
|
|
90
|
+
if (i.message && !i.message.test(warning.message)) {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
if (i.module &&
|
|
94
|
+
(!warning.module ||
|
|
95
|
+
!i.module.test(warning.module.readableIdentifier(requestShortener)))) {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
if (i.file && (!warning.file || !i.file.test(warning.file))) {
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
return true;
|
|
102
|
+
};
|
|
103
|
+
})
|
|
104
|
+
: undefined,
|
|
105
|
+
infrastructureLogging: cloneObject(config.infrastructureLogging),
|
|
106
|
+
loader: cloneObject(config.loader),
|
|
107
|
+
mode: config.mode,
|
|
108
|
+
module: nestedConfig(config.module, module => ({
|
|
109
|
+
noParse: module.noParse,
|
|
110
|
+
unsafeCache: module.unsafeCache,
|
|
111
|
+
parser: keyedNestedConfig(module.parser, cloneObject, {
|
|
112
|
+
javascript: parserOptions => (Object.assign({ unknownContextRequest: module.unknownContextRequest, unknownContextRegExp: module.unknownContextRegExp, unknownContextRecursive: module.unknownContextRecursive, unknownContextCritical: module.unknownContextCritical, exprContextRequest: module.exprContextRequest, exprContextRegExp: module.exprContextRegExp, exprContextRecursive: module.exprContextRecursive, exprContextCritical: module.exprContextCritical, wrappedContextRegExp: module.wrappedContextRegExp, wrappedContextRecursive: module.wrappedContextRecursive, wrappedContextCritical: module.wrappedContextCritical,
|
|
113
|
+
// TODO webpack 6 remove
|
|
114
|
+
strictExportPresence: module.strictExportPresence, strictThisContextOnImports: module.strictThisContextOnImports }, parserOptions)),
|
|
115
|
+
}),
|
|
116
|
+
generator: cloneObject(module.generator),
|
|
117
|
+
defaultRules: optionalNestedArray(module.defaultRules, r => [...r]),
|
|
118
|
+
rules: nestedArray(module.rules, r => [...r]),
|
|
119
|
+
})),
|
|
120
|
+
name: config.name,
|
|
121
|
+
optimization: nestedConfig(config.optimization, optimization => (Object.assign(Object.assign({}, optimization), { runtimeChunk: getNormalizedOptimizationRuntimeChunk(optimization.runtimeChunk), splitChunks: nestedConfig(optimization.splitChunks, splitChunks => splitChunks && Object.assign(Object.assign({}, splitChunks), { defaultSizeTypes: splitChunks.defaultSizeTypes
|
|
122
|
+
? [...splitChunks.defaultSizeTypes]
|
|
123
|
+
: ['...'], cacheGroups: cloneObject(splitChunks.cacheGroups) })), emitOnErrors: optimization.emitOnErrors }))),
|
|
124
|
+
output: nestedConfig(config.output, output => {
|
|
125
|
+
const { library } = output;
|
|
126
|
+
const libraryAsName = library;
|
|
127
|
+
const libraryBase = typeof library === 'object' && library && !Array.isArray(library) && 'type' in library
|
|
128
|
+
? library
|
|
129
|
+
: libraryAsName || output.libraryTarget
|
|
130
|
+
? {
|
|
131
|
+
name: libraryAsName,
|
|
132
|
+
}
|
|
133
|
+
: undefined;
|
|
134
|
+
const result = {
|
|
135
|
+
assetModuleFilename: output.assetModuleFilename,
|
|
136
|
+
asyncChunks: output.asyncChunks,
|
|
137
|
+
charset: output.charset,
|
|
138
|
+
chunkFilename: output.chunkFilename,
|
|
139
|
+
chunkFormat: output.chunkFormat,
|
|
140
|
+
chunkLoading: output.chunkLoading,
|
|
141
|
+
chunkLoadingGlobal: output.chunkLoadingGlobal,
|
|
142
|
+
chunkLoadTimeout: output.chunkLoadTimeout,
|
|
143
|
+
cssFilename: output.cssFilename,
|
|
144
|
+
cssChunkFilename: output.cssChunkFilename,
|
|
145
|
+
clean: output.clean,
|
|
146
|
+
compareBeforeEmit: output.compareBeforeEmit,
|
|
147
|
+
crossOriginLoading: output.crossOriginLoading,
|
|
148
|
+
devtoolFallbackModuleFilenameTemplate: output.devtoolFallbackModuleFilenameTemplate,
|
|
149
|
+
devtoolModuleFilenameTemplate: output.devtoolModuleFilenameTemplate,
|
|
150
|
+
devtoolNamespace: output.devtoolNamespace,
|
|
151
|
+
environment: cloneObject(output.environment),
|
|
152
|
+
enabledChunkLoadingTypes: output.enabledChunkLoadingTypes
|
|
153
|
+
? [...output.enabledChunkLoadingTypes]
|
|
154
|
+
: ['...'],
|
|
155
|
+
enabledLibraryTypes: output.enabledLibraryTypes ? [...output.enabledLibraryTypes] : ['...'],
|
|
156
|
+
enabledWasmLoadingTypes: output.enabledWasmLoadingTypes
|
|
157
|
+
? [...output.enabledWasmLoadingTypes]
|
|
158
|
+
: ['...'],
|
|
159
|
+
filename: output.filename,
|
|
160
|
+
globalObject: output.globalObject,
|
|
161
|
+
hashDigest: output.hashDigest,
|
|
162
|
+
hashDigestLength: output.hashDigestLength,
|
|
163
|
+
hashFunction: output.hashFunction,
|
|
164
|
+
hashSalt: output.hashSalt,
|
|
165
|
+
hotUpdateChunkFilename: output.hotUpdateChunkFilename,
|
|
166
|
+
hotUpdateGlobal: output.hotUpdateGlobal,
|
|
167
|
+
hotUpdateMainFilename: output.hotUpdateMainFilename,
|
|
168
|
+
ignoreBrowserWarnings: output.ignoreBrowserWarnings,
|
|
169
|
+
iife: output.iife,
|
|
170
|
+
importFunctionName: output.importFunctionName,
|
|
171
|
+
importMetaName: output.importMetaName,
|
|
172
|
+
scriptType: output.scriptType,
|
|
173
|
+
library: libraryBase && {
|
|
174
|
+
type: output.libraryTarget !== undefined ? output.libraryTarget : libraryBase.type,
|
|
175
|
+
auxiliaryComment: output.auxiliaryComment !== undefined
|
|
176
|
+
? output.auxiliaryComment
|
|
177
|
+
: libraryBase.auxiliaryComment,
|
|
178
|
+
amdContainer: output.amdContainer !== undefined ? output.amdContainer : libraryBase.amdContainer,
|
|
179
|
+
export: output.libraryExport !== undefined ? output.libraryExport : libraryBase.export,
|
|
180
|
+
name: libraryBase.name,
|
|
181
|
+
umdNamedDefine: output.umdNamedDefine !== undefined
|
|
182
|
+
? output.umdNamedDefine
|
|
183
|
+
: libraryBase.umdNamedDefine,
|
|
184
|
+
},
|
|
185
|
+
module: output.module,
|
|
186
|
+
path: output.path,
|
|
187
|
+
pathinfo: output.pathinfo,
|
|
188
|
+
publicPath: output.publicPath,
|
|
189
|
+
sourceMapFilename: output.sourceMapFilename,
|
|
190
|
+
sourcePrefix: output.sourcePrefix,
|
|
191
|
+
strictModuleExceptionHandling: output.strictModuleExceptionHandling,
|
|
192
|
+
trustedTypes: optionalNestedConfig(output.trustedTypes, trustedTypes => {
|
|
193
|
+
if (trustedTypes === true)
|
|
194
|
+
return {};
|
|
195
|
+
if (typeof trustedTypes === 'string')
|
|
196
|
+
return { policyName: trustedTypes };
|
|
197
|
+
return Object.assign({}, trustedTypes);
|
|
198
|
+
}),
|
|
199
|
+
uniqueName: output.uniqueName,
|
|
200
|
+
wasmLoading: output.wasmLoading,
|
|
201
|
+
webassemblyModuleFilename: output.webassemblyModuleFilename,
|
|
202
|
+
workerPublicPath: output.workerPublicPath,
|
|
203
|
+
workerChunkLoading: output.workerChunkLoading,
|
|
204
|
+
workerWasmLoading: output.workerWasmLoading,
|
|
205
|
+
};
|
|
206
|
+
return result;
|
|
207
|
+
}),
|
|
208
|
+
parallelism: config.parallelism,
|
|
209
|
+
plugins: nestedArray(config.plugins, p => [...p]),
|
|
210
|
+
profile: config.profile,
|
|
211
|
+
recordsInputPath: config.recordsInputPath !== undefined ? config.recordsInputPath : config.recordsPath,
|
|
212
|
+
recordsOutputPath: config.recordsOutputPath !== undefined ? config.recordsOutputPath : config.recordsPath,
|
|
213
|
+
resolve: nestedConfig(config.resolve, resolve => (Object.assign(Object.assign({}, resolve), { byDependency: keyedNestedConfig(resolve.byDependency, cloneObject) }))),
|
|
214
|
+
resolveLoader: cloneObject(config.resolveLoader),
|
|
215
|
+
snapshot: nestedConfig(config.snapshot, snapshot => ({
|
|
216
|
+
resolveBuildDependencies: optionalNestedConfig(snapshot.resolveBuildDependencies, resolveBuildDependencies => ({
|
|
217
|
+
timestamp: resolveBuildDependencies.timestamp,
|
|
218
|
+
hash: resolveBuildDependencies.hash,
|
|
219
|
+
})),
|
|
220
|
+
buildDependencies: optionalNestedConfig(snapshot.buildDependencies, buildDependencies => ({
|
|
221
|
+
timestamp: buildDependencies.timestamp,
|
|
222
|
+
hash: buildDependencies.hash,
|
|
223
|
+
})),
|
|
224
|
+
resolve: optionalNestedConfig(snapshot.resolve, resolve => ({
|
|
225
|
+
timestamp: resolve.timestamp,
|
|
226
|
+
hash: resolve.hash,
|
|
227
|
+
})),
|
|
228
|
+
module: optionalNestedConfig(snapshot.module, module => ({
|
|
229
|
+
timestamp: module.timestamp,
|
|
230
|
+
hash: module.hash,
|
|
231
|
+
})),
|
|
232
|
+
immutablePaths: optionalNestedArray(snapshot.immutablePaths, p => [...p]),
|
|
233
|
+
managedPaths: optionalNestedArray(snapshot.managedPaths, p => [...p]),
|
|
234
|
+
})),
|
|
235
|
+
stats: nestedConfig(config.stats, stats => {
|
|
236
|
+
if (stats === false) {
|
|
237
|
+
return {
|
|
238
|
+
preset: 'none',
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
if (stats === true) {
|
|
242
|
+
return {
|
|
243
|
+
preset: 'normal',
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
if (typeof stats === 'string') {
|
|
247
|
+
return {
|
|
248
|
+
preset: stats,
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
return Object.assign({}, stats);
|
|
252
|
+
}),
|
|
253
|
+
});
|
|
254
|
+
exports.getNormalizedWebpackOptions = getNormalizedWebpackOptions;
|
|
255
|
+
const getNormalizedEntryStatic = entry => {
|
|
256
|
+
if (typeof entry === 'string') {
|
|
257
|
+
return {
|
|
258
|
+
main: {
|
|
259
|
+
import: [entry],
|
|
260
|
+
},
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
if (Array.isArray(entry)) {
|
|
264
|
+
return {
|
|
265
|
+
main: {
|
|
266
|
+
import: entry,
|
|
267
|
+
},
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
const result = {};
|
|
271
|
+
for (const key of Object.keys(entry)) {
|
|
272
|
+
const value = entry[key];
|
|
273
|
+
if (typeof value === 'string') {
|
|
274
|
+
result[key] = {
|
|
275
|
+
import: [value],
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
else if (Array.isArray(value)) {
|
|
279
|
+
result[key] = {
|
|
280
|
+
import: value,
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
else {
|
|
284
|
+
result[key] = {
|
|
285
|
+
import: value.import && (Array.isArray(value.import) ? value.import : [value.import]),
|
|
286
|
+
filename: value.filename,
|
|
287
|
+
layer: value.layer,
|
|
288
|
+
runtime: value.runtime,
|
|
289
|
+
baseUri: value.baseUri,
|
|
290
|
+
publicPath: value.publicPath,
|
|
291
|
+
chunkLoading: value.chunkLoading,
|
|
292
|
+
asyncChunks: value.asyncChunks,
|
|
293
|
+
wasmLoading: value.wasmLoading,
|
|
294
|
+
dependOn: value.dependOn && (Array.isArray(value.dependOn) ? value.dependOn : [value.dependOn]),
|
|
295
|
+
library: value.library,
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
return result;
|
|
300
|
+
};
|
|
301
|
+
const getNormalizedOptimizationRuntimeChunk = runtimeChunk => {
|
|
302
|
+
if (runtimeChunk === undefined)
|
|
303
|
+
return undefined;
|
|
304
|
+
if (runtimeChunk === false)
|
|
305
|
+
return false;
|
|
306
|
+
if (runtimeChunk === 'single') {
|
|
307
|
+
return {
|
|
308
|
+
name: () => 'runtime',
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
if (runtimeChunk === true || runtimeChunk === 'multiple') {
|
|
312
|
+
return {
|
|
313
|
+
name: entrypoint => `runtime~${entrypoint.name}`,
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
const { name } = runtimeChunk;
|
|
317
|
+
return {
|
|
318
|
+
name: typeof name === 'function' ? name : () => name,
|
|
319
|
+
};
|
|
320
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Computes a hash value for the given string and range. This hashing algorithm is a modified
|
|
3
|
+
* version of the [FNV-1a algorithm](https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function).
|
|
4
|
+
* It is optimized for speed and does **not** generate a cryptographic hash value.
|
|
5
|
+
*
|
|
6
|
+
* We use `numberHash` in `lib/ids/IdHelpers.js` to generate hash values for the module identifier. The generated
|
|
7
|
+
* hash is used as a prefix for the module id's to avoid collisions with other modules.
|
|
8
|
+
*
|
|
9
|
+
* ```js
|
|
10
|
+
* const numberHash = require("mp-compiler/@/base/util/numberHash");
|
|
11
|
+
* numberHash("hello", 1000); // 57
|
|
12
|
+
* numberHash("hello world"); // 990
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
declare const _default: (str: string, range: number) => number;
|
|
17
|
+
export default _default;
|