@module-federation/modern-js-v3 2.6.0 → 2.8.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 +34 -13
- package/dist/cjs/cli/index.js +11 -7
- package/dist/cjs/cli/mfRuntimePlugins/inject-node-fetch.js +14 -21
- package/dist/cjs/cli/mfRuntimePlugins/shared-strategy.js +12 -8
- package/dist/cjs/cli/server/data-fetch-server-plugin.js +9 -5
- package/dist/cjs/cli/ssrPlugin.js +11 -7
- package/dist/cjs/cli/utils.js +9 -5
- package/dist/cjs/constant.js +13 -9
- package/dist/cjs/logger.js +9 -5
- package/dist/cjs/react/data-fetch.js +9 -5
- package/dist/cjs/react/index.js +9 -5
- package/dist/cjs/react/plugin.js +12 -8
- package/dist/cjs/react/v18.js +9 -5
- package/dist/cjs/react/v19.js +9 -5
- package/dist/cjs/runtime/index.js +9 -5
- package/dist/cjs/server/fileCache.js +13 -9
- package/dist/cjs/server/index.js +9 -5
- package/dist/cjs/server/staticMiddleware.js +11 -7
- package/dist/cjs/ssr-runtime/SSRLiveReload.js +9 -5
- package/dist/cjs/ssr-runtime/devPlugin.js +9 -5
- package/dist/cjs/ssr-runtime/injectDataFetchFunctionPlugin.js +9 -5
- package/dist/esm/cli/configPlugin.mjs +25 -18
- package/dist/esm/cli/index.mjs +3 -2
- package/dist/esm/cli/mfRuntimePlugins/inject-node-fetch.mjs +2 -3
- package/dist/esm/cli/mfRuntimePlugins/shared-strategy.mjs +1 -1
- package/dist/esm/cli/server/data-fetch-server-plugin.mjs +1 -1
- package/dist/esm/cli/ssrPlugin.mjs +2 -1
- package/dist/esm/cli/utils.mjs +1 -1
- package/dist/esm/interfaces/bundler.mjs +1 -0
- package/dist/esm/logger.mjs +1 -1
- package/dist/esm/react/plugin.mjs +1 -2
- package/dist/esm/rslib-runtime.mjs +18 -0
- package/dist/esm/server/fileCache.mjs +5 -4
- package/dist/esm/server/index.mjs +2 -1
- package/dist/esm/types/index.mjs +1 -0
- package/dist/esm-node/cli/configPlugin.mjs +24 -18
- package/dist/esm-node/cli/index.mjs +3 -2
- package/dist/esm-node/cli/mfRuntimePlugins/inject-node-fetch.mjs +2 -3
- package/dist/esm-node/cli/mfRuntimePlugins/shared-strategy.mjs +1 -1
- package/dist/esm-node/cli/server/data-fetch-server-plugin.mjs +1 -1
- package/dist/esm-node/cli/ssrPlugin.mjs +2 -1
- package/dist/esm-node/interfaces/bundler.mjs +1 -0
- package/dist/esm-node/logger.mjs +1 -1
- package/dist/esm-node/react/plugin.mjs +1 -2
- package/dist/esm-node/rslib-runtime.mjs +18 -0
- package/dist/esm-node/server/fileCache.mjs +4 -4
- package/dist/esm-node/server/index.mjs +2 -1
- package/dist/esm-node/types/index.mjs +1 -0
- package/dist/types/cli/configPlugin.d.ts +1 -0
- package/dist/types/server/fileCache.d.ts +1 -0
- package/dist/types/types/index.d.ts +6 -0
- package/package.json +21 -21
- package/dist/types/cli/configPlugin.spec.d.ts +0 -1
- package/dist/types/cli/ssrPlugin.spec.d.ts +0 -1
- package/dist/types/server/fileCache.spec.d.ts +0 -1
- package/dist/types/server/staticMiddleware.spec.d.ts +0 -1
|
@@ -24,11 +24,15 @@ function __webpack_require__(moduleId) {
|
|
|
24
24
|
};
|
|
25
25
|
})();
|
|
26
26
|
(()=>{
|
|
27
|
-
__webpack_require__.d = (exports1,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
28
|
+
var define = (defs, kind)=>{
|
|
29
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
[kind]: defs[key]
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
define(getters, "get");
|
|
35
|
+
define(values, "value");
|
|
32
36
|
};
|
|
33
37
|
})();
|
|
34
38
|
(()=>{
|
|
@@ -48,15 +52,16 @@ var __webpack_exports__ = {};
|
|
|
48
52
|
(()=>{
|
|
49
53
|
__webpack_require__.r(__webpack_exports__);
|
|
50
54
|
__webpack_require__.d(__webpack_exports__, {
|
|
51
|
-
|
|
55
|
+
addMyTypes2Ignored: ()=>addMyTypes2Ignored,
|
|
52
56
|
default: ()=>configPlugin,
|
|
53
57
|
getMFConfig: ()=>getMFConfig,
|
|
54
58
|
isWebTarget: ()=>external_utils_js_namespaceObject.isWebTarget,
|
|
55
59
|
moduleFederationConfigPlugin: ()=>moduleFederationConfigPlugin,
|
|
56
|
-
|
|
57
|
-
|
|
60
|
+
patchBundlerConfig: ()=>patchBundlerConfig,
|
|
61
|
+
patchMFConfig: ()=>patchMFConfig,
|
|
62
|
+
setDefaultOptimizationTarget: ()=>setDefaultOptimizationTarget,
|
|
58
63
|
setEnv: ()=>setEnv,
|
|
59
|
-
|
|
64
|
+
skipByTarget: ()=>external_utils_js_namespaceObject.skipByTarget
|
|
60
65
|
});
|
|
61
66
|
const external_fs_namespaceObject = require("fs");
|
|
62
67
|
var external_fs_default = /*#__PURE__*/ __webpack_require__.n(external_fs_namespaceObject);
|
|
@@ -163,6 +168,13 @@ var __webpack_exports__ = {};
|
|
|
163
168
|
mfConfig.dev = false;
|
|
164
169
|
return mfConfig;
|
|
165
170
|
};
|
|
171
|
+
const setDefaultOptimizationTarget = (mfConfig, enableSSR, isServer, autoOptimization = true)=>{
|
|
172
|
+
var _mfConfig, _mfConfig_experiments, _mfConfig_experiments_optimization;
|
|
173
|
+
if (!autoOptimization) return;
|
|
174
|
+
(_mfConfig = mfConfig).experiments || (_mfConfig.experiments = {});
|
|
175
|
+
(_mfConfig_experiments = mfConfig.experiments).optimization || (_mfConfig_experiments.optimization = {});
|
|
176
|
+
null != (_mfConfig_experiments_optimization = mfConfig.experiments.optimization).target || (_mfConfig_experiments_optimization.target = enableSSR && isServer ? 'node' : 'web');
|
|
177
|
+
};
|
|
166
178
|
function patchIgnoreWarning(chain) {
|
|
167
179
|
const ignoreWarnings = chain.get('ignoreWarnings') || [];
|
|
168
180
|
const ignoredMsgs = [
|
|
@@ -231,7 +243,10 @@ var __webpack_exports__ = {};
|
|
|
231
243
|
}
|
|
232
244
|
}
|
|
233
245
|
if ((0, external_utils_js_namespaceObject.isDev)() && enableSSR && !isServer) chain.resolve.fallback.set('crypto', false).set('stream', false).set('vm', false);
|
|
234
|
-
if ((null == (_modernjsConfig_deploy = modernjsConfig.deploy) ? void 0 : _modernjsConfig_deploy.microFrontend) && Object.keys(mfConfig.exposes || {}).length)
|
|
246
|
+
if ((null == (_modernjsConfig_deploy = modernjsConfig.deploy) ? void 0 : _modernjsConfig_deploy.microFrontend) && Object.keys(mfConfig.exposes || {}).length) {
|
|
247
|
+
external_logger_js_default().info('optimization.usedExports is set to "global" to avoid tree shaking issues in micro frontend mode.');
|
|
248
|
+
chain.optimization.usedExports('global');
|
|
249
|
+
}
|
|
235
250
|
}
|
|
236
251
|
const moduleFederationConfigPlugin = (userConfig)=>({
|
|
237
252
|
name: '@modern-js/plugin-module-federation-config',
|
|
@@ -258,6 +273,7 @@ var __webpack_exports__ = {};
|
|
|
258
273
|
const isWeb = (0, external_utils_js_namespaceObject.isWebTarget)(target);
|
|
259
274
|
addMyTypes2Ignored(chain, isWeb ? csrConfig : ssrConfig);
|
|
260
275
|
const targetMFConfig = isWeb ? csrConfig : ssrConfig;
|
|
276
|
+
setDefaultOptimizationTarget(targetMFConfig, enableSSR, !isWeb, userConfig.originPluginOptions.autoOptimization);
|
|
261
277
|
patchMFConfig(targetMFConfig, !isWeb);
|
|
262
278
|
if ((null == (_modernjsConfig_source = modernjsConfig.source) ? void 0 : _modernjsConfig_source.enableAsyncEntry) !== true && (null == (_targetMFConfig_experiments = targetMFConfig.experiments) ? void 0 : _targetMFConfig_experiments.asyncStartup) !== false) {
|
|
263
279
|
var _targetMFConfig;
|
|
@@ -282,15 +298,17 @@ var __webpack_exports__ = {};
|
|
|
282
298
|
});
|
|
283
299
|
api.config(()=>{
|
|
284
300
|
var _ref;
|
|
285
|
-
var _modernjsConfig_tools, _userConfig_csrConfig, _modernjsConfig_source,
|
|
301
|
+
var _modernjsConfig_tools, _userConfig_csrConfig, _modernjsConfig_dev, _modernjsConfig_source, _modernjsConfig_dev1, _modernjsConfig_dev2;
|
|
286
302
|
const devServerConfig = null == (_modernjsConfig_tools = modernjsConfig.tools) ? void 0 : _modernjsConfig_tools.devServer;
|
|
287
303
|
const corsWarnMsgs = [
|
|
288
304
|
'View https://module-federation.io/guide/troubleshooting/other.html#cors-warn for more details.'
|
|
289
305
|
];
|
|
290
306
|
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.');
|
|
291
307
|
const exposes = null == (_userConfig_csrConfig = userConfig.csrConfig) ? void 0 : _userConfig_csrConfig.exposes;
|
|
292
|
-
const hasExposes = exposes && Array.isArray(exposes) ? exposes.length : Object.keys(null != exposes ? exposes : {}).length;
|
|
308
|
+
const hasExposes = exposes && Array.isArray(exposes) ? exposes.length > 0 : Object.keys(null != exposes ? exposes : {}).length > 0;
|
|
309
|
+
const lazyCompilationDisabledByPlugin = hasExposes && (null == modernjsConfig ? void 0 : null == (_modernjsConfig_dev = modernjsConfig.dev) ? void 0 : _modernjsConfig_dev.lazyCompilation) !== false;
|
|
293
310
|
if (corsWarnMsgs.length > 1 && hasExposes) external_logger_js_default().warn(corsWarnMsgs.join('\n'));
|
|
311
|
+
if (lazyCompilationDisabledByPlugin) external_logger_js_default().warn('Detected exposes in the Module Federation config. The Modern.js v3 Module Federation plugin will set dev.lazyCompilation to false for producer apps.');
|
|
294
312
|
const corsHeaders = hasExposes ? {
|
|
295
313
|
'Access-Control-Allow-Origin': '*',
|
|
296
314
|
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
|
|
@@ -311,7 +329,8 @@ var __webpack_exports__ = {};
|
|
|
311
329
|
enableAsyncEntry: null != (_ref = null == (_modernjsConfig_source = modernjsConfig.source) ? void 0 : _modernjsConfig_source.enableAsyncEntry) ? _ref : true
|
|
312
330
|
},
|
|
313
331
|
dev: {
|
|
314
|
-
assetPrefix: (null == modernjsConfig ? void 0 : null == (
|
|
332
|
+
assetPrefix: (null == modernjsConfig ? void 0 : null == (_modernjsConfig_dev1 = modernjsConfig.dev) ? void 0 : _modernjsConfig_dev1.assetPrefix) ? modernjsConfig.dev.assetPrefix : 'auto',
|
|
333
|
+
lazyCompilation: hasExposes ? false : null == modernjsConfig ? void 0 : null == (_modernjsConfig_dev2 = modernjsConfig.dev) ? void 0 : _modernjsConfig_dev2.lazyCompilation
|
|
315
334
|
}
|
|
316
335
|
};
|
|
317
336
|
});
|
|
@@ -326,6 +345,7 @@ exports.isWebTarget = __webpack_exports__.isWebTarget;
|
|
|
326
345
|
exports.moduleFederationConfigPlugin = __webpack_exports__.moduleFederationConfigPlugin;
|
|
327
346
|
exports.patchBundlerConfig = __webpack_exports__.patchBundlerConfig;
|
|
328
347
|
exports.patchMFConfig = __webpack_exports__.patchMFConfig;
|
|
348
|
+
exports.setDefaultOptimizationTarget = __webpack_exports__.setDefaultOptimizationTarget;
|
|
329
349
|
exports.setEnv = __webpack_exports__.setEnv;
|
|
330
350
|
exports.skipByTarget = __webpack_exports__.skipByTarget;
|
|
331
351
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
@@ -336,6 +356,7 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
|
336
356
|
"moduleFederationConfigPlugin",
|
|
337
357
|
"patchBundlerConfig",
|
|
338
358
|
"patchMFConfig",
|
|
359
|
+
"setDefaultOptimizationTarget",
|
|
339
360
|
"setEnv",
|
|
340
361
|
"skipByTarget"
|
|
341
362
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
package/dist/cjs/cli/index.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
3
|
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
9
13
|
};
|
|
10
14
|
})();
|
|
11
15
|
(()=>{
|
|
@@ -24,9 +28,9 @@ var __webpack_require__ = {};
|
|
|
24
28
|
var __webpack_exports__ = {};
|
|
25
29
|
__webpack_require__.r(__webpack_exports__);
|
|
26
30
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
moduleFederationPlugin: ()=>moduleFederationPlugin,
|
|
28
31
|
createModuleFederationConfig: ()=>enhanced_namespaceObject.createModuleFederationConfig,
|
|
29
|
-
default: ()=>cli
|
|
32
|
+
default: ()=>cli,
|
|
33
|
+
moduleFederationPlugin: ()=>moduleFederationPlugin
|
|
30
34
|
});
|
|
31
35
|
const rspack_namespaceObject = require("@module-federation/enhanced/rspack");
|
|
32
36
|
const external_configPlugin_js_namespaceObject = require("./configPlugin.js");
|
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
3
|
(()=>{
|
|
4
|
-
__webpack_require__.
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
});
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
18
13
|
};
|
|
19
14
|
})();
|
|
20
15
|
(()=>{
|
|
@@ -32,19 +27,17 @@ var __webpack_require__ = {};
|
|
|
32
27
|
})();
|
|
33
28
|
var __webpack_exports__ = {};
|
|
34
29
|
__webpack_require__.r(__webpack_exports__);
|
|
35
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
-
default: ()=>inject_node_fetch
|
|
37
|
-
});
|
|
38
|
-
const external_node_fetch_namespaceObject = require("node-fetch");
|
|
39
|
-
var external_node_fetch_default = /*#__PURE__*/ __webpack_require__.n(external_node_fetch_namespaceObject);
|
|
40
30
|
const injectNodeFetchPlugin = ()=>({
|
|
41
31
|
name: 'inject-node-fetch-plugin',
|
|
42
32
|
beforeInit (args) {
|
|
43
|
-
if (!globalThis.fetch)
|
|
33
|
+
if (!globalThis.fetch) throw new Error('@module-federation/modern-js-v3 requires Node.js 18 or later.');
|
|
44
34
|
return args;
|
|
45
35
|
}
|
|
46
36
|
});
|
|
47
|
-
const
|
|
37
|
+
const __rspack_default_export = injectNodeFetchPlugin;
|
|
38
|
+
__webpack_require__.d(__webpack_exports__, {}, {
|
|
39
|
+
default: __rspack_default_export
|
|
40
|
+
});
|
|
48
41
|
exports["default"] = __webpack_exports__["default"];
|
|
49
42
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
50
43
|
"default"
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
3
|
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
9
13
|
};
|
|
10
14
|
})();
|
|
11
15
|
(()=>{
|
|
@@ -23,9 +27,6 @@ var __webpack_require__ = {};
|
|
|
23
27
|
})();
|
|
24
28
|
var __webpack_exports__ = {};
|
|
25
29
|
__webpack_require__.r(__webpack_exports__);
|
|
26
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
default: ()=>__rspack_default_export
|
|
28
|
-
});
|
|
29
30
|
const sharedStrategy = ()=>({
|
|
30
31
|
name: 'shared-strategy-plugin',
|
|
31
32
|
beforeInit (args) {
|
|
@@ -44,6 +45,9 @@ const sharedStrategy = ()=>({
|
|
|
44
45
|
}
|
|
45
46
|
});
|
|
46
47
|
const __rspack_default_export = sharedStrategy;
|
|
48
|
+
__webpack_require__.d(__webpack_exports__, {}, {
|
|
49
|
+
default: __rspack_default_export
|
|
50
|
+
});
|
|
47
51
|
exports["default"] = __webpack_exports__["default"];
|
|
48
52
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
49
53
|
"default"
|
|
@@ -10,11 +10,15 @@ var __webpack_require__ = {};
|
|
|
10
10
|
};
|
|
11
11
|
})();
|
|
12
12
|
(()=>{
|
|
13
|
-
__webpack_require__.d = (exports1,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
14
|
+
var define = (defs, kind)=>{
|
|
15
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
[kind]: defs[key]
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
define(getters, "get");
|
|
21
|
+
define(values, "value");
|
|
18
22
|
};
|
|
19
23
|
})();
|
|
20
24
|
(()=>{
|
|
@@ -10,11 +10,15 @@ var __webpack_require__ = {};
|
|
|
10
10
|
};
|
|
11
11
|
})();
|
|
12
12
|
(()=>{
|
|
13
|
-
__webpack_require__.d = (exports1,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
14
|
+
var define = (defs, kind)=>{
|
|
15
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
[kind]: defs[key]
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
define(getters, "get");
|
|
21
|
+
define(values, "value");
|
|
18
22
|
};
|
|
19
23
|
})();
|
|
20
24
|
(()=>{
|
|
@@ -33,10 +37,10 @@ var __webpack_require__ = {};
|
|
|
33
37
|
var __webpack_exports__ = {};
|
|
34
38
|
__webpack_require__.r(__webpack_exports__);
|
|
35
39
|
__webpack_require__.d(__webpack_exports__, {
|
|
40
|
+
CHAIN_MF_PLUGIN_ID: ()=>CHAIN_MF_PLUGIN_ID,
|
|
36
41
|
default: ()=>ssrPlugin,
|
|
37
42
|
moduleFederationSSRPlugin: ()=>moduleFederationSSRPlugin,
|
|
38
|
-
setEnv: ()=>setEnv
|
|
39
|
-
CHAIN_MF_PLUGIN_ID: ()=>CHAIN_MF_PLUGIN_ID
|
|
43
|
+
setEnv: ()=>setEnv
|
|
40
44
|
});
|
|
41
45
|
const external_path_namespaceObject = require("path");
|
|
42
46
|
var external_path_default = /*#__PURE__*/ __webpack_require__.n(external_path_namespaceObject);
|
package/dist/cjs/cli/utils.js
CHANGED
|
@@ -10,11 +10,15 @@ var __webpack_require__ = {};
|
|
|
10
10
|
};
|
|
11
11
|
})();
|
|
12
12
|
(()=>{
|
|
13
|
-
__webpack_require__.d = (exports1,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
14
|
+
var define = (defs, kind)=>{
|
|
15
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
[kind]: defs[key]
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
define(getters, "get");
|
|
21
|
+
define(values, "value");
|
|
18
22
|
};
|
|
19
23
|
})();
|
|
20
24
|
(()=>{
|
package/dist/cjs/constant.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
3
|
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
9
13
|
};
|
|
10
14
|
})();
|
|
11
15
|
(()=>{
|
|
@@ -23,12 +27,12 @@ var __webpack_require__ = {};
|
|
|
23
27
|
})();
|
|
24
28
|
var __webpack_exports__ = {};
|
|
25
29
|
__webpack_require__.r(__webpack_exports__);
|
|
26
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
LOCALHOST: ()=>LOCALHOST,
|
|
28
|
-
PLUGIN_IDENTIFIER: ()=>PLUGIN_IDENTIFIER
|
|
29
|
-
});
|
|
30
30
|
const LOCALHOST = 'localhost';
|
|
31
31
|
const PLUGIN_IDENTIFIER = '[ Modern.js Module Federation ]';
|
|
32
|
+
__webpack_require__.d(__webpack_exports__, {}, {
|
|
33
|
+
LOCALHOST: LOCALHOST,
|
|
34
|
+
PLUGIN_IDENTIFIER: PLUGIN_IDENTIFIER
|
|
35
|
+
});
|
|
32
36
|
exports.LOCALHOST = __webpack_exports__.LOCALHOST;
|
|
33
37
|
exports.PLUGIN_IDENTIFIER = __webpack_exports__.PLUGIN_IDENTIFIER;
|
|
34
38
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
package/dist/cjs/logger.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
3
|
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
9
13
|
};
|
|
10
14
|
})();
|
|
11
15
|
(()=>{
|
|
@@ -24,11 +24,15 @@ function __webpack_require__(moduleId) {
|
|
|
24
24
|
};
|
|
25
25
|
})();
|
|
26
26
|
(()=>{
|
|
27
|
-
__webpack_require__.d = (exports1,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
28
|
+
var define = (defs, kind)=>{
|
|
29
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
[kind]: defs[key]
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
define(getters, "get");
|
|
35
|
+
define(values, "value");
|
|
32
36
|
};
|
|
33
37
|
})();
|
|
34
38
|
(()=>{
|
package/dist/cjs/react/index.js
CHANGED
|
@@ -24,11 +24,15 @@ function __webpack_require__(moduleId) {
|
|
|
24
24
|
};
|
|
25
25
|
})();
|
|
26
26
|
(()=>{
|
|
27
|
-
__webpack_require__.d = (exports1,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
28
|
+
var define = (defs, kind)=>{
|
|
29
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
[kind]: defs[key]
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
define(getters, "get");
|
|
35
|
+
define(values, "value");
|
|
32
36
|
};
|
|
33
37
|
})();
|
|
34
38
|
(()=>{
|
package/dist/cjs/react/plugin.js
CHANGED
|
@@ -24,11 +24,15 @@ function __webpack_require__(moduleId) {
|
|
|
24
24
|
};
|
|
25
25
|
})();
|
|
26
26
|
(()=>{
|
|
27
|
-
__webpack_require__.d = (exports1,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
28
|
+
var define = (defs, kind)=>{
|
|
29
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
[kind]: defs[key]
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
define(getters, "get");
|
|
35
|
+
define(values, "value");
|
|
32
36
|
};
|
|
33
37
|
})();
|
|
34
38
|
(()=>{
|
|
@@ -47,14 +51,14 @@ function __webpack_require__(moduleId) {
|
|
|
47
51
|
var __webpack_exports__ = {};
|
|
48
52
|
(()=>{
|
|
49
53
|
__webpack_require__.r(__webpack_exports__);
|
|
50
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
51
|
-
default: ()=>_module_federation_bridge_react_plugin__rspack_import_0_default.a
|
|
52
|
-
});
|
|
53
54
|
var _module_federation_bridge_react_plugin__rspack_import_0 = __webpack_require__("@module-federation/bridge-react/plugin");
|
|
54
55
|
var _module_federation_bridge_react_plugin__rspack_import_0_default = /*#__PURE__*/ __webpack_require__.n(_module_federation_bridge_react_plugin__rspack_import_0);
|
|
55
56
|
var __rspack_reexport = {};
|
|
56
57
|
for(const __rspack_import_key in _module_federation_bridge_react_plugin__rspack_import_0)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_module_federation_bridge_react_plugin__rspack_import_0[__rspack_import_key];
|
|
57
58
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
59
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
60
|
+
default: ()=>_module_federation_bridge_react_plugin__rspack_import_0_default.a
|
|
61
|
+
});
|
|
58
62
|
})();
|
|
59
63
|
exports["default"] = __webpack_exports__["default"];
|
|
60
64
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
package/dist/cjs/react/v18.js
CHANGED
|
@@ -24,11 +24,15 @@ function __webpack_require__(moduleId) {
|
|
|
24
24
|
};
|
|
25
25
|
})();
|
|
26
26
|
(()=>{
|
|
27
|
-
__webpack_require__.d = (exports1,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
28
|
+
var define = (defs, kind)=>{
|
|
29
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
[kind]: defs[key]
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
define(getters, "get");
|
|
35
|
+
define(values, "value");
|
|
32
36
|
};
|
|
33
37
|
})();
|
|
34
38
|
(()=>{
|
package/dist/cjs/react/v19.js
CHANGED
|
@@ -24,11 +24,15 @@ function __webpack_require__(moduleId) {
|
|
|
24
24
|
};
|
|
25
25
|
})();
|
|
26
26
|
(()=>{
|
|
27
|
-
__webpack_require__.d = (exports1,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
28
|
+
var define = (defs, kind)=>{
|
|
29
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
[kind]: defs[key]
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
define(getters, "get");
|
|
35
|
+
define(values, "value");
|
|
32
36
|
};
|
|
33
37
|
})();
|
|
34
38
|
(()=>{
|
|
@@ -24,11 +24,15 @@ function __webpack_require__(moduleId) {
|
|
|
24
24
|
};
|
|
25
25
|
})();
|
|
26
26
|
(()=>{
|
|
27
|
-
__webpack_require__.d = (exports1,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
28
|
+
var define = (defs, kind)=>{
|
|
29
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
[kind]: defs[key]
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
define(getters, "get");
|
|
35
|
+
define(values, "value");
|
|
32
36
|
};
|
|
33
37
|
})();
|
|
34
38
|
(()=>{
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
3
|
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
9
13
|
};
|
|
10
14
|
})();
|
|
11
15
|
(()=>{
|
|
@@ -28,7 +32,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28
32
|
fileCache: ()=>fileCache
|
|
29
33
|
});
|
|
30
34
|
const promises_namespaceObject = require("fs/promises");
|
|
31
|
-
const
|
|
35
|
+
const size_limited_cache_namespaceObject = require("@module-federation/bridge-react/size-limited-cache");
|
|
32
36
|
const pathExists = async (filepath)=>{
|
|
33
37
|
try {
|
|
34
38
|
await (0, promises_namespaceObject.access)(filepath);
|
|
@@ -64,9 +68,9 @@ class FileCache {
|
|
|
64
68
|
return null;
|
|
65
69
|
}
|
|
66
70
|
}
|
|
67
|
-
constructor(){
|
|
68
|
-
this.cache = new
|
|
69
|
-
maxSize
|
|
71
|
+
constructor(maxSize = 209715200){
|
|
72
|
+
this.cache = new size_limited_cache_namespaceObject.SizeLimitedCache({
|
|
73
|
+
maxSize
|
|
70
74
|
});
|
|
71
75
|
}
|
|
72
76
|
}
|
package/dist/cjs/server/index.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
3
|
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
9
13
|
};
|
|
10
14
|
})();
|
|
11
15
|
(()=>{
|
|
@@ -10,11 +10,15 @@ var __webpack_require__ = {};
|
|
|
10
10
|
};
|
|
11
11
|
})();
|
|
12
12
|
(()=>{
|
|
13
|
-
__webpack_require__.d = (exports1,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
14
|
+
var define = (defs, kind)=>{
|
|
15
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
[kind]: defs[key]
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
define(getters, "get");
|
|
21
|
+
define(values, "value");
|
|
18
22
|
};
|
|
19
23
|
})();
|
|
20
24
|
(()=>{
|
|
@@ -33,8 +37,8 @@ var __webpack_require__ = {};
|
|
|
33
37
|
var __webpack_exports__ = {};
|
|
34
38
|
__webpack_require__.r(__webpack_exports__);
|
|
35
39
|
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
-
|
|
37
|
-
|
|
40
|
+
createCorsMiddleware: ()=>createCorsMiddleware,
|
|
41
|
+
createStaticMiddleware: ()=>createStaticMiddleware
|
|
38
42
|
});
|
|
39
43
|
const promises_namespaceObject = require("fs/promises");
|
|
40
44
|
const external_path_namespaceObject = require("path");
|