@module-federation/modern-js 0.21.6 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/dist/cjs/cli/configPlugin.js +301 -357
  2. package/dist/cjs/cli/index.js +103 -93
  3. package/dist/cjs/cli/mfRuntimePlugins/inject-node-fetch.js +51 -41
  4. package/dist/cjs/cli/mfRuntimePlugins/resolve-entry-ipv4.js +73 -75
  5. package/dist/cjs/cli/mfRuntimePlugins/shared-strategy.js +50 -40
  6. package/dist/cjs/cli/server/data-fetch-server-plugin.js +55 -44
  7. package/dist/cjs/cli/ssrPlugin.js +266 -298
  8. package/dist/cjs/cli/utils.js +84 -81
  9. package/dist/cjs/constant.js +37 -28
  10. package/dist/cjs/interfaces/bundler.js +17 -15
  11. package/dist/cjs/logger.js +37 -25
  12. package/dist/cjs/react/index.js +55 -19
  13. package/dist/cjs/react/plugin.js +62 -37
  14. package/dist/cjs/react/v18.js +55 -19
  15. package/dist/cjs/react/v19.js +55 -19
  16. package/dist/cjs/runtime/index.js +55 -19
  17. package/dist/cjs/server/fileCache.js +76 -76
  18. package/dist/cjs/server/index.js +65 -57
  19. package/dist/cjs/server/staticMiddleware.js +84 -84
  20. package/dist/cjs/ssr-runtime/SSRLiveReload.js +40 -34
  21. package/dist/cjs/ssr-runtime/devPlugin.js +63 -67
  22. package/dist/cjs/ssr-runtime/injectDataFetchFunctionPlugin.js +44 -36
  23. package/dist/cjs/types/index.js +17 -15
  24. package/dist/esm/cli/configPlugin.mjs +305 -0
  25. package/dist/esm/cli/index.mjs +83 -0
  26. package/dist/esm/cli/mfRuntimePlugins/inject-node-fetch.mjs +12 -0
  27. package/dist/esm/cli/mfRuntimePlugins/resolve-entry-ipv4.mjs +58 -0
  28. package/dist/esm/cli/mfRuntimePlugins/shared-strategy.mjs +21 -0
  29. package/dist/esm/cli/server/data-fetch-server-plugin.mjs +17 -0
  30. package/dist/esm/cli/ssrPlugin.mjs +254 -0
  31. package/dist/esm/cli/utils.mjs +40 -0
  32. package/dist/esm/constant.mjs +3 -0
  33. package/dist/esm/logger.mjs +5 -0
  34. package/dist/esm/react/plugin.mjs +3 -0
  35. package/dist/esm/server/fileCache.mjs +90 -0
  36. package/dist/esm/server/index.mjs +36 -0
  37. package/dist/esm/server/staticMiddleware.mjs +87 -0
  38. package/dist/esm/ssr-runtime/SSRLiveReload.mjs +22 -0
  39. package/dist/esm/ssr-runtime/devPlugin.mjs +70 -0
  40. package/dist/esm/ssr-runtime/injectDataFetchFunctionPlugin.mjs +34 -0
  41. package/dist/esm-node/cli/configPlugin.mjs +263 -0
  42. package/dist/esm-node/cli/index.mjs +67 -0
  43. package/dist/esm-node/cli/mfRuntimePlugins/inject-node-fetch.mjs +10 -0
  44. package/dist/esm-node/cli/mfRuntimePlugins/resolve-entry-ipv4.mjs +46 -0
  45. package/dist/esm-node/cli/mfRuntimePlugins/shared-strategy.mjs +19 -0
  46. package/dist/esm-node/cli/server/data-fetch-server-plugin.mjs +15 -0
  47. package/dist/esm-node/cli/ssrPlugin.mjs +228 -0
  48. package/dist/esm-node/cli/utils.mjs +40 -0
  49. package/dist/esm-node/constant.mjs +3 -0
  50. package/dist/esm-node/logger.mjs +5 -0
  51. package/dist/esm-node/react/plugin.mjs +3 -0
  52. package/dist/esm-node/server/fileCache.mjs +37 -0
  53. package/dist/esm-node/server/index.mjs +34 -0
  54. package/dist/esm-node/server/staticMiddleware.mjs +42 -0
  55. package/dist/esm-node/ssr-runtime/SSRLiveReload.mjs +15 -0
  56. package/dist/esm-node/ssr-runtime/devPlugin.mjs +33 -0
  57. package/dist/esm-node/ssr-runtime/injectDataFetchFunctionPlugin.mjs +14 -0
  58. package/package.json +32 -31
  59. package/dist/cjs/cli/configPlugin.spec.js +0 -112
  60. package/dist/cjs/server/fileCache.spec.js +0 -28
  61. package/dist/cjs/server/staticMiddleware.spec.js +0 -185
  62. package/dist/esm/cli/configPlugin.js +0 -395
  63. package/dist/esm/cli/configPlugin.spec.js +0 -108
  64. package/dist/esm/cli/index.js +0 -92
  65. package/dist/esm/cli/mfRuntimePlugins/inject-node-fetch.js +0 -16
  66. package/dist/esm/cli/mfRuntimePlugins/resolve-entry-ipv4.js +0 -74
  67. package/dist/esm/cli/mfRuntimePlugins/shared-strategy.js +0 -25
  68. package/dist/esm/cli/server/data-fetch-server-plugin.js +0 -20
  69. package/dist/esm/cli/ssrPlugin.js +0 -305
  70. package/dist/esm/cli/utils.js +0 -53
  71. package/dist/esm/constant.js +0 -6
  72. package/dist/esm/logger.js +0 -7
  73. package/dist/esm/react/plugin.js +0 -5
  74. package/dist/esm/server/fileCache.js +0 -98
  75. package/dist/esm/server/fileCache.spec.js +0 -50
  76. package/dist/esm/server/index.js +0 -41
  77. package/dist/esm/server/staticMiddleware.js +0 -104
  78. package/dist/esm/server/staticMiddleware.spec.js +0 -328
  79. package/dist/esm/ssr-runtime/SSRLiveReload.js +0 -26
  80. package/dist/esm/ssr-runtime/devPlugin.js +0 -73
  81. package/dist/esm/ssr-runtime/injectDataFetchFunctionPlugin.js +0 -34
  82. package/dist/esm-node/cli/configPlugin.js +0 -347
  83. package/dist/esm-node/cli/configPlugin.spec.js +0 -89
  84. package/dist/esm-node/cli/index.js +0 -72
  85. package/dist/esm-node/cli/mfRuntimePlugins/inject-node-fetch.js +0 -14
  86. package/dist/esm-node/cli/mfRuntimePlugins/resolve-entry-ipv4.js +0 -62
  87. package/dist/esm-node/cli/mfRuntimePlugins/shared-strategy.js +0 -23
  88. package/dist/esm-node/cli/server/data-fetch-server-plugin.js +0 -18
  89. package/dist/esm-node/cli/ssrPlugin.js +0 -280
  90. package/dist/esm-node/cli/utils.js +0 -53
  91. package/dist/esm-node/constant.js +0 -6
  92. package/dist/esm-node/logger.js +0 -7
  93. package/dist/esm-node/react/plugin.js +0 -5
  94. package/dist/esm-node/server/fileCache.js +0 -49
  95. package/dist/esm-node/server/fileCache.spec.js +0 -27
  96. package/dist/esm-node/server/index.js +0 -39
  97. package/dist/esm-node/server/staticMiddleware.js +0 -55
  98. package/dist/esm-node/server/staticMiddleware.spec.js +0 -162
  99. package/dist/esm-node/ssr-runtime/SSRLiveReload.js +0 -19
  100. package/dist/esm-node/ssr-runtime/devPlugin.js +0 -37
  101. package/dist/esm-node/ssr-runtime/injectDataFetchFunctionPlugin.js +0 -16
  102. /package/dist/esm/interfaces/{bundler.js → bundler.mjs} +0 -0
  103. /package/dist/esm/react/{index.js → index.mjs} +0 -0
  104. /package/dist/esm/react/{v18.js → v18.mjs} +0 -0
  105. /package/dist/esm/react/{v19.js → v19.mjs} +0 -0
  106. /package/dist/esm/runtime/{index.js → index.mjs} +0 -0
  107. /package/dist/esm/types/{index.js → index.mjs} +0 -0
  108. /package/dist/esm-node/interfaces/{bundler.js → bundler.mjs} +0 -0
  109. /package/dist/esm-node/react/{index.js → index.mjs} +0 -0
  110. /package/dist/esm-node/react/{v18.js → v18.mjs} +0 -0
  111. /package/dist/esm-node/react/{v19.js → v19.mjs} +0 -0
  112. /package/dist/esm-node/runtime/{index.js → index.mjs} +0 -0
  113. /package/dist/esm-node/types/{index.js → index.mjs} +0 -0
