@module-federation/modern-js 0.0.0-next-20250523070931 → 0.0.0-next-20250523083033

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.
@@ -161,7 +161,7 @@ const middleware = async (ctx, next) => {
161
161
  });
162
162
  return ctx.json(data);
163
163
  } catch (e) {
164
- console.log("data fetch error:");
164
+ console.log("server plugin data fetch error: ");
165
165
  console.error(e);
166
166
  ctx.status(500);
167
167
  return ctx.text(`failed to fetch ${remoteInfo.name} data, error:
@@ -242,7 +242,7 @@ function createRemoteComponent(options) {
242
242
  dangerouslySetInnerHTML: {
243
243
  __html: String.raw`
244
244
  globalThis['${import_constant.DATA_FETCH_FUNCTION}'] = globalThis['${import_constant.DATA_FETCH_FUNCTION}'] || [];
245
- globalThis['${import_constant.DATA_FETCH_FUNCTION}'].push(['${dataFetchMapKey}',${JSON.stringify(props.mfData)}']);
245
+ globalThis['${import_constant.DATA_FETCH_FUNCTION}'].push(['${dataFetchMapKey}',${JSON.stringify(props.mfData)}]);
246
246
  `
247
247
  }
248
248
  }),
@@ -106,9 +106,6 @@ const injectDataFetchFunctionPlugin = () => ({
106
106
  globalThis[import_constant.DOWNGRADE_KEY] = true;
107
107
  return (0, import_downgrade.callAllDowngrade)();
108
108
  }
109
- if (mfDowngrade.includes(id)) {
110
- return;
111
- }
112
109
  mfDowngrade.push(id);
113
110
  return (0, import_downgrade.callDowngrade)(id);
114
111
  }
@@ -198,7 +198,7 @@ var middleware = function() {
198
198
  ];
199
199
  case 10:
200
200
  e = _state.sent();
201
- console.log("data fetch error:");
201
+ console.log("server plugin data fetch error: ");
202
202
  console.error(e);
203
203
  ctx.status(500);
204
204
  return [
@@ -13,7 +13,7 @@ function _templateObject() {
13
13
  "'] || [];\n globalThis['",
14
14
  "'].push(['",
15
15
  "',",
16
- "']);\n "
16
+ "]);\n "
17
17
  ]);
18
18
  _templateObject = function _templateObject2() {
19
19
  return data;
@@ -107,11 +107,6 @@ var injectDataFetchFunctionPlugin = function() {
107
107
  callAllDowngrade()
108
108
  ];
109
109
  }
110
- if (mfDowngrade1.includes(id)) {
111
- return [
112
- 2
113
- ];
114
- }
115
110
  mfDowngrade1.push(id);
116
111
  return [
117
112
  2,
@@ -128,7 +128,7 @@ const middleware = async (ctx, next) => {
128
128
  });
129
129
  return ctx.json(data);
130
130
  } catch (e) {
131
- console.log("data fetch error:");
131
+ console.log("server plugin data fetch error: ");
132
132
  console.error(e);
133
133
  ctx.status(500);
134
134
  return ctx.text(`failed to fetch ${remoteInfo.name} data, error:
@@ -207,7 +207,7 @@ function createRemoteComponent(options) {
207
207
  dangerouslySetInnerHTML: {
208
208
  __html: String.raw`
209
209
  globalThis['${DATA_FETCH_FUNCTION}'] = globalThis['${DATA_FETCH_FUNCTION}'] || [];
210
- globalThis['${DATA_FETCH_FUNCTION}'].push(['${dataFetchMapKey}',${JSON.stringify(props.mfData)}']);
210
+ globalThis['${DATA_FETCH_FUNCTION}'].push(['${dataFetchMapKey}',${JSON.stringify(props.mfData)}]);
211
211
  `
212
212
  }
213
213
  }),
@@ -73,9 +73,6 @@ const injectDataFetchFunctionPlugin = () => ({
73
73
  globalThis[DOWNGRADE_KEY] = true;
74
74
  return callAllDowngrade();
75
75
  }
76
- if (mfDowngrade.includes(id)) {
77
- return;
78
- }
79
76
  mfDowngrade.push(id);
80
77
  return callDowngrade(id);
81
78
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/modern-js",
3
- "version": "0.0.0-next-20250523070931",
3
+ "version": "0.0.0-next-20250523083033",
4
4
  "files": [
5
5
  "dist/",
6
6
  "types.d.ts",
@@ -111,12 +111,12 @@
111
111
  "@swc/helpers": "0.5.13",
112
112
  "node-fetch": "~3.3.0",
113
113
  "react-error-boundary": "4.1.2",
114
- "@module-federation/rsbuild-plugin": "0.0.0-next-20250523070931",
115
- "@module-federation/enhanced": "0.0.0-next-20250523070931",
116
- "@module-federation/runtime": "0.0.0-next-20250523070931",
117
- "@module-federation/node": "0.0.0-next-20250523070931",
118
- "@module-federation/sdk": "0.0.0-next-20250523070931",
119
- "@module-federation/cli": "0.0.0-next-20250523070931"
114
+ "@module-federation/rsbuild-plugin": "0.0.0-next-20250523083033",
115
+ "@module-federation/enhanced": "0.0.0-next-20250523083033",
116
+ "@module-federation/runtime": "0.0.0-next-20250523083033",
117
+ "@module-federation/node": "0.0.0-next-20250523083033",
118
+ "@module-federation/sdk": "0.0.0-next-20250523083033",
119
+ "@module-federation/cli": "0.0.0-next-20250523083033"
120
120
  },
121
121
  "devDependencies": {
122
122
  "@rsbuild/core": "1.2.8",
@@ -126,7 +126,7 @@
126
126
  "@modern-js/runtime": "2.67.5",
127
127
  "@modern-js/tsconfig": "2.67.5",
128
128
  "@modern-js/server-runtime": "2.67.5",
129
- "@module-federation/manifest": "0.0.0-next-20250523070931"
129
+ "@module-federation/manifest": "0.0.0-next-20250523083033"
130
130
  },
131
131
  "peerDependencies": {
132
132
  "react": ">=17",