@module-federation/enhanced 2.1.0 → 2.2.1

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.
Files changed (285) hide show
  1. package/dist/CHANGELOG.md +2375 -0
  2. package/dist/README.md +213 -0
  3. package/dist/rstestmigrate.md +140 -0
  4. package/dist/src/_virtual/_rolldown/runtime.js +47 -0
  5. package/dist/src/index.d.ts +22 -19
  6. package/dist/src/index.js +47 -43
  7. package/dist/src/index.js.map +1 -1
  8. package/dist/src/lib/Constants.d.ts +25 -29
  9. package/dist/src/lib/Constants.js +136 -116
  10. package/dist/src/lib/Constants.js.map +1 -1
  11. package/dist/src/lib/container/AsyncBoundaryPlugin.d.ts +20 -16
  12. package/dist/src/lib/container/AsyncBoundaryPlugin.js +137 -200
  13. package/dist/src/lib/container/AsyncBoundaryPlugin.js.map +1 -1
  14. package/dist/src/lib/container/ContainerEntryDependency.d.ts +28 -23
  15. package/dist/src/lib/container/ContainerEntryDependency.js +39 -39
  16. package/dist/src/lib/container/ContainerEntryDependency.js.map +1 -1
  17. package/dist/src/lib/container/ContainerEntryModule.d.ts +93 -84
  18. package/dist/src/lib/container/ContainerEntryModule.js +219 -234
  19. package/dist/src/lib/container/ContainerEntryModule.js.map +1 -1
  20. package/dist/src/lib/container/ContainerEntryModuleFactory.d.ts +15 -10
  21. package/dist/src/lib/container/ContainerEntryModuleFactory.js +21 -25
  22. package/dist/src/lib/container/ContainerEntryModuleFactory.js.map +1 -1
  23. package/dist/src/lib/container/ContainerExposedDependency.d.ts +29 -24
  24. package/dist/src/lib/container/ContainerExposedDependency.js +47 -47
  25. package/dist/src/lib/container/ContainerExposedDependency.js.map +1 -1
  26. package/dist/src/lib/container/ContainerPlugin.d.ts +12 -8
  27. package/dist/src/lib/container/ContainerPlugin.js +147 -211
  28. package/dist/src/lib/container/ContainerPlugin.js.map +1 -1
  29. package/dist/src/lib/container/ContainerReferencePlugin.d.ts +16 -12
  30. package/dist/src/lib/container/ContainerReferencePlugin.js +74 -102
  31. package/dist/src/lib/container/ContainerReferencePlugin.js.map +1 -1
  32. package/dist/src/lib/container/FallbackDependency.d.ts +24 -19
  33. package/dist/src/lib/container/FallbackDependency.js +46 -44
  34. package/dist/src/lib/container/FallbackDependency.js.map +1 -1
  35. package/dist/src/lib/container/FallbackItemDependency.d.ts +13 -8
  36. package/dist/src/lib/container/FallbackItemDependency.js +24 -24
  37. package/dist/src/lib/container/FallbackItemDependency.js.map +1 -1
  38. package/dist/src/lib/container/FallbackModule.d.ts +82 -71
  39. package/dist/src/lib/container/FallbackModule.js +133 -145
  40. package/dist/src/lib/container/FallbackModule.js.map +1 -1
  41. package/dist/src/lib/container/FallbackModuleFactory.d.ts +15 -10
  42. package/dist/src/lib/container/FallbackModuleFactory.js +20 -24
  43. package/dist/src/lib/container/FallbackModuleFactory.js.map +1 -1
  44. package/dist/src/lib/container/HoistContainerReferencesPlugin.d.ts +11 -7
  45. package/dist/src/lib/container/HoistContainerReferencesPlugin.js +125 -188
  46. package/dist/src/lib/container/HoistContainerReferencesPlugin.js.map +1 -1
  47. package/dist/src/lib/container/ModuleFederationPlugin.d.ts +20 -16
  48. package/dist/src/lib/container/ModuleFederationPlugin.js +143 -181
  49. package/dist/src/lib/container/ModuleFederationPlugin.js.map +1 -1
  50. package/dist/src/lib/container/RemoteModule.d.ts +79 -74
  51. package/dist/src/lib/container/RemoteModule.js +143 -153
  52. package/dist/src/lib/container/RemoteModule.js.map +1 -1
  53. package/dist/src/lib/container/RemoteRuntimeModule.d.ts +12 -7
  54. package/dist/src/lib/container/RemoteRuntimeModule.js +86 -132
  55. package/dist/src/lib/container/RemoteRuntimeModule.js.map +1 -1
  56. package/dist/src/lib/container/RemoteToExternalDependency.d.ts +13 -8
  57. package/dist/src/lib/container/RemoteToExternalDependency.js +25 -23
  58. package/dist/src/lib/container/RemoteToExternalDependency.js.map +1 -1
  59. package/dist/src/lib/container/constant.d.ts +3 -0
  60. package/dist/src/lib/container/constant.js +11 -14
  61. package/dist/src/lib/container/constant.js.map +1 -1
  62. package/dist/src/lib/container/options.d.ts +7 -3
  63. package/dist/src/lib/container/options.js +51 -69
  64. package/dist/src/lib/container/options.js.map +1 -1
  65. package/dist/src/lib/container/runtime/EmbedFederationRuntimeModule.d.ts +14 -9
  66. package/dist/src/lib/container/runtime/EmbedFederationRuntimeModule.js +56 -64
  67. package/dist/src/lib/container/runtime/EmbedFederationRuntimeModule.js.map +1 -1
  68. package/dist/src/lib/container/runtime/EmbedFederationRuntimePlugin.d.ts +23 -19
  69. package/dist/src/lib/container/runtime/EmbedFederationRuntimePlugin.js +71 -101
  70. package/dist/src/lib/container/runtime/EmbedFederationRuntimePlugin.js.map +1 -1
  71. package/dist/src/lib/container/runtime/FederationModulesPlugin.d.ts +20 -16
  72. package/dist/src/lib/container/runtime/FederationModulesPlugin.js +55 -47
  73. package/dist/src/lib/container/runtime/FederationModulesPlugin.js.map +1 -1
  74. package/dist/src/lib/container/runtime/FederationRuntimeDependency.d.ts +9 -4
  75. package/dist/src/lib/container/runtime/FederationRuntimeDependency.js +16 -12
  76. package/dist/src/lib/container/runtime/FederationRuntimeDependency.js.map +1 -1
  77. package/dist/src/lib/container/runtime/FederationRuntimeModule.d.ts +16 -11
  78. package/dist/src/lib/container/runtime/FederationRuntimeModule.js +39 -46
  79. package/dist/src/lib/container/runtime/FederationRuntimeModule.js.map +1 -1
  80. package/dist/src/lib/container/runtime/FederationRuntimePlugin.d.ts +31 -20
  81. package/dist/src/lib/container/runtime/FederationRuntimePlugin.js +265 -358
  82. package/dist/src/lib/container/runtime/FederationRuntimePlugin.js.map +1 -1
  83. package/dist/src/lib/container/runtime/getFederationGlobal.d.ts +9 -4
  84. package/dist/src/lib/container/runtime/getFederationGlobal.js +43 -41
  85. package/dist/src/lib/container/runtime/getFederationGlobal.js.map +1 -1
  86. package/dist/src/lib/container/runtime/utils.d.ts +24 -13
  87. package/dist/src/lib/container/runtime/utils.js +83 -101
  88. package/dist/src/lib/container/runtime/utils.js.map +1 -1
  89. package/dist/src/lib/sharing/ConsumeSharedFallbackDependency.d.ts +15 -10
  90. package/dist/src/lib/sharing/ConsumeSharedFallbackDependency.js +27 -25
  91. package/dist/src/lib/sharing/ConsumeSharedFallbackDependency.js.map +1 -1
  92. package/dist/src/lib/sharing/ConsumeSharedModule.d.ts +77 -68
  93. package/dist/src/lib/sharing/ConsumeSharedModule.js +186 -214
  94. package/dist/src/lib/sharing/ConsumeSharedModule.js.map +1 -1
  95. package/dist/src/lib/sharing/ConsumeSharedPlugin.d.ts +13 -9
  96. package/dist/src/lib/sharing/ConsumeSharedPlugin.js +308 -475
  97. package/dist/src/lib/sharing/ConsumeSharedPlugin.js.map +1 -1
  98. package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.d.ts +16 -11
  99. package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.js +107 -137
  100. package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.js.map +1 -1
  101. package/dist/src/lib/sharing/ProvideForSharedDependency.d.ts +14 -9
  102. package/dist/src/lib/sharing/ProvideForSharedDependency.js +25 -25
  103. package/dist/src/lib/sharing/ProvideForSharedDependency.js.map +1 -1
  104. package/dist/src/lib/sharing/ProvideSharedDependency.d.ts +44 -39
  105. package/dist/src/lib/sharing/ProvideSharedDependency.js +72 -76
  106. package/dist/src/lib/sharing/ProvideSharedDependency.js.map +1 -1
  107. package/dist/src/lib/sharing/ProvideSharedModule.d.ts +91 -82
  108. package/dist/src/lib/sharing/ProvideSharedModule.js +177 -184
  109. package/dist/src/lib/sharing/ProvideSharedModule.js.map +1 -1
  110. package/dist/src/lib/sharing/ProvideSharedModuleFactory.d.ts +14 -9
  111. package/dist/src/lib/sharing/ProvideSharedModuleFactory.js +19 -25
  112. package/dist/src/lib/sharing/ProvideSharedModuleFactory.js.map +1 -1
  113. package/dist/src/lib/sharing/ProvideSharedPlugin.d.ts +27 -21
  114. package/dist/src/lib/sharing/ProvideSharedPlugin.js +341 -550
  115. package/dist/src/lib/sharing/ProvideSharedPlugin.js.map +1 -1
  116. package/dist/src/lib/sharing/SharePlugin.d.ts +53 -49
  117. package/dist/src/lib/sharing/SharePlugin.js +86 -100
  118. package/dist/src/lib/sharing/SharePlugin.js.map +1 -1
  119. package/dist/src/lib/sharing/ShareRuntimeModule.d.ts +12 -7
  120. package/dist/src/lib/sharing/ShareRuntimeModule.js +81 -103
  121. package/dist/src/lib/sharing/ShareRuntimeModule.js.map +1 -1
  122. package/dist/src/lib/sharing/resolveMatchedConfigs.d.ts +11 -7
  123. package/dist/src/lib/sharing/resolveMatchedConfigs.js +58 -71
  124. package/dist/src/lib/sharing/resolveMatchedConfigs.js.map +1 -1
  125. package/dist/src/lib/sharing/tree-shaking/CollectSharedEntryPlugin.d.ts +18 -14
  126. package/dist/src/lib/sharing/tree-shaking/CollectSharedEntryPlugin.js +74 -128
  127. package/dist/src/lib/sharing/tree-shaking/CollectSharedEntryPlugin.js.map +1 -1
  128. package/dist/src/lib/sharing/tree-shaking/IndependentSharedPlugin.d.ts +39 -34
  129. package/dist/src/lib/sharing/tree-shaking/IndependentSharedPlugin.js +234 -328
  130. package/dist/src/lib/sharing/tree-shaking/IndependentSharedPlugin.js.map +1 -1
  131. package/dist/src/lib/sharing/tree-shaking/IndependentSharedRuntimeModule.d.ts +16 -11
  132. package/dist/src/lib/sharing/tree-shaking/IndependentSharedRuntimeModule.js +30 -28
  133. package/dist/src/lib/sharing/tree-shaking/IndependentSharedRuntimeModule.js.map +1 -1
  134. package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedContainerPlugin.d.ts +28 -24
  135. package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedContainerPlugin.js +91 -95
  136. package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedContainerPlugin.js.map +1 -1
  137. package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedDependency.d.ts +29 -24
  138. package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedDependency.js +47 -43
  139. package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedDependency.js.map +1 -1
  140. package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedEntryDependency.d.ts +20 -15
  141. package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedEntryDependency.js +33 -29
  142. package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedEntryDependency.js.map +1 -1
  143. package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedEntryModule.d.ts +85 -77
  144. package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedEntryModule.js +141 -153
  145. package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedEntryModule.js.map +1 -1
  146. package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedEntryModuleFactory.d.ts +15 -10
  147. package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedEntryModuleFactory.js +20 -24
  148. package/dist/src/lib/sharing/tree-shaking/SharedContainerPlugin/SharedEntryModuleFactory.js.map +1 -1
  149. package/dist/src/lib/sharing/tree-shaking/SharedUsedExportsOptimizerPlugin.d.ts +21 -16
  150. package/dist/src/lib/sharing/tree-shaking/SharedUsedExportsOptimizerPlugin.js +157 -231
  151. package/dist/src/lib/sharing/tree-shaking/SharedUsedExportsOptimizerPlugin.js.map +1 -1
  152. package/dist/src/lib/sharing/tree-shaking/SharedUsedExportsOptimizerRuntimeModule.d.ts +14 -9
  153. package/dist/src/lib/sharing/tree-shaking/SharedUsedExportsOptimizerRuntimeModule.js +26 -27
  154. package/dist/src/lib/sharing/tree-shaking/SharedUsedExportsOptimizerRuntimeModule.js.map +1 -1
  155. package/dist/src/lib/sharing/tree-shaking/TreeShakingSharedPlugin.d.ts +18 -13
  156. package/dist/src/lib/sharing/tree-shaking/TreeShakingSharedPlugin.js +41 -49
  157. package/dist/src/lib/sharing/tree-shaking/TreeShakingSharedPlugin.js.map +1 -1
  158. package/dist/src/lib/sharing/utils.d.ts +27 -24
  159. package/dist/src/lib/sharing/utils.js +224 -367
  160. package/dist/src/lib/sharing/utils.js.map +1 -1
  161. package/dist/src/lib/startup/MfStartupChunkDependenciesPlugin.d.ts +11 -7
  162. package/dist/src/lib/startup/MfStartupChunkDependenciesPlugin.js +56 -75
  163. package/dist/src/lib/startup/MfStartupChunkDependenciesPlugin.js.map +1 -1
  164. package/dist/src/lib/startup/StartupHelpers.d.ts +11 -6
  165. package/dist/src/lib/startup/StartupHelpers.js +128 -178
  166. package/dist/src/lib/startup/StartupHelpers.js.map +1 -1
  167. package/dist/src/prefetch.d.ts +3 -2
  168. package/dist/src/prefetch.js +17 -8
  169. package/dist/src/rspack.d.ts +3 -2
  170. package/dist/src/rspack.js +35 -11
  171. package/dist/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.d.ts +8 -4
  172. package/dist/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.js +19 -16
  173. package/dist/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.js.map +1 -1
  174. package/dist/src/runtime.d.ts +1 -1
  175. package/dist/src/runtime.js +11 -18
  176. package/dist/src/schemas/container/ContainerPlugin.check.d.ts +13 -5
  177. package/dist/src/schemas/container/ContainerPlugin.check.js +958 -1218
  178. package/dist/src/schemas/container/ContainerPlugin.check.js.map +1 -1
  179. package/dist/src/schemas/container/ContainerPlugin.d.ts +271 -268
  180. package/dist/src/schemas/container/ContainerPlugin.js +273 -361
  181. package/dist/src/schemas/container/ContainerPlugin.js.map +1 -1
  182. package/dist/src/schemas/container/ContainerReferencePlugin.check.d.ts +13 -5
  183. package/dist/src/schemas/container/ContainerReferencePlugin.check.js +335 -443
  184. package/dist/src/schemas/container/ContainerReferencePlugin.check.js.map +1 -1
  185. package/dist/src/schemas/container/ContainerReferencePlugin.d.ts +102 -99
  186. package/dist/src/schemas/container/ContainerReferencePlugin.js +122 -162
  187. package/dist/src/schemas/container/ContainerReferencePlugin.js.map +1 -1
  188. package/dist/src/schemas/container/ExternalsType.check.d.ts +13 -5
  189. package/dist/src/schemas/container/ExternalsType.check.js +36 -62
  190. package/dist/src/schemas/container/ExternalsType.check.js.map +1 -1
  191. package/dist/src/schemas/container/ExternalsType.d.ts +5 -2
  192. package/dist/src/schemas/container/ExternalsType.js +8 -11
  193. package/dist/src/schemas/container/ExternalsType.js.map +1 -1
  194. package/dist/src/schemas/container/ModuleFederationPlugin.check.js +3001 -4812
  195. package/dist/src/schemas/container/ModuleFederationPlugin.check.js.map +1 -1
  196. package/dist/src/schemas/container/ModuleFederationPlugin.d.ts +819 -814
  197. package/dist/src/schemas/container/ModuleFederationPlugin.js +780 -1053
  198. package/dist/src/schemas/container/ModuleFederationPlugin.js.map +1 -1
  199. package/dist/src/schemas/sharing/ConsumeSharedPlugin.check.d.ts +13 -5
  200. package/dist/src/schemas/sharing/ConsumeSharedPlugin.check.js +568 -768
  201. package/dist/src/schemas/sharing/ConsumeSharedPlugin.check.js.map +1 -1
  202. package/dist/src/schemas/sharing/ConsumeSharedPlugin.d.ts +197 -194
  203. package/dist/src/schemas/sharing/ConsumeSharedPlugin.js +212 -238
  204. package/dist/src/schemas/sharing/ConsumeSharedPlugin.js.map +1 -1
  205. package/dist/src/schemas/sharing/ProvideSharedPlugin.check.d.ts +13 -5
  206. package/dist/src/schemas/sharing/ProvideSharedPlugin.check.js +598 -804
  207. package/dist/src/schemas/sharing/ProvideSharedPlugin.check.js.map +1 -1
  208. package/dist/src/schemas/sharing/ProvideSharedPlugin.d.ts +184 -181
  209. package/dist/src/schemas/sharing/ProvideSharedPlugin.js +196 -229
  210. package/dist/src/schemas/sharing/ProvideSharedPlugin.js.map +1 -1
  211. package/dist/src/schemas/sharing/ProviderSharedPlugin.check.d.ts +12 -4
  212. package/dist/src/schemas/sharing/ProviderSharedPlugin.check.js +285 -482
  213. package/dist/src/schemas/sharing/ProviderSharedPlugin.check.js.map +1 -1
  214. package/dist/src/schemas/sharing/ProviderSharedPlugin.d.ts +103 -100
  215. package/dist/src/schemas/sharing/ProviderSharedPlugin.js +104 -126
  216. package/dist/src/schemas/sharing/ProviderSharedPlugin.js.map +1 -1
  217. package/dist/src/schemas/sharing/SharePlugin.check.d.ts +13 -5
  218. package/dist/src/schemas/sharing/SharePlugin.check.js +749 -965
  219. package/dist/src/schemas/sharing/SharePlugin.check.js.map +1 -1
  220. package/dist/src/schemas/sharing/SharePlugin.d.ts +245 -242
  221. package/dist/src/schemas/sharing/SharePlugin.js +256 -293
  222. package/dist/src/schemas/sharing/SharePlugin.js.map +1 -1
  223. package/dist/src/utils.d.ts +3 -0
  224. package/dist/src/utils.js +35 -26
  225. package/dist/src/utils.js.map +1 -1
  226. package/dist/src/webpack.d.ts +2 -2
  227. package/dist/src/webpack.js +6 -40
  228. package/dist/src/wrapper/AsyncBoundaryPlugin.d.ts +9 -4
  229. package/dist/src/wrapper/AsyncBoundaryPlugin.js +12 -11
  230. package/dist/src/wrapper/AsyncBoundaryPlugin.js.map +1 -1
  231. package/dist/src/wrapper/BaseWrapperPlugin.d.ts +18 -13
  232. package/dist/src/wrapper/BaseWrapperPlugin.js +39 -39
  233. package/dist/src/wrapper/BaseWrapperPlugin.js.map +1 -1
  234. package/dist/src/wrapper/ConsumeSharedPlugin.d.ts +10 -4
  235. package/dist/src/wrapper/ConsumeSharedPlugin.js +12 -11
  236. package/dist/src/wrapper/ConsumeSharedPlugin.js.map +1 -1
  237. package/dist/src/wrapper/ContainerPlugin.d.ts +9 -4
  238. package/dist/src/wrapper/ContainerPlugin.js +12 -11
  239. package/dist/src/wrapper/ContainerPlugin.js.map +1 -1
  240. package/dist/src/wrapper/ContainerReferencePlugin.d.ts +9 -4
  241. package/dist/src/wrapper/ContainerReferencePlugin.js +12 -11
  242. package/dist/src/wrapper/ContainerReferencePlugin.js.map +1 -1
  243. package/dist/src/wrapper/FederationModulesPlugin.d.ts +18 -10
  244. package/dist/src/wrapper/FederationModulesPlugin.js +19 -19
  245. package/dist/src/wrapper/FederationModulesPlugin.js.map +1 -1
  246. package/dist/src/wrapper/FederationRuntimePlugin.d.ts +11 -6
  247. package/dist/src/wrapper/FederationRuntimePlugin.js +18 -17
  248. package/dist/src/wrapper/FederationRuntimePlugin.js.map +1 -1
  249. package/dist/src/wrapper/HoistContainerReferencesPlugin.d.ts +8 -3
  250. package/dist/src/wrapper/HoistContainerReferencesPlugin.js +12 -11
  251. package/dist/src/wrapper/HoistContainerReferencesPlugin.js.map +1 -1
  252. package/dist/src/wrapper/ModuleFederationPlugin.d.ts +12 -7
  253. package/dist/src/wrapper/ModuleFederationPlugin.js +73 -99
  254. package/dist/src/wrapper/ModuleFederationPlugin.js.map +1 -1
  255. package/dist/src/wrapper/ProvideSharedPlugin.d.ts +10 -4
  256. package/dist/src/wrapper/ProvideSharedPlugin.js +12 -11
  257. package/dist/src/wrapper/ProvideSharedPlugin.js.map +1 -1
  258. package/dist/src/wrapper/SharePlugin.d.ts +10 -4
  259. package/dist/src/wrapper/SharePlugin.js +12 -11
  260. package/dist/src/wrapper/SharePlugin.js.map +1 -1
  261. package/dist/src/wrapper/TreeShakingSharedPlugin.d.ts +9 -4
  262. package/dist/src/wrapper/TreeShakingSharedPlugin.js +12 -11
  263. package/dist/src/wrapper/TreeShakingSharedPlugin.js.map +1 -1
  264. package/package.json +23 -14
  265. package/dist/package.json +0 -110
  266. package/dist/src/declarations/plugins/container/AsyncDependenciesBlock.d.ts +0 -57
  267. package/dist/src/declarations/plugins/container/ModuleFactory.d.ts +0 -33
  268. package/dist/src/declarations/plugins/container/ObjectDeserializerContext.d.ts +0 -4
  269. package/dist/src/declarations/plugins/container/StaticExportsDependency.d.ts +0 -28
  270. package/dist/src/declarations/plugins/container/Template.d.ts +0 -198
  271. package/dist/src/declarations/plugins/container/WebpackError.d.ts +0 -33
  272. package/dist/src/declarations/plugins/sharing/ConsumeSharedModule.d.ts +0 -86
  273. package/dist/src/declarations/plugins/sharing/ConsumeSharedPlugin.d.ts +0 -100
  274. package/dist/src/declarations/plugins/sharing/ProvideSharedPlugin.d.ts +0 -102
  275. package/dist/src/declarations/plugins/sharing/SharePlugin.d.ts +0 -116
  276. package/dist/src/lib/container/runtime/ChildCompilationRuntimePlugin.d.ts +0 -20
  277. package/dist/src/lib/container/runtime/ChildCompilationRuntimePlugin.js +0 -222
  278. package/dist/src/lib/container/runtime/ChildCompilationRuntimePlugin.js.map +0 -1
  279. package/dist/src/prefetch.js.map +0 -1
  280. package/dist/src/rspack.js.map +0 -1
  281. package/dist/src/runtime.js.map +0 -1
  282. package/dist/src/types/runtime.d.ts +0 -10
  283. package/dist/src/types/runtime.js +0 -3
  284. package/dist/src/types/runtime.js.map +0 -1
  285. package/dist/src/webpack.js.map +0 -1