@@ -1,388 +1,332 @@
1
1
  "use strict";
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 __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var configPlugin_exports = {};
30
- __export(configPlugin_exports, {
31
- addMyTypes2Ignored: () => addMyTypes2Ignored,
32
- default: () => configPlugin_default,
33
- getMFConfig: () => getMFConfig,
34
- isWebTarget: () => import_utils.isWebTarget,
35
- moduleFederationConfigPlugin: () => moduleFederationConfigPlugin,
36
- patchBundlerConfig: () => patchBundlerConfig,
37
- patchMFConfig: () => patchMFConfig,
38
- setEnv: () => setEnv,
39
- skipByTarget: () => import_utils.skipByTarget
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.n = (module)=>{
5
+ var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
6
+ __webpack_require__.d(getter, {
7
+ a: getter
8
+ });
9
+ return getter;
10
+ };
11
+ })();
12
+ (()=>{
13
+ __webpack_require__.d = (exports1, definition)=>{
14
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
15
+ enumerable: true,
16
+ get: definition[key]
17
+ });
18
+ };
19
+ })();
20
+ (()=>{
21
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
22
+ })();
23
+ (()=>{
24
+ __webpack_require__.r = (exports1)=>{
25
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
26
+ value: 'Module'
27
+ });
28
+ Object.defineProperty(exports1, '__esModule', {
29
+ value: true
30
+ });
31
+ };
32
+ })();
33
+ var __webpack_exports__ = {};
34
+ __webpack_require__.r(__webpack_exports__);
35
+ __webpack_require__.d(__webpack_exports__, {
36
+ patchMFConfig: ()=>patchMFConfig,
37
+ default: ()=>configPlugin,
38
+ getMFConfig: ()=>getMFConfig,
39
+ isWebTarget: ()=>external_utils_js_namespaceObject.isWebTarget,
40
+ moduleFederationConfigPlugin: ()=>moduleFederationConfigPlugin,
41
+ addMyTypes2Ignored: ()=>addMyTypes2Ignored,
42
+ skipByTarget: ()=>external_utils_js_namespaceObject.skipByTarget,
43
+ setEnv: ()=>setEnv,
44
+ patchBundlerConfig: ()=>patchBundlerConfig
40
45
  });
41
- module.exports = __toCommonJS(configPlugin_exports);
42
- var import_path = __toESM(require("path"));
43
- var import_utils = require("./utils");
44
- var import_sdk = require("@module-federation/sdk");
45
- var import_node_bundle_require = require("@modern-js/node-bundle-require");
46
- var import_constant = require("../constant");
47
- var import_utils2 = require("@module-federation/rsbuild-plugin/utils");
48
- var import_logger = __toESM(require("../logger"));
49
- var import_utils3 = require("./utils");
50
- const defaultPath = import_path.default.resolve(process.cwd(), "module-federation.config.ts");
46
+ const external_path_namespaceObject = require("path");
47
+ var external_path_default = /*#__PURE__*/ __webpack_require__.n(external_path_namespaceObject);
48
+ const external_utils_js_namespaceObject = require("./utils.js");
49
+ const sdk_namespaceObject = require("@module-federation/sdk");
50
+ const node_bundle_require_namespaceObject = require("@modern-js/node-bundle-require");
51
+ const external_constant_js_namespaceObject = require("../constant.js");
52
+ const utils_namespaceObject = require("@module-federation/rsbuild-plugin/utils");
53
+ const external_logger_js_namespaceObject = require("../logger.js");
54
+ var external_logger_js_default = /*#__PURE__*/ __webpack_require__.n(external_logger_js_namespaceObject);
55
+ const defaultPath = external_path_default().resolve(process.cwd(), 'module-federation.config.ts');
51
56
  function setEnv(enableSSR) {
52
- if (enableSSR) {
53
- process.env["MF_SSR_PRJ"] = "true";
54
- }
57
+ if (enableSSR) process.env['MF_SSR_PRJ'] = 'true';
55
58
  }
