@module-federation/bridge-react 0.0.0-next-20250916055342 → 0.0.0-next-20250919235431
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 -18
- package/dist/{bridge-base-BwHtOqw_.mjs → bridge-base-27J_lXcZ.mjs} +1 -97
- package/dist/{bridge-base-Ds850AOx.js → bridge-base-BQC7HuHP.js} +2 -97
- package/dist/data-fetch-utils.cjs.js +1 -1
- package/dist/data-fetch-utils.es.js +2 -2
- package/dist/index.cjs.js +5 -4
- package/dist/index.es.js +4 -3
- package/dist/{lazy-load-component-plugin-CK7UDFEe.mjs → lazy-load-component-plugin-CpS2f0Fn.mjs} +1 -1
- package/dist/{lazy-load-component-plugin-B0BaoA1J.js → lazy-load-component-plugin-lQP9-guO.js} +1 -1
- package/dist/lazy-load-component-plugin.cjs.js +2 -2
- package/dist/lazy-load-component-plugin.es.js +2 -2
- package/dist/{prefetch-CAnjCqS9.mjs → prefetch-BdzRzcgJ.mjs} +2 -32
- package/dist/{prefetch-DzNdUtDa.js → prefetch-D9tbkj0B.js} +2 -32
- package/dist/v18.cjs.js +1 -1
- package/dist/v18.es.js +1 -1
- package/dist/v19.cjs.js +1 -1
- package/dist/v19.es.js +1 -1
- package/package.json +6 -6
- package/vite.config.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,26 +1,11 @@
|
|
|
1
1
|
# @module-federation/bridge-react
|
|
2
2
|
|
|
3
|
-
## 0.0.0-next-
|
|
3
|
+
## 0.0.0-next-20250919235431
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
- @module-federation/sdk@0.0.0-next-
|
|
8
|
-
- @module-federation/bridge-shared@0.0.0-next-
|
|
9
|
-
|
|
10
|
-
## 0.19.1
|
|
11
|
-
|
|
12
|
-
### Patch Changes
|
|
13
|
-
|
|
14
|
-
- Updated dependencies
|
|
15
|
-
- @module-federation/sdk@0.19.1
|
|
16
|
-
- @module-federation/bridge-shared@0.19.1
|
|
17
|
-
|
|
18
|
-
## 0.19.0
|
|
19
|
-
|
|
20
|
-
### Patch Changes
|
|
21
|
-
|
|
22
|
-
- @module-federation/sdk@0.19.0
|
|
23
|
-
- @module-federation/bridge-shared@0.19.0
|
|
7
|
+
- @module-federation/sdk@0.0.0-next-20250919235431
|
|
8
|
+
- @module-federation/bridge-shared@0.0.0-next-20250919235431
|
|
24
9
|
|
|
25
10
|
## 0.18.4
|
|
26
11
|
|
|
@@ -1,102 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { ErrorBoundary } from "react-error-boundary";
|
|
3
3
|
import { L as LoggerInstance, R as RouterContext } from "./index-rAO0Wr0M.mjs";
|
|
4
4
|
import { federationRuntime } from "./plugin.es.js";
|
|
5
|
-
const ErrorBoundaryContext = createContext(null);
|
|
6
|
-
const initialState = {
|
|
7
|
-
didCatch: false,
|
|
8
|
-
error: null
|
|
9
|
-
};
|
|
10
|
-
class ErrorBoundary extends Component {
|
|
11
|
-
constructor(props) {
|
|
12
|
-
super(props);
|
|
13
|
-
this.resetErrorBoundary = this.resetErrorBoundary.bind(this);
|
|
14
|
-
this.state = initialState;
|
|
15
|
-
}
|
|
16
|
-
static getDerivedStateFromError(error) {
|
|
17
|
-
return {
|
|
18
|
-
didCatch: true,
|
|
19
|
-
error
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
resetErrorBoundary() {
|
|
23
|
-
const {
|
|
24
|
-
error
|
|
25
|
-
} = this.state;
|
|
26
|
-
if (error !== null) {
|
|
27
|
-
var _this$props$onReset, _this$props;
|
|
28
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
29
|
-
args[_key] = arguments[_key];
|
|
30
|
-
}
|
|
31
|
-
(_this$props$onReset = (_this$props = this.props).onReset) === null || _this$props$onReset === void 0 ? void 0 : _this$props$onReset.call(_this$props, {
|
|
32
|
-
args,
|
|
33
|
-
reason: "imperative-api"
|
|
34
|
-
});
|
|
35
|
-
this.setState(initialState);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
componentDidCatch(error, info) {
|
|
39
|
-
var _this$props$onError, _this$props2;
|
|
40
|
-
(_this$props$onError = (_this$props2 = this.props).onError) === null || _this$props$onError === void 0 ? void 0 : _this$props$onError.call(_this$props2, error, info);
|
|
41
|
-
}
|
|
42
|
-
componentDidUpdate(prevProps, prevState) {
|
|
43
|
-
const {
|
|
44
|
-
didCatch
|
|
45
|
-
} = this.state;
|
|
46
|
-
const {
|
|
47
|
-
resetKeys
|
|
48
|
-
} = this.props;
|
|
49
|
-
if (didCatch && prevState.error !== null && hasArrayChanged(prevProps.resetKeys, resetKeys)) {
|
|
50
|
-
var _this$props$onReset2, _this$props3;
|
|
51
|
-
(_this$props$onReset2 = (_this$props3 = this.props).onReset) === null || _this$props$onReset2 === void 0 ? void 0 : _this$props$onReset2.call(_this$props3, {
|
|
52
|
-
next: resetKeys,
|
|
53
|
-
prev: prevProps.resetKeys,
|
|
54
|
-
reason: "keys"
|
|
55
|
-
});
|
|
56
|
-
this.setState(initialState);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
render() {
|
|
60
|
-
const {
|
|
61
|
-
children,
|
|
62
|
-
fallbackRender,
|
|
63
|
-
FallbackComponent,
|
|
64
|
-
fallback
|
|
65
|
-
} = this.props;
|
|
66
|
-
const {
|
|
67
|
-
didCatch,
|
|
68
|
-
error
|
|
69
|
-
} = this.state;
|
|
70
|
-
let childToRender = children;
|
|
71
|
-
if (didCatch) {
|
|
72
|
-
const props = {
|
|
73
|
-
error,
|
|
74
|
-
resetErrorBoundary: this.resetErrorBoundary
|
|
75
|
-
};
|
|
76
|
-
if (typeof fallbackRender === "function") {
|
|
77
|
-
childToRender = fallbackRender(props);
|
|
78
|
-
} else if (FallbackComponent) {
|
|
79
|
-
childToRender = createElement(FallbackComponent, props);
|
|
80
|
-
} else if (fallback !== void 0) {
|
|
81
|
-
childToRender = fallback;
|
|
82
|
-
} else {
|
|
83
|
-
throw error;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
return createElement(ErrorBoundaryContext.Provider, {
|
|
87
|
-
value: {
|
|
88
|
-
didCatch,
|
|
89
|
-
error,
|
|
90
|
-
resetErrorBoundary: this.resetErrorBoundary
|
|
91
|
-
}
|
|
92
|
-
}, childToRender);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
function hasArrayChanged() {
|
|
96
|
-
let a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
97
|
-
let b = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
98
|
-
return a.length !== b.length || a.some((item, index) => !Object.is(item, b[index]));
|
|
99
|
-
}
|
|
100
5
|
function createBaseBridgeComponent({
|
|
101
6
|
createRoot,
|
|
102
7
|
defaultRootOptions,
|
|
@@ -194,6 +99,5 @@ function createBaseBridgeComponent({
|
|
|
194
99
|
};
|
|
195
100
|
}
|
|
196
101
|
export {
|
|
197
|
-
ErrorBoundary as E,
|
|
198
102
|
createBaseBridgeComponent as c
|
|
199
103
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const React = require("react");
|
|
3
|
+
const reactErrorBoundary = require("react-error-boundary");
|
|
3
4
|
const index = require("./index-eN2xRRXs.js");
|
|
4
5
|
const plugin = require("./plugin.cjs.js");
|
|
5
6
|
function _interopNamespaceDefault(e) {
|
|
@@ -19,101 +20,6 @@ function _interopNamespaceDefault(e) {
|
|
|
19
20
|
return Object.freeze(n);
|
|
20
21
|
}
|
|
21
22
|
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
22
|
-
const ErrorBoundaryContext = React.createContext(null);
|
|
23
|
-
const initialState = {
|
|
24
|
-
didCatch: false,
|
|
25
|
-
error: null
|
|
26
|
-
};
|
|
27
|
-
class ErrorBoundary extends React.Component {
|
|
28
|
-
constructor(props) {
|
|
29
|
-
super(props);
|
|
30
|
-
this.resetErrorBoundary = this.resetErrorBoundary.bind(this);
|
|
31
|
-
this.state = initialState;
|
|
32
|
-
}
|
|
33
|
-
static getDerivedStateFromError(error) {
|
|
34
|
-
return {
|
|
35
|
-
didCatch: true,
|
|
36
|
-
error
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
resetErrorBoundary() {
|
|
40
|
-
const {
|
|
41
|
-
error
|
|
42
|
-
} = this.state;
|
|
43
|
-
if (error !== null) {
|
|
44
|
-
var _this$props$onReset, _this$props;
|
|
45
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
46
|
-
args[_key] = arguments[_key];
|
|
47
|
-
}
|
|
48
|
-
(_this$props$onReset = (_this$props = this.props).onReset) === null || _this$props$onReset === void 0 ? void 0 : _this$props$onReset.call(_this$props, {
|
|
49
|
-
args,
|
|
50
|
-
reason: "imperative-api"
|
|
51
|
-
});
|
|
52
|
-
this.setState(initialState);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
componentDidCatch(error, info) {
|
|
56
|
-
var _this$props$onError, _this$props2;
|
|
57
|
-
(_this$props$onError = (_this$props2 = this.props).onError) === null || _this$props$onError === void 0 ? void 0 : _this$props$onError.call(_this$props2, error, info);
|
|
58
|
-
}
|
|
59
|
-
componentDidUpdate(prevProps, prevState) {
|
|
60
|
-
const {
|
|
61
|
-
didCatch
|
|
62
|
-
} = this.state;
|
|
63
|
-
const {
|
|
64
|
-
resetKeys
|
|
65
|
-
} = this.props;
|
|
66
|
-
if (didCatch && prevState.error !== null && hasArrayChanged(prevProps.resetKeys, resetKeys)) {
|
|
67
|
-
var _this$props$onReset2, _this$props3;
|
|
68
|
-
(_this$props$onReset2 = (_this$props3 = this.props).onReset) === null || _this$props$onReset2 === void 0 ? void 0 : _this$props$onReset2.call(_this$props3, {
|
|
69
|
-
next: resetKeys,
|
|
70
|
-
prev: prevProps.resetKeys,
|
|
71
|
-
reason: "keys"
|
|
72
|
-
});
|
|
73
|
-
this.setState(initialState);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
render() {
|
|
77
|
-
const {
|
|
78
|
-
children,
|
|
79
|
-
fallbackRender,
|
|
80
|
-
FallbackComponent,
|
|
81
|
-
fallback
|
|
82
|
-
} = this.props;
|
|
83
|
-
const {
|
|
84
|
-
didCatch,
|
|
85
|
-
error
|
|
86
|
-
} = this.state;
|
|
87
|
-
let childToRender = children;
|
|
88
|
-
if (didCatch) {
|
|
89
|
-
const props = {
|
|
90
|
-
error,
|
|
91
|
-
resetErrorBoundary: this.resetErrorBoundary
|
|
92
|
-
};
|
|
93
|
-
if (typeof fallbackRender === "function") {
|
|
94
|
-
childToRender = fallbackRender(props);
|
|
95
|
-
} else if (FallbackComponent) {
|
|
96
|
-
childToRender = React.createElement(FallbackComponent, props);
|
|
97
|
-
} else if (fallback !== void 0) {
|
|
98
|
-
childToRender = fallback;
|
|
99
|
-
} else {
|
|
100
|
-
throw error;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
return React.createElement(ErrorBoundaryContext.Provider, {
|
|
104
|
-
value: {
|
|
105
|
-
didCatch,
|
|
106
|
-
error,
|
|
107
|
-
resetErrorBoundary: this.resetErrorBoundary
|
|
108
|
-
}
|
|
109
|
-
}, childToRender);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
function hasArrayChanged() {
|
|
113
|
-
let a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
114
|
-
let b = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
115
|
-
return a.length !== b.length || a.some((item, index2) => !Object.is(item, b[index2]));
|
|
116
|
-
}
|
|
117
23
|
function createBaseBridgeComponent({
|
|
118
24
|
createRoot,
|
|
119
25
|
defaultRootOptions,
|
|
@@ -157,7 +63,7 @@ function createBaseBridgeComponent({
|
|
|
157
63
|
};
|
|
158
64
|
const beforeBridgeRenderRes = ((_c = (_b = (_a = instance == null ? void 0 : instance.bridgeHook) == null ? void 0 : _a.lifecycle) == null ? void 0 : _b.beforeBridgeRender) == null ? void 0 : _c.emit(info)) || {};
|
|
159
65
|
const rootComponentWithErrorBoundary = /* @__PURE__ */ React__namespace.createElement(
|
|
160
|
-
ErrorBoundary,
|
|
66
|
+
reactErrorBoundary.ErrorBoundary,
|
|
161
67
|
{
|
|
162
68
|
FallbackComponent: fallback
|
|
163
69
|
},
|
|
@@ -210,5 +116,4 @@ function createBaseBridgeComponent({
|
|
|
210
116
|
};
|
|
211
117
|
};
|
|
212
118
|
}
|
|
213
|
-
exports.ErrorBoundary = ErrorBoundary;
|
|
214
119
|
exports.createBaseBridgeComponent = createBaseBridgeComponent;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const lazyUtils = require("./utils-vIpCrZmn.js");
|
|
4
|
-
const prefetch = require("./prefetch-
|
|
4
|
+
const prefetch = require("./prefetch-D9tbkj0B.js");
|
|
5
5
|
async function callDataFetch() {
|
|
6
6
|
const dataFetch = globalThis[lazyUtils.DATA_FETCH_FUNCTION];
|
|
7
7
|
if (dataFetch) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { x as DATA_FETCH_FUNCTION } from "./utils-VSOJTX_o.mjs";
|
|
2
2
|
import { C, b, e, h, c, d, r } from "./utils-VSOJTX_o.mjs";
|
|
3
|
-
import { d as dataFetchFunction } from "./prefetch-
|
|
4
|
-
import { i, p } from "./prefetch-
|
|
3
|
+
import { d as dataFetchFunction } from "./prefetch-BdzRzcgJ.mjs";
|
|
4
|
+
import { i, p } from "./prefetch-BdzRzcgJ.mjs";
|
|
5
5
|
async function callDataFetch() {
|
|
6
6
|
const dataFetch = globalThis[DATA_FETCH_FUNCTION];
|
|
7
7
|
if (dataFetch) {
|
package/dist/index.cjs.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const bridgeBase = require("./bridge-base-
|
|
3
|
+
const bridgeBase = require("./bridge-base-BQC7HuHP.js");
|
|
4
4
|
const ReactDOM = require("react-dom");
|
|
5
5
|
const React = require("react");
|
|
6
|
+
const reactErrorBoundary = require("react-error-boundary");
|
|
6
7
|
const index = require("./index-eN2xRRXs.js");
|
|
7
8
|
const ReactRouterDOM = require("react-router-dom");
|
|
8
9
|
const plugin = require("./plugin.cjs.js");
|
|
9
|
-
const lazyLoadComponentPlugin = require("./lazy-load-component-plugin-
|
|
10
|
+
const lazyLoadComponentPlugin = require("./lazy-load-component-plugin-lQP9-guO.js");
|
|
10
11
|
const lazyUtils = require("./utils-vIpCrZmn.js");
|
|
11
12
|
const dataFetchUtils = require("./data-fetch-utils.cjs.js");
|
|
12
|
-
const prefetch = require("./prefetch-
|
|
13
|
+
const prefetch = require("./prefetch-D9tbkj0B.js");
|
|
13
14
|
function _interopNamespaceDefault(e2) {
|
|
14
15
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
15
16
|
if (e2) {
|
|
@@ -259,7 +260,7 @@ function createRemoteAppComponent(info) {
|
|
|
259
260
|
const LazyComponent = createLazyRemoteComponent(info);
|
|
260
261
|
return React.forwardRef((props, ref) => {
|
|
261
262
|
return /* @__PURE__ */ React.createElement(
|
|
262
|
-
|
|
263
|
+
reactErrorBoundary.ErrorBoundary,
|
|
263
264
|
{
|
|
264
265
|
FallbackComponent: info.fallback
|
|
265
266
|
},
|
package/dist/index.es.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { c as createBaseBridgeComponent
|
|
1
|
+
import { c as createBaseBridgeComponent } from "./bridge-base-27J_lXcZ.mjs";
|
|
2
2
|
import ReactDOM from "react-dom";
|
|
3
3
|
import React__default, { forwardRef, useContext, useState, useEffect, useRef } from "react";
|
|
4
|
+
import { ErrorBoundary } from "react-error-boundary";
|
|
4
5
|
import { p as pathJoin, L as LoggerInstance, g as getRootDomDefaultClassName } from "./index-rAO0Wr0M.mjs";
|
|
5
6
|
import * as ReactRouterDOM from "react-router-dom";
|
|
6
7
|
import { federationRuntime } from "./plugin.es.js";
|
|
7
|
-
import { b, a, c, l } from "./lazy-load-component-plugin-
|
|
8
|
+
import { b, a, c, l } from "./lazy-load-component-plugin-CpS2f0Fn.mjs";
|
|
8
9
|
import { C, b as b2, E, e, h, c as c2, d, r, s } from "./utils-VSOJTX_o.mjs";
|
|
9
10
|
import { callDataFetch } from "./data-fetch-utils.es.js";
|
|
10
|
-
import { p } from "./prefetch-
|
|
11
|
+
import { p } from "./prefetch-BdzRzcgJ.mjs";
|
|
11
12
|
function createReact16Or17Root(container) {
|
|
12
13
|
return {
|
|
13
14
|
render(children) {
|
package/dist/{lazy-load-component-plugin-CK7UDFEe.mjs → lazy-load-component-plugin-CpS2f0Fn.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as injectDataFetch, p as prefetch } from "./prefetch-
|
|
1
|
+
import { i as injectDataFetch, p as prefetch } from "./prefetch-BdzRzcgJ.mjs";
|
|
2
2
|
import { i as initDataFetchMap, j as isDataLoaderExpose, k as getDataFetchInfo, m as getDataFetchMapKey, l as logger, n as getDataFetchItem, o as DATA_FETCH_CLIENT_SUFFIX, p as MF_DATA_FETCH_TYPE, q as isCSROnly, a as loadDataFetchModule, M as MF_DATA_FETCH_STATUS, g as getDataFetchMap, t as isServerEnv, u as getDataFetchIdWithErrorMsgs, v as DATA_FETCH_ERROR_PREFIX, E as ERROR_TYPE, w as wrapDataFetchId, L as LOAD_REMOTE_ERROR_PREFIX, x as DATA_FETCH_FUNCTION, y as getLoadedRemoteInfos, f as fetchData$1, z as setDataFetchItemLoadedStatus, F as FS_HREF } from "./utils-VSOJTX_o.mjs";
|
|
3
3
|
import React__default, { useRef, useState, Suspense, useEffect } from "react";
|
|
4
4
|
const autoFetchData = () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const lazyLoadComponentPlugin = require("./lazy-load-component-plugin-
|
|
4
|
-
require("./prefetch-
|
|
3
|
+
const lazyLoadComponentPlugin = require("./lazy-load-component-plugin-lQP9-guO.js");
|
|
4
|
+
require("./prefetch-D9tbkj0B.js");
|
|
5
5
|
exports.default = lazyLoadComponentPlugin.lazyLoadComponentPlugin;
|
|
6
6
|
exports.lazyLoadComponentPlugin = lazyLoadComponentPlugin.lazyLoadComponentPlugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l, l as l2 } from "./lazy-load-component-plugin-
|
|
2
|
-
import "./prefetch-
|
|
1
|
+
import { l, l as l2 } from "./lazy-load-component-plugin-CpS2f0Fn.mjs";
|
|
2
|
+
import "./prefetch-BdzRzcgJ.mjs";
|
|
3
3
|
export {
|
|
4
4
|
l as default,
|
|
5
5
|
l2 as lazyLoadComponentPlugin
|
|
@@ -270,7 +270,7 @@ function getGlobalFederationConstructor() {
|
|
|
270
270
|
function setGlobalFederationConstructor(FederationConstructor, isDebug = isDebugMode()) {
|
|
271
271
|
if (isDebug) {
|
|
272
272
|
CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
|
|
273
|
-
CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.0.0-next-
|
|
273
|
+
CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.0.0-next-20250919235431";
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
function getInfoWithoutType(target, key) {
|
|
@@ -1042,7 +1042,7 @@ function getRemoteEntryUniqueKey(remoteInfo) {
|
|
|
1042
1042
|
return composeKeyWithSeparator(name, entry);
|
|
1043
1043
|
}
|
|
1044
1044
|
async function getRemoteEntry(params) {
|
|
1045
|
-
const { origin, remoteEntryExports, remoteInfo, getEntryUrl
|
|
1045
|
+
const { origin, remoteEntryExports, remoteInfo, getEntryUrl } = params;
|
|
1046
1046
|
const uniqueKey = getRemoteEntryUniqueKey(remoteInfo);
|
|
1047
1047
|
if (remoteEntryExports) {
|
|
1048
1048
|
return remoteEntryExports;
|
|
@@ -1068,36 +1068,6 @@ async function getRemoteEntry(params) {
|
|
|
1068
1068
|
remoteInfo,
|
|
1069
1069
|
loaderHook
|
|
1070
1070
|
});
|
|
1071
|
-
}).catch(async (err) => {
|
|
1072
|
-
const uniqueKey2 = getRemoteEntryUniqueKey(remoteInfo);
|
|
1073
|
-
const isScriptLoadError = err instanceof Error && err.message.includes(RUNTIME_008);
|
|
1074
|
-
if (isScriptLoadError && !_inErrorHandling) {
|
|
1075
|
-
try {
|
|
1076
|
-
const wrappedGetRemoteEntry = (params2) => {
|
|
1077
|
-
return getRemoteEntry(_extends$1({}, params2, {
|
|
1078
|
-
_inErrorHandling: true
|
|
1079
|
-
}));
|
|
1080
|
-
};
|
|
1081
|
-
const retryResult = await origin.loaderHook.lifecycle.loadEntryError.emit({
|
|
1082
|
-
getRemoteEntry: wrappedGetRemoteEntry,
|
|
1083
|
-
origin,
|
|
1084
|
-
remoteInfo,
|
|
1085
|
-
remoteEntryExports,
|
|
1086
|
-
globalLoading,
|
|
1087
|
-
uniqueKey: uniqueKey2
|
|
1088
|
-
});
|
|
1089
|
-
if (retryResult) {
|
|
1090
|
-
if (typeof retryResult === "function") {
|
|
1091
|
-
return await retryResult();
|
|
1092
|
-
} else {
|
|
1093
|
-
return retryResult;
|
|
1094
|
-
}
|
|
1095
|
-
}
|
|
1096
|
-
} catch (retryError) {
|
|
1097
|
-
throw retryError;
|
|
1098
|
-
}
|
|
1099
|
-
}
|
|
1100
|
-
throw err;
|
|
1101
1071
|
});
|
|
1102
1072
|
}
|
|
1103
1073
|
return globalLoading[uniqueKey];
|
|
@@ -271,7 +271,7 @@ function getGlobalFederationConstructor() {
|
|
|
271
271
|
function setGlobalFederationConstructor(FederationConstructor, isDebug = index_esm.isDebugMode()) {
|
|
272
272
|
if (isDebug) {
|
|
273
273
|
CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
|
|
274
|
-
CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.0.0-next-
|
|
274
|
+
CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.0.0-next-20250919235431";
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
277
|
function getInfoWithoutType(target, key) {
|
|
@@ -1043,7 +1043,7 @@ function getRemoteEntryUniqueKey(remoteInfo) {
|
|
|
1043
1043
|
return index_esm.composeKeyWithSeparator(name, entry);
|
|
1044
1044
|
}
|
|
1045
1045
|
async function getRemoteEntry(params) {
|
|
1046
|
-
const { origin, remoteEntryExports, remoteInfo, getEntryUrl
|
|
1046
|
+
const { origin, remoteEntryExports, remoteInfo, getEntryUrl } = params;
|
|
1047
1047
|
const uniqueKey = getRemoteEntryUniqueKey(remoteInfo);
|
|
1048
1048
|
if (remoteEntryExports) {
|
|
1049
1049
|
return remoteEntryExports;
|
|
@@ -1069,36 +1069,6 @@ async function getRemoteEntry(params) {
|
|
|
1069
1069
|
remoteInfo,
|
|
1070
1070
|
loaderHook
|
|
1071
1071
|
});
|
|
1072
|
-
}).catch(async (err) => {
|
|
1073
|
-
const uniqueKey2 = getRemoteEntryUniqueKey(remoteInfo);
|
|
1074
|
-
const isScriptLoadError = err instanceof Error && err.message.includes(RUNTIME_008);
|
|
1075
|
-
if (isScriptLoadError && !_inErrorHandling) {
|
|
1076
|
-
try {
|
|
1077
|
-
const wrappedGetRemoteEntry = (params2) => {
|
|
1078
|
-
return getRemoteEntry(_extends$1({}, params2, {
|
|
1079
|
-
_inErrorHandling: true
|
|
1080
|
-
}));
|
|
1081
|
-
};
|
|
1082
|
-
const retryResult = await origin.loaderHook.lifecycle.loadEntryError.emit({
|
|
1083
|
-
getRemoteEntry: wrappedGetRemoteEntry,
|
|
1084
|
-
origin,
|
|
1085
|
-
remoteInfo,
|
|
1086
|
-
remoteEntryExports,
|
|
1087
|
-
globalLoading,
|
|
1088
|
-
uniqueKey: uniqueKey2
|
|
1089
|
-
});
|
|
1090
|
-
if (retryResult) {
|
|
1091
|
-
if (typeof retryResult === "function") {
|
|
1092
|
-
return await retryResult();
|
|
1093
|
-
} else {
|
|
1094
|
-
return retryResult;
|
|
1095
|
-
}
|
|
1096
|
-
}
|
|
1097
|
-
} catch (retryError) {
|
|
1098
|
-
throw retryError;
|
|
1099
|
-
}
|
|
1100
|
-
}
|
|
1101
|
-
throw err;
|
|
1102
1072
|
});
|
|
1103
1073
|
}
|
|
1104
1074
|
return globalLoading[uniqueKey];
|
package/dist/v18.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const client = require("react-dom/client");
|
|
4
|
-
const bridgeBase = require("./bridge-base-
|
|
4
|
+
const bridgeBase = require("./bridge-base-BQC7HuHP.js");
|
|
5
5
|
function createReact18Root(container, options) {
|
|
6
6
|
return client.createRoot(container, options);
|
|
7
7
|
}
|
package/dist/v18.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRoot } from "react-dom/client";
|
|
2
|
-
import { c as createBaseBridgeComponent } from "./bridge-base-
|
|
2
|
+
import { c as createBaseBridgeComponent } from "./bridge-base-27J_lXcZ.mjs";
|
|
3
3
|
function createReact18Root(container, options) {
|
|
4
4
|
return createRoot(container, options);
|
|
5
5
|
}
|
package/dist/v19.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const client = require("react-dom/client");
|
|
4
|
-
const bridgeBase = require("./bridge-base-
|
|
4
|
+
const bridgeBase = require("./bridge-base-BQC7HuHP.js");
|
|
5
5
|
function createReact19Root(container, options) {
|
|
6
6
|
return client.createRoot(container, options);
|
|
7
7
|
}
|
package/dist/v19.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRoot } from "react-dom/client";
|
|
2
|
-
import { c as createBaseBridgeComponent } from "./bridge-base-
|
|
2
|
+
import { c as createBaseBridgeComponent } from "./bridge-base-27J_lXcZ.mjs";
|
|
3
3
|
function createReact19Root(container, options) {
|
|
4
4
|
return createRoot(container, options);
|
|
5
5
|
}
|
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-20250919235431",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "git+https://github.com/module-federation/core.git",
|
|
13
|
-
"directory": "packages/bridge
|
|
13
|
+
"directory": "packages/bridge-react"
|
|
14
14
|
},
|
|
15
15
|
"main": "./dist/index.cjs.js",
|
|
16
16
|
"module": "./dist/index.es.js",
|
|
@@ -95,8 +95,8 @@
|
|
|
95
95
|
"dependencies": {
|
|
96
96
|
"react-error-boundary": "^4.1.2",
|
|
97
97
|
"lru-cache": "^10.4.3",
|
|
98
|
-
"@module-federation/bridge-shared": "0.0.0-next-
|
|
99
|
-
"@module-federation/sdk": "0.0.0-next-
|
|
98
|
+
"@module-federation/bridge-shared": "0.0.0-next-20250919235431",
|
|
99
|
+
"@module-federation/sdk": "0.0.0-next-20250919235431"
|
|
100
100
|
},
|
|
101
101
|
"peerDependencies": {
|
|
102
102
|
"react": ">=16.9.0",
|
|
@@ -118,8 +118,8 @@
|
|
|
118
118
|
"vite": "^5.4.18",
|
|
119
119
|
"vite-plugin-dts": "^4.3.0",
|
|
120
120
|
"hono": "3.12.12",
|
|
121
|
-
"@module-federation/runtime-core": "0.0.0-next-
|
|
122
|
-
"@module-federation/runtime": "0.0.0-next-
|
|
121
|
+
"@module-federation/runtime-core": "0.0.0-next-20250919235431",
|
|
122
|
+
"@module-federation/runtime": "0.0.0-next-20250919235431"
|
|
123
123
|
},
|
|
124
124
|
"scripts": {
|
|
125
125
|
"dev": "vite",
|