@module-federation/bridge-react 0.0.0-next-20250221063001 → 0.0.0-next-20250221081237
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/CHANGELOG.md +3 -11
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +3 -3
- package/package.json +4 -4
- package/src/remote/create.tsx +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
# @module-federation/bridge-react
|
|
2
2
|
|
|
3
|
-
## 0.0.0-next-
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- 1fe3d78: fix: prevent destroy/render the remote component every time rerendering from the host
|
|
8
|
-
- @module-federation/sdk@0.0.0-next-20250221063001
|
|
9
|
-
- @module-federation/bridge-shared@0.0.0-next-20250221063001
|
|
10
|
-
|
|
11
|
-
## 0.8.12
|
|
3
|
+
## 0.0.0-next-20250221081237
|
|
12
4
|
|
|
13
5
|
### Patch Changes
|
|
14
6
|
|
|
15
7
|
- 4ef21d2: chore: adjust bridge-react to structure directory
|
|
16
|
-
- @module-federation/sdk@0.
|
|
17
|
-
- @module-federation/bridge-shared@0.
|
|
8
|
+
- @module-federation/sdk@0.0.0-next-20250221081237
|
|
9
|
+
- @module-federation/bridge-shared@0.0.0-next-20250221081237
|
|
18
10
|
|
|
19
11
|
## 0.8.11
|
|
20
12
|
|
package/dist/index.cjs.js
CHANGED
|
@@ -212,7 +212,7 @@ const RemoteAppWrapper = React.forwardRef(function(props, ref) {
|
|
|
212
212
|
}
|
|
213
213
|
);
|
|
214
214
|
};
|
|
215
|
-
RemoteApp2["__APP_VERSION__"] = "0.8.
|
|
215
|
+
RemoteApp2["__APP_VERSION__"] = "0.8.11";
|
|
216
216
|
return /* @__PURE__ */ React.createElement(RemoteApp2, null);
|
|
217
217
|
});
|
|
218
218
|
function withRouterData(WrappedComponent) {
|
|
@@ -338,7 +338,7 @@ function createLazyRemoteComponent(info) {
|
|
|
338
338
|
function createRemoteComponent(info) {
|
|
339
339
|
return React.forwardRef(
|
|
340
340
|
(props, ref) => {
|
|
341
|
-
const LazyComponent =
|
|
341
|
+
const LazyComponent = createLazyRemoteComponent(info);
|
|
342
342
|
return /* @__PURE__ */ React.createElement(ErrorBoundary, { FallbackComponent: info.fallback }, /* @__PURE__ */ React.createElement(React.Suspense, { fallback: info.loading }, /* @__PURE__ */ React.createElement(LazyComponent, { ...props, ref })));
|
|
343
343
|
}
|
|
344
344
|
);
|
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import React__default, { createContext, Component, createElement, forwardRef, useRef, useEffect, useContext, useState
|
|
2
|
+
import React__default, { createContext, Component, createElement, forwardRef, useRef, useEffect, useContext, useState } from "react";
|
|
3
3
|
import { L as LoggerInstance, g as getRootDomDefaultClassName, p as pathJoin, R as RouterContext } from "./context-BwUPFSB2.js";
|
|
4
4
|
import * as ReactRouterDOM from "react-router-dom";
|
|
5
5
|
import { federationRuntime } from "./plugin.es.js";
|
|
@@ -193,7 +193,7 @@ const RemoteAppWrapper = forwardRef(function(props, ref) {
|
|
|
193
193
|
}
|
|
194
194
|
);
|
|
195
195
|
};
|
|
196
|
-
RemoteApp2["__APP_VERSION__"] = "0.8.
|
|
196
|
+
RemoteApp2["__APP_VERSION__"] = "0.8.11";
|
|
197
197
|
return /* @__PURE__ */ React__default.createElement(RemoteApp2, null);
|
|
198
198
|
});
|
|
199
199
|
function withRouterData(WrappedComponent) {
|
|
@@ -319,7 +319,7 @@ function createLazyRemoteComponent(info) {
|
|
|
319
319
|
function createRemoteComponent(info) {
|
|
320
320
|
return forwardRef(
|
|
321
321
|
(props, ref) => {
|
|
322
|
-
const LazyComponent =
|
|
322
|
+
const LazyComponent = createLazyRemoteComponent(info);
|
|
323
323
|
return /* @__PURE__ */ React__default.createElement(ErrorBoundary, { FallbackComponent: info.fallback }, /* @__PURE__ */ React__default.createElement(React__default.Suspense, { fallback: info.loading }, /* @__PURE__ */ React__default.createElement(LazyComponent, { ...props, ref })));
|
|
324
324
|
}
|
|
325
325
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/bridge-react",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-20250221081237",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@loadable/component": "^5.16.4",
|
|
48
48
|
"react-error-boundary": "^4.1.2",
|
|
49
|
-
"@module-federation/bridge-shared": "0.0.0-next-
|
|
50
|
-
"@module-federation/sdk": "0.0.0-next-
|
|
49
|
+
"@module-federation/bridge-shared": "0.0.0-next-20250221081237",
|
|
50
|
+
"@module-federation/sdk": "0.0.0-next-20250221081237"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"react": ">=16.9.0",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"typescript": "^5.2.2",
|
|
69
69
|
"vite": "^5.2.14",
|
|
70
70
|
"vite-plugin-dts": "^4.3.0",
|
|
71
|
-
"@module-federation/runtime": "0.0.0-next-
|
|
71
|
+
"@module-federation/runtime": "0.0.0-next-20250221081237"
|
|
72
72
|
},
|
|
73
73
|
"scripts": {
|
|
74
74
|
"dev": "vite",
|
package/src/remote/create.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { forwardRef
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
ErrorBoundary,
|
|
4
4
|
ErrorBoundaryPropsWithComponent,
|
|
@@ -102,8 +102,7 @@ export function createRemoteComponent<T, E extends keyof T>(
|
|
|
102
102
|
|
|
103
103
|
return forwardRef<HTMLDivElement, ProviderParams & RawComponentType>(
|
|
104
104
|
(props, ref) => {
|
|
105
|
-
|
|
106
|
-
const LazyComponent = useMemo(() => createLazyRemoteComponent(info), []);
|
|
105
|
+
const LazyComponent = createLazyRemoteComponent(info);
|
|
107
106
|
return (
|
|
108
107
|
<ErrorBoundary FallbackComponent={info.fallback}>
|
|
109
108
|
<React.Suspense fallback={info.loading}>
|