@module-federation/bridge-react 2.5.1 → 2.6.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/base.cjs.js +1 -1
- package/dist/base.es.js +2 -2
- package/dist/{bridge-base-EnVXD4Hr.mjs → bridge-base-CIOXqUYV.mjs} +8 -6
- package/dist/{bridge-base-IlvdqYIj.js → bridge-base-HLp3d7aF.js} +8 -6
- package/dist/{createHelpers-D77sECmY.mjs → createHelpers-BY5Uj9_Z.mjs} +1 -1
- package/dist/{createHelpers-9B0ttrN_.js → createHelpers-DNBacpxb.js} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +2 -2
- 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 +7 -7
package/dist/base.cjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const createHelpers = require("./createHelpers-
|
|
3
|
+
const createHelpers = require("./createHelpers-DNBacpxb.js");
|
|
4
4
|
const lazyLoadComponentPlugin = require("./lazy-load-component-plugin-DG4e3Tib.js");
|
|
5
5
|
const lazyUtils = require("./utils-CFTy4LVE.js");
|
|
6
6
|
const dataFetchUtils = require("./data-fetch-utils.cjs.js");
|
package/dist/base.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as createRemoteAppComponentFactory, a as createDeprecatedRemoteComponentFactory, R as RemoteAppWrapper } from "./createHelpers-
|
|
2
|
-
import { b } from "./createHelpers-
|
|
1
|
+
import { c as createRemoteAppComponentFactory, a as createDeprecatedRemoteComponentFactory, R as RemoteAppWrapper } from "./createHelpers-BY5Uj9_Z.mjs";
|
|
2
|
+
import { b } from "./createHelpers-BY5Uj9_Z.mjs";
|
|
3
3
|
import { a, c, b as b2, l } from "./lazy-load-component-plugin-BYI941I2.mjs";
|
|
4
4
|
import { C, a as a2, E, c as c2, b as b3, d, g, r, s } from "./utils-DGS4pYp8.mjs";
|
|
5
5
|
import { callDataFetch } from "./data-fetch-utils.es.js";
|
|
@@ -123,13 +123,17 @@ function createBaseBridgeComponent({
|
|
|
123
123
|
};
|
|
124
124
|
const DefaultFallback = ({ error }) => /* @__PURE__ */ React.createElement("div", { role: "alert" }, /* @__PURE__ */ React.createElement("p", null, "Something went wrong:"), /* @__PURE__ */ React.createElement("pre", { style: { color: "red" } }, error.message));
|
|
125
125
|
const ErrorBoundaryComponent = ErrorBoundary;
|
|
126
|
+
const omitHostFallback = (props) => {
|
|
127
|
+
const nextProps = { ...props };
|
|
128
|
+
delete nextProps.fallback;
|
|
129
|
+
return nextProps;
|
|
130
|
+
};
|
|
126
131
|
const BridgeWrapper = ({
|
|
127
132
|
basename,
|
|
128
133
|
moduleName,
|
|
129
134
|
memoryRoute,
|
|
130
|
-
propsInfo
|
|
131
|
-
|
|
132
|
-
}) => /* @__PURE__ */ React.createElement(ErrorBoundaryComponent, { FallbackComponent: fallback || DefaultFallback }, /* @__PURE__ */ React.createElement(
|
|
135
|
+
propsInfo
|
|
136
|
+
}) => /* @__PURE__ */ React.createElement(ErrorBoundaryComponent, { FallbackComponent: DefaultFallback }, /* @__PURE__ */ React.createElement(
|
|
133
137
|
RawComponent,
|
|
134
138
|
{
|
|
135
139
|
appInfo: {
|
|
@@ -149,7 +153,6 @@ function createBaseBridgeComponent({
|
|
|
149
153
|
dom,
|
|
150
154
|
basename,
|
|
151
155
|
memoryRoute,
|
|
152
|
-
fallback,
|
|
153
156
|
rootOptions,
|
|
154
157
|
...propsInfo
|
|
155
158
|
} = info;
|
|
@@ -164,9 +167,8 @@ function createBaseBridgeComponent({
|
|
|
164
167
|
basename,
|
|
165
168
|
moduleName,
|
|
166
169
|
memoryRoute,
|
|
167
|
-
fallback,
|
|
168
170
|
propsInfo: {
|
|
169
|
-
...propsInfo,
|
|
171
|
+
...omitHostFallback(propsInfo),
|
|
170
172
|
basename,
|
|
171
173
|
...beforeBridgeRenderRes == null ? void 0 : beforeBridgeRenderRes.extraProps
|
|
172
174
|
}
|
|
@@ -140,13 +140,17 @@ function createBaseBridgeComponent({
|
|
|
140
140
|
};
|
|
141
141
|
const DefaultFallback = ({ error }) => /* @__PURE__ */ React__namespace.createElement("div", { role: "alert" }, /* @__PURE__ */ React__namespace.createElement("p", null, "Something went wrong:"), /* @__PURE__ */ React__namespace.createElement("pre", { style: { color: "red" } }, error.message));
|
|
142
142
|
const ErrorBoundaryComponent = ErrorBoundary;
|
|
143
|
+
const omitHostFallback = (props) => {
|
|
144
|
+
const nextProps = { ...props };
|
|
145
|
+
delete nextProps.fallback;
|
|
146
|
+
return nextProps;
|
|
147
|
+
};
|
|
143
148
|
const BridgeWrapper = ({
|
|
144
149
|
basename,
|
|
145
150
|
moduleName,
|
|
146
151
|
memoryRoute,
|
|
147
|
-
propsInfo
|
|
148
|
-
|
|
149
|
-
}) => /* @__PURE__ */ React__namespace.createElement(ErrorBoundaryComponent, { FallbackComponent: fallback || DefaultFallback }, /* @__PURE__ */ React__namespace.createElement(
|
|
152
|
+
propsInfo
|
|
153
|
+
}) => /* @__PURE__ */ React__namespace.createElement(ErrorBoundaryComponent, { FallbackComponent: DefaultFallback }, /* @__PURE__ */ React__namespace.createElement(
|
|
150
154
|
RawComponent,
|
|
151
155
|
{
|
|
152
156
|
appInfo: {
|
|
@@ -166,7 +170,6 @@ function createBaseBridgeComponent({
|
|
|
166
170
|
dom,
|
|
167
171
|
basename,
|
|
168
172
|
memoryRoute,
|
|
169
|
-
fallback,
|
|
170
173
|
rootOptions,
|
|
171
174
|
...propsInfo
|
|
172
175
|
} = info;
|
|
@@ -181,9 +184,8 @@ function createBaseBridgeComponent({
|
|
|
181
184
|
basename,
|
|
182
185
|
moduleName,
|
|
183
186
|
memoryRoute,
|
|
184
|
-
fallback,
|
|
185
187
|
propsInfo: {
|
|
186
|
-
...propsInfo,
|
|
188
|
+
...omitHostFallback(propsInfo),
|
|
187
189
|
basename,
|
|
188
190
|
...beforeBridgeRenderRes == null ? void 0 : beforeBridgeRenderRes.extraProps
|
|
189
191
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as createBaseBridgeComponent, E as ErrorBoundary } from "./bridge-base-
|
|
1
|
+
import { c as createBaseBridgeComponent, E as ErrorBoundary } from "./bridge-base-CIOXqUYV.mjs";
|
|
2
2
|
import ReactDOM from "react-dom";
|
|
3
3
|
import { L as LoggerInstance, g as getRootDomDefaultClassName } from "./index-Bs2NxD2z.mjs";
|
|
4
4
|
import React__default, { forwardRef, useRef, useState, useEffect } from "react";
|
package/dist/index.cjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const createHelpers = require("./createHelpers-
|
|
3
|
+
const createHelpers = require("./createHelpers-DNBacpxb.js");
|
|
4
4
|
const lazyLoadComponentPlugin = require("./lazy-load-component-plugin-DG4e3Tib.js");
|
|
5
5
|
const lazyUtils = require("./utils-CFTy4LVE.js");
|
|
6
6
|
const dataFetchUtils = require("./data-fetch-utils.cjs.js");
|
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RemoteAppWrapper, c as createRemoteAppComponentFactory, a as createDeprecatedRemoteComponentFactory } from "./createHelpers-
|
|
2
|
-
import { b } from "./createHelpers-
|
|
1
|
+
import { R as RemoteAppWrapper, c as createRemoteAppComponentFactory, a as createDeprecatedRemoteComponentFactory } from "./createHelpers-BY5Uj9_Z.mjs";
|
|
2
|
+
import { b } from "./createHelpers-BY5Uj9_Z.mjs";
|
|
3
3
|
import { a, c, b as b2, l } from "./lazy-load-component-plugin-BYI941I2.mjs";
|
|
4
4
|
import { C, a as a2, E, c as c2, b as b3, d, g, r, s } from "./utils-DGS4pYp8.mjs";
|
|
5
5
|
import { callDataFetch } from "./data-fetch-utils.es.js";
|
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-HLp3d7aF.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-CIOXqUYV.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-HLp3d7aF.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-CIOXqUYV.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": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
},
|
|
141
141
|
"dependencies": {
|
|
142
142
|
"lru-cache": "10.4.3",
|
|
143
|
-
"@module-federation/sdk": "2.
|
|
143
|
+
"@module-federation/sdk": "2.6.0"
|
|
144
144
|
},
|
|
145
145
|
"peerDependencies": {
|
|
146
146
|
"react": ">=16.9.0",
|
|
@@ -168,15 +168,15 @@
|
|
|
168
168
|
"react": "18.3.1",
|
|
169
169
|
"react-dom": "18.3.1",
|
|
170
170
|
"react-router-dom": "6.30.3",
|
|
171
|
-
"react-router": "7.
|
|
171
|
+
"react-router": "7.16.0",
|
|
172
172
|
"typescript": "^5.2.2",
|
|
173
173
|
"vite": "^5.4.21",
|
|
174
174
|
"vite-plugin-dts": "^4.3.0",
|
|
175
|
-
"hono": "4.12.
|
|
175
|
+
"hono": "4.12.25",
|
|
176
176
|
"vitest": "1.6.0",
|
|
177
|
-
"@module-federation/bridge-shared": "2.
|
|
178
|
-
"@module-federation/runtime": "2.
|
|
179
|
-
"@module-federation/runtime-core": "2.
|
|
177
|
+
"@module-federation/bridge-shared": "2.6.0",
|
|
178
|
+
"@module-federation/runtime": "2.6.0",
|
|
179
|
+
"@module-federation/runtime-core": "2.6.0"
|
|
180
180
|
},
|
|
181
181
|
"scripts": {
|
|
182
182
|
"dev": "vite",
|