56
- const getMFConfig = async (userConfig) => {
57
- const { config, configPath } = userConfig;
58
- if (config) {
59
- return config;
60
- }
61
- const mfConfigPath = configPath ? configPath : defaultPath;
62
- const preBundlePath = await (0, import_node_bundle_require.bundle)(mfConfigPath);
63
- const mfConfig = (await Promise.resolve().then(() => __toESM(require(preBundlePath)))).default;
64
- return mfConfig;
65
- };
66
- const injectRuntimePlugins = (runtimePlugin, runtimePlugins) => {
67
- const pluginName = typeof runtimePlugin === "string" ? runtimePlugin : runtimePlugin[0];
68
- const hasPlugin = runtimePlugins.some((existingPlugin) => {
69
- if (typeof existingPlugin === "string") {
70
- return existingPlugin === pluginName;
71
- }
72
- return existingPlugin[0] === pluginName;
73
- });
74
- if (!hasPlugin) {
75
- runtimePlugins.push(runtimePlugin);
76
- }
59
+ const getMFConfig = async (userConfig)=>{
60
+ const { config, configPath } = userConfig;
61
+ if (config) return config;
62
+ const mfConfigPath = configPath ? configPath : defaultPath;
63
+ const preBundlePath = await (0, node_bundle_require_namespaceObject.bundle)(mfConfigPath);
64
+ const mfConfig = (await import(preBundlePath)).default;
65
+ return mfConfig;
77
66
  };
78
- const replaceRemoteUrl = (mfConfig, remoteIpStrategy) => {
79
- if (remoteIpStrategy && remoteIpStrategy === "inherit") {
80
- return;
81
- }
82
- if (!mfConfig.remotes) {
83
- return;
84
- }
85
- const ipv4 = (0, import_utils.getIPV4)();
86
- const handleRemoteObject = (remoteObject) => {
87
- Object.keys(remoteObject).forEach((remoteKey) => {
88
- const remote = remoteObject[remoteKey];
89
- if (Array.isArray(remote)) {
90
- return;
91
- }
92
- if (typeof remote === "string" && remote.includes(import_constant.LOCALHOST)) {
93
- remoteObject[remoteKey] = remote.replace(import_constant.LOCALHOST, ipv4);
94
- }
95
- if (typeof remote === "object" && !Array.isArray(remote.external) && remote.external.includes(import_constant.LOCALHOST)) {
96
- remote.external = remote.external.replace(import_constant.LOCALHOST, ipv4);
97
- }
67
+ const injectRuntimePlugins = (runtimePlugin, runtimePlugins)=>{
68
+ const pluginName = 'string' == typeof runtimePlugin ? runtimePlugin : runtimePlugin[0];
69
+ const hasPlugin = runtimePlugins.some((existingPlugin)=>{
70
+ if ('string' == typeof existingPlugin) return existingPlugin === pluginName;
71
+ return existingPlugin[0] === pluginName;
98
72
  });
99
- };
100
- if (Array.isArray(mfConfig.remotes)) {
101
- mfConfig.remotes.forEach((remoteObject) => {
102
- if (typeof remoteObject === "string") {
103
- return;
104
- }
105
- handleRemoteObject(remoteObject);
73
+ if (!hasPlugin) runtimePlugins.push(runtimePlugin);
74
+ };
75
+ const replaceRemoteUrl = (mfConfig, remoteIpStrategy)=>{
76
+ if (remoteIpStrategy && 'inherit' === remoteIpStrategy) return;
77
+ if (!mfConfig.remotes) return;
78
+ const ipv4 = (0, external_utils_js_namespaceObject.getIPV4)();
79
+ const handleRemoteObject = (remoteObject)=>{
80
+ Object.keys(remoteObject).forEach((remoteKey)=>{
81
+ const remote = remoteObject[remoteKey];
82
+ if (Array.isArray(remote)) return;
83
+ if ('string' == typeof remote && remote.includes(external_constant_js_namespaceObject.LOCALHOST)) remoteObject[remoteKey] = remote.replace(external_constant_js_namespaceObject.LOCALHOST, ipv4);
84
+ if ('object' == typeof remote && !Array.isArray(remote.external) && remote.external.includes(external_constant_js_namespaceObject.LOCALHOST)) remote.external = remote.external.replace(external_constant_js_namespaceObject.LOCALHOST, ipv4);
85
+ });
86
+ };
87
+ if (Array.isArray(mfConfig.remotes)) mfConfig.remotes.forEach((remoteObject)=>{
88
+ if ('string' == typeof remoteObject) return;
89
+ handleRemoteObject(remoteObject);
106
90
  });
107
- } else if (typeof mfConfig.remotes !== "string") {
108
- handleRemoteObject(mfConfig.remotes);
109
- }
91
+ else if ('string' != typeof mfConfig.remotes) handleRemoteObject(mfConfig.remotes);
110
92
  };
111
- const patchDTSConfig = (mfConfig, isServer) => {
112
- if (isServer) {
113
- return;
114
- }
115
- const ModernJSRuntime = "@module-federation/modern-js/runtime";
116
- if (mfConfig.dts !== false) {
117
- var _mfConfig_dts, _mfConfig_dts1;
118
- if (typeof mfConfig.dts === "boolean" || mfConfig.dts === void 0) {
119
- mfConfig.dts = {
120
- consumeTypes: {
121
- runtimePkgs: [
122
- ModernJSRuntime
123
- ]
124
- }
125
- };
126
- } else if (((_mfConfig_dts = mfConfig.dts) === null || _mfConfig_dts === void 0 ? void 0 : _mfConfig_dts.consumeTypes) || ((_mfConfig_dts1 = mfConfig.dts) === null || _mfConfig_dts1 === void 0 ? void 0 : _mfConfig_dts1.consumeTypes) === void 0) {
127
- var _mfConfig_dts2;
128
- if (typeof mfConfig.dts.consumeTypes === "boolean" || ((_mfConfig_dts2 = mfConfig.dts) === null || _mfConfig_dts2 === void 0 ? void 0 : _mfConfig_dts2.consumeTypes) === void 0) {
129
- mfConfig.dts.consumeTypes = {
130
- runtimePkgs: [
131
- ModernJSRuntime
132
- ]
93
+ const patchDTSConfig = (mfConfig, isServer)=>{
94
+ if (isServer) return;
95
+ const ModernJSRuntime = '@module-federation/modern-js/runtime';
96
+ if (false !== mfConfig.dts) {
97
+ var _mfConfig_dts, _mfConfig_dts1;
98
+ if ('boolean' == typeof mfConfig.dts || void 0 === mfConfig.dts) mfConfig.dts = {
99
+ consumeTypes: {
100
+ runtimePkgs: [
101
+ ModernJSRuntime
102
+ ]
103
+ }
133
104
  };
134
- } else {
135
- mfConfig.dts.consumeTypes.runtimePkgs = mfConfig.dts.consumeTypes.runtimePkgs || [];
136
- if (!mfConfig.dts.consumeTypes.runtimePkgs.includes(ModernJSRuntime)) {
137
- mfConfig.dts.consumeTypes.runtimePkgs.push(ModernJSRuntime);
105
+ else if ((null == (_mfConfig_dts = mfConfig.dts) ? void 0 : _mfConfig_dts.consumeTypes) || (null == (_mfConfig_dts1 = mfConfig.dts) ? void 0 : _mfConfig_dts1.consumeTypes) === void 0) {
106
+ var _mfConfig_dts2;
107
+ if ('boolean' == typeof mfConfig.dts.consumeTypes || (null == (_mfConfig_dts2 = mfConfig.dts) ? void 0 : _mfConfig_dts2.consumeTypes) === void 0) mfConfig.dts.consumeTypes = {
108
+ runtimePkgs: [
109
+ ModernJSRuntime
110
+ ]
111
+ };
112
+ else {
113
+ mfConfig.dts.consumeTypes.runtimePkgs = mfConfig.dts.consumeTypes.runtimePkgs || [];
114
+ if (!mfConfig.dts.consumeTypes.runtimePkgs.includes(ModernJSRuntime)) mfConfig.dts.consumeTypes.runtimePkgs.push(ModernJSRuntime);
115
+ }
138
116
  }
139
- }
140
117
  }
141
- }
142
118
  };
143
- const patchMFConfig = (mfConfig, isServer, remoteIpStrategy, enableSSR) => {
144
- replaceRemoteUrl(mfConfig, remoteIpStrategy);
145
- (0, import_utils2.addDataFetchExposes)(mfConfig.exposes, isServer);
146
- if (mfConfig.remoteType === void 0) {
147
- mfConfig.remoteType = "script";
148
- }
149
- if (!mfConfig.name) {
150
- throw new Error(`${import_constant.PLUGIN_IDENTIFIER} mfConfig.name can not be empty!`);
151
- }
152
- const runtimePlugins = [
153
- ...mfConfig.runtimePlugins || []
154
- ];
155
- patchDTSConfig(mfConfig, isServer);
156
- injectRuntimePlugins(require.resolve("@module-federation/modern-js/shared-strategy"), runtimePlugins);
157
- if (enableSSR && (0, import_utils3.isDev)()) {
158
- injectRuntimePlugins(require.resolve("@module-federation/modern-js/resolve-entry-ipv4"), runtimePlugins);
159
- }
160
- if (isServer) {
161
- injectRuntimePlugins(require.resolve("@module-federation/node/runtimePlugin"), runtimePlugins);
162
- if ((0, import_utils3.isDev)()) {
163
- injectRuntimePlugins(require.resolve("@module-federation/node/record-dynamic-remote-entry-hash-plugin"), runtimePlugins);
164
- }
165
- injectRuntimePlugins(require.resolve("@module-federation/modern-js/inject-node-fetch"), runtimePlugins);
166
- if (!mfConfig.library) {
167
- mfConfig.library = {
168
- type: "commonjs-module",
169
- name: mfConfig.name
170
- };
171
- } else {
172
- if (!mfConfig.library.type) {
173
- mfConfig.library.type = "commonjs-module";
174
- }
175
- if (!mfConfig.library.name) {
176
- mfConfig.library.name = mfConfig.name;
177
- }
119
+ const patchMFConfig = (mfConfig, isServer, remoteIpStrategy, enableSSR)=>{
120
+ replaceRemoteUrl(mfConfig, remoteIpStrategy);
121
+ (0, utils_namespaceObject.addDataFetchExposes)(mfConfig.exposes, isServer);
122
+ if (void 0 === mfConfig.remoteType) mfConfig.remoteType = "script";
123
+ if (!mfConfig.name) throw new Error(`${external_constant_js_namespaceObject.PLUGIN_IDENTIFIER} mfConfig.name can not be empty!`);
124
+ const runtimePlugins = [
125
+ ...mfConfig.runtimePlugins || []
126
+ ];
127
+ patchDTSConfig(mfConfig, isServer);
128
+ injectRuntimePlugins(require.resolve('@module-federation/modern-js/shared-strategy'), runtimePlugins);
129
+ if (enableSSR && (0, external_utils_js_namespaceObject.isDev)()) injectRuntimePlugins(require.resolve('@module-federation/modern-js/resolve-entry-ipv4'), runtimePlugins);
130
+ if (isServer) {
131
+ injectRuntimePlugins(require.resolve('@module-federation/node/runtimePlugin'), runtimePlugins);
132
+ if ((0, external_utils_js_namespaceObject.isDev)()) injectRuntimePlugins(require.resolve('@module-federation/node/record-dynamic-remote-entry-hash-plugin'), runtimePlugins);
133
+ injectRuntimePlugins(require.resolve('@module-federation/modern-js/inject-node-fetch'), runtimePlugins);
134
+ if (mfConfig.library) {
135
+ if (!mfConfig.library.type) mfConfig.library.type = 'commonjs-module';
136
+ if (!mfConfig.library.name) mfConfig.library.name = mfConfig.name;
137
+ } else mfConfig.library = {
138
+ type: 'commonjs-module',
139
+ name: mfConfig.name
140
+ };
178
141
  }
179
- }
180
- mfConfig.runtimePlugins = runtimePlugins;
181
- if (!isServer) {
182
- var _mfConfig_library;
183
- if (((_mfConfig_library = mfConfig.library) === null || _mfConfig_library === void 0 ? void 0 : _mfConfig_library.type) === "commonjs-module") {
184
- mfConfig.library.type = "global";
142
+ mfConfig.runtimePlugins = runtimePlugins;
143
+ if (!isServer) {
144
+ var _mfConfig_library;
145
+ if ((null == (_mfConfig_library = mfConfig.library) ? void 0 : _mfConfig_library.type) === 'commonjs-module') mfConfig.library.type = 'global';
146
+ return mfConfig;
185
147
  }
148
+ mfConfig.dts = false;
149
+ mfConfig.dev = false;
186
150
  return mfConfig;
187
- }
188
- mfConfig.dts = false;
189
- mfConfig.dev = false;
190
- return mfConfig;
191
151
  };
192
152
  function patchIgnoreWarning(chain) {
193
- const ignoreWarnings = chain.get("ignoreWarnings") || [];
194
- const ignoredMsgs = [
195
- "external script",
196
- "process.env.WS_NO_BUFFER_UTIL",
197
- `Can't resolve 'utf-8-validate`
198
- ];
199
- ignoreWarnings.push((warning) => {
200
- if (ignoredMsgs.some((msg) => warning.message.includes(msg))) {
201
- return true;
202
- }
203
- return false;
204
- });
205
- chain.ignoreWarnings(ignoreWarnings);
153
+ const ignoreWarnings = chain.get('ignoreWarnings') || [];
154
+ const ignoredMsgs = [
155
+ "external script",
156
+ 'process.env.WS_NO_BUFFER_UTIL',
157
+ "Can't resolve 'utf-8-validate"
158
+ ];
159
+ ignoreWarnings.push((warning)=>{
160
+ if (ignoredMsgs.some((msg)=>warning.message.includes(msg))) return true;
161
+ return false;
162
+ });
163
+ chain.ignoreWarnings(ignoreWarnings);
206
164
  }
207
165
  function addMyTypes2Ignored(chain, mfConfig) {
208
- const watchOptions = chain.get("watchOptions");
209
- if (!watchOptions || !watchOptions.ignored) {
210
- chain.watchOptions({
211
- ignored: /[\\/](?:\.git|node_modules|@mf-types)[\\/]/
166
+ const watchOptions = chain.get('watchOptions');
167
+ if (!watchOptions || !watchOptions.ignored) return void chain.watchOptions({
168
+ ignored: /[\\/](?:\.git|node_modules|@mf-types)[\\/]/
212
169
  });
213
- return;
214
- }
215
- const ignored = watchOptions.ignored;
216
- const DEFAULT_IGNORED_GLOB = "**/@mf-types/**";
217
- if (Array.isArray(ignored)) {
218
- if (mfConfig.dts !== false && typeof mfConfig.dts === "object" && typeof mfConfig.dts.consumeTypes === "object" && mfConfig.dts.consumeTypes.remoteTypesFolder) {
219
- chain.watchOptions({
170
+ const ignored = watchOptions.ignored;
171
+ const DEFAULT_IGNORED_GLOB = '**/@mf-types/**';
172
+ if (Array.isArray(ignored)) {
173
+ if (false !== mfConfig.dts && 'object' == typeof mfConfig.dts && 'object' == typeof mfConfig.dts.consumeTypes && mfConfig.dts.consumeTypes.remoteTypesFolder) chain.watchOptions({
174
+ ...watchOptions,
175
+ ignored: ignored.concat(`**/${mfConfig.dts.consumeTypes.remoteTypesFolder}/**`)
176
+ });
177
+ else chain.watchOptions({
178
+ ...watchOptions,
179
+ ignored: ignored.concat(DEFAULT_IGNORED_GLOB)
180
+ });
181
+ return;
182
+ }
183
+ if ('string' != typeof ignored) return void chain.watchOptions({
220
184
  ...watchOptions,
221
- ignored: ignored.concat(`**/${mfConfig.dts.consumeTypes.remoteTypesFolder}/**`)
222
- });
223
- } else {
224
- chain.watchOptions({
185
+ ignored: /[\\/](?:\.git|node_modules|@mf-types)[\\/]/
186
+ });
187
+ chain.watchOptions({
225
188
  ...watchOptions,
226
189
  ignored: ignored.concat(DEFAULT_IGNORED_GLOB)
227
- });
228
- }
229
- return;
230
- }
231
- if (typeof ignored !== "string") {
232
- chain.watchOptions({
233
- ...watchOptions,
234
- ignored: /[\\/](?:\.git|node_modules|@mf-types)[\\/]/
235
190
  });
236
- return;
237
- }
238
- chain.watchOptions({
239
- ...watchOptions,
240
- ignored: ignored.concat(DEFAULT_IGNORED_GLOB)
241
- });
242
191
  }
243
192
  function patchBundlerConfig(options) {
244
- var _modernjsConfig_deploy;
245
- const { chain, modernjsConfig, isServer, mfConfig, enableSSR } = options;
246
- chain.optimization.delete("runtimeChunk");
247
- patchIgnoreWarning(chain);
248
- if (!chain.output.get("chunkLoadingGlobal")) {
249
- chain.output.chunkLoadingGlobal(`chunk_${mfConfig.name}`);
250
- }
251
- if (!chain.output.get("uniqueName")) {
252
- chain.output.uniqueName(mfConfig.name);
253
- }
254
- const splitChunkConfig = chain.optimization.splitChunks.entries();
255
- if (!isServer) {
256
- (0, import_utils2.autoDeleteSplitChunkCacheGroups)(mfConfig, splitChunkConfig);
257
- }
258
- if (!isServer && enableSSR && splitChunkConfig && typeof splitChunkConfig === "object" && splitChunkConfig.cacheGroups) {
259
- splitChunkConfig.chunks = "async";
260
- import_logger.default.warn(`splitChunks.chunks = async is not allowed with stream SSR mode, it will auto changed to "async"`);
261
- }
262
- if ((0, import_utils3.isDev)() && chain.output.get("publicPath") === "auto") {
263
- var _modernjsConfig_dev, _modernjsConfig_server;
264
- const port = ((_modernjsConfig_dev = modernjsConfig.dev) === null || _modernjsConfig_dev === void 0 ? void 0 : _modernjsConfig_dev.port) || ((_modernjsConfig_server = modernjsConfig.server) === null || _modernjsConfig_server === void 0 ? void 0 : _modernjsConfig_server.port) || 8080;
265
- const publicPath = `http://localhost:${port}/`;
266
- chain.output.publicPath(publicPath);
267
- }
268
- if (isServer && enableSSR) {
269
- const uniqueName = mfConfig.name || chain.output.get("uniqueName");
270
- const chunkFileName = chain.output.get("chunkFilename");
271
- if (typeof chunkFileName === "string" && uniqueName && !chunkFileName.includes(uniqueName)) {
272
- const suffix = `${(0, import_sdk.encodeName)(uniqueName)}-[contenthash].js`;
273
- chain.output.chunkFilename(chunkFileName.replace(".js", suffix));
193
+ var _modernjsConfig_deploy;
194
+ const { chain, modernjsConfig, isServer, mfConfig, enableSSR } = options;
195
+ chain.optimization.delete('runtimeChunk');
196
+ patchIgnoreWarning(chain);
197
+ if (!chain.output.get('chunkLoadingGlobal')) chain.output.chunkLoadingGlobal(`chunk_${mfConfig.name}`);
198
+ if (!chain.output.get('uniqueName')) chain.output.uniqueName(mfConfig.name);
199
+ const splitChunkConfig = chain.optimization.splitChunks.entries();
200
+ if (!isServer) (0, utils_namespaceObject.autoDeleteSplitChunkCacheGroups)(mfConfig, splitChunkConfig);
201
+ if (!isServer && enableSSR && splitChunkConfig && 'object' == typeof splitChunkConfig && splitChunkConfig.cacheGroups) {
202
+ splitChunkConfig.chunks = 'async';
203
+ external_logger_js_default().warn('splitChunks.chunks = async is not allowed with stream SSR mode, it will auto changed to "async"');
274
204
  }
275
- }
276
- if ((0, import_utils3.isDev)() && enableSSR && !isServer) {
277
- chain.resolve.fallback.set("crypto", false).set("stream", false).set("vm", false);
278
- }
279
- if (((_modernjsConfig_deploy = modernjsConfig.deploy) === null || _modernjsConfig_deploy === void 0 ? void 0 : _modernjsConfig_deploy.microFrontend) && Object.keys(mfConfig.exposes || {}).length) {
280
- chain.optimization.usedExports(false);
281
- }
282
- }
283
- const moduleFederationConfigPlugin = (userConfig) => ({
284
- name: "@modern-js/plugin-module-federation-config",
285
- pre: [
286
- "@modern-js/plugin-initialize"
287
- ],
288
- post: [
289
- "@modern-js/plugin-module-federation"
290
- ],
291
- setup: async (api) => {
292
- var _userConfig_userConfig, _modernjsConfig_server;
293
- const modernjsConfig = api.getConfig();
294
- const mfConfig = await getMFConfig(userConfig.originPluginOptions);
295
- const csrConfig = userConfig.csrConfig || JSON.parse(JSON.stringify(mfConfig));
296
- const ssrConfig = userConfig.ssrConfig || JSON.parse(JSON.stringify(mfConfig));
297
- userConfig.ssrConfig = ssrConfig;
298
- userConfig.csrConfig = csrConfig;
299
- var _userConfig_userConfig_ssr;
300
- const enableSSR = Boolean((_userConfig_userConfig_ssr = (_userConfig_userConfig = userConfig.userConfig) === null || _userConfig_userConfig === void 0 ? void 0 : _userConfig_userConfig.ssr) !== null && _userConfig_userConfig_ssr !== void 0 ? _userConfig_userConfig_ssr : Boolean(modernjsConfig === null || modernjsConfig === void 0 ? void 0 : (_modernjsConfig_server = modernjsConfig.server) === null || _modernjsConfig_server === void 0 ? void 0 : _modernjsConfig_server.ssr));
301
- api.modifyBundlerChain((chain) => {
302
- const target = chain.get("target");
303
- if ((0, import_utils.skipByTarget)(target)) {
304
- return;
305
- }
306
- const isWeb = (0, import_utils.isWebTarget)(target);
307
- addMyTypes2Ignored(chain, !isWeb ? ssrConfig : csrConfig);
308
- const targetMFConfig = !isWeb ? ssrConfig : csrConfig;
309
- patchMFConfig(targetMFConfig, !isWeb, userConfig.remoteIpStrategy || "ipv4", enableSSR);
310
- patchBundlerConfig({
311
- chain,
312
- isServer: !isWeb,
313
- modernjsConfig,
314
- mfConfig,
315
- enableSSR
316
- });
317
- userConfig.distOutputDir = chain.output.get("path") || import_path.default.resolve(process.cwd(), "dist");
318
- });
319
- api.config(() => {
320
- var _modernjsConfig_tools, _userConfig_csrConfig, _modernjsConfig_source, _modernjsConfig_source1, _modernjsConfig_dev;
321
- const bundlerType = api.getAppContext().bundlerType === "rspack" ? "rspack" : "webpack";
322
- const ipv4 = (0, import_utils.getIPV4)();
323
- if (userConfig.remoteIpStrategy === void 0) {
324
- if (!enableSSR) {
325
- userConfig.remoteIpStrategy = "inherit";
326
- } else {
327
- userConfig.remoteIpStrategy = "ipv4";
205
+ if ((0, external_utils_js_namespaceObject.isDev)() && 'auto' === chain.output.get('publicPath')) {
206
+ var _modernjsConfig_dev, _modernjsConfig_server;
207
+ const port = (null == (_modernjsConfig_dev = modernjsConfig.dev) ? void 0 : _modernjsConfig_dev.port) || (null == (_modernjsConfig_server = modernjsConfig.server) ? void 0 : _modernjsConfig_server.port) || 8080;
208
+ const publicPath = `http://localhost:${port}/`;
209
+ chain.output.publicPath(publicPath);
210
+ }
211
+ if (isServer && enableSSR) {
212
+ const uniqueName = mfConfig.name || chain.output.get('uniqueName');
213
+ const chunkFileName = chain.output.get('chunkFilename');
214
+ if ('string' == typeof chunkFileName && uniqueName && !chunkFileName.includes(uniqueName)) {
215
+ const suffix = `${(0, sdk_namespaceObject.encodeName)(uniqueName)}-[contenthash].js`;
216
+ chain.output.chunkFilename(chunkFileName.replace('.js', suffix));
328
217
  }
329
- }
330
- const devServerConfig = (_modernjsConfig_tools = modernjsConfig.tools) === null || _modernjsConfig_tools === void 0 ? void 0 : _modernjsConfig_tools.devServer;
331
- const corsWarnMsgs = [
332
- "View https://module-federation.io/guide/troubleshooting/other.html#cors-warn for more details."
333
- ];
334
- if (typeof devServerConfig !== "object" || !("headers" in devServerConfig)) {
335
- corsWarnMsgs.unshift('Detect devServer.headers is empty, mf modern plugin will add default cors header: devServer.headers["Access-Control-Allow-Headers"] = "*". It is recommended to specify an allowlist of trusted origins instead.');
336
- }
337
- const exposes = (_userConfig_csrConfig = userConfig.csrConfig) === null || _userConfig_csrConfig === void 0 ? void 0 : _userConfig_csrConfig.exposes;
338
- const hasExposes = exposes && Array.isArray(exposes) ? exposes.length : Object.keys(exposes !== null && exposes !== void 0 ? exposes : {}).length;
339
- if (corsWarnMsgs.length > 1 && hasExposes) {
340
- import_logger.default.warn(corsWarnMsgs.join("\n"));
341
- }
342
- const corsHeaders = hasExposes ? {
343
- "Access-Control-Allow-Origin": "*",
344
- "Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS",
345
- "Access-Control-Allow-Headers": "*"
346
- } : void 0;
347
- const defineConfig = {
348
- REMOTE_IP_STRATEGY: JSON.stringify(userConfig.remoteIpStrategy)
349
- };
350
- if (enableSSR && (0, import_utils3.isDev)()) {
351
- defineConfig["FEDERATION_IPV4"] = JSON.stringify(ipv4);
352
- }
353
- var _modernjsConfig_source_enableAsyncEntry;
354
- return {
355
- tools: {
356
- devServer: {
357
- headers: corsHeaders
358
- }
359
- },
360
- resolve: {
361
- alias: {
362
- // TODO: deprecated
363
- "@modern-js/runtime/mf": require.resolve("@module-federation/modern-js/runtime")
364
- }
365
- },
366
- source: {
367
- define: defineConfig,
368
- enableAsyncEntry: bundlerType === "rspack" ? (_modernjsConfig_source_enableAsyncEntry = (_modernjsConfig_source = modernjsConfig.source) === null || _modernjsConfig_source === void 0 ? void 0 : _modernjsConfig_source.enableAsyncEntry) !== null && _modernjsConfig_source_enableAsyncEntry !== void 0 ? _modernjsConfig_source_enableAsyncEntry : true : (_modernjsConfig_source1 = modernjsConfig.source) === null || _modernjsConfig_source1 === void 0 ? void 0 : _modernjsConfig_source1.enableAsyncEntry
369
- },
370
- dev: {
371
- assetPrefix: (modernjsConfig === null || modernjsConfig === void 0 ? void 0 : (_modernjsConfig_dev = modernjsConfig.dev) === null || _modernjsConfig_dev === void 0 ? void 0 : _modernjsConfig_dev.assetPrefix) ? modernjsConfig.dev.assetPrefix : true
218
+ }
219
+ if ((0, external_utils_js_namespaceObject.isDev)() && enableSSR && !isServer) chain.resolve.fallback.set('crypto', false).set('stream', false).set('vm', false);
220
+ if ((null == (_modernjsConfig_deploy = modernjsConfig.deploy) ? void 0 : _modernjsConfig_deploy.microFrontend) && Object.keys(mfConfig.exposes || {}).length) chain.optimization.usedExports(false);
221
+ }
222
+ const moduleFederationConfigPlugin = (userConfig)=>({
223
+ name: '@modern-js/plugin-module-federation-config',
224
+ pre: [
225
+ '@modern-js/plugin-initialize'
226
+ ],
227
+ post: [
228
+ '@modern-js/plugin-module-federation'
229
+ ],
230
+ setup: async (api)=>{
231
+ var _userConfig_userConfig, _modernjsConfig_server;
232
+ const modernjsConfig = api.getConfig();
233
+ const mfConfig = await getMFConfig(userConfig.originPluginOptions);
234
+ const csrConfig = userConfig.csrConfig || JSON.parse(JSON.stringify(mfConfig));
235
+ const ssrConfig = userConfig.ssrConfig || JSON.parse(JSON.stringify(mfConfig));
236
+ userConfig.ssrConfig = ssrConfig;
237
+ userConfig.csrConfig = csrConfig;
238
+ var _ref;
239
+ const enableSSR = Boolean(null != (_ref = null == (_userConfig_userConfig = userConfig.userConfig) ? void 0 : _userConfig_userConfig.ssr) ? _ref : Boolean(null == modernjsConfig ? void 0 : null == (_modernjsConfig_server = modernjsConfig.server) ? void 0 : _modernjsConfig_server.ssr));
240
+ api.modifyBundlerChain((chain)=>{
241
+ const target = chain.get('target');
242
+ if ((0, external_utils_js_namespaceObject.skipByTarget)(target)) return;
243
+ const isWeb = (0, external_utils_js_namespaceObject.isWebTarget)(target);
244
+ addMyTypes2Ignored(chain, isWeb ? csrConfig : ssrConfig);
245
+ const targetMFConfig = isWeb ? csrConfig : ssrConfig;
246
+ patchMFConfig(targetMFConfig, !isWeb, userConfig.remoteIpStrategy || 'ipv4', enableSSR);
247
+ patchBundlerConfig({
248
+ chain,
249
+ isServer: !isWeb,
250
+ modernjsConfig,
251
+ mfConfig,
252
+ enableSSR
253
+ });
254
+ if (isWeb) userConfig.distOutputDir = chain.output.get('path') || external_path_default().resolve(process.cwd(), 'dist');
255
+ else if (enableSSR) {
256
+ var _userConfig, _userConfig_userConfig;
257
+ (_userConfig = userConfig).userConfig || (_userConfig.userConfig = {});
258
+ (_userConfig_userConfig = userConfig.userConfig).ssr || (_userConfig_userConfig.ssr = {});
259
+ if (true === userConfig.userConfig.ssr) userConfig.userConfig.ssr = {};
260
+ userConfig.userConfig.ssr.distOutputDir = chain.output.get('path') || external_path_default().resolve(process.cwd(), 'dist/bundles');
261
+ }
262
+ });
263
+ api.config(()=>{
264
+ var _modernjsConfig_tools, _userConfig_csrConfig, _modernjsConfig_source, _modernjsConfig_source1, _modernjsConfig_dev;
265
+ const bundlerType = 'rspack' === api.getAppContext().bundlerType ? 'rspack' : 'webpack';
266
+ const ipv4 = (0, external_utils_js_namespaceObject.getIPV4)();
267
+ if (void 0 === userConfig.remoteIpStrategy) if (enableSSR) userConfig.remoteIpStrategy = 'ipv4';
268
+ else userConfig.remoteIpStrategy = 'inherit';
269
+ const devServerConfig = null == (_modernjsConfig_tools = modernjsConfig.tools) ? void 0 : _modernjsConfig_tools.devServer;
270
+ const corsWarnMsgs = [
271
+ 'View https://module-federation.io/guide/troubleshooting/other.html#cors-warn for more details.'
272
+ ];
273
+ if ('object' != typeof devServerConfig || !('headers' in devServerConfig)) corsWarnMsgs.unshift('Detect devServer.headers is empty, mf modern plugin will add default cors header: devServer.headers["Access-Control-Allow-Headers"] = "*". It is recommended to specify an allowlist of trusted origins instead.');
274
+ const exposes = null == (_userConfig_csrConfig = userConfig.csrConfig) ? void 0 : _userConfig_csrConfig.exposes;
275
+ const hasExposes = exposes && Array.isArray(exposes) ? exposes.length : Object.keys(null != exposes ? exposes : {}).length;
276
+ if (corsWarnMsgs.length > 1 && hasExposes) external_logger_js_default().warn(corsWarnMsgs.join('\n'));
277
+ const corsHeaders = hasExposes ? {
278
+ 'Access-Control-Allow-Origin': '*',
279
+ 'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
280
+ 'Access-Control-Allow-Headers': '*'
281
+ } : void 0;
282
+ const defineConfig = {
283
+ REMOTE_IP_STRATEGY: JSON.stringify(userConfig.remoteIpStrategy)
284
+ };
285
+ if (enableSSR && (0, external_utils_js_namespaceObject.isDev)()) defineConfig['FEDERATION_IPV4'] = JSON.stringify(ipv4);
286
+ var _ref;
287
+ return {
288
+ tools: {
289
+ devServer: {
290
+ headers: corsHeaders
291
+ }
292
+ },
293
+ resolve: {
294
+ alias: {
295
+ '@modern-js/runtime/mf': require.resolve('@module-federation/modern-js/runtime')
296
+ }
297
+ },
298
+ source: {
299
+ define: defineConfig,
300
+ enableAsyncEntry: 'rspack' === bundlerType ? null != (_ref = null == (_modernjsConfig_source = modernjsConfig.source) ? void 0 : _modernjsConfig_source.enableAsyncEntry) ? _ref : true : null == (_modernjsConfig_source1 = modernjsConfig.source) ? void 0 : _modernjsConfig_source1.enableAsyncEntry
301
+ },
302
+ dev: {
303
+ assetPrefix: (null == modernjsConfig ? void 0 : null == (_modernjsConfig_dev = modernjsConfig.dev) ? void 0 : _modernjsConfig_dev.assetPrefix) ? modernjsConfig.dev.assetPrefix : true
304
+ }
305
+ };
306
+ });
372
307
  }
373
- };
374
308
  });
375
- }
376
- });
377
- var configPlugin_default = moduleFederationConfigPlugin;
378
- // Annotate the CommonJS export names for ESM import in node:
379
- 0 && (module.exports = {
380
- addMyTypes2Ignored,
381
- getMFConfig,
382
- isWebTarget,
383
- moduleFederationConfigPlugin,
384
- patchBundlerConfig,
385
- patchMFConfig,
386
- setEnv,
387
- skipByTarget
309
+ const configPlugin = moduleFederationConfigPlugin;
310
+ exports.addMyTypes2Ignored = __webpack_exports__.addMyTypes2Ignored;
311
+ exports["default"] = __webpack_exports__["default"];
312
+ exports.getMFConfig = __webpack_exports__.getMFConfig;
313
+ exports.isWebTarget = __webpack_exports__.isWebTarget;
314
+ exports.moduleFederationConfigPlugin = __webpack_exports__.moduleFederationConfigPlugin;
315
+ exports.patchBundlerConfig = __webpack_exports__.patchBundlerConfig;
316
+ exports.patchMFConfig = __webpack_exports__.patchMFConfig;
317
+ exports.setEnv = __webpack_exports__.setEnv;
318
+ exports.skipByTarget = __webpack_exports__.skipByTarget;
319
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
320
+ "addMyTypes2Ignored",
321
+ "default",
322
+ "getMFConfig",
323
+ "isWebTarget",
324
+ "moduleFederationConfigPlugin",
325
+ "patchBundlerConfig",
326
+ "patchMFConfig",
327
+ "setEnv",
328
+ "skipByTarget"
329
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
330
+ Object.defineProperty(exports, '__esModule', {
331
+ value: true
388
332
  });