@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.
- package/dist/cjs/cli/configPlugin.js +301 -357
- package/dist/cjs/cli/index.js +103 -93
- package/dist/cjs/cli/mfRuntimePlugins/inject-node-fetch.js +51 -41
- package/dist/cjs/cli/mfRuntimePlugins/resolve-entry-ipv4.js +73 -75
- package/dist/cjs/cli/mfRuntimePlugins/shared-strategy.js +50 -40
- package/dist/cjs/cli/server/data-fetch-server-plugin.js +55 -44
- package/dist/cjs/cli/ssrPlugin.js +266 -298
- package/dist/cjs/cli/utils.js +84 -81
- package/dist/cjs/constant.js +37 -28
- package/dist/cjs/interfaces/bundler.js +17 -15
- package/dist/cjs/logger.js +37 -25
- package/dist/cjs/react/index.js +55 -19
- package/dist/cjs/react/plugin.js +62 -37
- package/dist/cjs/react/v18.js +55 -19
- package/dist/cjs/react/v19.js +55 -19
- package/dist/cjs/runtime/index.js +55 -19
- package/dist/cjs/server/fileCache.js +76 -76
- package/dist/cjs/server/index.js +65 -57
- package/dist/cjs/server/staticMiddleware.js +84 -84
- package/dist/cjs/ssr-runtime/SSRLiveReload.js +40 -34
- package/dist/cjs/ssr-runtime/devPlugin.js +63 -67
- package/dist/cjs/ssr-runtime/injectDataFetchFunctionPlugin.js +44 -36
- package/dist/cjs/types/index.js +17 -15
- package/dist/esm/cli/configPlugin.mjs +305 -0
- package/dist/esm/cli/index.mjs +83 -0
- package/dist/esm/cli/mfRuntimePlugins/inject-node-fetch.mjs +12 -0
- package/dist/esm/cli/mfRuntimePlugins/resolve-entry-ipv4.mjs +58 -0
- package/dist/esm/cli/mfRuntimePlugins/shared-strategy.mjs +21 -0
- package/dist/esm/cli/server/data-fetch-server-plugin.mjs +17 -0
- package/dist/esm/cli/ssrPlugin.mjs +254 -0
- package/dist/esm/cli/utils.mjs +40 -0
- package/dist/esm/constant.mjs +3 -0
- package/dist/esm/logger.mjs +5 -0
- package/dist/esm/react/plugin.mjs +3 -0
- package/dist/esm/server/fileCache.mjs +90 -0
- package/dist/esm/server/index.mjs +36 -0
- package/dist/esm/server/staticMiddleware.mjs +87 -0
- package/dist/esm/ssr-runtime/SSRLiveReload.mjs +22 -0
- package/dist/esm/ssr-runtime/devPlugin.mjs +70 -0
- package/dist/esm/ssr-runtime/injectDataFetchFunctionPlugin.mjs +34 -0
- package/dist/esm-node/cli/configPlugin.mjs +263 -0
- package/dist/esm-node/cli/index.mjs +67 -0
- package/dist/esm-node/cli/mfRuntimePlugins/inject-node-fetch.mjs +10 -0
- package/dist/esm-node/cli/mfRuntimePlugins/resolve-entry-ipv4.mjs +46 -0
- package/dist/esm-node/cli/mfRuntimePlugins/shared-strategy.mjs +19 -0
- package/dist/esm-node/cli/server/data-fetch-server-plugin.mjs +15 -0
- package/dist/esm-node/cli/ssrPlugin.mjs +228 -0
- package/dist/esm-node/cli/utils.mjs +40 -0
- package/dist/esm-node/constant.mjs +3 -0
- package/dist/esm-node/logger.mjs +5 -0
- package/dist/esm-node/react/plugin.mjs +3 -0
- package/dist/esm-node/server/fileCache.mjs +37 -0
- package/dist/esm-node/server/index.mjs +34 -0
- package/dist/esm-node/server/staticMiddleware.mjs +42 -0
- package/dist/esm-node/ssr-runtime/SSRLiveReload.mjs +15 -0
- package/dist/esm-node/ssr-runtime/devPlugin.mjs +33 -0
- package/dist/esm-node/ssr-runtime/injectDataFetchFunctionPlugin.mjs +14 -0
- package/package.json +32 -31
- package/dist/cjs/cli/configPlugin.spec.js +0 -112
- package/dist/cjs/server/fileCache.spec.js +0 -28
- package/dist/cjs/server/staticMiddleware.spec.js +0 -185
- package/dist/esm/cli/configPlugin.js +0 -395
- package/dist/esm/cli/configPlugin.spec.js +0 -108
- package/dist/esm/cli/index.js +0 -92
- package/dist/esm/cli/mfRuntimePlugins/inject-node-fetch.js +0 -16
- package/dist/esm/cli/mfRuntimePlugins/resolve-entry-ipv4.js +0 -74
- package/dist/esm/cli/mfRuntimePlugins/shared-strategy.js +0 -25
- package/dist/esm/cli/server/data-fetch-server-plugin.js +0 -20
- package/dist/esm/cli/ssrPlugin.js +0 -305
- package/dist/esm/cli/utils.js +0 -53
- package/dist/esm/constant.js +0 -6
- package/dist/esm/logger.js +0 -7
- package/dist/esm/react/plugin.js +0 -5
- package/dist/esm/server/fileCache.js +0 -98
- package/dist/esm/server/fileCache.spec.js +0 -50
- package/dist/esm/server/index.js +0 -41
- package/dist/esm/server/staticMiddleware.js +0 -104
- package/dist/esm/server/staticMiddleware.spec.js +0 -328
- package/dist/esm/ssr-runtime/SSRLiveReload.js +0 -26
- package/dist/esm/ssr-runtime/devPlugin.js +0 -73
- package/dist/esm/ssr-runtime/injectDataFetchFunctionPlugin.js +0 -34
- package/dist/esm-node/cli/configPlugin.js +0 -347
- package/dist/esm-node/cli/configPlugin.spec.js +0 -89
- package/dist/esm-node/cli/index.js +0 -72
- package/dist/esm-node/cli/mfRuntimePlugins/inject-node-fetch.js +0 -14
- package/dist/esm-node/cli/mfRuntimePlugins/resolve-entry-ipv4.js +0 -62
- package/dist/esm-node/cli/mfRuntimePlugins/shared-strategy.js +0 -23
- package/dist/esm-node/cli/server/data-fetch-server-plugin.js +0 -18
- package/dist/esm-node/cli/ssrPlugin.js +0 -280
- package/dist/esm-node/cli/utils.js +0 -53
- package/dist/esm-node/constant.js +0 -6
- package/dist/esm-node/logger.js +0 -7
- package/dist/esm-node/react/plugin.js +0 -5
- package/dist/esm-node/server/fileCache.js +0 -49
- package/dist/esm-node/server/fileCache.spec.js +0 -27
- package/dist/esm-node/server/index.js +0 -39
- package/dist/esm-node/server/staticMiddleware.js +0 -55
- package/dist/esm-node/server/staticMiddleware.spec.js +0 -162
- package/dist/esm-node/ssr-runtime/SSRLiveReload.js +0 -19
- package/dist/esm-node/ssr-runtime/devPlugin.js +0 -37
- package/dist/esm-node/ssr-runtime/injectDataFetchFunctionPlugin.js +0 -16
- /package/dist/esm/interfaces/{bundler.js → bundler.mjs} +0 -0
- /package/dist/esm/react/{index.js → index.mjs} +0 -0
- /package/dist/esm/react/{v18.js → v18.mjs} +0 -0
- /package/dist/esm/react/{v19.js → v19.mjs} +0 -0
- /package/dist/esm/runtime/{index.js → index.mjs} +0 -0
- /package/dist/esm/types/{index.js → index.mjs} +0 -0
- /package/dist/esm-node/interfaces/{bundler.js → bundler.mjs} +0 -0
- /package/dist/esm-node/react/{index.js → index.mjs} +0 -0
- /package/dist/esm-node/react/{v18.js → v18.mjs} +0 -0
- /package/dist/esm-node/react/{v19.js → v19.mjs} +0 -0
- /package/dist/esm-node/runtime/{index.js → index.mjs} +0 -0
- /package/dist/esm-node/types/{index.js → index.mjs} +0 -0
|
@@ -1,388 +1,332 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
-
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
var
|
|
50
|
-
const defaultPath =
|
|
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
|
-
|
|
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
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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
|
-
|
|
108
|
-
handleRemoteObject(mfConfig.remotes);
|
|
109
|
-
}
|
|
91
|
+
else if ('string' != typeof mfConfig.remotes) handleRemoteObject(mfConfig.remotes);
|
|
110
92
|
};
|
|
111
|
-
const patchDTSConfig = (mfConfig, isServer)
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
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
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
mfConfig.
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
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
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
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
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
}
|
|
203
|
-
|
|
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
|
-
|
|
209
|
-
|
|
210
|
-
|
|
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
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
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:
|
|
222
|
-
|
|
223
|
-
|
|
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
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
chain.output.
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
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
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
const
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
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
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
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
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
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
|
});
|