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,763 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.HarmonyStarExportsList = exports.HarmonyExportImportedSpecifierDependency = void 0;
|
|
30
|
+
const Dependency_1 = __importDefault(require("@/dependencies/Dependency"));
|
|
31
|
+
const ExportsInfo_1 = require("@/module/ExportsInfo");
|
|
32
|
+
const HarmonyLinkingError_1 = __importDefault(require("@/base/errors/HarmonyLinkingError"));
|
|
33
|
+
const InitFragment_1 = __importDefault(require("@/base/InitFragment"));
|
|
34
|
+
const RuntimeGlobals = __importStar(require("@/module/RuntimeGlobals"));
|
|
35
|
+
const Template_1 = require("@/template/Template");
|
|
36
|
+
const IterableHelpers_1 = require("@/base/IterableHelpers");
|
|
37
|
+
const SetHelpers_1 = require("@/base/SetHelpers");
|
|
38
|
+
const makeSerializable_1 = __importDefault(require("@/serialization/makeSerializable"));
|
|
39
|
+
const propertyAccess_1 = __importDefault(require("@/base/propertyAccess"));
|
|
40
|
+
const propertyName_1 = require("@/base/propertyName");
|
|
41
|
+
const RuntimeHelpers_1 = require("@/module/RuntimeHelpers");
|
|
42
|
+
const processExportInfo_1 = __importDefault(require("@/dependencies/processExportInfo"));
|
|
43
|
+
const HarmonyExportInitFragment_1 = __importDefault(require("./HarmonyExportInitFragment"));
|
|
44
|
+
const HarmonyImportDependency_1 = require("./HarmonyImportDependency");
|
|
45
|
+
const idsSymbol = Symbol('HarmonyExportImportedSpecifierDependency.ids');
|
|
46
|
+
class NormalReexportItem {
|
|
47
|
+
constructor(name, ids, exportInfo, checked, hidden) {
|
|
48
|
+
this.name = name;
|
|
49
|
+
this.ids = ids;
|
|
50
|
+
this.exportInfo = exportInfo;
|
|
51
|
+
this.checked = checked;
|
|
52
|
+
this.hidden = hidden;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
class ExportMode {
|
|
56
|
+
constructor(type) {
|
|
57
|
+
this.type = type;
|
|
58
|
+
// for "normal-reexport":
|
|
59
|
+
this.items = null;
|
|
60
|
+
// for "reexport-named-default" | "reexport-fake-namespace-object" | "reexport-namespace-object"
|
|
61
|
+
this.name = null;
|
|
62
|
+
this.partialNamespaceExportInfo = null;
|
|
63
|
+
// for "dynamic-reexport":
|
|
64
|
+
this.ignored = null;
|
|
65
|
+
// for "dynamic-reexport" | "empty-star":
|
|
66
|
+
this.hidden = null;
|
|
67
|
+
// for "missing":
|
|
68
|
+
this.userRequest = null;
|
|
69
|
+
// for "reexport-fake-namespace-object":
|
|
70
|
+
this.fakeType = 0;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
const determineExportAssignments = (moduleGraph, dependencies, additionalDependency) => {
|
|
74
|
+
const names = new Set();
|
|
75
|
+
const dependencyIndices = [];
|
|
76
|
+
if (additionalDependency) {
|
|
77
|
+
dependencies = dependencies.concat(additionalDependency);
|
|
78
|
+
}
|
|
79
|
+
for (const dep of dependencies) {
|
|
80
|
+
const i = dependencyIndices.length;
|
|
81
|
+
dependencyIndices[i] = names.size;
|
|
82
|
+
const otherImportedModule = moduleGraph.getModule(dep);
|
|
83
|
+
if (otherImportedModule) {
|
|
84
|
+
const exportsInfo = moduleGraph.getExportsInfo(otherImportedModule);
|
|
85
|
+
for (const exportInfo of exportsInfo.exports) {
|
|
86
|
+
if (exportInfo.provided === true &&
|
|
87
|
+
exportInfo.name !== 'default' &&
|
|
88
|
+
!names.has(exportInfo.name)) {
|
|
89
|
+
names.add(exportInfo.name);
|
|
90
|
+
dependencyIndices[i] = names.size;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
dependencyIndices.push(names.size);
|
|
96
|
+
return { names: Array.from(names), dependencyIndices };
|
|
97
|
+
};
|
|
98
|
+
const findDependencyForName = ({ names, dependencyIndices }, name, dependencies) => {
|
|
99
|
+
const dependenciesIt = dependencies[Symbol.iterator]();
|
|
100
|
+
const dependencyIndicesIt = dependencyIndices[Symbol.iterator]();
|
|
101
|
+
let dependenciesItResult = dependenciesIt.next();
|
|
102
|
+
let dependencyIndicesItResult = dependencyIndicesIt.next();
|
|
103
|
+
if (dependencyIndicesItResult.done)
|
|
104
|
+
return;
|
|
105
|
+
for (let i = 0; i < names.length; i++) {
|
|
106
|
+
while (i >= dependencyIndicesItResult.value) {
|
|
107
|
+
dependenciesItResult = dependenciesIt.next();
|
|
108
|
+
dependencyIndicesItResult = dependencyIndicesIt.next();
|
|
109
|
+
if (dependencyIndicesItResult.done)
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if (names[i] === name)
|
|
113
|
+
return dependenciesItResult.value;
|
|
114
|
+
}
|
|
115
|
+
return undefined;
|
|
116
|
+
};
|
|
117
|
+
const getMode = (moduleGraph, dep, runtimeKey) => {
|
|
118
|
+
const importedModule = moduleGraph.getModule(dep);
|
|
119
|
+
if (!importedModule) {
|
|
120
|
+
const mode = new ExportMode('missing');
|
|
121
|
+
mode.userRequest = dep.userRequest;
|
|
122
|
+
return mode;
|
|
123
|
+
}
|
|
124
|
+
const name = dep.name;
|
|
125
|
+
const runtime = (0, RuntimeHelpers_1.keyToRuntime)(runtimeKey);
|
|
126
|
+
const parentModule = moduleGraph.getParentModule(dep);
|
|
127
|
+
const exportsInfo = moduleGraph.getExportsInfo(parentModule);
|
|
128
|
+
if (name
|
|
129
|
+
? exportsInfo.getUsed(name, runtime) === ExportsInfo_1.UsageState.Unused
|
|
130
|
+
: exportsInfo.isUsed(runtime) === false) {
|
|
131
|
+
const mode = new ExportMode('unused');
|
|
132
|
+
mode.name = name || '*';
|
|
133
|
+
return mode;
|
|
134
|
+
}
|
|
135
|
+
const importedExportsType = importedModule.getExportsType(moduleGraph, parentModule.buildMeta.strictHarmonyModule);
|
|
136
|
+
const ids = dep.getIds(moduleGraph);
|
|
137
|
+
// Special handling for reexporting the default export
|
|
138
|
+
// from non-namespace modules
|
|
139
|
+
if (name && ids.length > 0 && ids[0] === 'default') {
|
|
140
|
+
switch (importedExportsType) {
|
|
141
|
+
case 'dynamic': {
|
|
142
|
+
const mode = new ExportMode('reexport-dynamic-default');
|
|
143
|
+
mode.name = name;
|
|
144
|
+
return mode;
|
|
145
|
+
}
|
|
146
|
+
case 'default-only':
|
|
147
|
+
case 'default-with-named': {
|
|
148
|
+
const exportInfo = exportsInfo.getReadOnlyExportInfo(name);
|
|
149
|
+
const mode = new ExportMode('reexport-named-default');
|
|
150
|
+
mode.name = name;
|
|
151
|
+
mode.partialNamespaceExportInfo = exportInfo;
|
|
152
|
+
return mode;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
// reexporting with a fixed name
|
|
157
|
+
if (name) {
|
|
158
|
+
let mode;
|
|
159
|
+
const exportInfo = exportsInfo.getReadOnlyExportInfo(name);
|
|
160
|
+
if (ids.length > 0) {
|
|
161
|
+
// export { name as name }
|
|
162
|
+
switch (importedExportsType) {
|
|
163
|
+
case 'default-only':
|
|
164
|
+
mode = new ExportMode('reexport-undefined');
|
|
165
|
+
mode.name = name;
|
|
166
|
+
break;
|
|
167
|
+
default:
|
|
168
|
+
mode = new ExportMode('normal-reexport');
|
|
169
|
+
mode.items = [new NormalReexportItem(name, ids, exportInfo, false, false)];
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
// export * as name
|
|
175
|
+
switch (importedExportsType) {
|
|
176
|
+
case 'default-only':
|
|
177
|
+
mode = new ExportMode('reexport-fake-namespace-object');
|
|
178
|
+
mode.name = name;
|
|
179
|
+
mode.partialNamespaceExportInfo = exportInfo;
|
|
180
|
+
mode.fakeType = 0;
|
|
181
|
+
break;
|
|
182
|
+
case 'default-with-named':
|
|
183
|
+
mode = new ExportMode('reexport-fake-namespace-object');
|
|
184
|
+
mode.name = name;
|
|
185
|
+
mode.partialNamespaceExportInfo = exportInfo;
|
|
186
|
+
mode.fakeType = 2;
|
|
187
|
+
break;
|
|
188
|
+
case 'dynamic':
|
|
189
|
+
default:
|
|
190
|
+
mode = new ExportMode('reexport-namespace-object');
|
|
191
|
+
mode.name = name;
|
|
192
|
+
mode.partialNamespaceExportInfo = exportInfo;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
return mode;
|
|
196
|
+
}
|
|
197
|
+
// Star reexporting
|
|
198
|
+
const { ignoredExports, exports, checked, hidden } = dep.getStarReexports(moduleGraph, runtime, exportsInfo, importedModule);
|
|
199
|
+
if (!exports) {
|
|
200
|
+
// We have too few info about the modules
|
|
201
|
+
// Delegate the logic to the runtime code
|
|
202
|
+
const mode = new ExportMode('dynamic-reexport');
|
|
203
|
+
mode.ignored = ignoredExports;
|
|
204
|
+
mode.hidden = hidden;
|
|
205
|
+
return mode;
|
|
206
|
+
}
|
|
207
|
+
if (exports.size === 0) {
|
|
208
|
+
const mode = new ExportMode('empty-star');
|
|
209
|
+
mode.hidden = hidden;
|
|
210
|
+
return mode;
|
|
211
|
+
}
|
|
212
|
+
const mode = new ExportMode('normal-reexport');
|
|
213
|
+
mode.items = Array.from(exports, (exportName) => new NormalReexportItem(exportName, [exportName], exportsInfo.getReadOnlyExportInfo(exportName), checked.has(exportName), false));
|
|
214
|
+
if (hidden !== undefined) {
|
|
215
|
+
for (const exportName of hidden) {
|
|
216
|
+
mode.items.push(new NormalReexportItem(exportName, [exportName], exportsInfo.getReadOnlyExportInfo(exportName), false, true));
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
return mode;
|
|
220
|
+
};
|
|
221
|
+
class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency_1.HarmonyImportDependency {
|
|
222
|
+
constructor(request, sourceOrder, ids, name, activeExports, otherStarExports, exportPresenceMode, allStarExports, assertions) {
|
|
223
|
+
super(request, sourceOrder, assertions);
|
|
224
|
+
this.ids = ids;
|
|
225
|
+
this.name = name;
|
|
226
|
+
this.activeExports = activeExports;
|
|
227
|
+
this.otherStarExports = otherStarExports;
|
|
228
|
+
this.exportPresenceMode = exportPresenceMode;
|
|
229
|
+
this.allStarExports = allStarExports;
|
|
230
|
+
}
|
|
231
|
+
couldAffectReferencingModule() {
|
|
232
|
+
return Dependency_1.default.TRANSITIVE;
|
|
233
|
+
}
|
|
234
|
+
// TODO webpack 6 remove
|
|
235
|
+
get id() {
|
|
236
|
+
throw new Error('id was renamed to ids and type changed to string[]');
|
|
237
|
+
}
|
|
238
|
+
// TODO webpack 6 remove
|
|
239
|
+
getId() {
|
|
240
|
+
throw new Error('id was renamed to ids and type changed to string[]');
|
|
241
|
+
}
|
|
242
|
+
// TODO webpack 6 remove
|
|
243
|
+
setId() {
|
|
244
|
+
throw new Error('id was renamed to ids and type changed to string[]');
|
|
245
|
+
}
|
|
246
|
+
get type() {
|
|
247
|
+
return 'harmony export imported specifier';
|
|
248
|
+
}
|
|
249
|
+
getIds(moduleGraph) {
|
|
250
|
+
return moduleGraph.getMeta(this)[idsSymbol] || this.ids;
|
|
251
|
+
}
|
|
252
|
+
setIds(moduleGraph, ids) {
|
|
253
|
+
moduleGraph.getMeta(this)[idsSymbol] = ids;
|
|
254
|
+
}
|
|
255
|
+
getMode(moduleGraph, runtime) {
|
|
256
|
+
return moduleGraph.dependencyCacheProvide(this, (0, RuntimeHelpers_1.getRuntimeKey)(runtime), getMode);
|
|
257
|
+
}
|
|
258
|
+
getStarReexports(moduleGraph, runtime, exportsInfo = moduleGraph.getExportsInfo(moduleGraph.getParentModule(this)), importedModule = moduleGraph.getModule(this)) {
|
|
259
|
+
const importedExportsInfo = moduleGraph.getExportsInfo(importedModule);
|
|
260
|
+
const noExtraExports = importedExportsInfo.otherExportsInfo.provided === false;
|
|
261
|
+
const noExtraImports = exportsInfo.otherExportsInfo.getUsed(runtime) === ExportsInfo_1.UsageState.Unused;
|
|
262
|
+
const ignoredExports = new Set(['default', ...this.activeExports]);
|
|
263
|
+
let hiddenExports;
|
|
264
|
+
const otherStarExports = this._discoverActiveExportsFromOtherStarExports(moduleGraph);
|
|
265
|
+
if (otherStarExports !== undefined) {
|
|
266
|
+
hiddenExports = new Set();
|
|
267
|
+
for (let i = 0; i < otherStarExports.namesSlice; i++) {
|
|
268
|
+
hiddenExports.add(otherStarExports.names[i]);
|
|
269
|
+
}
|
|
270
|
+
for (const e of ignoredExports)
|
|
271
|
+
hiddenExports.delete(e);
|
|
272
|
+
}
|
|
273
|
+
if (!noExtraExports && !noExtraImports) {
|
|
274
|
+
return {
|
|
275
|
+
ignoredExports,
|
|
276
|
+
hidden: hiddenExports,
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
const exports = new Set();
|
|
280
|
+
const checked = new Set();
|
|
281
|
+
const hidden = hiddenExports !== undefined ? new Set() : undefined;
|
|
282
|
+
if (noExtraImports) {
|
|
283
|
+
for (const exportInfo of exportsInfo.orderedExports) {
|
|
284
|
+
const name = exportInfo.name;
|
|
285
|
+
if (ignoredExports.has(name))
|
|
286
|
+
continue;
|
|
287
|
+
if (exportInfo.getUsed(runtime) === ExportsInfo_1.UsageState.Unused)
|
|
288
|
+
continue;
|
|
289
|
+
const importedExportInfo = importedExportsInfo.getReadOnlyExportInfo(name);
|
|
290
|
+
if (importedExportInfo.provided === false)
|
|
291
|
+
continue;
|
|
292
|
+
if (hiddenExports === null || hiddenExports === void 0 ? void 0 : hiddenExports.has(name)) {
|
|
293
|
+
hidden.add(name);
|
|
294
|
+
continue;
|
|
295
|
+
}
|
|
296
|
+
exports.add(name);
|
|
297
|
+
if (importedExportInfo.provided === true)
|
|
298
|
+
continue;
|
|
299
|
+
checked.add(name);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
else if (noExtraExports) {
|
|
303
|
+
for (const importedExportInfo of importedExportsInfo.orderedExports) {
|
|
304
|
+
const name = importedExportInfo.name;
|
|
305
|
+
if (ignoredExports.has(name))
|
|
306
|
+
continue;
|
|
307
|
+
if (importedExportInfo.provided === false)
|
|
308
|
+
continue;
|
|
309
|
+
const exportInfo = exportsInfo.getReadOnlyExportInfo(name);
|
|
310
|
+
if (exportInfo.getUsed(runtime) === ExportsInfo_1.UsageState.Unused)
|
|
311
|
+
continue;
|
|
312
|
+
if (hiddenExports === null || hiddenExports === void 0 ? void 0 : hiddenExports.has(name)) {
|
|
313
|
+
hidden.add(name);
|
|
314
|
+
continue;
|
|
315
|
+
}
|
|
316
|
+
exports.add(name);
|
|
317
|
+
if (importedExportInfo.provided === true)
|
|
318
|
+
continue;
|
|
319
|
+
checked.add(name);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
return { ignoredExports, exports, checked, hidden };
|
|
323
|
+
}
|
|
324
|
+
getCondition(moduleGraph) {
|
|
325
|
+
return (connection, runtime) => {
|
|
326
|
+
const mode = this.getMode(moduleGraph, runtime);
|
|
327
|
+
return mode.type !== 'unused' && mode.type !== 'empty-star';
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
getModuleEvaluationSideEffectsState(moduleGraph) {
|
|
331
|
+
return false;
|
|
332
|
+
}
|
|
333
|
+
getReferencedExports(moduleGraph, runtime) {
|
|
334
|
+
const mode = this.getMode(moduleGraph, runtime);
|
|
335
|
+
switch (mode.type) {
|
|
336
|
+
case 'missing':
|
|
337
|
+
case 'unused':
|
|
338
|
+
case 'empty-star':
|
|
339
|
+
case 'reexport-undefined':
|
|
340
|
+
return Dependency_1.default.NO_EXPORTS_REFERENCED;
|
|
341
|
+
case 'reexport-dynamic-default':
|
|
342
|
+
return Dependency_1.default.EXPORTS_OBJECT_REFERENCED;
|
|
343
|
+
case 'reexport-named-default': {
|
|
344
|
+
if (!mode.partialNamespaceExportInfo)
|
|
345
|
+
return Dependency_1.default.EXPORTS_OBJECT_REFERENCED;
|
|
346
|
+
const referencedExports = [];
|
|
347
|
+
(0, processExportInfo_1.default)(runtime, referencedExports, [], mode.partialNamespaceExportInfo);
|
|
348
|
+
return referencedExports;
|
|
349
|
+
}
|
|
350
|
+
case 'reexport-namespace-object':
|
|
351
|
+
case 'reexport-fake-namespace-object': {
|
|
352
|
+
if (!mode.partialNamespaceExportInfo)
|
|
353
|
+
return Dependency_1.default.EXPORTS_OBJECT_REFERENCED;
|
|
354
|
+
const referencedExports = [];
|
|
355
|
+
(0, processExportInfo_1.default)(runtime, referencedExports, [], mode.partialNamespaceExportInfo, mode.type === 'reexport-fake-namespace-object');
|
|
356
|
+
return referencedExports;
|
|
357
|
+
}
|
|
358
|
+
case 'dynamic-reexport':
|
|
359
|
+
return Dependency_1.default.EXPORTS_OBJECT_REFERENCED;
|
|
360
|
+
case 'normal-reexport': {
|
|
361
|
+
const referencedExports = [];
|
|
362
|
+
for (const { ids, exportInfo, hidden } of mode.items) {
|
|
363
|
+
if (hidden)
|
|
364
|
+
continue;
|
|
365
|
+
(0, processExportInfo_1.default)(runtime, referencedExports, ids, exportInfo, false);
|
|
366
|
+
}
|
|
367
|
+
return referencedExports;
|
|
368
|
+
}
|
|
369
|
+
default:
|
|
370
|
+
throw new Error(`Unknown mode ${mode.type}`);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
_discoverActiveExportsFromOtherStarExports(moduleGraph) {
|
|
374
|
+
if (!this.otherStarExports)
|
|
375
|
+
return undefined;
|
|
376
|
+
const i = 'length' in this.otherStarExports
|
|
377
|
+
? this.otherStarExports.length
|
|
378
|
+
: (0, IterableHelpers_1.countIterable)(this.otherStarExports);
|
|
379
|
+
if (i === 0)
|
|
380
|
+
return undefined;
|
|
381
|
+
if (this.allStarExports) {
|
|
382
|
+
const { names, dependencyIndices } = moduleGraph.cached(determineExportAssignments, this.allStarExports.dependencies);
|
|
383
|
+
return {
|
|
384
|
+
names,
|
|
385
|
+
namesSlice: dependencyIndices[i - 1],
|
|
386
|
+
dependencyIndices,
|
|
387
|
+
dependencyIndex: i,
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
const { names, dependencyIndices } = moduleGraph.cached(determineExportAssignments, this.otherStarExports, this);
|
|
391
|
+
return {
|
|
392
|
+
names,
|
|
393
|
+
namesSlice: dependencyIndices[i - 1],
|
|
394
|
+
dependencyIndices,
|
|
395
|
+
dependencyIndex: i,
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
getExports(moduleGraph) {
|
|
399
|
+
const mode = this.getMode(moduleGraph, undefined);
|
|
400
|
+
switch (mode.type) {
|
|
401
|
+
case 'missing':
|
|
402
|
+
return undefined;
|
|
403
|
+
case 'dynamic-reexport': {
|
|
404
|
+
const from = moduleGraph.getConnection(this);
|
|
405
|
+
return {
|
|
406
|
+
exports: true,
|
|
407
|
+
from,
|
|
408
|
+
canMangle: false,
|
|
409
|
+
excludeExports: mode.hidden ? (0, SetHelpers_1.combine)(mode.ignored, mode.hidden) : mode.ignored,
|
|
410
|
+
hideExports: mode.hidden,
|
|
411
|
+
dependencies: [from.module],
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
case 'empty-star':
|
|
415
|
+
return {
|
|
416
|
+
exports: [],
|
|
417
|
+
hideExports: mode.hidden,
|
|
418
|
+
dependencies: [moduleGraph.getModule(this)],
|
|
419
|
+
};
|
|
420
|
+
// falls through
|
|
421
|
+
case 'normal-reexport': {
|
|
422
|
+
const from = moduleGraph.getConnection(this);
|
|
423
|
+
return {
|
|
424
|
+
exports: Array.from(mode.items, (item) => ({
|
|
425
|
+
name: item.name,
|
|
426
|
+
from,
|
|
427
|
+
export: item.ids,
|
|
428
|
+
hidden: item.hidden,
|
|
429
|
+
})),
|
|
430
|
+
priority: 1,
|
|
431
|
+
dependencies: [from.module],
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
case 'reexport-dynamic-default': {
|
|
435
|
+
const from = moduleGraph.getConnection(this);
|
|
436
|
+
return {
|
|
437
|
+
exports: [
|
|
438
|
+
{
|
|
439
|
+
name: mode.name,
|
|
440
|
+
from,
|
|
441
|
+
export: ['default'],
|
|
442
|
+
},
|
|
443
|
+
],
|
|
444
|
+
priority: 1,
|
|
445
|
+
dependencies: [from.module],
|
|
446
|
+
};
|
|
447
|
+
}
|
|
448
|
+
case 'reexport-undefined':
|
|
449
|
+
return {
|
|
450
|
+
exports: [mode.name],
|
|
451
|
+
dependencies: [moduleGraph.getModule(this)],
|
|
452
|
+
};
|
|
453
|
+
case 'reexport-fake-namespace-object': {
|
|
454
|
+
const from = moduleGraph.getConnection(this);
|
|
455
|
+
return {
|
|
456
|
+
exports: [
|
|
457
|
+
{
|
|
458
|
+
name: mode.name,
|
|
459
|
+
from,
|
|
460
|
+
export: null,
|
|
461
|
+
exports: [
|
|
462
|
+
{
|
|
463
|
+
name: 'default',
|
|
464
|
+
canMangle: false,
|
|
465
|
+
from,
|
|
466
|
+
export: null,
|
|
467
|
+
},
|
|
468
|
+
],
|
|
469
|
+
},
|
|
470
|
+
],
|
|
471
|
+
priority: 1,
|
|
472
|
+
dependencies: [from.module],
|
|
473
|
+
};
|
|
474
|
+
}
|
|
475
|
+
case 'reexport-namespace-object': {
|
|
476
|
+
const from = moduleGraph.getConnection(this);
|
|
477
|
+
return {
|
|
478
|
+
exports: [
|
|
479
|
+
{
|
|
480
|
+
name: mode.name,
|
|
481
|
+
from,
|
|
482
|
+
export: null,
|
|
483
|
+
},
|
|
484
|
+
],
|
|
485
|
+
priority: 1,
|
|
486
|
+
dependencies: [from.module],
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
case 'reexport-named-default': {
|
|
490
|
+
const from = moduleGraph.getConnection(this);
|
|
491
|
+
return {
|
|
492
|
+
exports: [
|
|
493
|
+
{
|
|
494
|
+
name: mode.name,
|
|
495
|
+
from,
|
|
496
|
+
export: ['default'],
|
|
497
|
+
},
|
|
498
|
+
],
|
|
499
|
+
priority: 1,
|
|
500
|
+
dependencies: [from.module],
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
default:
|
|
504
|
+
throw new Error(`Unknown mode ${mode.type}`);
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
_getEffectiveExportPresenceLevel(moduleGraph) {
|
|
508
|
+
if (this.exportPresenceMode !== HarmonyImportDependency_1.ExportPresenceModes.AUTO)
|
|
509
|
+
return this.exportPresenceMode;
|
|
510
|
+
return moduleGraph.getParentModule(this).buildMeta.strictHarmonyModule
|
|
511
|
+
? HarmonyImportDependency_1.ExportPresenceModes.ERROR
|
|
512
|
+
: HarmonyImportDependency_1.ExportPresenceModes.WARN;
|
|
513
|
+
}
|
|
514
|
+
getWarnings(moduleGraph) {
|
|
515
|
+
const exportsPresence = this._getEffectiveExportPresenceLevel(moduleGraph);
|
|
516
|
+
if (exportsPresence === HarmonyImportDependency_1.ExportPresenceModes.WARN) {
|
|
517
|
+
return this._getErrors(moduleGraph);
|
|
518
|
+
}
|
|
519
|
+
return null;
|
|
520
|
+
}
|
|
521
|
+
getErrors(moduleGraph) {
|
|
522
|
+
const exportsPresence = this._getEffectiveExportPresenceLevel(moduleGraph);
|
|
523
|
+
if (exportsPresence === HarmonyImportDependency_1.ExportPresenceModes.ERROR) {
|
|
524
|
+
return this._getErrors(moduleGraph);
|
|
525
|
+
}
|
|
526
|
+
return null;
|
|
527
|
+
}
|
|
528
|
+
_getErrors(moduleGraph) {
|
|
529
|
+
const ids = this.getIds(moduleGraph);
|
|
530
|
+
let errors = this.getLinkingErrors(moduleGraph, ids, `(reexported as '${this.name}')`);
|
|
531
|
+
if (ids.length === 0 && this.name === null) {
|
|
532
|
+
const potentialConflicts = this._discoverActiveExportsFromOtherStarExports(moduleGraph);
|
|
533
|
+
if (potentialConflicts && potentialConflicts.namesSlice > 0) {
|
|
534
|
+
const ownNames = new Set(potentialConflicts.names.slice(potentialConflicts.namesSlice, potentialConflicts.dependencyIndices[potentialConflicts.dependencyIndex]));
|
|
535
|
+
const importedModule = moduleGraph.getModule(this);
|
|
536
|
+
if (importedModule) {
|
|
537
|
+
const exportsInfo = moduleGraph.getExportsInfo(importedModule);
|
|
538
|
+
const conflicts = new Map();
|
|
539
|
+
for (const exportInfo of exportsInfo.orderedExports) {
|
|
540
|
+
if (exportInfo.provided !== true)
|
|
541
|
+
continue;
|
|
542
|
+
if (exportInfo.name === 'default')
|
|
543
|
+
continue;
|
|
544
|
+
if (this.activeExports.has(exportInfo.name))
|
|
545
|
+
continue;
|
|
546
|
+
if (ownNames.has(exportInfo.name))
|
|
547
|
+
continue;
|
|
548
|
+
const conflictingDependency = findDependencyForName(potentialConflicts, exportInfo.name, this.allStarExports
|
|
549
|
+
? this.allStarExports.dependencies
|
|
550
|
+
: [...this.otherStarExports, this]);
|
|
551
|
+
if (!conflictingDependency)
|
|
552
|
+
continue;
|
|
553
|
+
const target = exportInfo.getTerminalBinding(moduleGraph);
|
|
554
|
+
if (!target)
|
|
555
|
+
continue;
|
|
556
|
+
const conflictingModule = moduleGraph.getModule(conflictingDependency);
|
|
557
|
+
if (conflictingModule === importedModule)
|
|
558
|
+
continue;
|
|
559
|
+
const conflictingExportInfo = moduleGraph.getExportInfo(conflictingModule, exportInfo.name);
|
|
560
|
+
const conflictingTarget = conflictingExportInfo.getTerminalBinding(moduleGraph);
|
|
561
|
+
if (!conflictingTarget)
|
|
562
|
+
continue;
|
|
563
|
+
if (target === conflictingTarget)
|
|
564
|
+
continue;
|
|
565
|
+
const list = conflicts.get(conflictingDependency.request);
|
|
566
|
+
if (list === undefined) {
|
|
567
|
+
conflicts.set(conflictingDependency.request, [exportInfo.name]);
|
|
568
|
+
}
|
|
569
|
+
else {
|
|
570
|
+
list.push(exportInfo.name);
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
for (const [request, exports] of conflicts) {
|
|
574
|
+
if (!errors)
|
|
575
|
+
errors = [];
|
|
576
|
+
errors.push(new HarmonyLinkingError_1.default(`The requested module '${this.request}' contains conflicting star exports for the ${exports.length > 1 ? 'names' : 'name'} ${exports
|
|
577
|
+
.map(e => `'${e}'`)
|
|
578
|
+
.join(', ')} with the previous requested module '${request}'`));
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
return errors;
|
|
584
|
+
}
|
|
585
|
+
serialize(context) {
|
|
586
|
+
const { write, setCircularReference } = context;
|
|
587
|
+
setCircularReference(this);
|
|
588
|
+
write(this.ids);
|
|
589
|
+
write(this.name);
|
|
590
|
+
write(this.activeExports);
|
|
591
|
+
write(this.otherStarExports);
|
|
592
|
+
write(this.exportPresenceMode);
|
|
593
|
+
write(this.allStarExports);
|
|
594
|
+
super.serialize(context);
|
|
595
|
+
}
|
|
596
|
+
deserialize(context) {
|
|
597
|
+
const { read, setCircularReference } = context;
|
|
598
|
+
setCircularReference(this);
|
|
599
|
+
this.ids = read();
|
|
600
|
+
this.name = read();
|
|
601
|
+
this.activeExports = read();
|
|
602
|
+
this.otherStarExports = read();
|
|
603
|
+
this.exportPresenceMode = read();
|
|
604
|
+
this.allStarExports = read();
|
|
605
|
+
super.deserialize(context);
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
exports.HarmonyExportImportedSpecifierDependency = HarmonyExportImportedSpecifierDependency;
|
|
609
|
+
(0, makeSerializable_1.default)(HarmonyExportImportedSpecifierDependency, 'mp-compiler/core/dependencies/HarmonyExportImportedSpecifierDependency');
|
|
610
|
+
HarmonyExportImportedSpecifierDependency.Template = class HarmonyExportImportedSpecifierDependencyTemplate extends (HarmonyImportDependency_1.HarmonyImportDependency.Template) {
|
|
611
|
+
apply(dependency, source, templateContext) {
|
|
612
|
+
const { moduleGraph, runtime, concatenationScope } = templateContext;
|
|
613
|
+
const dep = dependency;
|
|
614
|
+
const mode = dep.getMode(moduleGraph, runtime);
|
|
615
|
+
if (concatenationScope) {
|
|
616
|
+
switch (mode.type) {
|
|
617
|
+
case 'reexport-undefined':
|
|
618
|
+
concatenationScope.registerRawExport(mode.name, '/* reexport non-default export from non-harmony */ undefined');
|
|
619
|
+
}
|
|
620
|
+
return;
|
|
621
|
+
}
|
|
622
|
+
if (mode.type !== 'unused' && mode.type !== 'empty-star') {
|
|
623
|
+
super.apply(dependency, source, templateContext);
|
|
624
|
+
this._addExportFragments(templateContext.initFragments, dep, mode, templateContext.module, moduleGraph, runtime, templateContext.runtimeTemplate, templateContext.runtimeRequirements);
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
_addExportFragments(initFragments, dep, mode, module, moduleGraph, runtime, runtimeTemplate, runtimeRequirements) {
|
|
628
|
+
const importedModule = moduleGraph.getModule(dep);
|
|
629
|
+
const importVar = dep.getImportVar(moduleGraph);
|
|
630
|
+
switch (mode.type) {
|
|
631
|
+
case 'missing':
|
|
632
|
+
case 'empty-star':
|
|
633
|
+
initFragments.push(new InitFragment_1.default('/* empty/unused harmony star reexport */\n', InitFragment_1.default.STAGE_HARMONY_EXPORTS, 1));
|
|
634
|
+
break;
|
|
635
|
+
case 'unused':
|
|
636
|
+
initFragments.push(new InitFragment_1.default(`${Template_1.Template.toNormalComment(`unused harmony reexport ${mode.name}`)}\n`, InitFragment_1.default.STAGE_HARMONY_EXPORTS, 1));
|
|
637
|
+
break;
|
|
638
|
+
case 'reexport-dynamic-default':
|
|
639
|
+
initFragments.push(this.getReexportFragment(module, 'reexport default from dynamic', moduleGraph.getExportsInfo(module).getUsedName(mode.name, runtime), importVar, null, runtimeRequirements));
|
|
640
|
+
break;
|
|
641
|
+
case 'reexport-fake-namespace-object':
|
|
642
|
+
initFragments.push(...this.getReexportFakeNamespaceObjectFragments(module, moduleGraph.getExportsInfo(module).getUsedName(mode.name, runtime), importVar, mode.fakeType, runtimeRequirements));
|
|
643
|
+
break;
|
|
644
|
+
case 'reexport-undefined':
|
|
645
|
+
initFragments.push(this.getReexportFragment(module, 'reexport non-default export from non-harmony', moduleGraph.getExportsInfo(module).getUsedName(mode.name, runtime), 'undefined', '', runtimeRequirements));
|
|
646
|
+
break;
|
|
647
|
+
case 'reexport-named-default':
|
|
648
|
+
initFragments.push(this.getReexportFragment(module, 'reExport = export from named module', moduleGraph.getExportsInfo(module).getUsedName(mode.name, runtime), importVar, '', runtimeRequirements));
|
|
649
|
+
break;
|
|
650
|
+
case 'reexport-namespace-object':
|
|
651
|
+
initFragments.push(this.getReexportFragment(module, 'reexport module object', moduleGraph.getExportsInfo(module).getUsedName(mode.name, runtime), importVar, '', runtimeRequirements));
|
|
652
|
+
break;
|
|
653
|
+
case 'normal-reexport':
|
|
654
|
+
for (const { name, ids, checked, hidden } of mode.items) {
|
|
655
|
+
if (hidden)
|
|
656
|
+
continue;
|
|
657
|
+
if (checked) {
|
|
658
|
+
initFragments.push(new InitFragment_1.default(`/* harmony reexport (checked) */ ${this.getConditionalReexportStatement(module, name, importVar, ids, runtimeRequirements)}`, moduleGraph.isAsync(importedModule)
|
|
659
|
+
? InitFragment_1.default.STAGE_ASYNC_HARMONY_IMPORTS
|
|
660
|
+
: InitFragment_1.default.STAGE_HARMONY_IMPORTS, dep.sourceOrder));
|
|
661
|
+
}
|
|
662
|
+
else {
|
|
663
|
+
initFragments.push(this.getReexportFragment(module, 'reexport safe', moduleGraph.getExportsInfo(module).getUsedName(name, runtime), importVar, moduleGraph.getExportsInfo(importedModule).getUsedName(ids, runtime), runtimeRequirements));
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
break;
|
|
667
|
+
case 'dynamic-reexport': {
|
|
668
|
+
const ignored = mode.hidden ? (0, SetHelpers_1.combine)(mode.ignored, mode.hidden) : mode.ignored;
|
|
669
|
+
const modern = runtimeTemplate.supportsConst() && runtimeTemplate.supportsArrowFunction();
|
|
670
|
+
let content = '/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};\n' +
|
|
671
|
+
`/* harmony reexport (unknown) */ for(${modern ? 'const' : 'var'} __WEBPACK_IMPORT_KEY__ in ${importVar}) `;
|
|
672
|
+
// Filter out exports which are defined by other exports
|
|
673
|
+
// and filter out default export because it cannot be reexported with *
|
|
674
|
+
if (ignored.size > 1) {
|
|
675
|
+
content +=
|
|
676
|
+
`if(${JSON.stringify(Array.from(ignored))}.indexOf(__WEBPACK_IMPORT_KEY__) < 0) `;
|
|
677
|
+
}
|
|
678
|
+
else if (ignored.size === 1) {
|
|
679
|
+
content += `if(__WEBPACK_IMPORT_KEY__ !== ${JSON.stringify((0, SetHelpers_1.first)(ignored))}) `;
|
|
680
|
+
}
|
|
681
|
+
content += `__WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = `;
|
|
682
|
+
if (modern) {
|
|
683
|
+
content += `() => ${importVar}[__WEBPACK_IMPORT_KEY__]`;
|
|
684
|
+
}
|
|
685
|
+
else {
|
|
686
|
+
content += `function(key) { return ${importVar}[key]; }.bind(0, __WEBPACK_IMPORT_KEY__)`;
|
|
687
|
+
}
|
|
688
|
+
runtimeRequirements.add(RuntimeGlobals.exports);
|
|
689
|
+
runtimeRequirements.add(RuntimeGlobals.definePropertyGetters);
|
|
690
|
+
const exportsName = module.exportsArgument;
|
|
691
|
+
initFragments.push(new InitFragment_1.default(`${content}\n/* harmony reexport (unknown) */ ${RuntimeGlobals.definePropertyGetters}(${exportsName}, __WEBPACK_REEXPORT_OBJECT__);\n`, moduleGraph.isAsync(importedModule)
|
|
692
|
+
? InitFragment_1.default.STAGE_ASYNC_HARMONY_IMPORTS
|
|
693
|
+
: InitFragment_1.default.STAGE_HARMONY_IMPORTS, dep.sourceOrder));
|
|
694
|
+
break;
|
|
695
|
+
}
|
|
696
|
+
default:
|
|
697
|
+
throw new Error(`Unknown mode ${mode.type}`);
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
getReexportFragment(module, comment, key, name, valueKey, runtimeRequirements) {
|
|
701
|
+
const returnValue = this.getReturnValue(name, valueKey);
|
|
702
|
+
runtimeRequirements.add(RuntimeGlobals.exports);
|
|
703
|
+
runtimeRequirements.add(RuntimeGlobals.definePropertyGetters);
|
|
704
|
+
const map = new Map();
|
|
705
|
+
map.set(key, `/* ${comment} */ ${returnValue}`);
|
|
706
|
+
return new HarmonyExportInitFragment_1.default(module.exportsArgument, map);
|
|
707
|
+
}
|
|
708
|
+
getReexportFakeNamespaceObjectFragments(module, key, name, fakeType, runtimeRequirements) {
|
|
709
|
+
runtimeRequirements.add(RuntimeGlobals.exports);
|
|
710
|
+
runtimeRequirements.add(RuntimeGlobals.definePropertyGetters);
|
|
711
|
+
runtimeRequirements.add(RuntimeGlobals.createFakeNamespaceObject);
|
|
712
|
+
const map = new Map();
|
|
713
|
+
map.set(key, `/* reexport fake namespace object from non-harmony */ ${name}_namespace_cache || (${name}_namespace_cache = ${RuntimeGlobals.createFakeNamespaceObject}(${name}${fakeType ? `, ${fakeType}` : ''}))`);
|
|
714
|
+
return [
|
|
715
|
+
new InitFragment_1.default(`var ${name}_namespace_cache;\n`, InitFragment_1.default.STAGE_CONSTANTS, -1, `${name}_namespace_cache`),
|
|
716
|
+
new HarmonyExportInitFragment_1.default(module.exportsArgument, map),
|
|
717
|
+
];
|
|
718
|
+
}
|
|
719
|
+
getConditionalReexportStatement(module, key, name, valueKey, runtimeRequirements) {
|
|
720
|
+
if (valueKey === false) {
|
|
721
|
+
return '/* unused export */\n';
|
|
722
|
+
}
|
|
723
|
+
const exportsName = module.exportsArgument;
|
|
724
|
+
const returnValue = this.getReturnValue(name, valueKey);
|
|
725
|
+
runtimeRequirements.add(RuntimeGlobals.exports);
|
|
726
|
+
runtimeRequirements.add(RuntimeGlobals.definePropertyGetters);
|
|
727
|
+
runtimeRequirements.add(RuntimeGlobals.hasOwnProperty);
|
|
728
|
+
return `if(${RuntimeGlobals.hasOwnProperty}(${name}, ${JSON.stringify(valueKey[0])})) ${RuntimeGlobals.definePropertyGetters}(${exportsName}, { ${(0, propertyName_1.propertyName)(key)}: function() { return ${returnValue}; } });\n`;
|
|
729
|
+
}
|
|
730
|
+
getReturnValue(name, valueKey) {
|
|
731
|
+
if (valueKey === null) {
|
|
732
|
+
return `${name}_default.a`;
|
|
733
|
+
}
|
|
734
|
+
if (valueKey === '') {
|
|
735
|
+
return name;
|
|
736
|
+
}
|
|
737
|
+
if (valueKey === false) {
|
|
738
|
+
return '/* unused export */ undefined';
|
|
739
|
+
}
|
|
740
|
+
return `${name}${(0, propertyAccess_1.default)(valueKey)}`;
|
|
741
|
+
}
|
|
742
|
+
};
|
|
743
|
+
class HarmonyStarExportsList {
|
|
744
|
+
constructor() {
|
|
745
|
+
this.dependencies = [];
|
|
746
|
+
}
|
|
747
|
+
push(dep) {
|
|
748
|
+
this.dependencies.push(dep);
|
|
749
|
+
}
|
|
750
|
+
slice() {
|
|
751
|
+
return this.dependencies.slice();
|
|
752
|
+
}
|
|
753
|
+
serialize({ write, setCircularReference }) {
|
|
754
|
+
setCircularReference(this);
|
|
755
|
+
write(this.dependencies);
|
|
756
|
+
}
|
|
757
|
+
deserialize({ read, setCircularReference }) {
|
|
758
|
+
setCircularReference(this);
|
|
759
|
+
this.dependencies = read();
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
exports.HarmonyStarExportsList = HarmonyStarExportsList;
|
|
763
|
+
(0, makeSerializable_1.default)(HarmonyStarExportsList, 'mp-compiler/core/dependencies/HarmonyExportImportedSpecifierDependency', 'HarmonyStarExportsList');
|