package/dist/README.md ADDED
@@ -0,0 +1,213 @@
1
+ # `@module-federation/enhanced`
2
+
3
+ This package provides enhanced features for module federation.
4
+
5
+ The following items are exported:
6
+
7
+ - ModuleFederationPlugin
8
+ - ContainerPlugin
9
+ - ContainerReferencePlugin
10
+ - SharePlugin
11
+ - ConsumeSharedPlugin
12
+ - ProvideSharedPlugin
13
+ - FederationRuntimePlugin
14
+ - AsyncBoundaryPlugin
15
+ - HoistContainerReferencesPlugin
16
+
17
+ ## Documentation
18
+
19
+ See [https://module-federation.io/guide/build-plugins/plugins.html](https://module-federation.io/guide/build-plugins/plugins.html) for details.
20
+
21
+ ## ModuleFederationPlugin
22
+
23
+ ### Configuration
24
+
25
+ ### name
26
+
27
+ - Type: `string`
28
+ - Required: No
29
+
30
+ The name of the container.
31
+
32
+ ### exposes
33
+
34
+ - Type: `Exposes`
35
+ - Required: No
36
+ - Default: `undefined`
37
+
38
+ Used to specify the modules and file entry points that are exposed via Module Federation. After configuration, the exposed modules will be extracted into a separate chunk, and if there are async chunks, they will also be extracted into a separate chunk (the specific splitting behavior depends on the chunk splitting rules).
39
+
40
+ The `Exposes` type is defined as follows:
41
+
42
+ ```tsx
43
+ type Exposes = (ExposesItem | ExposesObject)[] | ExposesObject;
44
+
45
+ type ExposesItem = string;
46
+
47
+ type ExposesItems = ExposesItem[];
48
+
49
+ interface ExposesObject {
50
+ [exposeKey: string]: ExposesConfig | ExposesItem | ExposesItems;
51
+ }
52
+ ```
53
+
54
+ Here, `exposeKey` is essentially the same as the [Package Entry Points](https://nodejs.org/api/packages.html#package-entry-points) specification (except that regular expression matching is not supported).
55
+
56
+ For example:
57
+
58
+ ```jsx
59
+ module.exports = {
60
+ plugins: [
61
+ new ModuleFederationPlugin({
62
+ name: 'mfButton',
63
+ exposes: {
64
+ // Note: "./" is not supported
65
+ '.': './src/index.tsx',
66
+ './add': './src/utils/add.ts',
67
+ './Button': './src/components/Button.tsx',
68
+ },
69
+ }),
70
+ ],
71
+ };
72
+ ```
73
+
74
+ ### remotes
75
+
76
+ > This is a consumer-specific parameter. If remotes is set, it can be considered as a consumer.
77
+
78
+ - Type: `Remotes`
79
+ - Required: No
80
+ - Default: `undefined`
81
+
82
+ This is used to specify how Module Federation consumes remote modules.
83
+
84
+ The `Remotes` type is defined as follows:
85
+
86
+ ```tsx
87
+ type Remotes = (RemotesItem | RemotesObject)[] | RemotesObject;
88
+
89
+ type RemotesItem = string;
90
+ type RemotesItems = RemotesItem[];
91
+
92
+ interface RemotesObject {
93
+ [remoteAlias: string]: RemotesConfig | RemotesItem | RemotesItems;
94
+ }
95
+ ```
96
+
97
+ Here, `remoteAlias` is the name actually used by the user and can be configured arbitrarily. For example, if `remoteAlias` is set to `demo`, the consumption method is `import xx from 'demo'`.
98
+
99
+ ### shared
100
+
101
+ - Type: `Shared`
102
+ - Required: No
103
+ - Default: `undefined`
104
+
105
+ `shared` is used to share common dependencies between consumers and producers, reducing runtime download size and thus improving performance.
106
+
107
+ The `Shared` type is defined as follows:
108
+
109
+ ```tsx
110
+ type Shared = (SharedItem | SharedObject)[] | SharedObject;
111
+
112
+ type SharedItem = string;
113
+
114
+ interface SharedObject {
115
+ [k: string]: SharedConfig | SharedItem;
116
+ }
117
+ ```
118
+
119
+ #### singleton
120
+
121
+ - Type: `boolean`
122
+ - Required: No
123
+ - Default: `false`
124
+
125
+ Determines whether only one version of the shared module is allowed in the shared scope (singleton mode).
126
+
127
+ - If the value is true, singleton mode is enabled; if the value is false, singleton mode is not enabled.
128
+ - If singleton mode is enabled, the shared dependencies of the remote application components and host application are loaded only once, and a higher version is loaded when the versions are not consistent. At this time, a warning will be given to the lower version side:
129
+ - If singleton mode is not enabled, if the versions of shared dependencies between the remote application and host application are not consistent, the remote application and host application load their own dependencies
130
+
131
+ #### requiredVersion
132
+
133
+ - Type: `string`
134
+ - Required: False
135
+ - Default: `require('project/package.json')[devDeps | dep]['depName']`
136
+
137
+ The required version can be a version range. The default value is the dependency version of the current application.
138
+
139
+ - When using shared dependencies, it will be judged whether the dependency version meets requiredVersion. If it does, it will be used normally. If it is less than requiredVersion, a warning will be issued in the console, and the smallest version in the current shared dependency will be used.
140
+ - When one side sets requiredVersion and the other side sets singleton, the dependency of requiredVersion will be loaded, and the singleton side will directly use the dependency of requiredVersion, regardless of the version.
141
+
142
+ #### eager
143
+
144
+ :::warning
145
+ When `eager` is set to true, the shared dependencies will be packaged into the entry file, which will cause the entry file to be too large. Please open with caution.
146
+ `eager: true` is rarely recommended
147
+ :::
148
+
149
+ - Type: `boolean`
150
+ - Required: False
151
+ - Default: `false`
152
+
153
+ Determines whether to load shared modules immediately.
154
+
155
+ Under normal circumstances, you need to open the asynchronous entry, and then load shared asynchronously on demand. If you want to use shared but don't want to enable asynchronous entry, you can set `eager` to true .
156
+
157
+ ### runtimePlugins
158
+
159
+ - Type: `string[] | Array<[string, Record<string, unknown>]>`
160
+ - Required: False
161
+ - Default: `undefined`
162
+
163
+ Used to add additional plug-ins required at runtime. The value is the path of the specific plug-in. It supports absolute/relative paths and package names.
164
+
165
+ Once set, the runtime plugin is automatically injected and used at build time.
166
+
167
+ ### implementation
168
+
169
+ - Type: `string`
170
+ - Required: False
171
+ - Default: `undefined`
172
+
173
+ Used to modify the actual bundler runtime version. Path with value `@module-federation/runtime-tools`.
174
+
175
+ ## CLI
176
+
177
+ To view all available CLI commands, run the following command in the project directory:
178
+
179
+ ```bash
180
+ npx mf -h
181
+ ```
182
+
183
+ The output is shown below:
184
+
185
+ ```bash
186
+ Usage: mf <command> [options]
187
+
188
+ Options:
189
+ -V, --version output the version number
190
+ -h, --help display help for command
191
+
192
+ Commands:
193
+ dts [options] generate or fetch the mf types
194
+ help [command] display help for command
195
+ ```
196
+
197
+ ### mf dts
198
+
199
+ The mf dts command is used to generate or fetch remote types.
200
+
201
+ ```bash
202
+ Usage: mf dts [options]
203
+
204
+ generate or fetch the mf types
205
+
206
+ Options:
207
+ --root <root> specify the project root directory
208
+ --output <output> specify the generated dts output directory
209
+ --fetch <boolean> fetch types from remote, default is true (default: true)
210
+ --generate <boolean> generate types, default is true (default: true)
211
+ -c --config <config> specify the configuration file, can be a relative or absolute path
212
+ -h, --help display help for command
213
+ ```
@@ -0,0 +1,140 @@
1
+ # Rstest migration plan for packages/enhanced
2
+
3
+ This document captures the work needed to migrate the enhanced package tests
4
+ from Jest to Rstest. It is written against the current repo state and the
5
+ Rstest docs listed in the references section.
6
+
7
+ ## Current state
8
+ - Jest configs are in `packages/enhanced/jest.config.ts` and
9
+ `packages/enhanced/jest.embed.ts`, with Nx targets `test:jest` and
10
+ `test:experiments` in `packages/enhanced/project.json`.
11
+ - The default `enhanced:test` target runs Vitest via
12
+ `packages/enhanced/vitest.config.ts`.
13
+ - Rstest is already wired in `packages/enhanced/rstest.config.ts`, but only
14
+ includes `test/ConfigTestCases.*.rstest.ts` files.
15
+ - Many unit and compiler tests under `packages/enhanced/test/**` are Jest-only
16
+ (global `jest`, `jest.mock`, `jest.fn`, callback-style `done`, etc).
17
+
18
+ ## Target state
19
+ - All enhanced package tests run under Rstest via `enhanced:rstest`.
20
+ - Nx target `enhanced:test` uses Rstest and no longer depends on Jest/Vitest.
21
+ - Jest-only helpers/configs in `packages/enhanced` are removed or unused.
22
+
23
+ ## Work items
24
+
25
+ ### 1) Update scripts and Nx targets
26
+ - Switch `packages/enhanced/project.json` `test` target to Rstest:
27
+ `rstest run -c packages/enhanced/rstest.config.ts` (match CLI usage).
28
+ - Replace or remove `test:jest` and `test:experiments` targets, or rewrite
29
+ them as Rstest equivalents (for example, separate includes/projects).
30
+ - Keep `enhanced:rstest` in the root `package.json` as the user-facing entry
31
+ point and ensure it uses `rstest run` (or `rstest`) consistently.
32
+
33
+ ### 2) Expand `rstest.config.ts` coverage
34
+ - Include unit and compiler tests (not just ConfigTestCases):
35
+ - `test/**/*.test.ts`
36
+ - `test/**/*.spec.ts`
37
+ - `test/**/*.rstest.ts` (keep existing Rstest cases)
38
+ - Exclude non-Rstest variants to prevent duplicate runs:
39
+ - `test/**/*.vitest.ts`
40
+ - `test/**/*.basictest.js` (Jest-only)
41
+ - `test/**/*.embedruntime.js` (Jest-only)
42
+ - Consider Rstest `projects` to separate long-running config-case tests from
43
+ fast unit tests (different `testTimeout`, `include`, etc).
44
+ - Add `setupFiles` to reapply `test/setupTestFramework.js` logic (custom
45
+ matchers and debug hooks).
46
+ - If cleaning `packages/enhanced/test/js` is still required, move it to
47
+ `globalSetup` or a pretest script instead of Jest config.
48
+
49
+ ### 3) Replace Jest APIs in tests
50
+ Map Jest-only APIs to Rstest equivalents and update imports where needed.
51
+
52
+ Core mappings:
53
+ - `jest.fn` -> `rs.fn` (from `@rstest/core`)
54
+ - `jest.spyOn` -> `rs.spyOn`
55
+ - `jest.mock` -> `rs.mock`
56
+ - `jest.doMock` -> `rs.doMock`
57
+ - `jest.dontMock` -> `rs.unmock` or `rs.doUnmock`
58
+ - `jest.resetModules` -> `rs.resetModules` (note: does not clear mocks)
59
+ - `jest.clearAllMocks` -> `rs.clearAllMocks`
60
+ - `jest.resetAllMocks` -> `rs.resetAllMocks`
61
+ - `jest.restoreAllMocks` -> `rs.restoreAllMocks`
62
+ - `jest.setTimeout` -> `rs.setConfig({ testTimeout })` or config `testTimeout`
63
+ - `jest.requireActual` -> `await rs.importActual(...)` or
64
+ `import ... with { rstest: 'importActual' }`
65
+
66
+ Known gaps to rework:
67
+ - `jest.isolateModules` has no direct Rstest equivalent; use
68
+ `rs.resetModules` + dynamic `import()` and refactor those tests.
69
+
70
+ Files to review specifically (non-exhaustive):
71
+ - `packages/enhanced/test/helpers/webpackMocks.ts`
72
+ - `packages/enhanced/test/compiler-unit/**/*.test.ts`
73
+ - `packages/enhanced/test/unit/**/*.test.ts`
74
+ - `packages/enhanced/test/ConfigTestCases.template.js`
75
+ - `packages/enhanced/test/ConfigTestCases.embedruntime.js`
76
+ - `packages/enhanced/test/ConfigTestCases.basictest.js`
77
+
78
+ ### 4) Remove callback-style `done` usage
79
+ Rstest does not support `done` callbacks in tests. Convert to async/Promise
80
+ style (return a Promise or `async` function). Key files include:
81
+ - `packages/enhanced/test/warmup-webpack.js`
82
+ - `packages/enhanced/test/helpers/expectWarningFactory.js`
83
+ - `packages/enhanced/test/compiler-unit/container/HoistContainerReferencesPlugin.test.ts`
84
+ - `packages/enhanced/test/ConfigTestCases.template.js` (if still used)
85
+
86
+ Note: callback-style functions inside config-case bundles are already wrapped
87
+ in `packages/enhanced/test/ConfigTestCases.rstest.ts` and do not require
88
+ Rstest to support `done`.
89
+
90
+ ### 5) TypeScript types and globals
91
+ - Decide between explicit imports (`import { describe, it, expect, rs }`)
92
+ vs `globals: true`. The current `rstest.config.ts` uses `globals: true`.
93
+ - If keeping globals, update `packages/enhanced/tsconfig.spec.json` to include
94
+ `@rstest/core/globals` and remove `jest` types.
95
+ - Replace `jest.Mock`, `jest.MockedFunction`, etc. with Rstest types
96
+ (`Mock`, `MockInstance`) from `@rstest/core`.
97
+
98
+ ### 6) Remove Jest-only infra
99
+ - Drop or ignore `packages/enhanced/jest.config.ts`,
100
+ `packages/enhanced/jest.embed.ts`, and `packages/enhanced/test/patch-node-env.js`
101
+ once no tests rely on them.
102
+ - Rework `packages/enhanced/test/helpers/createLazyTestEnv.js`, which depends on
103
+ `JEST_STATE_SYMBOL`. Prefer avoiding this helper under Rstest or implement a
104
+ Rstest-native alternative if still needed.
105
+
106
+ ### 7) Verify behavior and parity
107
+ - Run `pnpm enhanced:rstest` and check for parity with the old Jest suite.
108
+ - Use `rstest list --filesOnly -c packages/enhanced/rstest.config.ts` to verify
109
+ include/exclude patterns.
110
+ - Validate that custom matchers in `test/setupTestFramework.js` still work with
111
+ Rstest's `expect.extend`.
112
+
113
+ ## Suggested file-level checklist
114
+ - `packages/enhanced/project.json`: update `test` target and pre-release steps.
115
+ - `packages/enhanced/rstest.config.ts`: include patterns, setupFiles,
116
+ globalSetup, timeouts.
117
+ - `packages/enhanced/tsconfig.spec.json`: replace Jest types with Rstest types.
118
+ - `packages/enhanced/test/setupTestFramework.js`: ensure compatibility with
119
+ Rstest (no `done` usage).
120
+ - `packages/enhanced/test/helpers/webpackMocks.ts`: replace Jest mocks.
121
+ - `packages/enhanced/test/unit/**`: replace Jest APIs and types.
122
+ - `packages/enhanced/test/compiler-unit/**`: replace Jest APIs and types.
123
+
124
+ ## References (Rstest docs)
125
+ - https://rstest.rs/llms.txt
126
+ - https://rstest.rs/guide/migration/jest.md
127
+ - https://rstest.rs/guide/basic/cli.md
128
+ - https://rstest.rs/guide/basic/configure-rstest.md
129
+ - https://rstest.rs/guide/basic/projects.md
130
+ - https://rstest.rs/config/test/include.md
131
+ - https://rstest.rs/config/test/setup-files.md
132
+ - https://rstest.rs/config/test/global-setup.md
133
+ - https://rstest.rs/config/test/globals.md
134
+ - https://rstest.rs/config/test/test-environment.md
135
+ - https://rstest.rs/api/runtime-api/test-api/expect.md
136
+ - https://rstest.rs/api/runtime-api/rstest/mock-modules.md
137
+ - https://rstest.rs/api/runtime-api/rstest/mock-functions.md
138
+ - https://rstest.rs/api/runtime-api/rstest/mock-instance.md
139
+ - https://rstest.rs/api/runtime-api/rstest/utilities.md
140
+ - https://rstest.rs/api/javascript-api/rstest-core.md
@@ -0,0 +1,47 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
9
+ var __exportAll = (all, no_symbols) => {
10
+ let target = {};
11
+ for (var name in all) {
12
+ __defProp(target, name, {
13
+ get: all[name],
14
+ enumerable: true
15
+ });
16
+ }
17
+ if (!no_symbols) {
18
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
19
+ }
20
+ return target;
21
+ };
22
+ var __copyProps = (to, from, except, desc) => {
23
+ if (from && typeof from === "object" || typeof from === "function") {
24
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
25
+ key = keys[i];
26
+ if (!__hasOwnProp.call(to, key) && key !== except) {
27
+ __defProp(to, key, {
28
+ get: ((k) => from[k]).bind(null, key),
29
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
30
+ });
31
+ }
32
+ }
33
+ }
34
+ return to;
35
+ };
36
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
37
+ value: mod,
38
+ enumerable: true
39
+ }) : target, mod));
40
+ var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
41
+
42
+ //#endregion
43
+
44
+ exports.__esmMin = __esmMin;
45
+ exports.__exportAll = __exportAll;
46
+ exports.__toCommonJS = __toCommonJS;
47
+ exports.__toESM = __toESM;
@@ -1,21 +1,24 @@
1
- import type { moduleFederationPlugin } from '@module-federation/sdk';
2
- export { default as ModuleFederationPlugin, PLUGIN_NAME, } from './wrapper/ModuleFederationPlugin';
3
- export { default as ContainerReferencePlugin } from './wrapper/ContainerReferencePlugin';
4
- export { default as SharePlugin } from './wrapper/SharePlugin';
5
- export { default as ContainerPlugin } from './wrapper/ContainerPlugin';
6
- export { default as ConsumeSharedPlugin } from './wrapper/ConsumeSharedPlugin';
7
- export { default as ProvideSharedPlugin } from './wrapper/ProvideSharedPlugin';
8
- export { default as FederationModulesPlugin } from './wrapper/FederationModulesPlugin';
9
- export { default as FederationRuntimePlugin } from './wrapper/FederationRuntimePlugin';
10
- export { default as AsyncBoundaryPlugin } from './wrapper/AsyncBoundaryPlugin';
11
- export { default as HoistContainerReferencesPlugin } from './wrapper/HoistContainerReferencesPlugin';
12
- export { default as TreeShakingSharedPlugin } from './wrapper/TreeShakingSharedPlugin';
13
- export declare const dependencies: {
14
- readonly ContainerEntryDependency: any;
1
+ import ModuleFederationPlugin, { PLUGIN_NAME } from "./wrapper/ModuleFederationPlugin.js";
2
+ import ContainerReferencePlugin from "./wrapper/ContainerReferencePlugin.js";
3
+ import SharePlugin from "./wrapper/SharePlugin.js";
4
+ import ContainerPlugin from "./wrapper/ContainerPlugin.js";
5
+ import ConsumeSharedPlugin from "./wrapper/ConsumeSharedPlugin.js";
6
+ import ProvideSharedPlugin from "./wrapper/ProvideSharedPlugin.js";
7
+ import FederationModulesPlugin from "./wrapper/FederationModulesPlugin.js";
8
+ import FederationRuntimePlugin from "./wrapper/FederationRuntimePlugin.js";
9
+ import AsyncBoundaryPlugin from "./wrapper/AsyncBoundaryPlugin.js";
10
+ import HoistContainerReferencesPlugin from "./wrapper/HoistContainerReferencesPlugin.js";
11
+ import TreeShakingSharedPlugin from "./wrapper/TreeShakingSharedPlugin.js";
12
+ import { parseOptions } from "./lib/container/options.js";
13
+ import { createModuleFederationConfig, moduleFederationPlugin } from "@module-federation/sdk";
14
+
15
+ //#region src/index.d.ts
16
+ declare const dependencies: {
17
+ readonly ContainerEntryDependency: any;
15
18
  };
16
- export { parseOptions } from './lib/container/options';
17
- export declare const container: {
18
- readonly ContainerEntryModule: any;
19
+ declare const container: {
20
+ readonly ContainerEntryModule: any;
19
21
  };
20
- export { createModuleFederationConfig } from '@module-federation/sdk';
21
- export type { moduleFederationPlugin };
22
+ //#endregion
23
+ export { AsyncBoundaryPlugin, ConsumeSharedPlugin, ContainerPlugin, ContainerReferencePlugin, FederationModulesPlugin, FederationRuntimePlugin, HoistContainerReferencesPlugin, ModuleFederationPlugin, PLUGIN_NAME, ProvideSharedPlugin, SharePlugin, TreeShakingSharedPlugin, container, createModuleFederationConfig, dependencies, type moduleFederationPlugin, parseOptions };
24
+ //# sourceMappingURL=index.d.ts.map
package/dist/src/index.js CHANGED
@@ -1,44 +1,48 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.createModuleFederationConfig = exports.container = exports.parseOptions = exports.dependencies = exports.TreeShakingSharedPlugin = exports.HoistContainerReferencesPlugin = exports.AsyncBoundaryPlugin = exports.FederationRuntimePlugin = exports.FederationModulesPlugin = exports.ProvideSharedPlugin = exports.ConsumeSharedPlugin = exports.ContainerPlugin = exports.SharePlugin = exports.ContainerReferencePlugin = exports.PLUGIN_NAME = exports.ModuleFederationPlugin = void 0;
7
- var ModuleFederationPlugin_1 = require("./wrapper/ModuleFederationPlugin");
8
- Object.defineProperty(exports, "ModuleFederationPlugin", { enumerable: true, get: function () { return __importDefault(ModuleFederationPlugin_1).default; } });
9
- Object.defineProperty(exports, "PLUGIN_NAME", { enumerable: true, get: function () { return ModuleFederationPlugin_1.PLUGIN_NAME; } });
10
- var ContainerReferencePlugin_1 = require("./wrapper/ContainerReferencePlugin");
11
- Object.defineProperty(exports, "ContainerReferencePlugin", { enumerable: true, get: function () { return __importDefault(ContainerReferencePlugin_1).default; } });
12
- var SharePlugin_1 = require("./wrapper/SharePlugin");
13
- Object.defineProperty(exports, "SharePlugin", { enumerable: true, get: function () { return __importDefault(SharePlugin_1).default; } });
14
- var ContainerPlugin_1 = require("./wrapper/ContainerPlugin");
15
- Object.defineProperty(exports, "ContainerPlugin", { enumerable: true, get: function () { return __importDefault(ContainerPlugin_1).default; } });
16
- var ConsumeSharedPlugin_1 = require("./wrapper/ConsumeSharedPlugin");
17
- Object.defineProperty(exports, "ConsumeSharedPlugin", { enumerable: true, get: function () { return __importDefault(ConsumeSharedPlugin_1).default; } });
18
- var ProvideSharedPlugin_1 = require("./wrapper/ProvideSharedPlugin");
19
- Object.defineProperty(exports, "ProvideSharedPlugin", { enumerable: true, get: function () { return __importDefault(ProvideSharedPlugin_1).default; } });
20
- var FederationModulesPlugin_1 = require("./wrapper/FederationModulesPlugin");
21
- Object.defineProperty(exports, "FederationModulesPlugin", { enumerable: true, get: function () { return __importDefault(FederationModulesPlugin_1).default; } });
22
- var FederationRuntimePlugin_1 = require("./wrapper/FederationRuntimePlugin");
23
- Object.defineProperty(exports, "FederationRuntimePlugin", { enumerable: true, get: function () { return __importDefault(FederationRuntimePlugin_1).default; } });
24
- var AsyncBoundaryPlugin_1 = require("./wrapper/AsyncBoundaryPlugin");
25
- Object.defineProperty(exports, "AsyncBoundaryPlugin", { enumerable: true, get: function () { return __importDefault(AsyncBoundaryPlugin_1).default; } });
26
- var HoistContainerReferencesPlugin_1 = require("./wrapper/HoistContainerReferencesPlugin");
27
- Object.defineProperty(exports, "HoistContainerReferencesPlugin", { enumerable: true, get: function () { return __importDefault(HoistContainerReferencesPlugin_1).default; } });
28
- var TreeShakingSharedPlugin_1 = require("./wrapper/TreeShakingSharedPlugin");
29
- Object.defineProperty(exports, "TreeShakingSharedPlugin", { enumerable: true, get: function () { return __importDefault(TreeShakingSharedPlugin_1).default; } });
30
- exports.dependencies = {
31
- get ContainerEntryDependency() {
32
- return require('./lib/container/ContainerEntryDependency').default;
33
- },
34
- };
35
- var options_1 = require("./lib/container/options");
36
- Object.defineProperty(exports, "parseOptions", { enumerable: true, get: function () { return options_1.parseOptions; } });
37
- exports.container = {
38
- get ContainerEntryModule() {
39
- return require('./lib/container/ContainerEntryModule').default;
40
- },
41
- };
42
- var sdk_1 = require("@module-federation/sdk");
43
- Object.defineProperty(exports, "createModuleFederationConfig", { enumerable: true, get: function () { return sdk_1.createModuleFederationConfig; } });
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
+ const require_wrapper_ContainerReferencePlugin = require('./wrapper/ContainerReferencePlugin.js');
5
+ const require_wrapper_SharePlugin = require('./wrapper/SharePlugin.js');
6
+ const require_wrapper_ContainerPlugin = require('./wrapper/ContainerPlugin.js');
7
+ const require_wrapper_ConsumeSharedPlugin = require('./wrapper/ConsumeSharedPlugin.js');
8
+ const require_wrapper_ProvideSharedPlugin = require('./wrapper/ProvideSharedPlugin.js');
9
+ const require_wrapper_FederationModulesPlugin = require('./wrapper/FederationModulesPlugin.js');
10
+ const require_wrapper_FederationRuntimePlugin = require('./wrapper/FederationRuntimePlugin.js');
11
+ const require_wrapper_AsyncBoundaryPlugin = require('./wrapper/AsyncBoundaryPlugin.js');
12
+ const require_wrapper_HoistContainerReferencesPlugin = require('./wrapper/HoistContainerReferencesPlugin.js');
13
+ const require_wrapper_TreeShakingSharedPlugin = require('./wrapper/TreeShakingSharedPlugin.js');
14
+ const require_lib_container_options = require('./lib/container/options.js');
15
+ let _module_federation_sdk = require("@module-federation/sdk");
16
+
17
+ //#region src/index.ts
18
+ const lazyRequire = (id) => module.require(id);
19
+ const dependencies = { get ContainerEntryDependency() {
20
+ return lazyRequire("./lib/container/ContainerEntryDependency").default;
21
+ } };
22
+ const container = { get ContainerEntryModule() {
23
+ return lazyRequire("./lib/container/ContainerEntryModule").default;
24
+ } };
25
+
26
+ //#endregion
27
+ exports.AsyncBoundaryPlugin = require_wrapper_AsyncBoundaryPlugin.default;
28
+ exports.ConsumeSharedPlugin = require_wrapper_ConsumeSharedPlugin.default;
29
+ exports.ContainerPlugin = require_wrapper_ContainerPlugin.default;
30
+ exports.ContainerReferencePlugin = require_wrapper_ContainerReferencePlugin.default;
31
+ exports.FederationModulesPlugin = require_wrapper_FederationModulesPlugin.default;
32
+ exports.FederationRuntimePlugin = require_wrapper_FederationRuntimePlugin.default;
33
+ exports.HoistContainerReferencesPlugin = require_wrapper_HoistContainerReferencesPlugin.default;
34
+ exports.ModuleFederationPlugin = require_wrapper_ModuleFederationPlugin.default;
35
+ exports.PLUGIN_NAME = require_wrapper_ModuleFederationPlugin.PLUGIN_NAME;
36
+ exports.ProvideSharedPlugin = require_wrapper_ProvideSharedPlugin.default;
37
+ exports.SharePlugin = require_wrapper_SharePlugin.default;
38
+ exports.TreeShakingSharedPlugin = require_wrapper_TreeShakingSharedPlugin.default;
39
+ exports.container = container;
40
+ Object.defineProperty(exports, 'createModuleFederationConfig', {
41
+ enumerable: true,
42
+ get: function () {
43
+ return _module_federation_sdk.createModuleFederationConfig;
44
+ }
45
+ });
46
+ exports.dependencies = dependencies;
47
+ exports.parseOptions = require_lib_container_options.parseOptions;
44
48
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AACA,2EAG0C;AAFxC,iJAAA,OAAO,OAA0B;AACjC,qHAAA,WAAW,OAAA;AAEb,+EAAyF;AAAhF,qJAAA,OAAO,OAA4B;AAC5C,qDAA+D;AAAtD,2HAAA,OAAO,OAAe;AAC/B,6DAAuE;AAA9D,mIAAA,OAAO,OAAmB;AACnC,qEAA+E;AAAtE,2IAAA,OAAO,OAAuB;AACvC,qEAA+E;AAAtE,2IAAA,OAAO,OAAuB;AACvC,6EAAuF;AAA9E,mJAAA,OAAO,OAA2B;AAC3C,6EAAuF;AAA9E,mJAAA,OAAO,OAA2B;AAC3C,qEAA+E;AAAtE,2IAAA,OAAO,OAAuB;AACvC,2FAAqG;AAA5F,iKAAA,OAAO,OAAkC;AAClD,6EAAuF;AAA9E,mJAAA,OAAO,OAA2B;AAE9B,QAAA,YAAY,GAAG;IAC1B,IAAI,wBAAwB;QAC1B,OAAO,OAAO,CAAC,0CAA0C,CAAC,CAAC,OAAO,CAAC;IACrE,CAAC;CACF,CAAC;AAEF,mDAAuD;AAA9C,uGAAA,YAAY,OAAA;AAER,QAAA,SAAS,GAAG;IACvB,IAAI,oBAAoB;QACtB,OAAO,OAAO,CAAC,sCAAsC,CAAC,CAAC,OAAO,CAAC;IACjE,CAAC;CACF,CAAC;AAEF,8CAAsE;AAA7D,mHAAA,4BAA4B,OAAA"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["import type { moduleFederationPlugin } from '@module-federation/sdk';\nexport {\n default as ModuleFederationPlugin,\n PLUGIN_NAME,\n} from './wrapper/ModuleFederationPlugin';\nexport { default as ContainerReferencePlugin } from './wrapper/ContainerReferencePlugin';\nexport { default as SharePlugin } from './wrapper/SharePlugin';\nexport { default as ContainerPlugin } from './wrapper/ContainerPlugin';\nexport { default as ConsumeSharedPlugin } from './wrapper/ConsumeSharedPlugin';\nexport { default as ProvideSharedPlugin } from './wrapper/ProvideSharedPlugin';\nexport { default as FederationModulesPlugin } from './wrapper/FederationModulesPlugin';\nexport { default as FederationRuntimePlugin } from './wrapper/FederationRuntimePlugin';\nexport { default as AsyncBoundaryPlugin } from './wrapper/AsyncBoundaryPlugin';\nexport { default as HoistContainerReferencesPlugin } from './wrapper/HoistContainerReferencesPlugin';\nexport { default as TreeShakingSharedPlugin } from './wrapper/TreeShakingSharedPlugin';\n\nconst lazyRequire = (id: string): any => module.require(id);\n\nexport const dependencies = {\n get ContainerEntryDependency() {\n return lazyRequire('./lib/container/ContainerEntryDependency').default;\n },\n};\n\nexport { parseOptions } from './lib/container/options';\n\nexport const container = {\n get ContainerEntryModule() {\n return lazyRequire('./lib/container/ContainerEntryModule').default;\n },\n};\n\nexport { createModuleFederationConfig } from '@module-federation/sdk';\n\nexport type { moduleFederationPlugin };\n"],"mappings":";;;;;;;;;;;;;;;;;AAgBA,MAAM,eAAe,OAAoB,OAAO,QAAQ,GAAG;AAE3D,MAAa,eAAe,EAC1B,IAAI,2BAA2B;AAC7B,QAAO,YAAY,2CAA2C,CAAC;GAElE;AAID,MAAa,YAAY,EACvB,IAAI,uBAAuB;AACzB,QAAO,YAAY,uCAAuC,CAAC;GAE9D"}