@module-federation/modern-js 0.0.0-next-20250926024003 → 0.0.0-perf-devtools-20260107043700

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