@module-federation/enhanced 2.1.0 → 2.2.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/dist/CHANGELOG.md +2357 -0
- package/dist/README.md +213 -0
- package/dist/rstestmigrate.md +140 -0
- package/dist/src/_virtual/_rolldown/runtime.js +47 -0
- package/dist/src/index.d.ts +22 -19
- package/dist/src/index.js +47 -43
- package/dist/src/index.js.map +1 -1
- package/dist/src/lib/Constants.d.ts +25 -29
- package/dist/src/lib/Constants.js +136 -116
- package/dist/src/lib/Constants.js.map +1 -1
- package/dist/src/lib/container/AsyncBoundaryPlugin.d.ts +20 -16
- package/dist/src/lib/container/AsyncBoundaryPlugin.js +137 -200
- package/dist/src/lib/container/AsyncBoundaryPlugin.js.map +1 -1
- package/dist/src/lib/container/ContainerEntryDependency.d.ts +28 -23
- package/dist/src/lib/container/ContainerEntryDependency.js +39 -39
- package/dist/src/lib/container/ContainerEntryDependency.js.map +1 -1
- package/dist/src/lib/container/ContainerEntryModule.d.ts +93 -84
- package/dist/src/lib/container/ContainerEntryModule.js +219 -234
- package/dist/src/lib/container/ContainerEntryModule.js.map +1 -1
- package/dist/src/lib/container/ContainerEntryModuleFactory.d.ts +15 -10
- package/dist/src/lib/container/ContainerEntryModuleFactory.js +21 -25
- package/dist/src/lib/container/ContainerEntryModuleFactory.js.map +1 -1
- package/dist/src/lib/container/ContainerExposedDependency.d.ts +29 -24
- package/dist/src/lib/container/ContainerExposedDependency.js +47 -47
- package/dist/src/lib/container/ContainerExposedDependency.js.map +1 -1
- package/dist/src/lib/container/ContainerPlugin.d.ts +12 -8
- package/dist/src/lib/container/ContainerPlugin.js +147 -211
- package/dist/src/lib/container/ContainerPlugin.js.map +1 -1
- package/dist/src/lib/container/ContainerReferencePlugin.d.ts +16 -12
- package/dist/src/lib/container/ContainerReferencePlugin.js +74 -102
- package/dist/src/lib/container/ContainerReferencePlugin.js.map +1 -1
- package/dist/src/lib/container/FallbackDependency.d.ts +24 -19
- package/dist/src/lib/container/FallbackDependency.js +46 -44
- package/dist/src/lib/container/FallbackDependency.js.map +1 -1
- package/dist/src/lib/container/FallbackItemDependency.d.ts +13 -8
- package/dist/src/lib/container/FallbackItemDependency.js +24 -24
- package/dist/src/lib/container/FallbackItemDependency.js.map +1 -1
- package/dist/src/lib/container/FallbackModule.d.ts +82 -71
- package/dist/src/lib/container/FallbackModule.js +133 -145
- package/dist/src/lib/container/FallbackModule.js.map +1 -1
- package/dist/src/lib/container/FallbackModuleFactory.d.ts +15 -10
- package/dist/src/lib/container/FallbackModuleFactory.js +20 -24
- package/dist/src/lib/container/FallbackModuleFactory.js.map +1 -1
- package/dist/src/lib/container/HoistContainerReferencesPlugin.d.ts +11 -7
- package/dist/src/lib/container/HoistContainerReferencesPlugin.js +125 -188
- package/dist/src/lib/container/HoistContainerReferencesPlugin.js.map +1 -1
- package/dist/src/lib/container/ModuleFederationPlugin.d.ts +20 -16
- package/dist/src/lib/container/ModuleFederationPlugin.js +143 -181
- package/dist/src/lib/container/ModuleFederationPlugin.js.map +1 -1
- package/dist/src/lib/container/RemoteModule.d.ts +79 -74
- package/dist/src/lib/container/RemoteModule.js +143 -153
- package/dist/src/lib/container/RemoteModule.js.map +1 -1
- package/dist/src/lib/container/RemoteRuntimeModule.d.ts +12 -7
- package/dist/src/lib/container/RemoteRuntimeModule.js +86 -132
- package/dist/src/lib/container/RemoteRuntimeModule.js.map +1 -1
- package/dist/src/lib/container/RemoteToExternalDependency.d.ts +13 -8
- package/dist/src/lib/container/RemoteToExternalDependency.js +25 -23
- package/dist/src/lib/container/RemoteToExternalDependency.js.map +1 -1
- package/dist/src/lib/container/constant.d.ts +3 -0
- package/dist/src/lib/container/constant.js +11 -14
- package/dist/src/lib/container/constant.js.map +1 -1
- package/dist/src/lib/container/options.d.ts +7 -3
- package/dist/src/lib/container/options.js +51 -69
- package/dist/src/lib/container/options.js.map +1 -1
- package/dist/src/lib/container/runtime/EmbedFederationRuntimeModule.d.ts +14 -9
- package/dist/src/lib/container/runtime/EmbedFederationRuntimeModule.js +56 -64
- package/dist/src/lib/container/runtime/EmbedFederationRuntimeModule.js.map +1 -1
- package/dist/src/lib/container/runtime/EmbedFederationRuntimePlugin.d.ts +23 -19
- package/dist/src/lib/container/runtime/EmbedFederationRuntimePlugin.js +71 -101
- package/dist/src/lib/container/runtime/EmbedFederationRuntimePlugin.js.map +1 -1
- package/dist/src/lib/container/runtime/FederationModulesPlugin.d.ts +20 -16
- package/dist/src/lib/container/runtime/FederationModulesPlugin.js +55 -47
- package/dist/src/lib/container/runtime/FederationModulesPlugin.js.map +1 -1
- package/dist/src/lib/container/runtime/FederationRuntimeDependency.d.ts +9 -4
- package/dist/src/lib/container/runtime/FederationRuntimeDependency.js +16 -12
- package/dist/src/lib/container/runtime/FederationRuntimeDependency.js.map +1 -1
- package/dist/src/lib/container/runtime/FederationRuntimeModule.d.ts +16 -11
- package/dist/src/lib/container/runtime/FederationRuntimeModule.js +39 -46
- package/dist/src/lib/container/runtime/FederationRuntimeModule.js.map +1 -1
- package/dist/src/lib/container/runtime/FederationRuntimePlugin.d.ts +31 -20
- package/dist/src/lib/container/runtime/FederationRuntimePlugin.js +265 -358
- package/dist/src/lib/container/runtime/FederationRuntimePlugin.js.map +1 -1
- package/dist/src/lib/container/runtime/getFederationGlobal.d.ts +9 -4
- package/dist/src/lib/container/runtime/getFederationGlobal.js +43 -41
- package/dist/src/lib/container/runtime/getFederationGlobal.js.map +1 -1
- package/dist/src/lib/container/runtime/utils.d.ts +24 -13
- package/dist/src/lib/container/runtime/utils.js +83 -101
- package/dist/src/lib/container/runtime/utils.js.map +1 -1
- package/dist/src/lib/sharing/ConsumeSharedFallbackDependency.d.ts +15 -10
- package/dist/src/lib/sharing/ConsumeSharedFallbackDependency.js +27 -25
- package/dist/src/lib/sharing/ConsumeSharedFallbackDependency.js.map +1 -1
- package/dist/src/lib/sharing/ConsumeSharedModule.d.ts +77 -68
- package/dist/src/lib/sharing/ConsumeSharedModule.js +186 -214
- package/dist/src/lib/sharing/ConsumeSharedModule.js.map +1 -1
- package/dist/src/lib/sharing/ConsumeSharedPlugin.d.ts +13 -9
- package/dist/src/lib/sharing/ConsumeSharedPlugin.js +308 -475
- package/dist/src/lib/sharing/ConsumeSharedPlugin.js.map +1 -1
- package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.d.ts +16 -11
- package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.js +107 -137
- package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.js.map +1 -1
- package/dist/src/lib/sharing/ProvideForSharedDependency.d.ts +14 -9
- package/dist/src/lib/sharing/ProvideForSharedDependency.js +25 -25
- package/dist/src/lib/sharing/ProvideForSharedDependency.js.map +1 -1
- package/dist/src/lib/sharing/ProvideSharedDependency.d.ts +44 -39
- package/dist/src/lib/sharing/ProvideSharedDependency.js +72 -76
- package/dist/src/lib/sharing/ProvideSharedDependency.js.map +1 -1
- package/dist/src/lib/sharing/ProvideSharedModule.d.ts +91 -82
- package/dist/src/lib/sharing/ProvideSharedModule.js +177 -184
- package/dist/src/lib/sharing/ProvideSharedModule.js.map +1 -1
- package/dist/src/lib/sharing/ProvideSharedModuleFactory.d.ts +14 -9
- package/dist/src/lib/sharing/ProvideSharedModuleFactory.js +19 -25
- package/dist/src/lib/sharing/ProvideSharedModuleFactory.js.map +1 -1
- package/dist/src/lib/sharing/ProvideSharedPlugin.d.ts +27 -21
- package/dist/src/lib/sharing/ProvideSharedPlugin.js +341 -550
- package/dist/src/lib/sharing/ProvideSharedPlugin.js.map +1 -1
- package/dist/src/lib/sharing/SharePlugin.d.ts +53 -49
- package/dist/src/lib/sharing/SharePlugin.js +86 -100
- package/dist/src/lib/sharing/SharePlugin.js.map +1 -1
- package/dist/src/lib/sharing/ShareRuntimeModule.d.ts +12 -7
- package/dist/src/lib/sharing/ShareRuntimeModule.js +81 -103
- package/dist/src/lib/sharing/ShareRuntimeModule.js.map +1 -1
- package/dist/src/lib/sharing/resolveMatchedConfigs.d.ts +11 -7
- package/dist/src/lib/sharing/resolveMatchedConfigs.js +58 -71
- package/dist/src/lib/sharing/resolveMatchedConfigs.js.map +1 -1
- package/dist/src/lib/sharing/tree-shaking/CollectSharedEntryPlugin.d.ts +18 -14
- package/dist/src/lib/sharing/tree-shaking/CollectSharedEntryPlugin.js +74 -128
- package/dist/src/lib/sharing/tree-shaking/CollectSharedEntryPlugin.js.map +1 -1
- package/dist/src/lib/sharing/tree-shaking/IndependentSharedPlugin.d.ts +39 -34
- package/dist/src/lib/sharing/tree-shaking/IndependentSharedPlugin.js +234 -328
- package/dist/src/lib/sharing/tree-shaking/IndependentSharedPlugin.js.map +1 -1
- package/dist/src/lib/sharing/tree-shaking/IndependentSharedRuntimeModule.d.ts +16 -11
- package/dist/src/lib/sharing/tree-shaking/IndependentSharedRuntimeModule.js +30 -28
- package/dist/src/lib/sharing/tree-shaking/IndependentSharedRuntimeModule.js.map +1 -1
- package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedContainerPlugin.d.ts +28 -24
- package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedContainerPlugin.js +91 -95
- package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedContainerPlugin.js.map +1 -1
- package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedDependency.d.ts +29 -24
- package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedDependency.js +47 -43
- package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedDependency.js.map +1 -1
- package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedEntryDependency.d.ts +20 -15
- package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedEntryDependency.js +33 -29
- package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedEntryDependency.js.map +1 -1
- package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedEntryModule.d.ts +85 -77
- package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedEntryModule.js +141 -153
- package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedEntryModule.js.map +1 -1
- package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedEntryModuleFactory.d.ts +15 -10
- package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedEntryModuleFactory.js +20 -24
- package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedEntryModuleFactory.js.map +1 -1
- package/dist/src/lib/sharing/tree-shaking/SharedUsedExportsOptimizerPlugin.d.ts +21 -16
- package/dist/src/lib/sharing/tree-shaking/SharedUsedExportsOptimizerPlugin.js +157 -231
- package/dist/src/lib/sharing/tree-shaking/SharedUsedExportsOptimizerPlugin.js.map +1 -1
- package/dist/src/lib/sharing/tree-shaking/SharedUsedExportsOptimizerRuntimeModule.d.ts +14 -9
- package/dist/src/lib/sharing/tree-shaking/SharedUsedExportsOptimizerRuntimeModule.js +26 -27
- package/dist/src/lib/sharing/tree-shaking/SharedUsedExportsOptimizerRuntimeModule.js.map +1 -1
- package/dist/src/lib/sharing/tree-shaking/TreeShakingSharedPlugin.d.ts +18 -13
- package/dist/src/lib/sharing/tree-shaking/TreeShakingSharedPlugin.js +41 -49
- package/dist/src/lib/sharing/tree-shaking/TreeShakingSharedPlugin.js.map +1 -1
- package/dist/src/lib/sharing/utils.d.ts +27 -24
- package/dist/src/lib/sharing/utils.js +224 -367
- package/dist/src/lib/sharing/utils.js.map +1 -1
- package/dist/src/lib/startup/MfStartupChunkDependenciesPlugin.d.ts +11 -7
- package/dist/src/lib/startup/MfStartupChunkDependenciesPlugin.js +56 -75
- package/dist/src/lib/startup/MfStartupChunkDependenciesPlugin.js.map +1 -1
- package/dist/src/lib/startup/StartupHelpers.d.ts +11 -6
- package/dist/src/lib/startup/StartupHelpers.js +128 -178
- package/dist/src/lib/startup/StartupHelpers.js.map +1 -1
- package/dist/src/prefetch.d.ts +3 -2
- package/dist/src/prefetch.js +17 -8
- package/dist/src/rspack.d.ts +3 -2
- package/dist/src/rspack.js +35 -11
- package/dist/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.d.ts +8 -4
- package/dist/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.js +19 -16
- package/dist/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.js.map +1 -1
- package/dist/src/runtime.d.ts +1 -1
- package/dist/src/runtime.js +11 -18
- package/dist/src/schemas/container/ContainerPlugin.check.d.ts +13 -5
- package/dist/src/schemas/container/ContainerPlugin.check.js +958 -1218
- package/dist/src/schemas/container/ContainerPlugin.check.js.map +1 -1
- package/dist/src/schemas/container/ContainerPlugin.d.ts +271 -268
- package/dist/src/schemas/container/ContainerPlugin.js +273 -361
- package/dist/src/schemas/container/ContainerPlugin.js.map +1 -1
- package/dist/src/schemas/container/ContainerReferencePlugin.check.d.ts +13 -5
- package/dist/src/schemas/container/ContainerReferencePlugin.check.js +335 -443
- package/dist/src/schemas/container/ContainerReferencePlugin.check.js.map +1 -1
- package/dist/src/schemas/container/ContainerReferencePlugin.d.ts +102 -99
- package/dist/src/schemas/container/ContainerReferencePlugin.js +122 -162
- package/dist/src/schemas/container/ContainerReferencePlugin.js.map +1 -1
- package/dist/src/schemas/container/ExternalsType.check.d.ts +13 -5
- package/dist/src/schemas/container/ExternalsType.check.js +36 -62
- package/dist/src/schemas/container/ExternalsType.check.js.map +1 -1
- package/dist/src/schemas/container/ExternalsType.d.ts +5 -2
- package/dist/src/schemas/container/ExternalsType.js +8 -11
- package/dist/src/schemas/container/ExternalsType.js.map +1 -1
- package/dist/src/schemas/container/ModuleFederationPlugin.check.js +3001 -4812
- package/dist/src/schemas/container/ModuleFederationPlugin.check.js.map +1 -1
- package/dist/src/schemas/container/ModuleFederationPlugin.d.ts +819 -814
- package/dist/src/schemas/container/ModuleFederationPlugin.js +780 -1053
- package/dist/src/schemas/container/ModuleFederationPlugin.js.map +1 -1
- package/dist/src/schemas/sharing/ConsumeSharedPlugin.check.d.ts +13 -5
- package/dist/src/schemas/sharing/ConsumeSharedPlugin.check.js +568 -768
- package/dist/src/schemas/sharing/ConsumeSharedPlugin.check.js.map +1 -1
- package/dist/src/schemas/sharing/ConsumeSharedPlugin.d.ts +197 -194
- package/dist/src/schemas/sharing/ConsumeSharedPlugin.js +212 -238
- package/dist/src/schemas/sharing/ConsumeSharedPlugin.js.map +1 -1
- package/dist/src/schemas/sharing/ProvideSharedPlugin.check.d.ts +13 -5
- package/dist/src/schemas/sharing/ProvideSharedPlugin.check.js +598 -804
- package/dist/src/schemas/sharing/ProvideSharedPlugin.check.js.map +1 -1
- package/dist/src/schemas/sharing/ProvideSharedPlugin.d.ts +184 -181
- package/dist/src/schemas/sharing/ProvideSharedPlugin.js +196 -229
- package/dist/src/schemas/sharing/ProvideSharedPlugin.js.map +1 -1
- package/dist/src/schemas/sharing/ProviderSharedPlugin.check.d.ts +12 -4
- package/dist/src/schemas/sharing/ProviderSharedPlugin.check.js +285 -482
- package/dist/src/schemas/sharing/ProviderSharedPlugin.check.js.map +1 -1
- package/dist/src/schemas/sharing/ProviderSharedPlugin.d.ts +103 -100
- package/dist/src/schemas/sharing/ProviderSharedPlugin.js +104 -126
- package/dist/src/schemas/sharing/ProviderSharedPlugin.js.map +1 -1
- package/dist/src/schemas/sharing/SharePlugin.check.d.ts +13 -5
- package/dist/src/schemas/sharing/SharePlugin.check.js +749 -965
- package/dist/src/schemas/sharing/SharePlugin.check.js.map +1 -1
- package/dist/src/schemas/sharing/SharePlugin.d.ts +245 -242
- package/dist/src/schemas/sharing/SharePlugin.js +256 -293
- package/dist/src/schemas/sharing/SharePlugin.js.map +1 -1
- package/dist/src/utils.d.ts +3 -0
- package/dist/src/utils.js +35 -26
- package/dist/src/utils.js.map +1 -1
- package/dist/src/webpack.d.ts +2 -2
- package/dist/src/webpack.js +6 -40
- package/dist/src/wrapper/AsyncBoundaryPlugin.d.ts +9 -4
- package/dist/src/wrapper/AsyncBoundaryPlugin.js +12 -11
- package/dist/src/wrapper/AsyncBoundaryPlugin.js.map +1 -1
- package/dist/src/wrapper/BaseWrapperPlugin.d.ts +18 -13
- package/dist/src/wrapper/BaseWrapperPlugin.js +39 -39
- package/dist/src/wrapper/BaseWrapperPlugin.js.map +1 -1
- package/dist/src/wrapper/ConsumeSharedPlugin.d.ts +10 -4
- package/dist/src/wrapper/ConsumeSharedPlugin.js +12 -11
- package/dist/src/wrapper/ConsumeSharedPlugin.js.map +1 -1
- package/dist/src/wrapper/ContainerPlugin.d.ts +9 -4
- package/dist/src/wrapper/ContainerPlugin.js +12 -11
- package/dist/src/wrapper/ContainerPlugin.js.map +1 -1
- package/dist/src/wrapper/ContainerReferencePlugin.d.ts +9 -4
- package/dist/src/wrapper/ContainerReferencePlugin.js +12 -11
- package/dist/src/wrapper/ContainerReferencePlugin.js.map +1 -1
- package/dist/src/wrapper/FederationModulesPlugin.d.ts +18 -10
- package/dist/src/wrapper/FederationModulesPlugin.js +19 -19
- package/dist/src/wrapper/FederationModulesPlugin.js.map +1 -1
- package/dist/src/wrapper/FederationRuntimePlugin.d.ts +11 -6
- package/dist/src/wrapper/FederationRuntimePlugin.js +18 -17
- package/dist/src/wrapper/FederationRuntimePlugin.js.map +1 -1
- package/dist/src/wrapper/HoistContainerReferencesPlugin.d.ts +8 -3
- package/dist/src/wrapper/HoistContainerReferencesPlugin.js +12 -11
- package/dist/src/wrapper/HoistContainerReferencesPlugin.js.map +1 -1
- package/dist/src/wrapper/ModuleFederationPlugin.d.ts +12 -7
- package/dist/src/wrapper/ModuleFederationPlugin.js +73 -99
- package/dist/src/wrapper/ModuleFederationPlugin.js.map +1 -1
- package/dist/src/wrapper/ProvideSharedPlugin.d.ts +10 -4
- package/dist/src/wrapper/ProvideSharedPlugin.js +12 -11
- package/dist/src/wrapper/ProvideSharedPlugin.js.map +1 -1
- package/dist/src/wrapper/SharePlugin.d.ts +10 -4
- package/dist/src/wrapper/SharePlugin.js +12 -11
- package/dist/src/wrapper/SharePlugin.js.map +1 -1
- package/dist/src/wrapper/TreeShakingSharedPlugin.d.ts +9 -4
- package/dist/src/wrapper/TreeShakingSharedPlugin.js +12 -11
- package/dist/src/wrapper/TreeShakingSharedPlugin.js.map +1 -1
- package/package.json +20 -13
- package/dist/package.json +0 -110
- package/dist/src/declarations/plugins/container/AsyncDependenciesBlock.d.ts +0 -57
- package/dist/src/declarations/plugins/container/ModuleFactory.d.ts +0 -33
- package/dist/src/declarations/plugins/container/ObjectDeserializerContext.d.ts +0 -4
- package/dist/src/declarations/plugins/container/StaticExportsDependency.d.ts +0 -28
- package/dist/src/declarations/plugins/container/Template.d.ts +0 -198
- package/dist/src/declarations/plugins/container/WebpackError.d.ts +0 -33
- package/dist/src/declarations/plugins/sharing/ConsumeSharedModule.d.ts +0 -86
- package/dist/src/declarations/plugins/sharing/ConsumeSharedPlugin.d.ts +0 -100
- package/dist/src/declarations/plugins/sharing/ProvideSharedPlugin.d.ts +0 -102
- package/dist/src/declarations/plugins/sharing/SharePlugin.d.ts +0 -116
- package/dist/src/lib/container/runtime/ChildCompilationRuntimePlugin.d.ts +0 -20
- package/dist/src/lib/container/runtime/ChildCompilationRuntimePlugin.js +0 -222
- package/dist/src/lib/container/runtime/ChildCompilationRuntimePlugin.js.map +0 -1
- package/dist/src/prefetch.js.map +0 -1
- package/dist/src/rspack.js.map +0 -1
- package/dist/src/runtime.js.map +0 -1
- package/dist/src/types/runtime.d.ts +0 -10
- package/dist/src/types/runtime.js +0 -3
- package/dist/src/types/runtime.js.map +0 -1
- package/dist/src/webpack.js.map +0 -1
package/dist/src/utils.js
CHANGED
|
@@ -1,31 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.js');
|
|
3
|
+
let _module_federation_sdk_normalize_webpack_path = require("@module-federation/sdk/normalize-webpack-path");
|
|
4
|
+
|
|
5
|
+
//#region src/utils.ts
|
|
6
|
+
const memoize = require((0, _module_federation_sdk_normalize_webpack_path.normalizeWebpackPath)("webpack/lib/util/memoize"));
|
|
7
|
+
const getValidate = memoize(() => require("schema-utils").validate);
|
|
7
8
|
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
* @template {object | object[]} T
|
|
10
|
+
* @param {(function(T): boolean) | undefined} check check
|
|
11
|
+
* @param {() => JsonObject} getSchema get schema fn
|
|
12
|
+
* @param {ValidationErrorConfiguration} options options
|
|
13
|
+
* @returns {function(T=): void} validate
|
|
14
|
+
*/
|
|
14
15
|
const createSchemaValidation = (check, getSchema, options) => {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
16
|
+
getSchema = memoize(getSchema);
|
|
17
|
+
return (value) => {
|
|
18
|
+
if (check && !check(
|
|
19
|
+
/** @type {T} */
|
|
20
|
+
value
|
|
21
|
+
)) {
|
|
22
|
+
getValidate()(
|
|
23
|
+
getSchema(),
|
|
24
|
+
/** @type {object | object[]} */
|
|
25
|
+
value,
|
|
26
|
+
options
|
|
27
|
+
);
|
|
28
|
+
require("util").deprecate(
|
|
29
|
+
/* istanbul ignore next - deprecation warning */
|
|
30
|
+
function noop() {},
|
|
31
|
+
"webpack bug: Pre-compiled schema reports error while real schema is happy. This has performance drawbacks.",
|
|
32
|
+
"DEP_WEBPACK_PRE_COMPILED_SCHEMA_INVALID"
|
|
33
|
+
)();
|
|
34
|
+
}
|
|
35
|
+
};
|
|
29
36
|
};
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
30
39
|
exports.createSchemaValidation = createSchemaValidation;
|
|
31
40
|
//# sourceMappingURL=utils.js.map
|
package/dist/src/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../src/utils.ts"],"sourcesContent":["import { normalizeWebpackPath } from '@module-federation/sdk/normalize-webpack-path';\n\nconst memoize = require(\n normalizeWebpackPath('webpack/lib/util/memoize'),\n) as typeof import('webpack/lib/util/memoize');\n\nconst getValidate = memoize(() => require('schema-utils').validate);\n\n/**\n * @template {object | object[]} T\n * @param {(function(T): boolean) | undefined} check check\n * @param {() => JsonObject} getSchema get schema fn\n * @param {ValidationErrorConfiguration} options options\n * @returns {function(T=): void} validate\n */\nconst createSchemaValidation = (\n check: ((value: any) => boolean) | undefined,\n getSchema: () => any,\n options: any,\n) => {\n getSchema = memoize(getSchema);\n //@ts-ignore\n return (value) => {\n if (check && !check(/** @type {T} */ value)) {\n getValidate()(\n getSchema(),\n /** @type {object | object[]} */\n value,\n options,\n );\n require('util').deprecate(\n /* istanbul ignore next - deprecation warning */\n function noop() {\n /* intentionally empty for deprecation */\n },\n 'webpack bug: Pre-compiled schema reports error while real schema is happy. This has performance drawbacks.',\n 'DEP_WEBPACK_PRE_COMPILED_SCHEMA_INVALID',\n )();\n }\n };\n};\n\nexport { createSchemaValidation };\n"],"mappings":";;;;;AAEA,MAAM,UAAU,gFACO,2BAA2B,CACjD;AAED,MAAM,cAAc,cAAc,QAAQ,eAAe,CAAC,SAAS;;;;;;;;AASnE,MAAM,0BACJ,OACA,WACA,YACG;AACH,aAAY,QAAQ,UAAU;AAE9B,SAAQ,UAAU;AAChB,MAAI,SAAS,CAAC;;GAAuB;GAAM,EAAE;AAC3C,gBAAa;IACX,WAAW;;IAEX;IACA;IACD;AACD,WAAQ,OAAO,CAAC;;IAEd,SAAS,OAAO;IAGhB;IACA;IACD,EAAE"}
|
package/dist/src/webpack.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { ModuleFederationPlugin, PLUGIN_NAME };
|
|
1
|
+
import ModuleFederationPlugin, { PLUGIN_NAME } from "./wrapper/ModuleFederationPlugin.js";
|
|
2
|
+
export { ModuleFederationPlugin, PLUGIN_NAME };
|
package/dist/src/webpack.js
CHANGED
|
@@ -1,40 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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 () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.PLUGIN_NAME = exports.ModuleFederationPlugin = void 0;
|
|
37
|
-
const ModuleFederationPlugin_1 = __importStar(require("./wrapper/ModuleFederationPlugin"));
|
|
38
|
-
Object.defineProperty(exports, "ModuleFederationPlugin", { enumerable: true, get: function () { return ModuleFederationPlugin_1.default; } });
|
|
39
|
-
Object.defineProperty(exports, "PLUGIN_NAME", { enumerable: true, get: function () { return ModuleFederationPlugin_1.PLUGIN_NAME; } });
|
|
40
|
-
//# sourceMappingURL=webpack.js.map
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.js');
|
|
3
|
+
const require_wrapper_ModuleFederationPlugin = require('./wrapper/ModuleFederationPlugin.js');
|
|
4
|
+
|
|
5
|
+
exports.ModuleFederationPlugin = require_wrapper_ModuleFederationPlugin.default;
|
|
6
|
+
exports.PLUGIN_NAME = require_wrapper_ModuleFederationPlugin.PLUGIN_NAME;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import BaseWrapperPlugin from "./BaseWrapperPlugin.js";
|
|
2
|
+
import { Options } from "../lib/container/AsyncBoundaryPlugin.js";
|
|
3
|
+
|
|
4
|
+
//#region src/wrapper/AsyncBoundaryPlugin.d.ts
|
|
5
|
+
declare class AsyncBoundaryPlugin extends BaseWrapperPlugin {
|
|
6
|
+
constructor(options: Options);
|
|
5
7
|
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { AsyncBoundaryPlugin as default };
|
|
10
|
+
//# sourceMappingURL=AsyncBoundaryPlugin.d.ts.map
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.js');
|
|
3
|
+
const require_wrapper_BaseWrapperPlugin = require('./BaseWrapperPlugin.js');
|
|
4
|
+
|
|
5
|
+
//#region src/wrapper/AsyncBoundaryPlugin.ts
|
|
6
|
+
const PLUGIN_NAME = "AsyncBoundaryPlugin";
|
|
7
|
+
var AsyncBoundaryPlugin = class extends require_wrapper_BaseWrapperPlugin.default {
|
|
8
|
+
constructor(options) {
|
|
9
|
+
super(options, PLUGIN_NAME, "../lib/container/AsyncBoundaryPlugin");
|
|
10
|
+
}
|
|
4
11
|
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const PLUGIN_NAME = 'AsyncBoundaryPlugin';
|
|
8
|
-
class AsyncBoundaryPlugin extends BaseWrapperPlugin_1.default {
|
|
9
|
-
constructor(options) {
|
|
10
|
-
super(options, PLUGIN_NAME, '../lib/container/AsyncBoundaryPlugin');
|
|
11
|
-
}
|
|
12
|
-
}
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
13
14
|
exports.default = AsyncBoundaryPlugin;
|
|
14
15
|
//# sourceMappingURL=AsyncBoundaryPlugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsyncBoundaryPlugin.js","
|
|
1
|
+
{"version":3,"file":"AsyncBoundaryPlugin.js","names":["BaseWrapperPlugin"],"sources":["../../../src/wrapper/AsyncBoundaryPlugin.ts"],"sourcesContent":["import type { Options } from '../lib/container/AsyncBoundaryPlugin';\nimport BaseWrapperPlugin from './BaseWrapperPlugin';\n\nconst PLUGIN_NAME = 'AsyncBoundaryPlugin';\n\nexport default class AsyncBoundaryPlugin extends BaseWrapperPlugin {\n constructor(options: Options) {\n super(options, PLUGIN_NAME, '../lib/container/AsyncBoundaryPlugin');\n }\n}\n"],"mappings":";;;;;AAGA,MAAM,cAAc;AAEpB,IAAqB,sBAArB,cAAiDA,0CAAkB;CACjE,YAAY,SAAkB;AAC5B,QAAM,SAAS,aAAa,uCAAuC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Compiler, WebpackPluginInstance } from "webpack";
|
|
2
|
+
|
|
3
|
+
//#region src/wrapper/BaseWrapperPlugin.d.ts
|
|
2
4
|
/**
|
|
3
5
|
* Base Wrapper Plugin Class
|
|
4
6
|
*
|
|
@@ -12,16 +14,19 @@ import type { WebpackPluginInstance, Compiler } from 'webpack';
|
|
|
12
14
|
* which can cause module federation to malfunction. By setting FEDERATION_WEBPACK_PATH, we ensure all internal
|
|
13
15
|
* dependencies use the same webpack instance as the current compiler.
|
|
14
16
|
*/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
17
|
+
declare abstract class BaseWrapperPlugin implements WebpackPluginInstance {
|
|
18
|
+
protected _options: any;
|
|
19
|
+
name: string;
|
|
20
|
+
protected pluginName: string;
|
|
21
|
+
protected coreModulePath: string;
|
|
22
|
+
constructor(options: any, pluginName: string, coreModulePath: string);
|
|
23
|
+
apply(compiler: Compiler): void;
|
|
24
|
+
/**
|
|
25
|
+
* Create core plugin instance
|
|
26
|
+
* Subclasses can override this method to customize instantiation logic
|
|
27
|
+
*/
|
|
28
|
+
protected createCorePluginInstance(CorePlugin: any, compiler: Compiler): void;
|
|
27
29
|
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { BaseWrapperPlugin as default };
|
|
32
|
+
//# sourceMappingURL=BaseWrapperPlugin.d.ts.map
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.js');
|
|
3
|
+
let _module_federation_sdk_normalize_webpack_path = require("@module-federation/sdk/normalize-webpack-path");
|
|
4
|
+
|
|
5
|
+
//#region src/wrapper/BaseWrapperPlugin.ts
|
|
4
6
|
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
}
|
|
7
|
+
* Base Wrapper Plugin Class
|
|
8
|
+
*
|
|
9
|
+
* Why we need a Wrapper layer:
|
|
10
|
+
* 1. Prevent direct references to peer dependency webpack in CommonJS environment, which can lead to inconsistent instances
|
|
11
|
+
* 2. Ensure the FEDERATION_WEBPACK_PATH environment variable is set correctly, which is crucial for module federation to work properly
|
|
12
|
+
* 3. Provide unified plugin initialization logic, reducing code duplication
|
|
13
|
+
*
|
|
14
|
+
* Why we need to set FEDERATION_WEBPACK_PATH:
|
|
15
|
+
* In CommonJS environment, require('webpack') might get a different webpack version than the current compiler instance,
|
|
16
|
+
* which can cause module federation to malfunction. By setting FEDERATION_WEBPACK_PATH, we ensure all internal
|
|
17
|
+
* dependencies use the same webpack instance as the current compiler.
|
|
18
|
+
*/
|
|
19
|
+
var BaseWrapperPlugin = class {
|
|
20
|
+
constructor(options, pluginName, coreModulePath) {
|
|
21
|
+
this._options = options;
|
|
22
|
+
this.pluginName = pluginName;
|
|
23
|
+
this.coreModulePath = coreModulePath;
|
|
24
|
+
this.name = pluginName;
|
|
25
|
+
}
|
|
26
|
+
apply(compiler) {
|
|
27
|
+
process.env["FEDERATION_WEBPACK_PATH"] = process.env["FEDERATION_WEBPACK_PATH"] || (0, _module_federation_sdk_normalize_webpack_path.getWebpackPath)(compiler);
|
|
28
|
+
const CorePlugin = require(this.coreModulePath).default;
|
|
29
|
+
this.createCorePluginInstance(CorePlugin, compiler);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Create core plugin instance
|
|
33
|
+
* Subclasses can override this method to customize instantiation logic
|
|
34
|
+
*/
|
|
35
|
+
createCorePluginInstance(CorePlugin, compiler) {
|
|
36
|
+
new CorePlugin(this._options).apply(compiler);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
//#endregion
|
|
41
41
|
exports.default = BaseWrapperPlugin;
|
|
42
42
|
//# sourceMappingURL=BaseWrapperPlugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseWrapperPlugin.js","
|
|
1
|
+
{"version":3,"file":"BaseWrapperPlugin.js","names":[],"sources":["../../../src/wrapper/BaseWrapperPlugin.ts"],"sourcesContent":["import type { WebpackPluginInstance, Compiler } from 'webpack';\nimport { getWebpackPath } from '@module-federation/sdk/normalize-webpack-path';\n\n/**\n * Base Wrapper Plugin Class\n *\n * Why we need a Wrapper layer:\n * 1. Prevent direct references to peer dependency webpack in CommonJS environment, which can lead to inconsistent instances\n * 2. Ensure the FEDERATION_WEBPACK_PATH environment variable is set correctly, which is crucial for module federation to work properly\n * 3. Provide unified plugin initialization logic, reducing code duplication\n *\n * Why we need to set FEDERATION_WEBPACK_PATH:\n * In CommonJS environment, require('webpack') might get a different webpack version than the current compiler instance,\n * which can cause module federation to malfunction. By setting FEDERATION_WEBPACK_PATH, we ensure all internal\n * dependencies use the same webpack instance as the current compiler.\n */\nexport default abstract class BaseWrapperPlugin implements WebpackPluginInstance {\n protected _options: any;\n name: string;\n protected pluginName: string;\n protected coreModulePath: string;\n\n constructor(options: any, pluginName: string, coreModulePath: string) {\n this._options = options;\n this.pluginName = pluginName;\n this.coreModulePath = coreModulePath;\n this.name = pluginName;\n }\n\n apply(compiler: Compiler): void {\n // Ensure FEDERATION_WEBPACK_PATH environment variable is set correctly\n process.env['FEDERATION_WEBPACK_PATH'] =\n process.env['FEDERATION_WEBPACK_PATH'] || getWebpackPath(compiler);\n\n // Lazily load core plugin after webpack path is set.\n const CorePlugin = require(this.coreModulePath).default as any;\n\n // Create core plugin instance and apply it\n this.createCorePluginInstance(CorePlugin, compiler);\n }\n\n /**\n * Create core plugin instance\n * Subclasses can override this method to customize instantiation logic\n */\n protected createCorePluginInstance(\n CorePlugin: any,\n compiler: Compiler,\n ): void {\n new CorePlugin(this._options).apply(compiler);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAgBA,IAA8B,oBAA9B,MAAiF;CAM/E,YAAY,SAAc,YAAoB,gBAAwB;AACpE,OAAK,WAAW;AAChB,OAAK,aAAa;AAClB,OAAK,iBAAiB;AACtB,OAAK,OAAO;;CAGd,MAAM,UAA0B;AAE9B,UAAQ,IAAI,6BACV,QAAQ,IAAI,gGAA6C,SAAS;EAGpE,MAAM,aAAa,QAAQ,KAAK,eAAe,CAAC;AAGhD,OAAK,yBAAyB,YAAY,SAAS;;;;;;CAOrD,AAAU,yBACR,YACA,UACM;AACN,MAAI,WAAW,KAAK,SAAS,CAAC,MAAM,SAAS"}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import BaseWrapperPlugin from "./BaseWrapperPlugin.js";
|
|
2
|
+
import { consumeSharedPlugin } from "@module-federation/sdk";
|
|
3
|
+
|
|
4
|
+
//#region src/wrapper/ConsumeSharedPlugin.d.ts
|
|
5
|
+
type ConsumeSharedPluginOptions = consumeSharedPlugin.ConsumeSharedPluginOptions;
|
|
6
|
+
declare class ConsumeSharedPlugin extends BaseWrapperPlugin {
|
|
7
|
+
constructor(options: ConsumeSharedPluginOptions);
|
|
5
8
|
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { ConsumeSharedPlugin as default };
|
|
11
|
+
//# sourceMappingURL=ConsumeSharedPlugin.d.ts.map
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.js');
|
|
3
|
+
const require_wrapper_BaseWrapperPlugin = require('./BaseWrapperPlugin.js');
|
|
4
|
+
|
|
5
|
+
//#region src/wrapper/ConsumeSharedPlugin.ts
|
|
6
|
+
const PLUGIN_NAME = "ConsumeSharedPlugin";
|
|
7
|
+
var ConsumeSharedPlugin = class extends require_wrapper_BaseWrapperPlugin.default {
|
|
8
|
+
constructor(options) {
|
|
9
|
+
super(options, PLUGIN_NAME, "../lib/sharing/ConsumeSharedPlugin");
|
|
10
|
+
}
|
|
4
11
|
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const PLUGIN_NAME = 'ConsumeSharedPlugin';
|
|
8
|
-
class ConsumeSharedPlugin extends BaseWrapperPlugin_1.default {
|
|
9
|
-
constructor(options) {
|
|
10
|
-
super(options, PLUGIN_NAME, '../lib/sharing/ConsumeSharedPlugin');
|
|
11
|
-
}
|
|
12
|
-
}
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
13
14
|
exports.default = ConsumeSharedPlugin;
|
|
14
15
|
//# sourceMappingURL=ConsumeSharedPlugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConsumeSharedPlugin.js","
|
|
1
|
+
{"version":3,"file":"ConsumeSharedPlugin.js","names":["BaseWrapperPlugin"],"sources":["../../../src/wrapper/ConsumeSharedPlugin.ts"],"sourcesContent":["import type { consumeSharedPlugin } from '@module-federation/sdk';\ntype ConsumeSharedPluginOptions =\n consumeSharedPlugin.ConsumeSharedPluginOptions;\nimport BaseWrapperPlugin from './BaseWrapperPlugin';\n\nconst PLUGIN_NAME = 'ConsumeSharedPlugin';\n\nexport default class ConsumeSharedPlugin extends BaseWrapperPlugin {\n constructor(options: ConsumeSharedPluginOptions) {\n super(options, PLUGIN_NAME, '../lib/sharing/ConsumeSharedPlugin');\n }\n}\n"],"mappings":";;;;;AAKA,MAAM,cAAc;AAEpB,IAAqB,sBAArB,cAAiDA,0CAAkB;CACjE,YAAY,SAAqC;AAC/C,QAAM,SAAS,aAAa,qCAAqC"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import BaseWrapperPlugin from "./BaseWrapperPlugin.js";
|
|
2
|
+
import { containerPlugin } from "@module-federation/sdk";
|
|
3
|
+
|
|
4
|
+
//#region src/wrapper/ContainerPlugin.d.ts
|
|
5
|
+
declare class ContainerPlugin extends BaseWrapperPlugin {
|
|
6
|
+
constructor(options: containerPlugin.ContainerPluginOptions);
|
|
5
7
|
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { ContainerPlugin as default };
|
|
10
|
+
//# sourceMappingURL=ContainerPlugin.d.ts.map
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.js');
|
|
3
|
+
const require_wrapper_BaseWrapperPlugin = require('./BaseWrapperPlugin.js');
|
|
4
|
+
|
|
5
|
+
//#region src/wrapper/ContainerPlugin.ts
|
|
6
|
+
const PLUGIN_NAME = "ContainerPlugin";
|
|
7
|
+
var ContainerPlugin = class extends require_wrapper_BaseWrapperPlugin.default {
|
|
8
|
+
constructor(options) {
|
|
9
|
+
super(options, PLUGIN_NAME, "../lib/container/ContainerPlugin");
|
|
10
|
+
}
|
|
4
11
|
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const PLUGIN_NAME = 'ContainerPlugin';
|
|
8
|
-
class ContainerPlugin extends BaseWrapperPlugin_1.default {
|
|
9
|
-
constructor(options) {
|
|
10
|
-
super(options, PLUGIN_NAME, '../lib/container/ContainerPlugin');
|
|
11
|
-
}
|
|
12
|
-
}
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
13
14
|
exports.default = ContainerPlugin;
|
|
14
15
|
//# sourceMappingURL=ContainerPlugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContainerPlugin.js","
|
|
1
|
+
{"version":3,"file":"ContainerPlugin.js","names":["BaseWrapperPlugin"],"sources":["../../../src/wrapper/ContainerPlugin.ts"],"sourcesContent":["import type { containerPlugin } from '@module-federation/sdk';\nimport BaseWrapperPlugin from './BaseWrapperPlugin';\n\nconst PLUGIN_NAME = 'ContainerPlugin';\n\nexport default class ContainerPlugin extends BaseWrapperPlugin {\n constructor(options: containerPlugin.ContainerPluginOptions) {\n super(options, PLUGIN_NAME, '../lib/container/ContainerPlugin');\n }\n}\n"],"mappings":";;;;;AAGA,MAAM,cAAc;AAEpB,IAAqB,kBAArB,cAA6CA,0CAAkB;CAC7D,YAAY,SAAiD;AAC3D,QAAM,SAAS,aAAa,mCAAmC"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import BaseWrapperPlugin from "./BaseWrapperPlugin.js";
|
|
2
|
+
import { containerReferencePlugin } from "@module-federation/sdk";
|
|
3
|
+
|
|
4
|
+
//#region src/wrapper/ContainerReferencePlugin.d.ts
|
|
5
|
+
declare class ContainerReferencePlugin extends BaseWrapperPlugin {
|
|
6
|
+
constructor(options: containerReferencePlugin.ContainerReferencePluginOptions);
|
|
5
7
|
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { ContainerReferencePlugin as default };
|
|
10
|
+
//# sourceMappingURL=ContainerReferencePlugin.d.ts.map
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.js');
|
|
3
|
+
const require_wrapper_BaseWrapperPlugin = require('./BaseWrapperPlugin.js');
|
|
4
|
+
|
|
5
|
+
//#region src/wrapper/ContainerReferencePlugin.ts
|
|
6
|
+
const PLUGIN_NAME = "ContainerReferencePlugin";
|
|
7
|
+
var ContainerReferencePlugin = class extends require_wrapper_BaseWrapperPlugin.default {
|
|
8
|
+
constructor(options) {
|
|
9
|
+
super(options, PLUGIN_NAME, "../lib/container/ContainerReferencePlugin");
|
|
10
|
+
}
|
|
4
11
|
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const PLUGIN_NAME = 'ContainerReferencePlugin';
|
|
8
|
-
class ContainerReferencePlugin extends BaseWrapperPlugin_1.default {
|
|
9
|
-
constructor(options) {
|
|
10
|
-
super(options, PLUGIN_NAME, '../lib/container/ContainerReferencePlugin');
|
|
11
|
-
}
|
|
12
|
-
}
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
13
14
|
exports.default = ContainerReferencePlugin;
|
|
14
15
|
//# sourceMappingURL=ContainerReferencePlugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContainerReferencePlugin.js","
|
|
1
|
+
{"version":3,"file":"ContainerReferencePlugin.js","names":["BaseWrapperPlugin"],"sources":["../../../src/wrapper/ContainerReferencePlugin.ts"],"sourcesContent":["import type { containerReferencePlugin } from '@module-federation/sdk';\nimport BaseWrapperPlugin from './BaseWrapperPlugin';\n\nconst PLUGIN_NAME = 'ContainerReferencePlugin';\n\nexport default class ContainerReferencePlugin extends BaseWrapperPlugin {\n constructor(\n options: containerReferencePlugin.ContainerReferencePluginOptions,\n ) {\n super(options, PLUGIN_NAME, '../lib/container/ContainerReferencePlugin');\n }\n}\n"],"mappings":";;;;;AAGA,MAAM,cAAc;AAEpB,IAAqB,2BAArB,cAAsDA,0CAAkB;CACtE,YACE,SACA;AACA,QAAM,SAAS,aAAa,4CAA4C"}
|
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import BaseWrapperPlugin from "./BaseWrapperPlugin.js";
|
|
2
|
+
import ContainerEntryDependency from "../lib/container/ContainerEntryDependency.js";
|
|
3
|
+
import FederationRuntimeDependency from "../lib/container/runtime/FederationRuntimeDependency.js";
|
|
4
|
+
import { Compilation } from "webpack";
|
|
5
|
+
import * as tapable from "tapable";
|
|
6
|
+
|
|
7
|
+
//#region src/wrapper/FederationModulesPlugin.d.ts
|
|
8
|
+
declare class FederationModulesPlugin extends BaseWrapperPlugin {
|
|
9
|
+
constructor();
|
|
10
|
+
static getCompilationHooks(compilation: Compilation): {
|
|
11
|
+
addContainerEntryDependency: tapable.SyncHook<[ContainerEntryDependency], void>;
|
|
12
|
+
addFederationRuntimeDependency: tapable.SyncHook<[FederationRuntimeDependency], void>;
|
|
13
|
+
addRemoteDependency: tapable.SyncHook<[any], void>;
|
|
14
|
+
};
|
|
15
|
+
protected createCorePluginInstance(CorePlugin: any, compiler: any): void;
|
|
11
16
|
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { FederationModulesPlugin as default };
|
|
19
|
+
//# sourceMappingURL=FederationModulesPlugin.d.ts.map
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.js');
|
|
3
|
+
const require_wrapper_BaseWrapperPlugin = require('./BaseWrapperPlugin.js');
|
|
4
|
+
const require_lib_container_runtime_FederationModulesPlugin = require('../lib/container/runtime/FederationModulesPlugin.js');
|
|
5
|
+
|
|
6
|
+
//#region src/wrapper/FederationModulesPlugin.ts
|
|
7
|
+
const PLUGIN_NAME = "FederationModulesPlugin";
|
|
8
|
+
var FederationModulesPlugin = class extends require_wrapper_BaseWrapperPlugin.default {
|
|
9
|
+
constructor() {
|
|
10
|
+
super({}, PLUGIN_NAME, "../lib/container/runtime/FederationModulesPlugin");
|
|
11
|
+
}
|
|
12
|
+
static getCompilationHooks(compilation) {
|
|
13
|
+
return (require_lib_container_runtime_FederationModulesPlugin.init_FederationModulesPlugin(), require_runtime.__toCommonJS(require_lib_container_runtime_FederationModulesPlugin.FederationModulesPlugin_exports)).default.getCompilationHooks(compilation);
|
|
14
|
+
}
|
|
15
|
+
createCorePluginInstance(CorePlugin, compiler) {
|
|
16
|
+
new CorePlugin().apply(compiler);
|
|
17
|
+
}
|
|
4
18
|
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const PLUGIN_NAME = 'FederationModulesPlugin';
|
|
8
|
-
class FederationModulesPlugin extends BaseWrapperPlugin_1.default {
|
|
9
|
-
constructor() {
|
|
10
|
-
super({}, PLUGIN_NAME, '../lib/container/runtime/FederationModulesPlugin');
|
|
11
|
-
}
|
|
12
|
-
static getCompilationHooks(compilation) {
|
|
13
|
-
const CoreFederationModulesPlugin = require('../lib/container/runtime/FederationModulesPlugin')
|
|
14
|
-
.default;
|
|
15
|
-
return CoreFederationModulesPlugin.getCompilationHooks(compilation);
|
|
16
|
-
}
|
|
17
|
-
createCorePluginInstance(CorePlugin, compiler) {
|
|
18
|
-
new CorePlugin().apply(compiler);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
21
|
exports.default = FederationModulesPlugin;
|
|
22
22
|
//# sourceMappingURL=FederationModulesPlugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FederationModulesPlugin.js","
|
|
1
|
+
{"version":3,"file":"FederationModulesPlugin.js","names":["BaseWrapperPlugin"],"sources":["../../../src/wrapper/FederationModulesPlugin.ts"],"sourcesContent":["import type { Compilation } from 'webpack';\nimport BaseWrapperPlugin from './BaseWrapperPlugin';\n\nconst PLUGIN_NAME = 'FederationModulesPlugin';\n\nexport default class FederationModulesPlugin extends BaseWrapperPlugin {\n constructor() {\n super({}, PLUGIN_NAME, '../lib/container/runtime/FederationModulesPlugin');\n }\n\n static getCompilationHooks(compilation: Compilation) {\n const CoreFederationModulesPlugin =\n require('../lib/container/runtime/FederationModulesPlugin')\n .default as typeof import('../lib/container/runtime/FederationModulesPlugin').default;\n return CoreFederationModulesPlugin.getCompilationHooks(compilation);\n }\n\n protected override createCorePluginInstance(\n CorePlugin: any,\n compiler: any,\n ): void {\n new CorePlugin().apply(compiler);\n }\n}\n"],"mappings":";;;;;;AAGA,MAAM,cAAc;AAEpB,IAAqB,0BAArB,cAAqDA,0CAAkB;CACrE,cAAc;AACZ,QAAM,EAAE,EAAE,aAAa,mDAAmD;;CAG5E,OAAO,oBAAoB,aAA0B;AAInD,qNADK,QAC8B,oBAAoB,YAAY;;CAGrE,AAAmB,yBACjB,YACA,UACM;AACN,MAAI,YAAY,CAAC,MAAM,SAAS"}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import BaseWrapperPlugin from "./BaseWrapperPlugin.js";
|
|
2
|
+
import { moduleFederationPlugin } from "@module-federation/sdk";
|
|
3
|
+
|
|
4
|
+
//#region src/wrapper/FederationRuntimePlugin.d.ts
|
|
5
|
+
declare class FederationRuntimePlugin extends BaseWrapperPlugin {
|
|
6
|
+
entryFilePath: string;
|
|
7
|
+
constructor(options?: moduleFederationPlugin.ModuleFederationPluginOptions);
|
|
8
|
+
protected createCorePluginInstance(CorePlugin: any, compiler: any): void;
|
|
7
9
|
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { FederationRuntimePlugin as default };
|
|
12
|
+
//# sourceMappingURL=FederationRuntimePlugin.d.ts.map
|