@module-federation/enhanced 0.0.4-0 → 0.0.5

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 (279) hide show
  1. package/LICENSE +21 -0
  2. package/dist/package.json +33 -0
  3. package/{src → dist/src}/index.d.ts +4 -0
  4. package/dist/src/index.js +32 -0
  5. package/dist/src/index.js.map +1 -0
  6. package/dist/src/lib/Constants.js +125 -0
  7. package/dist/src/lib/Constants.js.map +1 -0
  8. package/dist/src/lib/RuntimeGlobals.d.ts +0 -0
  9. package/{src → dist/src}/lib/RuntimeGlobals.js +144 -74
  10. package/dist/src/lib/RuntimeGlobals.js.map +1 -0
  11. package/dist/src/lib/container/AsyncBoundaryPlugin.d.ts +19 -0
  12. package/dist/src/lib/container/AsyncBoundaryPlugin.js +172 -0
  13. package/dist/src/lib/container/AsyncBoundaryPlugin.js.map +1 -0
  14. package/{src → dist/src}/lib/container/ContainerEntryDependency.d.ts +1 -1
  15. package/dist/src/lib/container/ContainerEntryDependency.js +37 -0
  16. package/dist/src/lib/container/ContainerEntryDependency.js.map +1 -0
  17. package/{src → dist/src}/lib/container/ContainerEntryModule.d.ts +2 -2
  18. package/dist/src/lib/container/ContainerEntryModule.js +230 -0
  19. package/dist/src/lib/container/ContainerEntryModule.js.map +1 -0
  20. package/{src → dist/src}/lib/container/ContainerEntryModuleFactory.d.ts +2 -1
  21. package/dist/src/lib/container/ContainerEntryModuleFactory.js +30 -0
  22. package/dist/src/lib/container/ContainerEntryModuleFactory.js.map +1 -0
  23. package/{src → dist/src}/lib/container/ContainerExposedDependency.d.ts +2 -2
  24. package/dist/src/lib/container/ContainerExposedDependency.js +49 -0
  25. package/dist/src/lib/container/ContainerExposedDependency.js.map +1 -0
  26. package/{src → dist/src}/lib/container/ContainerPlugin.d.ts +1 -1
  27. package/dist/src/lib/container/ContainerPlugin.js +85 -0
  28. package/dist/src/lib/container/ContainerPlugin.js.map +1 -0
  29. package/{src → dist/src}/lib/container/ContainerReferencePlugin.d.ts +1 -1
  30. package/dist/src/lib/container/ContainerReferencePlugin.js +100 -0
  31. package/dist/src/lib/container/ContainerReferencePlugin.js.map +1 -0
  32. package/{src → dist/src}/lib/container/FallbackDependency.d.ts +1 -5
  33. package/dist/src/lib/container/FallbackDependency.js +47 -0
  34. package/dist/src/lib/container/FallbackDependency.js.map +1 -0
  35. package/{src → dist/src}/lib/container/FallbackItemDependency.d.ts +2 -2
  36. package/dist/src/lib/container/FallbackItemDependency.js +26 -0
  37. package/dist/src/lib/container/FallbackItemDependency.js.map +1 -0
  38. package/{src → dist/src}/lib/container/FallbackModule.d.ts +2 -3
  39. package/dist/src/lib/container/FallbackModule.js +152 -0
  40. package/dist/src/lib/container/FallbackModule.js.map +1 -0
  41. package/{src → dist/src}/lib/container/FallbackModuleFactory.d.ts +3 -2
  42. package/dist/src/lib/container/FallbackModuleFactory.js +28 -0
  43. package/dist/src/lib/container/FallbackModuleFactory.js.map +1 -0
  44. package/dist/src/lib/container/HoistContainerReferencesPlugin.d.ts +13 -0
  45. package/dist/src/lib/container/HoistContainerReferencesPlugin.js +70 -0
  46. package/dist/src/lib/container/HoistContainerReferencesPlugin.js.map +1 -0
  47. package/{src → dist/src}/lib/container/ModuleFederationPlugin.d.ts +1 -1
  48. package/dist/src/lib/container/ModuleFederationPlugin.js +86 -0
  49. package/dist/src/lib/container/ModuleFederationPlugin.js.map +1 -0
  50. package/{src → dist/src}/lib/container/RemoteModule.d.ts +2 -3
  51. package/dist/src/lib/container/RemoteModule.js +148 -0
  52. package/dist/src/lib/container/RemoteModule.js.map +1 -0
  53. package/{src → dist/src}/lib/container/RemoteRuntimeModule.d.ts +1 -1
  54. package/dist/src/lib/container/RemoteRuntimeModule.js +103 -0
  55. package/dist/src/lib/container/RemoteRuntimeModule.js.map +1 -0
  56. package/{src → dist/src}/lib/container/RemoteToExternalDependency.d.ts +2 -2
  57. package/dist/src/lib/container/RemoteToExternalDependency.js +26 -0
  58. package/dist/src/lib/container/RemoteToExternalDependency.js.map +1 -0
  59. package/{src → dist/src}/lib/container/options.js +32 -42
  60. package/dist/src/lib/container/options.js.map +1 -0
  61. package/{src → dist/src}/lib/sharing/ConsumeSharedFallbackDependency.d.ts +2 -2
  62. package/dist/src/lib/sharing/ConsumeSharedFallbackDependency.js +26 -0
  63. package/dist/src/lib/sharing/ConsumeSharedFallbackDependency.js.map +1 -0
  64. package/{src → dist/src}/lib/sharing/ConsumeSharedModule.d.ts +1 -1
  65. package/dist/src/lib/sharing/ConsumeSharedModule.js +201 -0
  66. package/dist/src/lib/sharing/ConsumeSharedModule.js.map +1 -0
  67. package/{src → dist/src}/lib/sharing/ConsumeSharedPlugin.d.ts +1 -1
  68. package/dist/src/lib/sharing/ConsumeSharedPlugin.js +238 -0
  69. package/dist/src/lib/sharing/ConsumeSharedPlugin.js.map +1 -0
  70. package/{src → dist/src}/lib/sharing/ConsumeSharedRuntimeModule.d.ts +1 -1
  71. package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.js +247 -0
  72. package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.js.map +1 -0
  73. package/{src → dist/src}/lib/sharing/ProvideForSharedDependency.d.ts +2 -2
  74. package/dist/src/lib/sharing/ProvideForSharedDependency.js +27 -0
  75. package/dist/src/lib/sharing/ProvideForSharedDependency.js.map +1 -0
  76. package/{src → dist/src}/lib/sharing/ProvideSharedDependency.d.ts +1 -1
  77. package/dist/src/lib/sharing/ProvideSharedDependency.js +61 -0
  78. package/dist/src/lib/sharing/ProvideSharedDependency.js.map +1 -0
  79. package/{src → dist/src}/lib/sharing/ProvideSharedModule.d.ts +5 -5
  80. package/dist/src/lib/sharing/ProvideSharedModule.js +163 -0
  81. package/dist/src/lib/sharing/ProvideSharedModule.js.map +1 -0
  82. package/{src → dist/src}/lib/sharing/ProvideSharedModuleFactory.d.ts +1 -1
  83. package/dist/src/lib/sharing/ProvideSharedModuleFactory.js +30 -0
  84. package/dist/src/lib/sharing/ProvideSharedModuleFactory.js.map +1 -0
  85. package/{src → dist/src}/lib/sharing/ProvideSharedPlugin.d.ts +1 -1
  86. package/dist/src/lib/sharing/ProvideSharedPlugin.js +185 -0
  87. package/dist/src/lib/sharing/ProvideSharedPlugin.js.map +1 -0
  88. package/{src → dist/src}/lib/sharing/SharePlugin.d.ts +1 -1
  89. package/dist/src/lib/sharing/SharePlugin.js +76 -0
  90. package/dist/src/lib/sharing/SharePlugin.js.map +1 -0
  91. package/{src → dist/src}/lib/sharing/ShareRuntimeModule.d.ts +1 -1
  92. package/dist/src/lib/sharing/ShareRuntimeModule.js +116 -0
  93. package/dist/src/lib/sharing/ShareRuntimeModule.js.map +1 -0
  94. package/{src → dist/src}/lib/sharing/resolveMatchedConfigs.d.ts +1 -1
  95. package/dist/src/lib/sharing/resolveMatchedConfigs.js +66 -0
  96. package/dist/src/lib/sharing/resolveMatchedConfigs.js.map +1 -0
  97. package/{src → dist/src}/lib/sharing/utils.d.ts +1 -1
  98. package/{src → dist/src}/lib/sharing/utils.js +94 -81
  99. package/dist/src/lib/sharing/utils.js.map +1 -0
  100. package/dist/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.d.ts +5 -0
  101. package/dist/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.js +19 -0
  102. package/dist/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.js.map +1 -0
  103. package/{src → dist/src}/runtime/ModuleInfoRuntimeModule.d.ts +2 -1
  104. package/dist/src/runtime/ModuleInfoRuntimeModule.js +80 -0
  105. package/dist/src/runtime/ModuleInfoRuntimeModule.js.map +1 -0
  106. package/{src → dist/src}/runtime/ModuleInfoRuntimePlugin.d.ts +1 -1
  107. package/dist/src/runtime/ModuleInfoRuntimePlugin.js +24 -0
  108. package/dist/src/runtime/ModuleInfoRuntimePlugin.js.map +1 -0
  109. package/dist/src/schemas/container/ModuleFederationPlugin.check.d.ts +7 -0
  110. package/dist/src/schemas/container/ModuleFederationPlugin.check.js +1668 -0
  111. package/dist/src/schemas/container/ModuleFederationPlugin.check.js.map +1 -0
  112. package/dist/src/schemas/container/ModuleFederationPlugin.d.ts +437 -0
  113. package/dist/src/schemas/container/ModuleFederationPlugin.js +529 -0
  114. package/dist/src/schemas/container/ModuleFederationPlugin.js.map +1 -0
  115. package/package.json +23 -8
  116. package/CHANGELOG.md +0 -120
  117. package/global.d.js +0 -14
  118. package/global.d.js.map +0 -1
  119. package/pullts.d.ts +0 -1
  120. package/src/declarations/plugins/container/AsyncDependenciesBlock.d.js +0 -14
  121. package/src/declarations/plugins/container/AsyncDependenciesBlock.d.js.map +0 -1
  122. package/src/declarations/plugins/container/ContainerPlugin.d.js +0 -12
  123. package/src/declarations/plugins/container/ContainerPlugin.d.js.map +0 -1
  124. package/src/declarations/plugins/container/ContainerReferencePlugin.d.js +0 -12
  125. package/src/declarations/plugins/container/ContainerReferencePlugin.d.js.map +0 -1
  126. package/src/declarations/plugins/container/Dependency.d.js +0 -14
  127. package/src/declarations/plugins/container/Dependency.d.js.map +0 -1
  128. package/src/declarations/plugins/container/Module.d.js +0 -3
  129. package/src/declarations/plugins/container/Module.d.js.map +0 -1
  130. package/src/declarations/plugins/container/ModuleFactory.d.js +0 -3
  131. package/src/declarations/plugins/container/ModuleFactory.d.js.map +0 -1
  132. package/src/declarations/plugins/container/ModuleFederationPlugin.d.js +0 -12
  133. package/src/declarations/plugins/container/ModuleFederationPlugin.d.js.map +0 -1
  134. package/src/declarations/plugins/container/ObjectDeserializerContext.d.js +0 -6
  135. package/src/declarations/plugins/container/ObjectDeserializerContext.d.js.map +0 -1
  136. package/src/declarations/plugins/container/StaticExportsDependency.d.js +0 -14
  137. package/src/declarations/plugins/container/StaticExportsDependency.d.js.map +0 -1
  138. package/src/declarations/plugins/container/Template.d.js +0 -4
  139. package/src/declarations/plugins/container/Template.d.js.map +0 -1
  140. package/src/declarations/plugins/container/WebpackError.d.js +0 -3
  141. package/src/declarations/plugins/container/WebpackError.d.js.map +0 -1
  142. package/src/declarations/plugins/container/WebpackOptions.d.js +0 -6
  143. package/src/declarations/plugins/container/WebpackOptions.d.js.map +0 -1
  144. package/src/declarations/plugins/sharing/ConsumeSharedPlugin.d.js +0 -12
  145. package/src/declarations/plugins/sharing/ConsumeSharedPlugin.d.js.map +0 -1
  146. package/src/declarations/plugins/sharing/ProvideSharedPlugin.d.js +0 -12
  147. package/src/declarations/plugins/sharing/ProvideSharedPlugin.d.js.map +0 -1
  148. package/src/declarations/plugins/sharing/SharePlugin.d.js +0 -12
  149. package/src/declarations/plugins/sharing/SharePlugin.d.js.map +0 -1
  150. package/src/index.js +0 -47
  151. package/src/index.js.map +0 -1
  152. package/src/lib/Constants.js +0 -103
  153. package/src/lib/Constants.js.map +0 -1
  154. package/src/lib/RuntimeGlobals.d.ts +0 -1
  155. package/src/lib/RuntimeGlobals.js.map +0 -1
  156. package/src/lib/container/AsyncBoundaryPlugin.d.ts +0 -45
  157. package/src/lib/container/AsyncBoundaryPlugin.js +0 -103
  158. package/src/lib/container/AsyncBoundaryPlugin.js.map +0 -1
  159. package/src/lib/container/ContainerEntryDependency.d.js +0 -4
  160. package/src/lib/container/ContainerEntryDependency.d.js.map +0 -1
  161. package/src/lib/container/ContainerEntryDependency.js +0 -47
  162. package/src/lib/container/ContainerEntryDependency.js.map +0 -1
  163. package/src/lib/container/ContainerEntryModule.d.js +0 -14
  164. package/src/lib/container/ContainerEntryModule.d.js.map +0 -1
  165. package/src/lib/container/ContainerEntryModule.js +0 -279
  166. package/src/lib/container/ContainerEntryModule.js.map +0 -1
  167. package/src/lib/container/ContainerEntryModuleFactory.d.js +0 -4
  168. package/src/lib/container/ContainerEntryModuleFactory.d.js.map +0 -1
  169. package/src/lib/container/ContainerEntryModuleFactory.js +0 -36
  170. package/src/lib/container/ContainerEntryModuleFactory.js.map +0 -1
  171. package/src/lib/container/ContainerExposedDependency.d.js +0 -4
  172. package/src/lib/container/ContainerExposedDependency.d.js.map +0 -1
  173. package/src/lib/container/ContainerExposedDependency.js +0 -57
  174. package/src/lib/container/ContainerExposedDependency.js.map +0 -1
  175. package/src/lib/container/ContainerPlugin.d.js +0 -4
  176. package/src/lib/container/ContainerPlugin.d.js.map +0 -1
  177. package/src/lib/container/ContainerPlugin.js +0 -92
  178. package/src/lib/container/ContainerPlugin.js.map +0 -1
  179. package/src/lib/container/ContainerReferencePlugin.d.js +0 -4
  180. package/src/lib/container/ContainerReferencePlugin.d.js.map +0 -1
  181. package/src/lib/container/ContainerReferencePlugin.js +0 -139
  182. package/src/lib/container/ContainerReferencePlugin.js.map +0 -1
  183. package/src/lib/container/FallbackDependency.d.js +0 -14
  184. package/src/lib/container/FallbackDependency.d.js.map +0 -1
  185. package/src/lib/container/FallbackDependency.js +0 -59
  186. package/src/lib/container/FallbackDependency.js.map +0 -1
  187. package/src/lib/container/FallbackItemDependency.d.js +0 -4
  188. package/src/lib/container/FallbackItemDependency.d.js.map +0 -1
  189. package/src/lib/container/FallbackItemDependency.js +0 -37
  190. package/src/lib/container/FallbackItemDependency.js.map +0 -1
  191. package/src/lib/container/FallbackModule.d.js +0 -4
  192. package/src/lib/container/FallbackModule.d.js.map +0 -1
  193. package/src/lib/container/FallbackModule.js +0 -153
  194. package/src/lib/container/FallbackModule.js.map +0 -1
  195. package/src/lib/container/FallbackModuleFactory.d.js +0 -4
  196. package/src/lib/container/FallbackModuleFactory.d.js.map +0 -1
  197. package/src/lib/container/FallbackModuleFactory.js +0 -34
  198. package/src/lib/container/FallbackModuleFactory.js.map +0 -1
  199. package/src/lib/container/ModuleFederationPlugin.d.js +0 -4
  200. package/src/lib/container/ModuleFederationPlugin.d.js.map +0 -1
  201. package/src/lib/container/ModuleFederationPlugin.js +0 -83
  202. package/src/lib/container/ModuleFederationPlugin.js.map +0 -1
  203. package/src/lib/container/ModuleFederationPluginTypes.d.js +0 -12
  204. package/src/lib/container/ModuleFederationPluginTypes.d.js.map +0 -1
  205. package/src/lib/container/RemoteModule.d.js +0 -13
  206. package/src/lib/container/RemoteModule.d.js.map +0 -1
  207. package/src/lib/container/RemoteModule.js +0 -151
  208. package/src/lib/container/RemoteModule.js.map +0 -1
  209. package/src/lib/container/RemoteRuntimeModule.d.js +0 -13
  210. package/src/lib/container/RemoteRuntimeModule.d.js.map +0 -1
  211. package/src/lib/container/RemoteRuntimeModule.js +0 -125
  212. package/src/lib/container/RemoteRuntimeModule.js.map +0 -1
  213. package/src/lib/container/RemoteToExternalDependency.d.js +0 -19
  214. package/src/lib/container/RemoteToExternalDependency.d.js.map +0 -1
  215. package/src/lib/container/RemoteToExternalDependency.js +0 -37
  216. package/src/lib/container/RemoteToExternalDependency.js.map +0 -1
  217. package/src/lib/container/options.d.js +0 -6
  218. package/src/lib/container/options.d.js.map +0 -1
  219. package/src/lib/container/options.js.map +0 -1
  220. package/src/lib/inversion/ContainerInversionPlugin.d.ts +0 -1
  221. package/src/lib/inversion/ContainerInversionPlugin.js +0 -3
  222. package/src/lib/inversion/ContainerInversionPlugin.js.map +0 -1
  223. package/src/lib/sharing/ConsumeSharedFallbackDependency.d.js +0 -4
  224. package/src/lib/sharing/ConsumeSharedFallbackDependency.d.js.map +0 -1
  225. package/src/lib/sharing/ConsumeSharedFallbackDependency.js +0 -37
  226. package/src/lib/sharing/ConsumeSharedFallbackDependency.js.map +0 -1
  227. package/src/lib/sharing/ConsumeSharedModule.d.js +0 -4
  228. package/src/lib/sharing/ConsumeSharedModule.d.js.map +0 -1
  229. package/src/lib/sharing/ConsumeSharedModule.js +0 -233
  230. package/src/lib/sharing/ConsumeSharedModule.js.map +0 -1
  231. package/src/lib/sharing/ConsumeSharedPlugin.d.js +0 -4
  232. package/src/lib/sharing/ConsumeSharedPlugin.d.js.map +0 -1
  233. package/src/lib/sharing/ConsumeSharedPlugin.js +0 -272
  234. package/src/lib/sharing/ConsumeSharedPlugin.js.map +0 -1
  235. package/src/lib/sharing/ConsumeSharedRuntimeModule.d.js +0 -4
  236. package/src/lib/sharing/ConsumeSharedRuntimeModule.d.js.map +0 -1
  237. package/src/lib/sharing/ConsumeSharedRuntimeModule.js +0 -293
  238. package/src/lib/sharing/ConsumeSharedRuntimeModule.js.map +0 -1
  239. package/src/lib/sharing/ProvideForSharedDependency.d.js +0 -4
  240. package/src/lib/sharing/ProvideForSharedDependency.d.js.map +0 -1
  241. package/src/lib/sharing/ProvideForSharedDependency.js +0 -38
  242. package/src/lib/sharing/ProvideForSharedDependency.js.map +0 -1
  243. package/src/lib/sharing/ProvideSharedDependency.d.js +0 -14
  244. package/src/lib/sharing/ProvideSharedDependency.d.js.map +0 -1
  245. package/src/lib/sharing/ProvideSharedDependency.js +0 -69
  246. package/src/lib/sharing/ProvideSharedDependency.js.map +0 -1
  247. package/src/lib/sharing/ProvideSharedModule.d.js +0 -4
  248. package/src/lib/sharing/ProvideSharedModule.d.js.map +0 -1
  249. package/src/lib/sharing/ProvideSharedModule.js +0 -201
  250. package/src/lib/sharing/ProvideSharedModule.js.map +0 -1
  251. package/src/lib/sharing/ProvideSharedModuleFactory.d.js +0 -4
  252. package/src/lib/sharing/ProvideSharedModuleFactory.d.js.map +0 -1
  253. package/src/lib/sharing/ProvideSharedModuleFactory.js +0 -36
  254. package/src/lib/sharing/ProvideSharedModuleFactory.js.map +0 -1
  255. package/src/lib/sharing/ProvideSharedPlugin.d.js +0 -4
  256. package/src/lib/sharing/ProvideSharedPlugin.d.js.map +0 -1
  257. package/src/lib/sharing/ProvideSharedPlugin.js +0 -182
  258. package/src/lib/sharing/ProvideSharedPlugin.js.map +0 -1
  259. package/src/lib/sharing/SharePlugin.d.js +0 -4
  260. package/src/lib/sharing/SharePlugin.d.js.map +0 -1
  261. package/src/lib/sharing/SharePlugin.js +0 -77
  262. package/src/lib/sharing/SharePlugin.js.map +0 -1
  263. package/src/lib/sharing/ShareRuntimeModule.d.js +0 -4
  264. package/src/lib/sharing/ShareRuntimeModule.d.js.map +0 -1
  265. package/src/lib/sharing/ShareRuntimeModule.js +0 -159
  266. package/src/lib/sharing/ShareRuntimeModule.js.map +0 -1
  267. package/src/lib/sharing/resolveMatchedConfigs.d.js +0 -6
  268. package/src/lib/sharing/resolveMatchedConfigs.d.js.map +0 -1
  269. package/src/lib/sharing/resolveMatchedConfigs.js +0 -73
  270. package/src/lib/sharing/resolveMatchedConfigs.js.map +0 -1
  271. package/src/lib/sharing/utils.d.js +0 -6
  272. package/src/lib/sharing/utils.d.js.map +0 -1
  273. package/src/lib/sharing/utils.js.map +0 -1
  274. package/src/runtime/ModuleInfoRuntimeModule.js +0 -88
  275. package/src/runtime/ModuleInfoRuntimeModule.js.map +0 -1
  276. package/src/runtime/ModuleInfoRuntimePlugin.js +0 -29
  277. package/src/runtime/ModuleInfoRuntimePlugin.js.map +0 -1
  278. /package/{src → dist/src}/lib/Constants.d.ts +0 -0
  279. /package/{src → dist/src}/lib/container/options.d.ts +0 -0
