@module-federation/modern-js 0.0.0-next-20250701093604 → 0.0.0-next-20250701100253
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 +2 -2
- package/dist/cjs/cli/configPlugin.spec.js +2 -2
- package/dist/cjs/cli/mfRuntimePlugins/auto-fetch-data.js +100 -0
- package/dist/cjs/cli/server/data-fetch-server-plugin.js +143 -2
- package/dist/cjs/cli/ssrPlugin.js +8 -8
- package/dist/cjs/constant.js +49 -2
- package/dist/cjs/interfaces/global.js +16 -0
- package/dist/cjs/runtime/AwaitDataFetch.js +144 -0
- package/dist/cjs/runtime/createRemoteComponent.js +327 -0
- package/dist/cjs/runtime/index.js +28 -0
- package/dist/cjs/runtime/wrapNoSSR.js +35 -0
- package/dist/cjs/ssr-runtime/devPlugin.js +2 -2
- package/dist/cjs/ssr-runtime/downgrade.js +114 -0
- package/dist/cjs/ssr-runtime/injectDataFetchFunctionPlugin.js +102 -6
- package/dist/cjs/utils/dataFetch.js +211 -0
- package/dist/cjs/utils/index.js +54 -0
- package/dist/esm/cli/configPlugin.js +2 -2
- package/dist/esm/cli/configPlugin.spec.js +2 -2
- package/dist/esm/cli/mfRuntimePlugins/auto-fetch-data.js +76 -0
- package/dist/esm/cli/server/data-fetch-server-plugin.js +219 -2
- package/dist/esm/cli/ssrPlugin.js +1 -1
- package/dist/esm/constant.js +37 -1
- package/dist/esm/interfaces/global.js +0 -0
- package/dist/esm/runtime/AwaitDataFetch.js +131 -0
- package/dist/esm/runtime/createRemoteComponent.js +417 -0
- package/dist/esm/runtime/index.js +21 -0
- package/dist/esm/runtime/wrapNoSSR.js +12 -0
- package/dist/esm/ssr-runtime/devPlugin.js +1 -1
- package/dist/esm/ssr-runtime/downgrade.js +150 -0
- package/dist/esm/ssr-runtime/injectDataFetchFunctionPlugin.js +147 -4
- package/dist/esm/utils/dataFetch.js +237 -0
- package/dist/esm/utils/index.js +28 -0
- package/dist/esm-node/cli/configPlugin.js +2 -2
- package/dist/esm-node/cli/configPlugin.spec.js +2 -2
- package/dist/esm-node/cli/mfRuntimePlugins/auto-fetch-data.js +70 -0
- package/dist/esm-node/cli/server/data-fetch-server-plugin.js +143 -2
- package/dist/esm-node/cli/ssrPlugin.js +1 -1
- package/dist/esm-node/constant.js +37 -1
- package/dist/esm-node/interfaces/global.js +0 -0
- package/dist/esm-node/runtime/AwaitDataFetch.js +109 -0
- package/dist/esm-node/runtime/createRemoteComponent.js +291 -0
- package/dist/esm-node/runtime/index.js +21 -0
- package/dist/esm-node/runtime/wrapNoSSR.js +11 -0
- package/dist/esm-node/ssr-runtime/devPlugin.js +1 -1
- package/dist/esm-node/ssr-runtime/downgrade.js +88 -0
- package/dist/esm-node/ssr-runtime/injectDataFetchFunctionPlugin.js +89 -4
- package/dist/esm-node/utils/dataFetch.js +166 -0
- package/dist/esm-node/utils/index.js +27 -0
- package/dist/types/cli/mfRuntimePlugins/auto-fetch-data.d.ts +3 -0
- package/dist/types/constant.d.ts +23 -0
- package/dist/types/interfaces/global.d.ts +27 -0
- package/dist/types/runtime/AwaitDataFetch.d.ts +19 -0
- package/dist/types/runtime/createRemoteComponent.d.ts +26 -0
- package/dist/types/runtime/index.d.ts +9 -0
- package/dist/types/runtime/wrapNoSSR.d.ts +9 -0
- package/dist/types/ssr-runtime/downgrade.d.ts +4 -0
- package/dist/types/ssr-runtime/injectDataFetchFunctionPlugin.d.ts +3 -0
- package/dist/types/utils/dataFetch.d.ts +26 -0
- package/dist/types/utils/index.d.ts +15 -0
- package/package.json +16 -16
- package/dist/cjs/react/index.js +0 -50
- package/dist/esm/react/index.js +0 -15
- package/dist/esm-node/react/index.js +0 -15
- package/dist/types/react/index.d.ts +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/modern-js",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-20250701100253",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/",
|
|
6
6
|
"types.d.ts",
|
|
@@ -24,10 +24,6 @@
|
|
|
24
24
|
"types": "./dist/types/runtime/index.d.ts",
|
|
25
25
|
"default": "./dist/esm/runtime/index.js"
|
|
26
26
|
},
|
|
27
|
-
"./react": {
|
|
28
|
-
"types": "./dist/types/react/index.d.ts",
|
|
29
|
-
"default": "./dist/esm/react/index.js"
|
|
30
|
-
},
|
|
31
27
|
"./ssr-dev-plugin": {
|
|
32
28
|
"types": "./dist/types/ssr-runtime/devPlugin.d.ts",
|
|
33
29
|
"default": "./dist/esm/ssr-runtime/devPlugin.js"
|
|
@@ -56,6 +52,11 @@
|
|
|
56
52
|
"import": "./dist/esm/cli/mfRuntimePlugins/resolve-entry-ipv4.js",
|
|
57
53
|
"require": "./dist/esm/cli/mfRuntimePlugins/resolve-entry-ipv4.js"
|
|
58
54
|
},
|
|
55
|
+
"./auto-fetch-data": {
|
|
56
|
+
"types": "./dist/types/cli/mfRuntimePlugins/auto-fetch-data.d.ts",
|
|
57
|
+
"import": "./dist/esm/cli/mfRuntimePlugins/auto-fetch-data.js",
|
|
58
|
+
"require": "./dist/esm/cli/mfRuntimePlugins/auto-fetch-data.js"
|
|
59
|
+
},
|
|
59
60
|
"./inject-node-fetch": {
|
|
60
61
|
"types": "./dist/types/cli/mfRuntimePlugins/inject-node-fetch.d.ts",
|
|
61
62
|
"import": "./dist/esm/cli/mfRuntimePlugins/inject-node-fetch.js",
|
|
@@ -78,9 +79,6 @@
|
|
|
78
79
|
"runtime": [
|
|
79
80
|
"./dist/types/runtime/index.d.ts"
|
|
80
81
|
],
|
|
81
|
-
"react": [
|
|
82
|
-
"./dist/types/react/index.d.ts"
|
|
83
|
-
],
|
|
84
82
|
"config-plugin": [
|
|
85
83
|
"./dist/types/cli/configPlugin.d.ts"
|
|
86
84
|
],
|
|
@@ -93,6 +91,9 @@
|
|
|
93
91
|
"resolve-entry-ipv4": [
|
|
94
92
|
"./dist/types/cli/mfRuntimePlugins/resolve-entry-ipv4.d.ts"
|
|
95
93
|
],
|
|
94
|
+
"auto-fetch-data": [
|
|
95
|
+
"./dist/types/cli/mfRuntimePlugins/auto-fetch-data.d.ts"
|
|
96
|
+
],
|
|
96
97
|
"inject-node-fetch": [
|
|
97
98
|
"./dist/types/cli/mfRuntimePlugins/inject-node-fetch.d.ts"
|
|
98
99
|
],
|
|
@@ -119,13 +120,12 @@
|
|
|
119
120
|
"@swc/helpers": "^0.5.17",
|
|
120
121
|
"node-fetch": "~3.3.0",
|
|
121
122
|
"react-error-boundary": "4.1.2",
|
|
122
|
-
"@module-federation/rsbuild-plugin": "0.0.0-next-
|
|
123
|
-
"@module-federation/
|
|
124
|
-
"@module-federation/
|
|
125
|
-
"@module-federation/
|
|
126
|
-
"@module-federation/
|
|
127
|
-
"@module-federation/
|
|
128
|
-
"@module-federation/cli": "0.0.0-next-20250701093604"
|
|
123
|
+
"@module-federation/rsbuild-plugin": "0.0.0-next-20250701100253",
|
|
124
|
+
"@module-federation/enhanced": "0.0.0-next-20250701100253",
|
|
125
|
+
"@module-federation/runtime": "0.0.0-next-20250701100253",
|
|
126
|
+
"@module-federation/node": "0.0.0-next-20250701100253",
|
|
127
|
+
"@module-federation/sdk": "0.0.0-next-20250701100253",
|
|
128
|
+
"@module-federation/cli": "0.0.0-next-20250701100253"
|
|
129
129
|
},
|
|
130
130
|
"devDependencies": {
|
|
131
131
|
"@modern-js/core": "2.67.5",
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
"@modern-js/module-tools": "2.67.6",
|
|
136
136
|
"@modern-js/runtime": "2.67.6",
|
|
137
137
|
"@modern-js/tsconfig": "2.67.6",
|
|
138
|
-
"@module-federation/manifest": "0.0.0-next-
|
|
138
|
+
"@module-federation/manifest": "0.0.0-next-20250701100253"
|
|
139
139
|
},
|
|
140
140
|
"peerDependencies": {
|
|
141
141
|
"react": ">=17",
|
package/dist/cjs/react/index.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var react_exports = {};
|
|
20
|
-
__export(react_exports, {
|
|
21
|
-
CacheSize: () => import_bridge_react.CacheSize,
|
|
22
|
-
CacheTime: () => import_bridge_react.CacheTime,
|
|
23
|
-
ERROR_TYPE: () => import_bridge_react.ERROR_TYPE,
|
|
24
|
-
cache: () => import_bridge_react.cache,
|
|
25
|
-
clearStore: () => import_bridge_react.clearStore,
|
|
26
|
-
collectSSRAssets: () => import_bridge_react.collectSSRAssets,
|
|
27
|
-
configureCache: () => import_bridge_react.configureCache,
|
|
28
|
-
createLazyComponent: () => import_bridge_react.createLazyComponent,
|
|
29
|
-
generateKey: () => import_bridge_react.generateKey,
|
|
30
|
-
prefetch: () => import_bridge_react.prefetch,
|
|
31
|
-
revalidateTag: () => import_bridge_react.revalidateTag,
|
|
32
|
-
wrapNoSSR: () => import_bridge_react.wrapNoSSR
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(react_exports);
|
|
35
|
-
var import_bridge_react = require("@module-federation/bridge-react");
|
|
36
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
-
0 && (module.exports = {
|
|
38
|
-
CacheSize,
|
|
39
|
-
CacheTime,
|
|
40
|
-
ERROR_TYPE,
|
|
41
|
-
cache,
|
|
42
|
-
clearStore,
|
|
43
|
-
collectSSRAssets,
|
|
44
|
-
configureCache,
|
|
45
|
-
createLazyComponent,
|
|
46
|
-
generateKey,
|
|
47
|
-
prefetch,
|
|
48
|
-
revalidateTag,
|
|
49
|
-
wrapNoSSR
|
|
50
|
-
});
|
package/dist/esm/react/index.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ERROR_TYPE, createLazyComponent, collectSSRAssets, wrapNoSSR, CacheSize, CacheTime, configureCache, generateKey, cache, revalidateTag, clearStore, prefetch } from "@module-federation/bridge-react";
|
|
2
|
-
export {
|
|
3
|
-
CacheSize,
|
|
4
|
-
CacheTime,
|
|
5
|
-
ERROR_TYPE,
|
|
6
|
-
cache,
|
|
7
|
-
clearStore,
|
|
8
|
-
collectSSRAssets,
|
|
9
|
-
configureCache,
|
|
10
|
-
createLazyComponent,
|
|
11
|
-
generateKey,
|
|
12
|
-
prefetch,
|
|
13
|
-
revalidateTag,
|
|
14
|
-
wrapNoSSR
|
|
15
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ERROR_TYPE, createLazyComponent, collectSSRAssets, wrapNoSSR, CacheSize, CacheTime, configureCache, generateKey, cache, revalidateTag, clearStore, prefetch } from "@module-federation/bridge-react";
|
|
2
|
-
export {
|
|
3
|
-
CacheSize,
|
|
4
|
-
CacheTime,
|
|
5
|
-
ERROR_TYPE,
|
|
6
|
-
cache,
|
|
7
|
-
clearStore,
|
|
8
|
-
collectSSRAssets,
|
|
9
|
-
configureCache,
|
|
10
|
-
createLazyComponent,
|
|
11
|
-
generateKey,
|
|
12
|
-
prefetch,
|
|
13
|
-
revalidateTag,
|
|
14
|
-
wrapNoSSR
|
|
15
|
-
};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export { ERROR_TYPE, createLazyComponent, collectSSRAssets, wrapNoSSR, CacheSize, CacheTime, configureCache, generateKey, cache, revalidateTag, clearStore, prefetch, } from '@module-federation/bridge-react';
|
|
2
|
-
export type { DataFetchParams, CacheStatus, CacheStatsInfo, } from '@module-federation/bridge-react';
|