@@ -1,139 +0,0 @@
1
- /*
2
- MIT License http://www.opensource.org/licenses/mit-license.php
3
- Author Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy
4
- */ "use strict";
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- Object.defineProperty(exports, "default", {
9
- enumerable: true,
10
- get: function() {
11
- return _default;
12
- }
13
- });
14
- const _RuntimeGlobals = /*#__PURE__*/ _interop_require_wildcard(require("webpack/lib/RuntimeGlobals"));
15
- const _createschemavalidation = /*#__PURE__*/ _interop_require_default(require("webpack/lib/util/create-schema-validation"));
16
- const _FallbackDependency = /*#__PURE__*/ _interop_require_default(require("./FallbackDependency"));
17
- const _FallbackItemDependency = /*#__PURE__*/ _interop_require_default(require("./FallbackItemDependency"));
18
- const _FallbackModuleFactory = /*#__PURE__*/ _interop_require_default(require("./FallbackModuleFactory"));
19
- const _RemoteModule = /*#__PURE__*/ _interop_require_default(require("./RemoteModule"));
20
- const _RemoteRuntimeModule = /*#__PURE__*/ _interop_require_default(require("./RemoteRuntimeModule"));
21
- const _RemoteToExternalDependency = /*#__PURE__*/ _interop_require_default(require("./RemoteToExternalDependency"));
22
- const _options = require("./options");
23
- const _ExternalsPlugin = /*#__PURE__*/ _interop_require_default(require("webpack/lib/ExternalsPlugin"));
24
- function _interop_require_default(obj) {
25
- return obj && obj.__esModule ? obj : {
26
- default: obj
27
- };
28
- }
29
- function _getRequireWildcardCache(nodeInterop) {
30
- if (typeof WeakMap !== "function") return null;
31
- var cacheBabelInterop = new WeakMap();
32
- var cacheNodeInterop = new WeakMap();
33
- return (_getRequireWildcardCache = function(nodeInterop) {
34
- return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
35
- })(nodeInterop);
36
- }
37
- function _interop_require_wildcard(obj, nodeInterop) {
38
- if (!nodeInterop && obj && obj.__esModule) {
39
- return obj;
40
- }
41
- if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
42
- return {
43
- default: obj
44
- };
45
- }
46
- var cache = _getRequireWildcardCache(nodeInterop);
47
- if (cache && cache.has(obj)) {
48
- return cache.get(obj);
49
- }
50
- var newObj = {};
51
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
52
- for(var key in obj){
53
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
54
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
55
- if (desc && (desc.get || desc.set)) {
56
- Object.defineProperty(newObj, key, desc);
57
- } else {
58
- newObj[key] = obj[key];
59
- }
60
- }
61
- }
62
- newObj.default = obj;
63
- if (cache) {
64
- cache.set(obj, newObj);
65
- }
66
- return newObj;
67
- }
68
- const validate = (0, _createschemavalidation.default)(//eslint-disable-next-line
69
- require('webpack/schemas/plugins/container/ContainerReferencePlugin.check.js'), ()=>require('webpack/schemas/plugins/container/ContainerReferencePlugin.json'), {
70
- name: 'Container Reference Plugin',
71
- baseDataPath: 'options'
72
- });
73
- const slashCode = '/'.charCodeAt(0);
74
- let ContainerReferencePlugin = class ContainerReferencePlugin {
75
- /**
76
- * Apply the plugin
77
- * @param {Compiler} compiler the compiler instance
78
- * @returns {void}
79
- */ apply(compiler) {
80
- const { _remotes: remotes, _remoteType: remoteType } = this;
81
- /** @type {Record<string, string>} */ const remoteExternals = {};
82
- for (const [key, config] of remotes){
83
- let i = 0;
84
- for (const external of config.external){
85
- if (typeof external === 'string' && external.startsWith('internal ')) {
86
- continue;
87
- }
88
- remoteExternals[`webpack/container/reference/${key}${i ? `/fallback-${i}` : ''}`] = external;
89
- i++;
90
- }
91
- }
92
- const Externals = compiler.webpack.ExternalsPlugin || _ExternalsPlugin.default;
93
- //@ts-ignore
94
- new Externals(remoteType, remoteExternals).apply(compiler);
95
- compiler.hooks.compilation.tap('ContainerReferencePlugin', (compilation, { normalModuleFactory })=>{
96
- compilation.dependencyFactories.set(_RemoteToExternalDependency.default, normalModuleFactory);
97
- compilation.dependencyFactories.set(_FallbackItemDependency.default, normalModuleFactory);
98
- compilation.dependencyFactories.set(_FallbackDependency.default, new _FallbackModuleFactory.default());
99
- normalModuleFactory.hooks.factorize.tap('ContainerReferencePlugin', //@ts-ignore
100
- (data)=>{
101
- if (!data.request.includes('!')) {
102
- for (const [key, config] of remotes){
103
- if (data.request.startsWith(`${key}`) && (data.request.length === key.length || data.request.charCodeAt(key.length) === slashCode)) {
104
- return new _RemoteModule.default(data.request, //@ts-ignore
105
- config.external.map((external, i)=>external.startsWith('internal ') ? external.slice(9) : `webpack/container/reference/${key}${i ? `/fallback-${i}` : ''}`), `.${data.request.slice(key.length)}`, //@ts-ignore
106
- config.shareScope);
107
- }
108
- }
109
- }
110
- });
111
- compilation.hooks.runtimeRequirementInTree.for(_RuntimeGlobals.ensureChunkHandlers).tap('ContainerReferencePlugin', (chunk, set)=>{
112
- set.add(_RuntimeGlobals.module);
113
- set.add(_RuntimeGlobals.moduleFactoriesAddOnly);
114
- set.add(_RuntimeGlobals.hasOwnProperty);
115
- set.add(_RuntimeGlobals.initializeSharing);
116
- set.add(_RuntimeGlobals.shareScopeMap);
117
- compilation.addRuntimeModule(chunk, new _RemoteRuntimeModule.default());
118
- });
119
- });
120
- }
121
- constructor(options){
122
- validate(options);
123
- this._remoteType = options.remoteType;
124
- this._remotes = (0, _options.parseOptions)(options.remotes, (item)=>({
125
- external: Array.isArray(item) ? item : [
126
- item
127
- ],
128
- shareScope: options.shareScope || 'default'
129
- }), (item)=>({
130
- external: Array.isArray(item.external) ? item.external : [
131
- item.external
132
- ],
133
- shareScope: item.shareScope || options.shareScope || 'default'
134
- }));
135
- }
136
- };
137
- const _default = ContainerReferencePlugin;
138
-
139
- //# sourceMappingURL=ContainerReferencePlugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/ContainerReferencePlugin.ts"],"sourcesContent":["/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy\n*/\n\nimport type Compiler from 'webpack/lib/Compiler';\nimport * as RuntimeGlobals from 'webpack/lib/RuntimeGlobals';\nimport createSchemaValidation from 'webpack/lib/util/create-schema-validation';\nimport FallbackDependency from './FallbackDependency';\nimport FallbackItemDependency from './FallbackItemDependency';\nimport FallbackModuleFactory from './FallbackModuleFactory';\nimport RemoteModule from './RemoteModule';\nimport RemoteRuntimeModule from './RemoteRuntimeModule';\nimport RemoteToExternalDependency from './RemoteToExternalDependency';\nimport { parseOptions } from './options';\nimport ExternalsPlugin from 'webpack/lib/ExternalsPlugin';\nimport type Compilation from 'webpack/lib/Compilation';\nimport type { ResolveData } from 'webpack/lib/NormalModuleFactory';\nimport NormalModuleFactory from 'webpack/lib/NormalModuleFactory';\nimport {\n ExternalsType,\n ContainerReferencePluginOptions,\n RemotesConfig,\n} from '../../declarations/plugins/container/ContainerReferencePlugin';\n\nconst validate = createSchemaValidation(\n //eslint-disable-next-line\n require('webpack/schemas/plugins/container/ContainerReferencePlugin.check.js'),\n () =>\n require('webpack/schemas/plugins/container/ContainerReferencePlugin.json'),\n {\n name: 'Container Reference Plugin',\n baseDataPath: 'options',\n },\n);\n\nconst slashCode = '/'.charCodeAt(0);\n\nclass ContainerReferencePlugin {\n private _remoteType: ExternalsType;\n private _remotes: [string, RemotesConfig][];\n\n constructor(options: ContainerReferencePluginOptions) {\n validate(options);\n\n this._remoteType = options.remoteType;\n this._remotes = parseOptions(\n options.remotes,\n (item) => ({\n external: Array.isArray(item) ? item : [item],\n shareScope: options.shareScope || 'default',\n }),\n (item) => ({\n external: Array.isArray(item.external)\n ? item.external\n : [item.external],\n shareScope: item.shareScope || options.shareScope || 'default',\n }),\n );\n }\n\n /**\n * Apply the plugin\n * @param {Compiler} compiler the compiler instance\n * @returns {void}\n */\n apply(compiler: Compiler): void {\n const { _remotes: remotes, _remoteType: remoteType } = this;\n\n /** @type {Record<string, string>} */\n const remoteExternals: Record<string, string> = {};\n\n for (const [key, config] of remotes) {\n let i = 0;\n for (const external of config.external) {\n if (typeof external === 'string' && external.startsWith('internal ')) {\n continue;\n }\n remoteExternals[\n `webpack/container/reference/${key}${i ? `/fallback-${i}` : ''}`\n ] = external;\n i++;\n }\n }\n const Externals = compiler.webpack.ExternalsPlugin || ExternalsPlugin;\n //@ts-ignore\n new Externals(remoteType, remoteExternals).apply(compiler);\n\n compiler.hooks.compilation.tap(\n 'ContainerReferencePlugin',\n (\n compilation: Compilation,\n { normalModuleFactory }: { normalModuleFactory: NormalModuleFactory },\n ) => {\n compilation.dependencyFactories.set(\n RemoteToExternalDependency,\n normalModuleFactory,\n );\n\n compilation.dependencyFactories.set(\n FallbackItemDependency,\n normalModuleFactory,\n );\n\n compilation.dependencyFactories.set(\n FallbackDependency,\n new FallbackModuleFactory(),\n );\n\n normalModuleFactory.hooks.factorize.tap(\n 'ContainerReferencePlugin',\n //@ts-ignore\n (data: ResolveData): Module => {\n if (!data.request.includes('!')) {\n for (const [key, config] of remotes) {\n if (\n data.request.startsWith(`${key}`) &&\n (data.request.length === key.length ||\n data.request.charCodeAt(key.length) === slashCode)\n ) {\n return new RemoteModule(\n data.request,\n //@ts-ignore\n config.external.map((external: any, i: any) =>\n external.startsWith('internal ')\n ? external.slice(9)\n : `webpack/container/reference/${key}${\n i ? `/fallback-${i}` : ''\n }`,\n ),\n `.${data.request.slice(key.length)}`,\n //@ts-ignore\n config.shareScope,\n );\n }\n }\n }\n },\n );\n\n compilation.hooks.runtimeRequirementInTree\n .for(RuntimeGlobals.ensureChunkHandlers)\n .tap('ContainerReferencePlugin', (chunk, set) => {\n set.add(RuntimeGlobals.module);\n set.add(RuntimeGlobals.moduleFactoriesAddOnly);\n set.add(RuntimeGlobals.hasOwnProperty);\n set.add(RuntimeGlobals.initializeSharing);\n set.add(RuntimeGlobals.shareScopeMap);\n compilation.addRuntimeModule(chunk, new RemoteRuntimeModule());\n });\n },\n );\n }\n}\n\nexport default ContainerReferencePlugin;\n"],"names":["validate","createSchemaValidation","require","name","baseDataPath","slashCode","charCodeAt","ContainerReferencePlugin","apply","compiler","_remotes","remotes","_remoteType","remoteType","remoteExternals","key","config","i","external","startsWith","Externals","webpack","ExternalsPlugin","hooks","compilation","tap","normalModuleFactory","dependencyFactories","set","RemoteToExternalDependency","FallbackItemDependency","FallbackDependency","FallbackModuleFactory","factorize","data","request","includes","length","RemoteModule","map","slice","shareScope","runtimeRequirementInTree","for","RuntimeGlobals","ensureChunkHandlers","chunk","add","module","moduleFactoriesAddOnly","hasOwnProperty","initializeSharing","shareScopeMap","addRuntimeModule","RemoteRuntimeModule","constructor","options","parseOptions","item","Array","isArray"],"mappings":"AAAA;;;AAGA;;;;+BAwJA;;;eAAA;;;wEArJgC;+EACG;2EACJ;+EACI;8EACD;qEACT;4EACO;mFACO;yBACV;wEACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAU5B,MAAMA,WAAWC,IAAAA,+BAAsB,EACrC,0BAA0B;AAC1BC,QAAQ,wEACR,IACEA,QAAQ,oEACV;IACEC,MAAM;IACNC,cAAc;AAChB;AAGF,MAAMC,YAAY,IAAIC,UAAU,CAAC;AAEjC,IAAA,AAAMC,2BAAN,MAAMA;IAuBJ;;;;GAIC,GACDC,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C,QAAQ,IACjCwC,KAAKxC,QAAQ,GACb;oBAACwC,KAAKxC,QAAQ;iBAAC;gBACnBuB,YAAYiB,KAAKjB,UAAU,IAAIe,QAAQf,UAAU,IAAI;YACvD,CAAA;IAEJ;AA8FF;MAEA,WAAelC"}
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "FallbackDependency", {
6
- enumerable: true,
7
- get: function() {
8
- return FallbackDependency;
9
- }
10
- });
11
- let FallbackDependency = class FallbackDependency extends Dependency {
12
- };
13
-
14
- //# sourceMappingURL=FallbackDependency.d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/FallbackDependency.d.ts"],"sourcesContent":["export class FallbackDependency extends Dependency {\n /**\n * @param {ObjectDeserializerContext} context context\n * @returns {FallbackDependency} deserialize fallback dependency\n */\n static deserialize(context: ObjectDeserializerContext): FallbackDependency;\n /**\n * @param {string[]} requests requests\n */\n constructor(requests: string[]);\n requests: string[];\n}\ndeclare namespace FallbackDependency {\n export { ObjectDeserializerContext, ObjectSerializerContext };\n}\n"],"names":["FallbackDependency","Dependency"],"mappings":";;;;+BAAaA;;;eAAAA;;;AAAN,IAAA,AAAMA,qBAAN,MAAMA,2BAA2BC;AAWxC"}
@@ -1,59 +0,0 @@
1
- /*
2
- MIT License http://www.opensource.org/licenses/mit-license.php
3
- Author Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy
4
- */ 'use strict';
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- Object.defineProperty(exports, "default", {
9
- enumerable: true,
10
- get: function() {
11
- return _default;
12
- }
13
- });
14
- const _Dependency = /*#__PURE__*/ _interop_require_default(require("webpack/lib/Dependency"));
15
- const _makeSerializable = /*#__PURE__*/ _interop_require_default(require("webpack/lib/util/makeSerializable"));
16
- function _interop_require_default(obj) {
17
- return obj && obj.__esModule ? obj : {
18
- default: obj
19
- };
20
- }
21
- let FallbackDependency = class FallbackDependency extends _Dependency.default {
22
- /**
23
- * @returns {string | null} an identifier to merge equal requests
24
- */ getResourceIdentifier() {
25
- return `fallback ${this.requests.join(' ')}`;
26
- }
27
- get type() {
28
- return 'fallback';
29
- }
30
- get category() {
31
- return 'esm';
32
- }
33
- /**
34
- * @param {ObjectSerializerContext} context context
35
- */ serialize(context) {
36
- const { write } = context;
37
- write(this.requests);
38
- super.serialize(context);
39
- }
40
- /**
41
- * @param {ObjectDeserializerContext} context context
42
- * @returns {FallbackDependency} deserialize fallback dependency
43
- */ static deserialize(context) {
44
- const { read } = context;
45
- const obj = new FallbackDependency(read());
46
- obj.deserialize(context);
47
- return obj;
48
- }
49
- /**
50
- * @param {string[]} requests requests
51
- */ constructor(requests){
52
- super();
53
- this.requests = requests;
54
- }
55
- };
56
- (0, _makeSerializable.default)(FallbackDependency, 'enhanced/lib/container/FallbackDependency');
57
- const _default = FallbackDependency;
58
-
59
- //# sourceMappingURL=FallbackDependency.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/FallbackDependency.ts"],"sourcesContent":["/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy\n*/\n\n'use strict';\n\nimport type {\n ObjectDeserializerContext,\n ObjectSerializerContext,\n} from 'webpack/lib/Dependency';\nimport Dependency from 'webpack/lib/Dependency';\nimport makeSerializable from 'webpack/lib/util/makeSerializable';\n\nclass FallbackDependency extends Dependency {\n requests: string[];\n\n /**\n * @param {string[]} requests requests\n */\n constructor(requests: string[]) {\n super();\n this.requests = requests;\n }\n\n /**\n * @returns {string | null} an identifier to merge equal requests\n */\n override getResourceIdentifier(): string | null {\n return `fallback ${this.requests.join(' ')}`;\n }\n\n override get type(): string {\n return 'fallback';\n }\n\n override get category(): string {\n return 'esm';\n }\n\n /**\n * @param {ObjectSerializerContext} context context\n */\n override serialize(context: ObjectSerializerContext): void {\n const { write } = context;\n write(this.requests);\n super.serialize(context);\n }\n\n /**\n * @param {ObjectDeserializerContext} context context\n * @returns {FallbackDependency} deserialize fallback dependency\n */\n static deserialize(context: ObjectDeserializerContext): FallbackDependency {\n const { read } = context;\n const obj = new FallbackDependency(read());\n obj.deserialize(context);\n return obj;\n }\n}\n\nmakeSerializable(\n FallbackDependency,\n 'enhanced/lib/container/FallbackDependency',\n);\n\nexport default FallbackDependency;\n"],"names":["FallbackDependency","Dependency","getResourceIdentifier","requests","join","type","category","serialize","context","write","deserialize","read","obj","constructor","makeSerializable"],"mappings":"AAAA;;;AAGA,GAEA;;;;+BA6DA;;;eAAA;;;mEAvDuB;yEACM;;;;;;AAE7B,IAAA,AAAMA,qBAAN,MAAMA,2BAA2BC,mBAAU;IAWzC;;GAEC,GACD,AAASC,wBAAuC;QAC9C,OAAO,CAAC,SAAS,EAAE,IAAI,CAACC,QAAQ,CAACC,IAAI,CAAC,KAAK,CAAC;IAC9C;IAEA,IAAaC,OAAe;QAC1B,OAAO;IACT;IAEA,IAAaC,WAAmB;QAC9B,OAAO;IACT;IAEA;;GAEC,GACD,AAASC,UAAUC,OAAgC,EAAQ;QACzD,MAAM,EAAEC,KAAK,EAAE,GAAGD;QAClBC,MAAM,IAAI,CAACN,QAAQ;QACnB,KAAK,CAACI,UAAUC;IAClB;IAEA;;;GAGC,GACD,OAAOE,YAAYF,OAAkC,EAAsB;QACzE,MAAM,EAAEG,IAAI,EAAE,GAAGH;QACjB,MAAMI,MAAM,IAAIZ,mBAAmBW;QACnCC,IAAIF,WAAW,CAACF;QAChB,OAAOI;IACT;IAzCA;;GAEC,GACDC,YAAYV,QAAkB,CAAE;QAC9B,KAAK;QACL,IAAI,CAACA,QAAQ,GAAGA;IAClB;AAoCF;AAEAW,IAAAA,yBAAgB,EACdd,oBACA;MAGF,WAAeA"}
@@ -1,4 +0,0 @@
1
- "use strict";
2
- module.exports = FallbackItemDependency;
3
-
4
- //# sourceMappingURL=FallbackItemDependency.d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/FallbackItemDependency.d.ts"],"sourcesContent":["export = FallbackItemDependency;\ndeclare class FallbackItemDependency extends ModuleDependency {}\nimport ModuleDependency = require('webpack/lib/dependencies/ModuleDependency');\n"],"names":["FallbackItemDependency"],"mappings":";iBAASA"}
@@ -1,37 +0,0 @@
1
- /*
2
- MIT License http://www.opensource.org/licenses/mit-license.php
3
- Author Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy
4
- */ "use strict";
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- Object.defineProperty(exports, "default", {
9
- enumerable: true,
10
- get: function() {
11
- return _default;
12
- }
13
- });
14
- const _ModuleDependency = /*#__PURE__*/ _interop_require_default(require("webpack/lib/dependencies/ModuleDependency"));
15
- const _makeSerializable = /*#__PURE__*/ _interop_require_default(require("webpack/lib/util/makeSerializable"));
16
- function _interop_require_default(obj) {
17
- return obj && obj.__esModule ? obj : {
18
- default: obj
19
- };
20
- }
21
- let FallbackItemDependency = class FallbackItemDependency extends _ModuleDependency.default {
22
- get type() {
23
- return 'fallback item';
24
- }
25
- get category() {
26
- return 'esm';
27
- }
28
- /**
29
- * @param {string} request request
30
- */ constructor(request){
31
- super(request);
32
- }
33
- };
34
- (0, _makeSerializable.default)(FallbackItemDependency, 'enhanced/lib/container/FallbackItemDependency');
35
- const _default = FallbackItemDependency;
36
-
37
- //# sourceMappingURL=FallbackItemDependency.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/FallbackItemDependency.ts"],"sourcesContent":["/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy\n*/\nimport ModuleDependency from 'webpack/lib/dependencies/ModuleDependency';\nimport makeSerializable from 'webpack/lib/util/makeSerializable';\n\nclass FallbackItemDependency extends ModuleDependency {\n /**\n * @param {string} request request\n */\n constructor(request: string) {\n super(request);\n }\n\n override get type(): string {\n return 'fallback item';\n }\n\n override get category(): string {\n return 'esm';\n }\n}\n\nmakeSerializable(\n FallbackItemDependency,\n 'enhanced/lib/container/FallbackItemDependency',\n);\n\nexport default FallbackItemDependency;\n"],"names":["FallbackItemDependency","ModuleDependency","type","category","constructor","request","makeSerializable"],"mappings":"AAAA;;;AAGA;;;;+BA0BA;;;eAAA;;;yEAzB6B;yEACA;;;;;;AAE7B,IAAA,AAAMA,yBAAN,MAAMA,+BAA+BC,yBAAgB;IAQnD,IAAaC,OAAe;QAC1B,OAAO;IACT;IAEA,IAAaC,WAAmB;QAC9B,OAAO;IACT;IAbA;;GAEC,GACDC,YAAYC,OAAe,CAAE;QAC3B,KAAK,CAACA;IACR;AASF;AAEAC,IAAAA,yBAAgB,EACdN,wBACA;MAGF,WAAeA"}
@@ -1,4 +0,0 @@
1
- "use strict";
2
- module.exports = FallbackModule;
3
-
4
- //# sourceMappingURL=FallbackModule.d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/FallbackModule.d.ts"],"sourcesContent":["export = FallbackModule;\ndeclare class FallbackModule extends Module {\n /**\n * @param {ObjectDeserializerContext} context context\n * @returns {FallbackModule} deserialized fallback module\n */\n static deserialize(context: ObjectDeserializerContext): FallbackModule;\n /**\n * @param {string[]} requests list of requests to choose one\n */\n constructor(requests: string[]);\n requests: string[];\n _identifier: string;\n}\ndeclare namespace FallbackModule {\n export {\n WebpackOptions,\n Chunk,\n ChunkGraph,\n ChunkGroup,\n Compilation,\n CodeGenerationContext,\n CodeGenerationResult,\n LibIdentOptions,\n NeedBuildContext,\n RequestShortener,\n ResolverWithOptions,\n WebpackError,\n ObjectDeserializerContext,\n ObjectSerializerContext,\n Hash,\n InputFileSystem,\n };\n}\nimport Module = require('webpack/lib/Module');\ntype ObjectDeserializerContext =\n import('webpack/lib/serialization/ObjectMiddleware').ObjectDeserializerContext;\ntype WebpackOptions = any;\ntype Chunk = import('webpack/lib/Chunk');\ntype ChunkGraph = import('webpack/lib/ChunkGraph');\ntype ChunkGroup = import('webpack/lib/ChunkGroup');\ntype Compilation = import('webpack/lib/Compilation');\ntype CodeGenerationContext = import('webpack/lib/Module').CodeGenerationContext;\ntype CodeGenerationResult = import('webpack/lib/Module').CodeGenerationResult;\ntype LibIdentOptions = import('webpack/lib/Module').LibIdentOptions;\ntype NeedBuildContext = import('webpack/lib/Module').NeedBuildContext;\ntype RequestShortener = import('webpack/lib/RequestShortener');\ntype ResolverWithOptions =\n import('webpack/lib/ResolverFactory').ResolverWithOptions;\ntype WebpackError = import('webpack/lib/WebpackError');\ntype ObjectSerializerContext =\n import('webpack/lib/serialization/ObjectMiddleware').ObjectSerializerContext;\ntype Hash = import('webpack/lib/util/Hash');\ntype InputFileSystem = import('webpack/lib/util/fs').InputFileSystem;\n"],"names":["FallbackModule"],"mappings":";iBAASA"}
@@ -1,153 +0,0 @@
1
- /*
2
- MIT License http://www.opensource.org/licenses/mit-license.php
3
- Author Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy
4
- */ 'use strict';
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- Object.defineProperty(exports, "default", {
9
- enumerable: true,
10
- get: function() {
11
- return _default;
12
- }
13
- });
14
- const _webpacksources = require("webpack-sources");
15
- const _Module = /*#__PURE__*/ _interop_require_default(require("webpack/lib/Module"));
16
- const _ModuleTypeConstants = require("webpack/lib/ModuleTypeConstants");
17
- const _RuntimeGlobals = /*#__PURE__*/ _interop_require_default(require("webpack/lib/RuntimeGlobals"));
18
- const _Template = /*#__PURE__*/ _interop_require_default(require("webpack/lib/Template"));
19
- const _makeSerializable = /*#__PURE__*/ _interop_require_default(require("webpack/lib/util/makeSerializable"));
20
- const _FallbackItemDependency = /*#__PURE__*/ _interop_require_default(require("./FallbackItemDependency"));
21
- function _interop_require_default(obj) {
22
- return obj && obj.__esModule ? obj : {
23
- default: obj
24
- };
25
- }
26
- const TYPES = new Set([
27
- 'javascript'
28
- ]);
29
- const RUNTIME_REQUIREMENTS = new Set([
30
- _RuntimeGlobals.default.module
31
- ]);
32
- let FallbackModule = class FallbackModule extends _Module.default {
33
- /**
34
- * @returns {string} a unique identifier of the module
35
- */ identifier() {
36
- return this._identifier;
37
- }
38
- /**
39
- * @param {RequestShortener} requestShortener the request shortener
40
- * @returns {string} a user readable identifier of the module
41
- */ readableIdentifier(requestShortener) {
42
- return this._identifier;
43
- }
44
- /**
45
- * @param {LibIdentOptions} options options
46
- * @returns {string | null} an identifier for library inclusion
47
- */ libIdent(options) {
48
- return `${this.layer ? `(${this.layer})/` : ''}webpack/container/fallback/${this.requests[0]}/and ${this.requests.length - 1} more`;
49
- }
50
- /**
51
- * @param {Chunk} chunk the chunk which condition should be checked
52
- * @param {Compilation} compilation the compilation
53
- * @returns {boolean} true, if the chunk is ok for the module
54
- */ chunkCondition(chunk, { chunkGraph }) {
55
- return chunkGraph.getNumberOfEntryModules(chunk) > 0;
56
- }
57
- /**
58
- * @param {NeedBuildContext} context context info
59
- * @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild
60
- * @returns {void}
61
- */ needBuild(context, callback) {
62
- callback(null, !this.buildInfo);
63
- }
64
- /**
65
- * @param {WebpackOptions} options webpack options
66
- * @param {Compilation} compilation the compilation
67
- * @param {ResolverWithOptions} resolver the resolver
68
- * @param {InputFileSystem} fs the file system
69
- * @param {function(WebpackError=): void} callback callback function
70
- * @returns {void}
71
- */ build(options, compilation, resolver, fs, callback) {
72
- this.buildMeta = {};
73
- this.buildInfo = {
74
- strict: true
75
- };
76
- this.clearDependenciesAndBlocks();
77
- for (const request of this.requests)this.addDependency(new _FallbackItemDependency.default(request));
78
- callback();
79
- }
80
- /**
81
- * @param {string=} type the source type for which the size should be estimated
82
- * @returns {number} the estimated size of the module (must be non-zero)
83
- */ size(type) {
84
- return this.requests.length * 5 + 42;
85
- }
86
- /**
87
- * @returns {Set<string>} types available (do not mutate)
88
- */ getSourceTypes() {
89
- return TYPES;
90
- }
91
- /**
92
- * @param {CodeGenerationContext} context context for code generation
93
- * @returns {CodeGenerationResult} result
94
- */ codeGeneration({ runtimeTemplate, moduleGraph, chunkGraph }) {
95
- const ids = this.dependencies.map((dep)=>//@ts-ignore
96
- chunkGraph.getModuleId(moduleGraph.getModule(dep)));
97
- const code = _Template.default.asString([
98
- `var ids = ${JSON.stringify(ids)};`,
99
- 'var error, result, i = 0;',
100
- `var loop = ${runtimeTemplate.basicFunction('next', [
101
- 'while(i < ids.length) {',
102
- _Template.default.indent([
103
- `try { next = ${_RuntimeGlobals.default.require}(ids[i++]); } catch(e) { return handleError(e); }`,
104
- 'if(next) return next.then ? next.then(handleResult, handleError) : handleResult(next);'
105
- ]),
106
- '}',
107
- 'if(error) throw error;'
108
- ])}`,
109
- `var handleResult = ${runtimeTemplate.basicFunction('result', [
110
- 'if(result) return result;',
111
- 'return loop();'
112
- ])};`,
113
- `var handleError = ${runtimeTemplate.basicFunction('e', [
114
- 'error = e;',
115
- 'return loop();'
116
- ])};`,
117
- 'module.exports = loop();'
118
- ]);
119
- const sources = new Map();
120
- sources.set('javascript', new _webpacksources.RawSource(code));
121
- return {
122
- sources,
123
- runtimeRequirements: RUNTIME_REQUIREMENTS
124
- };
125
- }
126
- /**
127
- * @param {ObjectSerializerContext} context context
128
- */ serialize(context) {
129
- const { write } = context;
130
- write(this.requests);
131
- super.serialize(context);
132
- }
133
- /**
134
- * @param {ObjectDeserializerContext} context context
135
- * @returns {FallbackModule} deserialized fallback module
136
- */ static deserialize(context) {
137
- const { read } = context;
138
- const obj = new FallbackModule(read());
139
- obj.deserialize(context);
140
- return obj;
141
- }
142
- /**
143
- * @param {string[]} requests list of requests to choose one
144
- */ constructor(requests){
145
- super(_ModuleTypeConstants.WEBPACK_MODULE_TYPE_FALLBACK);
146
- this.requests = requests;
147
- this._identifier = `fallback ${this.requests.join(' ')}`;
148
- }
149
- };
150
- (0, _makeSerializable.default)(FallbackModule, 'enhanced/lib/container/FallbackModule');
151
- const _default = FallbackModule;
152
-
153
- //# sourceMappingURL=FallbackModule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/FallbackModule.ts"],"sourcesContent":["/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy\n*/\n\n'use strict';\n\nimport { RawSource } from 'webpack-sources';\nimport type {\n RequestShortener,\n LibIdentOptions,\n CodeGenerationContext,\n CodeGenerationResult,\n NeedBuildContext,\n WebpackError,\n ResolverWithOptions,\n InputFileSystem,\n Compilation,\n WebpackOptions,\n ObjectDeserializerContext,\n ObjectSerializerContext,\n} from 'webpack/lib/Module';\nimport Module from 'webpack/lib/Module';\nimport type ChunkGraph from 'webpack/lib/ChunkGraph';\nimport Chunk from 'webpack/lib/Chunk';\nimport { WEBPACK_MODULE_TYPE_FALLBACK } from 'webpack/lib/ModuleTypeConstants';\nimport RuntimeGlobals from 'webpack/lib/RuntimeGlobals';\nimport Template from 'webpack/lib/Template';\nimport makeSerializable from 'webpack/lib/util/makeSerializable';\nimport FallbackItemDependency from './FallbackItemDependency';\n\nconst TYPES = new Set(['javascript']);\nconst RUNTIME_REQUIREMENTS = new Set([RuntimeGlobals.module]);\n\nclass FallbackModule extends Module {\n private requests: string[];\n private _identifier: string;\n\n /**\n * @param {string[]} requests list of requests to choose one\n */\n constructor(requests: string[]) {\n super(WEBPACK_MODULE_TYPE_FALLBACK);\n this.requests = requests;\n this._identifier = `fallback ${this.requests.join(' ')}`;\n }\n\n /**\n * @returns {string} a unique identifier of the module\n */\n override identifier(): string {\n return this._identifier;\n }\n\n /**\n * @param {RequestShortener} requestShortener the request shortener\n * @returns {string} a user readable identifier of the module\n */\n override readableIdentifier(requestShortener: RequestShortener): string {\n return this._identifier;\n }\n\n /**\n * @param {LibIdentOptions} options options\n * @returns {string | null} an identifier for library inclusion\n */\n override libIdent(options: LibIdentOptions): string | null {\n return `${this.layer ? `(${this.layer})/` : ''}webpack/container/fallback/${\n this.requests[0]\n }/and ${this.requests.length - 1} more`;\n }\n\n /**\n * @param {Chunk} chunk the chunk which condition should be checked\n * @param {Compilation} compilation the compilation\n * @returns {boolean} true, if the chunk is ok for the module\n */\n override chunkCondition(\n chunk: Chunk,\n { chunkGraph }: { chunkGraph: ChunkGraph },\n ): boolean {\n return chunkGraph.getNumberOfEntryModules(chunk) > 0;\n }\n\n /**\n * @param {NeedBuildContext} context context info\n * @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild\n * @returns {void}\n */\n override needBuild(\n context: NeedBuildContext,\n callback: (error: WebpackError | null, result?: boolean) => void,\n ): void {\n callback(null, !this.buildInfo);\n }\n\n /**\n * @param {WebpackOptions} options webpack options\n * @param {Compilation} compilation the compilation\n * @param {ResolverWithOptions} resolver the resolver\n * @param {InputFileSystem} fs the file system\n * @param {function(WebpackError=): void} callback callback function\n * @returns {void}\n */\n override build(\n options: WebpackOptions,\n compilation: Compilation,\n resolver: ResolverWithOptions,\n fs: InputFileSystem,\n callback: (error?: WebpackError) => void,\n ): void {\n this.buildMeta = {};\n this.buildInfo = {\n strict: true,\n };\n\n this.clearDependenciesAndBlocks();\n for (const request of this.requests)\n this.addDependency(new FallbackItemDependency(request));\n\n callback();\n }\n\n /**\n * @param {string=} type the source type for which the size should be estimated\n * @returns {number} the estimated size of the module (must be non-zero)\n */\n override size(type?: string): number {\n return this.requests.length * 5 + 42;\n }\n\n /**\n * @returns {Set<string>} types available (do not mutate)\n */\n override getSourceTypes(): Set<string> {\n return TYPES;\n }\n\n /**\n * @param {CodeGenerationContext} context context for code generation\n * @returns {CodeGenerationResult} result\n */\n override codeGeneration({\n runtimeTemplate,\n moduleGraph,\n chunkGraph,\n }: CodeGenerationContext): CodeGenerationResult {\n const ids = this.dependencies.map((dep) =>\n //@ts-ignore\n chunkGraph.getModuleId(moduleGraph.getModule(dep)),\n );\n const code = Template.asString([\n `var ids = ${JSON.stringify(ids)};`,\n 'var error, result, i = 0;',\n `var loop = ${runtimeTemplate.basicFunction('next', [\n 'while(i < ids.length) {',\n Template.indent([\n `try { next = ${RuntimeGlobals.require}(ids[i++]); } catch(e) { return handleError(e); }`,\n 'if(next) return next.then ? next.then(handleResult, handleError) : handleResult(next);',\n ]),\n '}',\n 'if(error) throw error;',\n ])}`,\n `var handleResult = ${runtimeTemplate.basicFunction('result', [\n 'if(result) return result;',\n 'return loop();',\n ])};`,\n `var handleError = ${runtimeTemplate.basicFunction('e', [\n 'error = e;',\n 'return loop();',\n ])};`,\n 'module.exports = loop();',\n ]);\n const sources = new Map();\n sources.set('javascript', new RawSource(code));\n return { sources, runtimeRequirements: RUNTIME_REQUIREMENTS };\n }\n\n /**\n * @param {ObjectSerializerContext} context context\n */\n override serialize(context: ObjectSerializerContext): void {\n const { write } = context;\n write(this.requests);\n super.serialize(context);\n }\n\n /**\n * @param {ObjectDeserializerContext} context context\n * @returns {FallbackModule} deserialized fallback module\n */\n static deserialize(context: ObjectDeserializerContext): FallbackModule {\n const { read } = context;\n const obj = new FallbackModule(read());\n obj.deserialize(context);\n return obj;\n }\n}\n\nmakeSerializable(FallbackModule, 'enhanced/lib/container/FallbackModule');\n\nexport default FallbackModule;\n"],"names":["TYPES","Set","RUNTIME_REQUIREMENTS","RuntimeGlobals","module","FallbackModule","Module","identifier","_identifier","readableIdentifier","requestShortener","libIdent","options","layer","requests","length","chunkCondition","chunk","chunkGraph","getNumberOfEntryModules","needBuild","context","callback","buildInfo","build","compilation","resolver","fs","buildMeta","strict","clearDependenciesAndBlocks","request","addDependency","FallbackItemDependency","size","type","getSourceTypes","codeGeneration","runtimeTemplate","moduleGraph","ids","dependencies","map","dep","getModuleId","getModule","code","Template","asString","JSON","stringify","basicFunction","indent","require","sources","Map","set","RawSource","runtimeRequirements","serialize","write","deserialize","read","obj","constructor","WEBPACK_MODULE_TYPE_FALLBACK","join","makeSerializable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AOwC,YAAYxC,OAAkC,EAAkB;QACrE,MAAM,EAAEyC,IAAI,EAAE,GAAGzC;QACjB,MAAM0C,MAAM,IAAI1D,eAAeyD;QAC/BC,IAAIF,WAAW,CAACxC;QAChB,OAAO0C;IACT;IA9JA;;GAEC,GACDC,YAAYlD,QAAkB,CAAE;QAC9B,KAAK,CAACmD,iDAA4B;QAClC,IAAI,CAACnD,QAAQ,GAAGA;QAChB,IAAI,CAACN,WAAW,GAAG,CAAC,SAAS,EAAE,IAAI,CAACM,QAAQ,CAACoD,IAAI,CAAC,KAAK,CAAC;IAC1D;AAwJF;AAEAC,IAAAA,yBAAgB,EAAC9D,gBAAgB;MAEjC,WAAeA"}
@@ -1,4 +0,0 @@
1
- "use strict";
2
- module.exports = FallbackModuleFactory;
3
-
4
- //# sourceMappingURL=FallbackModuleFactory.d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/FallbackModuleFactory.d.ts"],"sourcesContent":["export = FallbackModuleFactory;\ndeclare class FallbackModuleFactory extends ModuleFactory {}\ndeclare namespace FallbackModuleFactory {\n export { ModuleFactoryCreateData, ModuleFactoryResult, FallbackDependency };\n}\nimport ModuleFactory = require('webpack/lib/ModuleFactory');\ntype ModuleFactoryCreateData =\n import('webpack/lib/ModuleFactory').ModuleFactoryCreateData;\ntype ModuleFactoryResult =\n import('webpack/lib/ModuleFactory').ModuleFactoryResult;\ntype FallbackDependency = import('./FallbackDependency');\n"],"names":["FallbackModuleFactory"],"mappings":";iBAASA"}
@@ -1,34 +0,0 @@
1
- /*
2
- MIT License http://www.opensource.org/licenses/mit-license.php
3
- Author Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy, Marais Rossouw @maraisr
4
- */ 'use strict';
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- Object.defineProperty(exports, "default", {
9
- enumerable: true,
10
- get: function() {
11
- return FallbackModuleFactory;
12
- }
13
- });
14
- const _ModuleFactory = /*#__PURE__*/ _interop_require_default(require("webpack/lib/ModuleFactory"));
15
- const _FallbackModule = /*#__PURE__*/ _interop_require_default(require("./FallbackModule"));
16
- function _interop_require_default(obj) {
17
- return obj && obj.__esModule ? obj : {
18
- default: obj
19
- };
20
- }
21
- let FallbackModuleFactory = class FallbackModuleFactory extends _ModuleFactory.default {
22
- /**
23
- * @param {ModuleFactoryCreateData} data data object
24
- * @param {function((Error | null)=, ModuleFactoryResult=): void} callback callback
25
- * @returns {void}
26
- */ create(data, callback) {
27
- const dependency = data.dependencies[0];
28
- callback(null, {
29
- module: new _FallbackModule.default(dependency.requests)
30
- });
31
- }
32
- };
33
-
34
- //# sourceMappingURL=FallbackModuleFactory.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/FallbackModuleFactory.ts"],"sourcesContent":["/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy, Marais Rossouw @maraisr\n*/\n\n'use strict';\nimport {\n ModuleFactoryCreateData,\n ModuleFactoryResult,\n} from 'webpack/lib/ModuleFactory';\nimport ModuleFactory from 'webpack/lib/ModuleFactory';\nimport FallbackModule from './FallbackModule';\nimport FallbackDependency from './FallbackDependency';\n\nexport default class FallbackModuleFactory extends ModuleFactory {\n /**\n * @param {ModuleFactoryCreateData} data data object\n * @param {function((Error | null)=, ModuleFactoryResult=): void} callback callback\n * @returns {void}\n */\n override create(\n data: ModuleFactoryCreateData,\n callback: (error: Error | null, result?: ModuleFactoryResult) => void,\n ): void {\n const dependency = data.dependencies[0] as FallbackDependency;\n callback(null, {\n module: new FallbackModule(dependency.requests),\n });\n }\n}\n"],"names":["FallbackModuleFactory","ModuleFactory","create","data","callback","dependency","dependencies","module","FallbackModule","requests"],"mappings":"AAAA;;;AAGA,GAEA;;;;;;;eASqBA;;;sEAJK;uEACC;;;;;;AAGZ,IAAA,AAAMA,wBAAN,MAAMA,8BAA8BC,sBAAa;IAC9D;;;;GAIC,GACD,AAASC,OACPC,IAA6B,EAC7BC,QAAqE,EAC/D;QACN,MAAMC,aAAaF,KAAKG,YAAY,CAAC,EAAE;QACvCF,SAAS,MAAM;YACbG,QAAQ,IAAIC,uBAAc,CAACH,WAAWI,QAAQ;QAChD;IACF;AACF"}
@@ -1,4 +0,0 @@
1
- "use strict";
2
- module.exports = ModuleFederationPlugin;
3
-
4
- //# sourceMappingURL=ModuleFederationPlugin.d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/ModuleFederationPlugin.d.ts"],"sourcesContent":["export = ModuleFederationPlugin;\ndeclare class ModuleFederationPlugin {\n /**\n * @param {ModuleFederationPluginOptions} options options\n */\n constructor(options: any);\n _options: any;\n /**\n * Apply the plugin\n * @param {Compiler} compiler the compiler instance\n * @returns {void}\n */\n apply(compiler: Compiler): void;\n}\ndeclare namespace ModuleFederationPlugin {\n export { ExternalsType, ModuleFederationPluginOptions, Shared, Compiler };\n}\ntype Compiler = import('webpack/lib/Compiler');\ntype ExternalsType = any;\ntype ModuleFederationPluginOptions = any;\ntype Shared = any;\n"],"names":["ModuleFederationPlugin"],"mappings":";iBAASA"}
@@ -1,83 +0,0 @@
1
- /*
2
- MIT License http://www.opensource.org/licenses/mit-license.php
3
- Author Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy
4
- */ 'use strict';
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- Object.defineProperty(exports, "default", {
9
- enumerable: true,
10
- get: function() {
11
- return _default;
12
- }
13
- });
14
- const _ExternalsTypecheck = /*#__PURE__*/ _interop_require_default(require("webpack/schemas/plugins/container/ExternalsType.check.js"));
15
- const _SharePlugin = /*#__PURE__*/ _interop_require_default(require("../sharing/SharePlugin"));
16
- const _createschemavalidation = /*#__PURE__*/ _interop_require_default(require("webpack/lib/util/create-schema-validation"));
17
- const _ContainerPlugin = /*#__PURE__*/ _interop_require_default(require("./ContainerPlugin"));
18
- const _ContainerReferencePlugin = /*#__PURE__*/ _interop_require_default(require("./ContainerReferencePlugin"));
19
- function _interop_require_default(obj) {
20
- return obj && obj.__esModule ? obj : {
21
- default: obj
22
- };
23
- }
24
- const validate = (0, _createschemavalidation.default)(//eslint-disable-next-line
25
- require('webpack/schemas/plugins/container/ModuleFederationPlugin.check.js'), ()=>require('webpack/schemas/plugins/container/ModuleFederationPlugin.json'), {
26
- name: 'Module Federation Plugin',
27
- baseDataPath: 'options'
28
- });
29
- let ModuleFederationPlugin = class ModuleFederationPlugin {
30
- /**
31
- * Apply the plugin
32
- * @param {Compiler} compiler the compiler instance
33
- * @returns {void}
34
- */ apply(compiler) {
35
- var _compiler_options_output_enabledLibraryTypes;
36
- const { _options: options } = this;
37
- const library = options.library || {
38
- type: 'var',
39
- name: options.name
40
- };
41
- const remoteType = options.remoteType || (options.library && (0, _ExternalsTypecheck.default)(options.library.type) ? options.library.type : 'script');
42
- if (library && !((_compiler_options_output_enabledLibraryTypes = compiler.options.output.enabledLibraryTypes) == null ? void 0 : _compiler_options_output_enabledLibraryTypes.includes(library.type))) {
43
- var _compiler_options_output_enabledLibraryTypes1;
44
- (_compiler_options_output_enabledLibraryTypes1 = compiler.options.output.enabledLibraryTypes) == null ? void 0 : _compiler_options_output_enabledLibraryTypes1.push(library.type);
45
- }
46
- compiler.hooks.afterPlugins.tap('ModuleFederationPlugin', ()=>{
47
- if (options.exposes && (Array.isArray(options.exposes) ? options.exposes.length > 0 : Object.keys(options.exposes).length > 0)) {
48
- new _ContainerPlugin.default({
49
- //@ts-ignore
50
- name: options.name,
51
- library,
52
- filename: options.filename,
53
- runtime: options.runtime,
54
- shareScope: options.shareScope,
55
- exposes: options.exposes
56
- }).apply(compiler);
57
- }
58
- if (options.remotes && (Array.isArray(options.remotes) ? options.remotes.length > 0 : Object.keys(options.remotes).length > 0)) {
59
- new _ContainerReferencePlugin.default({
60
- //@ts-ignore
61
- remoteType,
62
- shareScope: options.shareScope,
63
- remotes: options.remotes
64
- }).apply(compiler);
65
- }
66
- if (options.shared) {
67
- new _SharePlugin.default({
68
- shared: options.shared,
69
- shareScope: options.shareScope
70
- }).apply(compiler);
71
- }
72
- });
73
- }
74
- /**
75
- * @param {ModuleFederationPluginOptions} options options
76
- */ constructor(options){
77
- validate(options);
78
- this._options = options;
79
- }
80
- };
81
- const _default = ModuleFederationPlugin;
82
-
83
- //# sourceMappingURL=ModuleFederationPlugin.js.map