@module-federation/bridge-react 2.8.2 → 2.9.1
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 +3 -3
- package/dist/base.es.js +4 -4
- package/dist/{bridge-base-BaKy6CY_.mjs → bridge-base-CHnL6Q9P.mjs} +30 -6
- package/dist/{bridge-base-Ch33UJuN.js → bridge-base-DSYKAGGD.js} +30 -6
- package/dist/{createHelpers-BSHeKyd-.mjs → createHelpers-D3Sg5lKp.mjs} +29 -14
- package/dist/{createHelpers-19BP0xtB.js → createHelpers-D6thyyLv.js} +29 -14
- package/dist/data-fetch-utils.cjs.js +1 -1
- package/dist/data-fetch-utils.es.js +2 -2
- package/dist/data-fetch.cjs.js +2 -2
- package/dist/data-fetch.es.js +2 -2
- package/dist/index.cjs.js +24 -3
- package/dist/index.es.js +25 -4
- package/dist/{lazy-load-component-plugin-DeTbkGlM.js → lazy-load-component-plugin-DSURjnZ0.js} +1 -1
- package/dist/{lazy-load-component-plugin-DQFjLSsW.mjs → lazy-load-component-plugin-NZphPG7_.mjs} +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-CfMDdqO-.js → prefetch-Bxf6DSx_.js} +98 -37
- package/dist/{prefetch-BJZbf9LF.mjs → prefetch-TKq_EK_q.mjs} +98 -37
- 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,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const createHelpers = require("./createHelpers-
|
|
4
|
-
const lazyLoadComponentPlugin = require("./lazy-load-component-plugin-
|
|
3
|
+
const createHelpers = require("./createHelpers-D6thyyLv.js");
|
|
4
|
+
const lazyLoadComponentPlugin = require("./lazy-load-component-plugin-DSURjnZ0.js");
|
|
5
5
|
const lazyUtils = require("./utils-5dGErM3C.js");
|
|
6
6
|
const dataFetchUtils = require("./data-fetch-utils.cjs.js");
|
|
7
|
-
const prefetch = require("./prefetch-
|
|
7
|
+
const prefetch = require("./prefetch-Bxf6DSx_.js");
|
|
8
8
|
const createRemoteAppComponent = createHelpers.createRemoteAppComponentFactory(createHelpers.RemoteAppWrapper);
|
|
9
9
|
const createRemoteComponent = createHelpers.createDeprecatedRemoteComponentFactory(
|
|
10
10
|
createRemoteAppComponent
|
package/dist/base.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as createRemoteAppComponentFactory, a as createDeprecatedRemoteComponentFactory, R as RemoteAppWrapper } from "./createHelpers-
|
|
2
|
-
import { b } from "./createHelpers-
|
|
3
|
-
import { a, c, b as b2, l } from "./lazy-load-component-plugin-
|
|
1
|
+
import { c as createRemoteAppComponentFactory, a as createDeprecatedRemoteComponentFactory, R as RemoteAppWrapper } from "./createHelpers-D3Sg5lKp.mjs";
|
|
2
|
+
import { b } from "./createHelpers-D3Sg5lKp.mjs";
|
|
3
|
+
import { a, c, b as b2, l } from "./lazy-load-component-plugin-NZphPG7_.mjs";
|
|
4
4
|
import { C, a as a2, E, c as c2, b as b3, d, g, r, s } from "./utils-BBP3hEeV.mjs";
|
|
5
5
|
import { callDataFetch } from "./data-fetch-utils.es.js";
|
|
6
|
-
import { p } from "./prefetch-
|
|
6
|
+
import { p } from "./prefetch-TKq_EK_q.mjs";
|
|
7
7
|
const createRemoteAppComponent = createRemoteAppComponentFactory(RemoteAppWrapper);
|
|
8
8
|
const createRemoteComponent = createDeprecatedRemoteComponentFactory(
|
|
9
9
|
createRemoteAppComponent
|
|
@@ -89,11 +89,20 @@ function createBaseBridgeComponent({
|
|
|
89
89
|
rootOptions,
|
|
90
90
|
...propsInfo
|
|
91
91
|
} = info;
|
|
92
|
+
const operationContext = {
|
|
93
|
+
side: "producer",
|
|
94
|
+
framework: "react",
|
|
95
|
+
operation: rootMap.has(dom) ? "update" : "render",
|
|
96
|
+
reason: "direct"
|
|
97
|
+
};
|
|
92
98
|
const mergedRootOptions = {
|
|
93
99
|
...defaultRootOptions,
|
|
94
100
|
...rootOptions
|
|
95
101
|
};
|
|
96
|
-
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(
|
|
102
|
+
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(
|
|
103
|
+
info,
|
|
104
|
+
operationContext
|
|
105
|
+
)) || {};
|
|
97
106
|
const rootComponentWithErrorBoundary = /* @__PURE__ */ React.createElement(
|
|
98
107
|
BridgeWrapper,
|
|
99
108
|
{
|
|
@@ -108,9 +117,10 @@ function createBaseBridgeComponent({
|
|
|
108
117
|
}
|
|
109
118
|
);
|
|
110
119
|
if (bridgeInfo.render) {
|
|
111
|
-
await Promise.resolve(
|
|
120
|
+
const root = await Promise.resolve(
|
|
112
121
|
bridgeInfo.render(rootComponentWithErrorBoundary, dom)
|
|
113
|
-
)
|
|
122
|
+
);
|
|
123
|
+
rootMap.set(dom, root);
|
|
114
124
|
} else {
|
|
115
125
|
let root = rootMap.get(dom);
|
|
116
126
|
if (!root && createRoot) {
|
|
@@ -121,13 +131,25 @@ function createBaseBridgeComponent({
|
|
|
121
131
|
root.render(rootComponentWithErrorBoundary);
|
|
122
132
|
}
|
|
123
133
|
}
|
|
124
|
-
((_f = (_e = (_d = instance == null ? void 0 : instance.bridgeHook) == null ? void 0 : _d.lifecycle) == null ? void 0 : _e.afterBridgeRender) == null ? void 0 : _f.emit(info
|
|
134
|
+
((_f = (_e = (_d = instance == null ? void 0 : instance.bridgeHook) == null ? void 0 : _d.lifecycle) == null ? void 0 : _e.afterBridgeRender) == null ? void 0 : _f.emit(info, {
|
|
135
|
+
context: operationContext
|
|
136
|
+
})) || {};
|
|
125
137
|
},
|
|
126
138
|
destroy(info) {
|
|
127
|
-
var _a, _b, _c;
|
|
139
|
+
var _a, _b, _c, _d, _e, _f;
|
|
128
140
|
const { dom } = info;
|
|
129
141
|
LoggerInstance.debug(`createBridgeComponent destroy Info`, info);
|
|
130
142
|
const root = rootMap.get(dom);
|
|
143
|
+
const operationContext = {
|
|
144
|
+
side: "producer",
|
|
145
|
+
framework: "react",
|
|
146
|
+
operation: "destroy",
|
|
147
|
+
reason: "direct"
|
|
148
|
+
};
|
|
149
|
+
(_c = (_b = (_a = instance == null ? void 0 : instance.bridgeHook) == null ? void 0 : _a.lifecycle) == null ? void 0 : _b.beforeBridgeDestroy) == null ? void 0 : _c.emit(
|
|
150
|
+
info,
|
|
151
|
+
operationContext
|
|
152
|
+
);
|
|
131
153
|
if (root) {
|
|
132
154
|
if ("unmount" in root) {
|
|
133
155
|
root.unmount();
|
|
@@ -136,7 +158,9 @@ function createBaseBridgeComponent({
|
|
|
136
158
|
}
|
|
137
159
|
rootMap.delete(dom);
|
|
138
160
|
}
|
|
139
|
-
(
|
|
161
|
+
(_f = (_e = (_d = instance == null ? void 0 : instance.bridgeHook) == null ? void 0 : _d.lifecycle) == null ? void 0 : _e.afterBridgeDestroy) == null ? void 0 : _f.emit(info, {
|
|
162
|
+
context: operationContext
|
|
163
|
+
});
|
|
140
164
|
}
|
|
141
165
|
};
|
|
142
166
|
};
|
|
@@ -107,11 +107,20 @@ function createBaseBridgeComponent({
|
|
|
107
107
|
rootOptions,
|
|
108
108
|
...propsInfo
|
|
109
109
|
} = info;
|
|
110
|
+
const operationContext = {
|
|
111
|
+
side: "producer",
|
|
112
|
+
framework: "react",
|
|
113
|
+
operation: rootMap.has(dom) ? "update" : "render",
|
|
114
|
+
reason: "direct"
|
|
115
|
+
};
|
|
110
116
|
const mergedRootOptions = {
|
|
111
117
|
...defaultRootOptions,
|
|
112
118
|
...rootOptions
|
|
113
119
|
};
|
|
114
|
-
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(
|
|
120
|
+
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(
|
|
121
|
+
info,
|
|
122
|
+
operationContext
|
|
123
|
+
)) || {};
|
|
115
124
|
const rootComponentWithErrorBoundary = /* @__PURE__ */ React__namespace.createElement(
|
|
116
125
|
BridgeWrapper,
|
|
117
126
|
{
|
|
@@ -126,9 +135,10 @@ function createBaseBridgeComponent({
|
|
|
126
135
|
}
|
|
127
136
|
);
|
|
128
137
|
if (bridgeInfo.render) {
|
|
129
|
-
await Promise.resolve(
|
|
138
|
+
const root = await Promise.resolve(
|
|
130
139
|
bridgeInfo.render(rootComponentWithErrorBoundary, dom)
|
|
131
|
-
)
|
|
140
|
+
);
|
|
141
|
+
rootMap.set(dom, root);
|
|
132
142
|
} else {
|
|
133
143
|
let root = rootMap.get(dom);
|
|
134
144
|
if (!root && createRoot) {
|
|
@@ -139,13 +149,25 @@ function createBaseBridgeComponent({
|
|
|
139
149
|
root.render(rootComponentWithErrorBoundary);
|
|
140
150
|
}
|
|
141
151
|
}
|
|
142
|
-
((_f = (_e = (_d = instance == null ? void 0 : instance.bridgeHook) == null ? void 0 : _d.lifecycle) == null ? void 0 : _e.afterBridgeRender) == null ? void 0 : _f.emit(info
|
|
152
|
+
((_f = (_e = (_d = instance == null ? void 0 : instance.bridgeHook) == null ? void 0 : _d.lifecycle) == null ? void 0 : _e.afterBridgeRender) == null ? void 0 : _f.emit(info, {
|
|
153
|
+
context: operationContext
|
|
154
|
+
})) || {};
|
|
143
155
|
},
|
|
144
156
|
destroy(info) {
|
|
145
|
-
var _a, _b, _c;
|
|
157
|
+
var _a, _b, _c, _d, _e, _f;
|
|
146
158
|
const { dom } = info;
|
|
147
159
|
index.LoggerInstance.debug(`createBridgeComponent destroy Info`, info);
|
|
148
160
|
const root = rootMap.get(dom);
|
|
161
|
+
const operationContext = {
|
|
162
|
+
side: "producer",
|
|
163
|
+
framework: "react",
|
|
164
|
+
operation: "destroy",
|
|
165
|
+
reason: "direct"
|
|
166
|
+
};
|
|
167
|
+
(_c = (_b = (_a = instance == null ? void 0 : instance.bridgeHook) == null ? void 0 : _a.lifecycle) == null ? void 0 : _b.beforeBridgeDestroy) == null ? void 0 : _c.emit(
|
|
168
|
+
info,
|
|
169
|
+
operationContext
|
|
170
|
+
);
|
|
149
171
|
if (root) {
|
|
150
172
|
if ("unmount" in root) {
|
|
151
173
|
root.unmount();
|
|
@@ -154,7 +176,9 @@ function createBaseBridgeComponent({
|
|
|
154
176
|
}
|
|
155
177
|
rootMap.delete(dom);
|
|
156
178
|
}
|
|
157
|
-
(
|
|
179
|
+
(_f = (_e = (_d = instance == null ? void 0 : instance.bridgeHook) == null ? void 0 : _d.lifecycle) == null ? void 0 : _e.afterBridgeDestroy) == null ? void 0 : _f.emit(info, {
|
|
180
|
+
context: operationContext
|
|
181
|
+
});
|
|
158
182
|
}
|
|
159
183
|
};
|
|
160
184
|
};
|
|
@@ -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-CHnL6Q9P.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";
|
|
@@ -57,31 +57,36 @@ const RemoteAppWrapper = forwardRef(function(props, ref) {
|
|
|
57
57
|
providerInfoRef.current = providerReturn;
|
|
58
58
|
setInitialized(true);
|
|
59
59
|
return () => {
|
|
60
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
60
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
61
61
|
if ((_a = providerInfoRef.current) == null ? void 0 : _a.destroy) {
|
|
62
62
|
LoggerInstance.debug(
|
|
63
63
|
`createRemoteAppComponent LazyComponent destroy >>>`,
|
|
64
64
|
{ moduleName, basename, dom: renderDom.current }
|
|
65
65
|
);
|
|
66
|
-
|
|
66
|
+
const destroyInfo = {
|
|
67
67
|
moduleName,
|
|
68
68
|
dom: renderDom.current,
|
|
69
69
|
basename,
|
|
70
70
|
memoryRoute,
|
|
71
71
|
fallback,
|
|
72
72
|
...resProps
|
|
73
|
-
}
|
|
74
|
-
|
|
73
|
+
};
|
|
74
|
+
const operationContext = {
|
|
75
|
+
side: "consumer",
|
|
76
|
+
framework: "react",
|
|
77
|
+
operation: "destroy",
|
|
78
|
+
reason: "unmount"
|
|
79
|
+
};
|
|
80
|
+
(_d = (_c = (_b = instance == null ? void 0 : instance.bridgeHook) == null ? void 0 : _b.lifecycle) == null ? void 0 : _c.beforeBridgeDestroy) == null ? void 0 : _d.emit(
|
|
81
|
+
destroyInfo,
|
|
82
|
+
operationContext
|
|
83
|
+
);
|
|
84
|
+
providerInfoRef.current.destroy({
|
|
75
85
|
moduleName,
|
|
76
86
|
dom: renderDom.current
|
|
77
87
|
});
|
|
78
|
-
(
|
|
79
|
-
|
|
80
|
-
dom: renderDom.current,
|
|
81
|
-
basename,
|
|
82
|
-
memoryRoute,
|
|
83
|
-
fallback,
|
|
84
|
-
...resProps
|
|
88
|
+
(_g = (_f = (_e = instance == null ? void 0 : instance.bridgeHook) == null ? void 0 : _e.lifecycle) == null ? void 0 : _f.afterBridgeDestroy) == null ? void 0 : _g.emit(destroyInfo, {
|
|
89
|
+
context: operationContext
|
|
85
90
|
});
|
|
86
91
|
}
|
|
87
92
|
};
|
|
@@ -98,10 +103,20 @@ const RemoteAppWrapper = forwardRef(function(props, ref) {
|
|
|
98
103
|
...resProps
|
|
99
104
|
};
|
|
100
105
|
renderDom.current = rootRef.current;
|
|
101
|
-
const
|
|
106
|
+
const operationContext = {
|
|
107
|
+
side: "consumer",
|
|
108
|
+
framework: "react",
|
|
109
|
+
operation: "render"
|
|
110
|
+
};
|
|
111
|
+
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(
|
|
112
|
+
renderProps,
|
|
113
|
+
operationContext
|
|
114
|
+
)) || {};
|
|
102
115
|
renderProps = { ...renderProps, ...beforeBridgeRenderRes.extraProps };
|
|
103
116
|
providerInfoRef.current.render(renderProps);
|
|
104
|
-
(_f = (_e = (_d = instance == null ? void 0 : instance.bridgeHook) == null ? void 0 : _d.lifecycle) == null ? void 0 : _e.afterBridgeRender) == null ? void 0 : _f.emit(renderProps
|
|
117
|
+
(_f = (_e = (_d = instance == null ? void 0 : instance.bridgeHook) == null ? void 0 : _d.lifecycle) == null ? void 0 : _e.afterBridgeRender) == null ? void 0 : _f.emit(renderProps, {
|
|
118
|
+
context: operationContext
|
|
119
|
+
});
|
|
105
120
|
}, [initialized, ...Object.values(props)]);
|
|
106
121
|
const rootComponentClassName = `${getRootDomDefaultClassName(moduleName)} ${className || ""}`;
|
|
107
122
|
return /* @__PURE__ */ React__default.createElement("div", { className: rootComponentClassName, style, ref: rootRef }, loading);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const bridgeBase = require("./bridge-base-
|
|
2
|
+
const bridgeBase = require("./bridge-base-DSYKAGGD.js");
|
|
3
3
|
const ReactDOM = require("react-dom");
|
|
4
4
|
const index = require("./index-DbjGCKOr.js");
|
|
5
5
|
const React = require("react");
|
|
@@ -58,31 +58,36 @@ const RemoteAppWrapper = React.forwardRef(function(props, ref) {
|
|
|
58
58
|
providerInfoRef.current = providerReturn;
|
|
59
59
|
setInitialized(true);
|
|
60
60
|
return () => {
|
|
61
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
61
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
62
62
|
if ((_a = providerInfoRef.current) == null ? void 0 : _a.destroy) {
|
|
63
63
|
index.LoggerInstance.debug(
|
|
64
64
|
`createRemoteAppComponent LazyComponent destroy >>>`,
|
|
65
65
|
{ moduleName, basename, dom: renderDom.current }
|
|
66
66
|
);
|
|
67
|
-
|
|
67
|
+
const destroyInfo = {
|
|
68
68
|
moduleName,
|
|
69
69
|
dom: renderDom.current,
|
|
70
70
|
basename,
|
|
71
71
|
memoryRoute,
|
|
72
72
|
fallback,
|
|
73
73
|
...resProps
|
|
74
|
-
}
|
|
75
|
-
|
|
74
|
+
};
|
|
75
|
+
const operationContext = {
|
|
76
|
+
side: "consumer",
|
|
77
|
+
framework: "react",
|
|
78
|
+
operation: "destroy",
|
|
79
|
+
reason: "unmount"
|
|
80
|
+
};
|
|
81
|
+
(_d = (_c = (_b = instance == null ? void 0 : instance.bridgeHook) == null ? void 0 : _b.lifecycle) == null ? void 0 : _c.beforeBridgeDestroy) == null ? void 0 : _d.emit(
|
|
82
|
+
destroyInfo,
|
|
83
|
+
operationContext
|
|
84
|
+
);
|
|
85
|
+
providerInfoRef.current.destroy({
|
|
76
86
|
moduleName,
|
|
77
87
|
dom: renderDom.current
|
|
78
88
|
});
|
|
79
|
-
(
|
|
80
|
-
|
|
81
|
-
dom: renderDom.current,
|
|
82
|
-
basename,
|
|
83
|
-
memoryRoute,
|
|
84
|
-
fallback,
|
|
85
|
-
...resProps
|
|
89
|
+
(_g = (_f = (_e = instance == null ? void 0 : instance.bridgeHook) == null ? void 0 : _e.lifecycle) == null ? void 0 : _f.afterBridgeDestroy) == null ? void 0 : _g.emit(destroyInfo, {
|
|
90
|
+
context: operationContext
|
|
86
91
|
});
|
|
87
92
|
}
|
|
88
93
|
};
|
|
@@ -99,10 +104,20 @@ const RemoteAppWrapper = React.forwardRef(function(props, ref) {
|
|
|
99
104
|
...resProps
|
|
100
105
|
};
|
|
101
106
|
renderDom.current = rootRef.current;
|
|
102
|
-
const
|
|
107
|
+
const operationContext = {
|
|
108
|
+
side: "consumer",
|
|
109
|
+
framework: "react",
|
|
110
|
+
operation: "render"
|
|
111
|
+
};
|
|
112
|
+
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(
|
|
113
|
+
renderProps,
|
|
114
|
+
operationContext
|
|
115
|
+
)) || {};
|
|
103
116
|
renderProps = { ...renderProps, ...beforeBridgeRenderRes.extraProps };
|
|
104
117
|
providerInfoRef.current.render(renderProps);
|
|
105
|
-
(_f = (_e = (_d = instance == null ? void 0 : instance.bridgeHook) == null ? void 0 : _d.lifecycle) == null ? void 0 : _e.afterBridgeRender) == null ? void 0 : _f.emit(renderProps
|
|
118
|
+
(_f = (_e = (_d = instance == null ? void 0 : instance.bridgeHook) == null ? void 0 : _d.lifecycle) == null ? void 0 : _e.afterBridgeRender) == null ? void 0 : _f.emit(renderProps, {
|
|
119
|
+
context: operationContext
|
|
120
|
+
});
|
|
106
121
|
}, [initialized, ...Object.values(props)]);
|
|
107
122
|
const rootComponentClassName = `${index.getRootDomDefaultClassName(moduleName)} ${className || ""}`;
|
|
108
123
|
return /* @__PURE__ */ React.createElement("div", { className: rootComponentClassName, style, ref: rootRef }, loading);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const lazyUtils = require("./utils-5dGErM3C.js");
|
|
4
|
-
const prefetch = require("./prefetch-
|
|
4
|
+
const prefetch = require("./prefetch-Bxf6DSx_.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 { y as DATA_FETCH_FUNCTION } from "./utils-BBP3hEeV.mjs";
|
|
2
2
|
import { C, a, c, b, d, g, r } from "./utils-BBP3hEeV.mjs";
|
|
3
|
-
import { d as dataFetchFunction } from "./prefetch-
|
|
4
|
-
import { i, p } from "./prefetch-
|
|
3
|
+
import { d as dataFetchFunction } from "./prefetch-TKq_EK_q.mjs";
|
|
4
|
+
import { i, p } from "./prefetch-TKq_EK_q.mjs";
|
|
5
5
|
async function callDataFetch() {
|
|
6
6
|
const dataFetch = globalThis[DATA_FETCH_FUNCTION];
|
|
7
7
|
if (dataFetch) {
|
package/dist/data-fetch.cjs.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const lazyLoadComponentPlugin = require("./lazy-load-component-plugin-
|
|
3
|
+
const lazyLoadComponentPlugin = require("./lazy-load-component-plugin-DSURjnZ0.js");
|
|
4
4
|
const lazyUtils = require("./utils-5dGErM3C.js");
|
|
5
5
|
const dataFetchUtils = require("./data-fetch-utils.cjs.js");
|
|
6
|
-
const prefetch = require("./prefetch-
|
|
6
|
+
const prefetch = require("./prefetch-Bxf6DSx_.js");
|
|
7
7
|
exports.autoFetchDataPlugin = lazyLoadComponentPlugin.autoFetchData;
|
|
8
8
|
exports.collectSSRAssets = lazyLoadComponentPlugin.collectSSRAssets;
|
|
9
9
|
exports.createLazyComponent = lazyLoadComponentPlugin.createLazyComponent;
|
package/dist/data-fetch.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a, c, b, l } from "./lazy-load-component-plugin-
|
|
1
|
+
import { a, c, b, l } from "./lazy-load-component-plugin-NZphPG7_.mjs";
|
|
2
2
|
import { C, a as a2, E, c as c2, b as b2, d, f, g, r, s } from "./utils-BBP3hEeV.mjs";
|
|
3
3
|
import { callDataFetch } from "./data-fetch-utils.es.js";
|
|
4
|
-
import { p } from "./prefetch-
|
|
4
|
+
import { p } from "./prefetch-TKq_EK_q.mjs";
|
|
5
5
|
export {
|
|
6
6
|
C as CacheSize,
|
|
7
7
|
a2 as CacheTime,
|
package/dist/index.cjs.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const createHelpers = require("./createHelpers-
|
|
4
|
-
const lazyLoadComponentPlugin = require("./lazy-load-component-plugin-
|
|
3
|
+
const createHelpers = require("./createHelpers-D6thyyLv.js");
|
|
4
|
+
const lazyLoadComponentPlugin = require("./lazy-load-component-plugin-DSURjnZ0.js");
|
|
5
5
|
const lazyUtils = require("./utils-5dGErM3C.js");
|
|
6
6
|
const dataFetchUtils = require("./data-fetch-utils.cjs.js");
|
|
7
7
|
const React = require("react");
|
|
8
8
|
const ReactRouterDOM = require("react-router-dom");
|
|
9
9
|
const index = require("./index-DbjGCKOr.js");
|
|
10
|
-
const
|
|
10
|
+
const plugin = require("./plugin.cjs.js");
|
|
11
|
+
const prefetch = require("./prefetch-Bxf6DSx_.js");
|
|
11
12
|
function _interopNamespaceDefault(e2) {
|
|
12
13
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
13
14
|
if (e2) {
|
|
@@ -81,6 +82,7 @@ function withRouterData(WrappedComponent) {
|
|
|
81
82
|
const location = ReactRouterDOM__namespace.useLocation();
|
|
82
83
|
const [pathname, setPathname] = React.useState(location.pathname);
|
|
83
84
|
React.useEffect(() => {
|
|
85
|
+
var _a2;
|
|
84
86
|
if (pathname !== "" && pathname !== location.pathname) {
|
|
85
87
|
index.LoggerInstance.debug(
|
|
86
88
|
`createRemoteAppComponent dispatchPopstateEnv >>>`,
|
|
@@ -89,7 +91,26 @@ function withRouterData(WrappedComponent) {
|
|
|
89
91
|
pathname: location.pathname
|
|
90
92
|
}
|
|
91
93
|
);
|
|
94
|
+
const route = {
|
|
95
|
+
action: "host-to-remote",
|
|
96
|
+
mechanism: "popstate",
|
|
97
|
+
from: pathname,
|
|
98
|
+
to: location.pathname,
|
|
99
|
+
basename
|
|
100
|
+
};
|
|
101
|
+
const operationContext = {
|
|
102
|
+
side: "consumer",
|
|
103
|
+
framework: "react",
|
|
104
|
+
operation: "route-sync",
|
|
105
|
+
moduleName: props.moduleName,
|
|
106
|
+
route
|
|
107
|
+
};
|
|
92
108
|
e();
|
|
109
|
+
(_a2 = plugin.federationRuntime.instance) == null ? void 0 : _a2.bridgeHook.lifecycle.afterBridgeRouteSync.emit(
|
|
110
|
+
{
|
|
111
|
+
context: operationContext
|
|
112
|
+
}
|
|
113
|
+
);
|
|
93
114
|
}
|
|
94
115
|
setPathname(location.pathname);
|
|
95
116
|
}, [location]);
|
package/dist/index.es.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { R as RemoteAppWrapper, c as createRemoteAppComponentFactory, a as createDeprecatedRemoteComponentFactory } from "./createHelpers-
|
|
2
|
-
import { b } from "./createHelpers-
|
|
3
|
-
import { a, c, b as b2, l } from "./lazy-load-component-plugin-
|
|
1
|
+
import { R as RemoteAppWrapper, c as createRemoteAppComponentFactory, a as createDeprecatedRemoteComponentFactory } from "./createHelpers-D3Sg5lKp.mjs";
|
|
2
|
+
import { b } from "./createHelpers-D3Sg5lKp.mjs";
|
|
3
|
+
import { a, c, b as b2, l } from "./lazy-load-component-plugin-NZphPG7_.mjs";
|
|
4
4
|
import { C, a as a2, E, c as c2, b as b3, d, g, r, s } from "./utils-BBP3hEeV.mjs";
|
|
5
5
|
import { callDataFetch } from "./data-fetch-utils.es.js";
|
|
6
6
|
import React__default, { forwardRef, useContext, useState, useEffect } from "react";
|
|
7
7
|
import * as ReactRouterDOM from "react-router-dom";
|
|
8
8
|
import { p as pathJoin, L as LoggerInstance } from "./index-Bs2NxD2z.mjs";
|
|
9
|
-
import {
|
|
9
|
+
import { federationRuntime } from "./plugin.es.js";
|
|
10
|
+
import { p } from "./prefetch-TKq_EK_q.mjs";
|
|
10
11
|
function e() {
|
|
11
12
|
const t = new PopStateEvent("popstate", { state: window.history.state });
|
|
12
13
|
window.dispatchEvent(t);
|
|
@@ -63,6 +64,7 @@ function withRouterData(WrappedComponent) {
|
|
|
63
64
|
const location = ReactRouterDOM.useLocation();
|
|
64
65
|
const [pathname, setPathname] = useState(location.pathname);
|
|
65
66
|
useEffect(() => {
|
|
67
|
+
var _a2;
|
|
66
68
|
if (pathname !== "" && pathname !== location.pathname) {
|
|
67
69
|
LoggerInstance.debug(
|
|
68
70
|
`createRemoteAppComponent dispatchPopstateEnv >>>`,
|
|
@@ -71,7 +73,26 @@ function withRouterData(WrappedComponent) {
|
|
|
71
73
|
pathname: location.pathname
|
|
72
74
|
}
|
|
73
75
|
);
|
|
76
|
+
const route = {
|
|
77
|
+
action: "host-to-remote",
|
|
78
|
+
mechanism: "popstate",
|
|
79
|
+
from: pathname,
|
|
80
|
+
to: location.pathname,
|
|
81
|
+
basename
|
|
82
|
+
};
|
|
83
|
+
const operationContext = {
|
|
84
|
+
side: "consumer",
|
|
85
|
+
framework: "react",
|
|
86
|
+
operation: "route-sync",
|
|
87
|
+
moduleName: props.moduleName,
|
|
88
|
+
route
|
|
89
|
+
};
|
|
74
90
|
e();
|
|
91
|
+
(_a2 = federationRuntime.instance) == null ? void 0 : _a2.bridgeHook.lifecycle.afterBridgeRouteSync.emit(
|
|
92
|
+
{
|
|
93
|
+
context: operationContext
|
|
94
|
+
}
|
|
95
|
+
);
|
|
75
96
|
}
|
|
76
97
|
setPathname(location.pathname);
|
|
77
98
|
}, [location]);
|
package/dist/{lazy-load-component-plugin-DQFjLSsW.mjs → lazy-load-component-plugin-NZphPG7_.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-TKq_EK_q.mjs";
|
|
2
2
|
import { i as initDataFetchMap, k as isDataLoaderExpose, m as getDataFetchInfo, n as getDataFetchMapKey, l as logger, o as getDataFetchItem, p as DATA_FETCH_CLIENT_SUFFIX, q as MF_DATA_FETCH_TYPE, t as isCSROnly, M as MF_DATA_FETCH_STATUS, j as loadDataFetchModule, e as getDataFetchMap, u as isServerEnv, v as getDataFetchIdWithErrorMsgs, w as DATA_FETCH_ERROR_PREFIX, E as ERROR_TYPE, x as wrapDataFetchId, L as LOAD_REMOTE_ERROR_PREFIX, y as DATA_FETCH_FUNCTION, z as getLoadedRemoteInfos, h as fetchData$1, A as setDataFetchItemLoadedStatus, F as FS_HREF } from "./utils-BBP3hEeV.mjs";
|
|
3
3
|
import React__default, { useRef, useState, useEffect, Suspense } 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-DSURjnZ0.js");
|
|
4
|
+
require("./prefetch-Bxf6DSx_.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-NZphPG7_.mjs";
|
|
2
|
+
import "./prefetch-TKq_EK_q.mjs";
|
|
3
3
|
export {
|
|
4
4
|
l as default,
|
|
5
5
|
l2 as lazyLoadComponentPlugin
|
|
@@ -492,6 +492,7 @@ const processModuleAlias = (name, subPath) => {
|
|
|
492
492
|
moduleName = moduleName + subPath;
|
|
493
493
|
return moduleName;
|
|
494
494
|
};
|
|
495
|
+
const MAX_PRELOADED_ASSETS = 2e3;
|
|
495
496
|
const CurrentGlobal = typeof globalThis === "object" ? globalThis : window;
|
|
496
497
|
const nativeGlobal = (() => {
|
|
497
498
|
try {
|
|
@@ -513,7 +514,7 @@ function includeOwnProperty(target, key) {
|
|
|
513
514
|
if (!includeOwnProperty(CurrentGlobal, "__GLOBAL_LOADING_REMOTE_ENTRY__")) definePropertyGlobalVal(CurrentGlobal, "__GLOBAL_LOADING_REMOTE_ENTRY__", {});
|
|
514
515
|
const globalLoading = CurrentGlobal.__GLOBAL_LOADING_REMOTE_ENTRY__;
|
|
515
516
|
function setGlobalDefaultVal(target) {
|
|
516
|
-
var _a, _b, _c, _d, _e, _f;
|
|
517
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
517
518
|
if (includeOwnProperty(target, "__VMOK__") && !includeOwnProperty(target, "__FEDERATION__")) definePropertyGlobalVal(target, "__FEDERATION__", target.__VMOK__);
|
|
518
519
|
if (!includeOwnProperty(target, "__FEDERATION__")) {
|
|
519
520
|
definePropertyGlobalVal(target, "__FEDERATION__", {
|
|
@@ -522,7 +523,8 @@ function setGlobalDefaultVal(target) {
|
|
|
522
523
|
moduleInfo: {},
|
|
523
524
|
__SHARE__: {},
|
|
524
525
|
__MANIFEST_LOADING__: {},
|
|
525
|
-
__PRELOADED_MAP__: /* @__PURE__ */ new Map()
|
|
526
|
+
__PRELOADED_MAP__: /* @__PURE__ */ new Map(),
|
|
527
|
+
__PRELOADED_ASSETS__: /* @__PURE__ */ new Set()
|
|
526
528
|
});
|
|
527
529
|
definePropertyGlobalVal(target, "__VMOK__", target.__FEDERATION__);
|
|
528
530
|
}
|
|
@@ -532,6 +534,7 @@ function setGlobalDefaultVal(target) {
|
|
|
532
534
|
(_d = target.__FEDERATION__).__SHARE__ ?? (_d.__SHARE__ = {});
|
|
533
535
|
(_e = target.__FEDERATION__).__MANIFEST_LOADING__ ?? (_e.__MANIFEST_LOADING__ = {});
|
|
534
536
|
(_f = target.__FEDERATION__).__PRELOADED_MAP__ ?? (_f.__PRELOADED_MAP__ = /* @__PURE__ */ new Map());
|
|
537
|
+
(_g = target.__FEDERATION__).__PRELOADED_ASSETS__ ?? (_g.__PRELOADED_ASSETS__ = /* @__PURE__ */ new Set());
|
|
535
538
|
}
|
|
536
539
|
setGlobalDefaultVal(CurrentGlobal);
|
|
537
540
|
setGlobalDefaultVal(nativeGlobal);
|
|
@@ -542,6 +545,15 @@ const getRemoteEntryExports = (name, globalName) => {
|
|
|
542
545
|
entryExports: CurrentGlobal[remoteEntryKey]
|
|
543
546
|
};
|
|
544
547
|
};
|
|
548
|
+
const getPreloadedAsset = (url) => CurrentGlobal.__FEDERATION__.__PRELOADED_ASSETS__.has(url);
|
|
549
|
+
const setPreloadedAsset = (url) => {
|
|
550
|
+
const preloadedAssets = CurrentGlobal.__FEDERATION__.__PRELOADED_ASSETS__;
|
|
551
|
+
preloadedAssets.add(url);
|
|
552
|
+
if (preloadedAssets.size > MAX_PRELOADED_ASSETS) {
|
|
553
|
+
const oldestUrl = preloadedAssets.values().next().value;
|
|
554
|
+
if (oldestUrl !== void 0) preloadedAssets.delete(oldestUrl);
|
|
555
|
+
}
|
|
556
|
+
};
|
|
545
557
|
const DEFAULT_SCOPE = "default";
|
|
546
558
|
const DEFAULT_REMOTE_TYPE = "global";
|
|
547
559
|
function composeRemoteRequestId(remoteName, expose) {
|
|
@@ -622,6 +634,7 @@ const runtimeDescMap = {
|
|
|
622
634
|
...runtimeDescMap
|
|
623
635
|
});
|
|
624
636
|
const importCallback = ".then(callbacks[0]).catch(callbacks[1])";
|
|
637
|
+
const remoteEntryLoadingOrigins = /* @__PURE__ */ new WeakMap();
|
|
625
638
|
const esmRemoteEntryLoadErrorMessages = [
|
|
626
639
|
"Failed to fetch dynamically imported module",
|
|
627
640
|
"Importing a module script failed",
|
|
@@ -773,15 +786,25 @@ function getRemoteEntryUniqueKey(remoteInfo) {
|
|
|
773
786
|
async function getRemoteEntry(params) {
|
|
774
787
|
const { origin, remoteEntryExports, remoteInfo, getEntryUrl, resourceContext, _inErrorHandling = false } = params;
|
|
775
788
|
const uniqueKey = getRemoteEntryUniqueKey(remoteInfo);
|
|
776
|
-
if (remoteEntryExports)
|
|
789
|
+
if (remoteEntryExports) {
|
|
790
|
+
await origin.loaderHook.lifecycle.afterLoadEntry.emit({
|
|
791
|
+
origin,
|
|
792
|
+
remoteInfo,
|
|
793
|
+
remoteEntryExports,
|
|
794
|
+
resourceContext,
|
|
795
|
+
cached: true
|
|
796
|
+
});
|
|
797
|
+
return remoteEntryExports;
|
|
798
|
+
}
|
|
777
799
|
if (!globalLoading[uniqueKey]) {
|
|
778
800
|
const loadEntryHook = origin.remoteHandler.hooks.lifecycle.loadEntry;
|
|
779
801
|
const loaderHook = origin.loaderHook;
|
|
780
|
-
|
|
802
|
+
const loading = loadEntryHook.emit({
|
|
781
803
|
origin,
|
|
782
804
|
loaderHook,
|
|
783
805
|
remoteInfo,
|
|
784
|
-
remoteEntryExports
|
|
806
|
+
remoteEntryExports,
|
|
807
|
+
resourceContext
|
|
785
808
|
}).then((res) => {
|
|
786
809
|
if (res) return res;
|
|
787
810
|
return (typeof ENV_TARGET !== "undefined" ? ENV_TARGET === "web" : logger.isBrowserEnvValue) ? loadEntryDom({
|
|
@@ -799,46 +822,73 @@ async function getRemoteEntry(params) {
|
|
|
799
822
|
await origin.loaderHook.lifecycle.afterLoadEntry.emit({
|
|
800
823
|
origin,
|
|
801
824
|
remoteInfo,
|
|
802
|
-
remoteEntryExports: res
|
|
825
|
+
remoteEntryExports: res,
|
|
826
|
+
resourceContext
|
|
803
827
|
});
|
|
804
828
|
return res;
|
|
805
|
-
}).catch(async (
|
|
806
|
-
const
|
|
807
|
-
|
|
808
|
-
if (err instanceof Error && err.message.includes(RUNTIME_008) && !isScriptExecutionError && !_inErrorHandling) {
|
|
829
|
+
}).catch(async (loadError) => {
|
|
830
|
+
const isScriptExecutionError = loadError instanceof Error && loadError.message.includes("ScriptExecutionError");
|
|
831
|
+
if (loadError instanceof Error && loadError.message.includes(RUNTIME_008) && !isScriptExecutionError && !_inErrorHandling) {
|
|
809
832
|
const wrappedGetRemoteEntry = (params2) => {
|
|
810
833
|
return getRemoteEntry({
|
|
811
834
|
...params2,
|
|
812
835
|
_inErrorHandling: true
|
|
813
836
|
});
|
|
814
837
|
};
|
|
815
|
-
const
|
|
838
|
+
const recoveredRemoteEntryExports = await origin.loaderHook.lifecycle.loadEntryError.emit({
|
|
816
839
|
getRemoteEntry: wrappedGetRemoteEntry,
|
|
817
840
|
origin,
|
|
818
841
|
remoteInfo,
|
|
819
842
|
remoteEntryExports,
|
|
820
843
|
globalLoading,
|
|
821
|
-
uniqueKey
|
|
844
|
+
uniqueKey
|
|
822
845
|
});
|
|
823
|
-
if (
|
|
846
|
+
if (recoveredRemoteEntryExports) {
|
|
824
847
|
await origin.loaderHook.lifecycle.afterLoadEntry.emit({
|
|
825
848
|
origin,
|
|
826
849
|
remoteInfo,
|
|
827
|
-
remoteEntryExports:
|
|
850
|
+
remoteEntryExports: recoveredRemoteEntryExports,
|
|
851
|
+
resourceContext,
|
|
852
|
+
error: loadError,
|
|
828
853
|
recovered: true
|
|
829
854
|
});
|
|
830
|
-
return
|
|
855
|
+
return recoveredRemoteEntryExports;
|
|
831
856
|
}
|
|
832
857
|
}
|
|
833
858
|
await origin.loaderHook.lifecycle.afterLoadEntry.emit({
|
|
834
859
|
origin,
|
|
835
860
|
remoteInfo,
|
|
836
|
-
|
|
861
|
+
resourceContext,
|
|
862
|
+
error: loadError
|
|
837
863
|
});
|
|
838
|
-
throw
|
|
864
|
+
throw loadError;
|
|
839
865
|
});
|
|
866
|
+
globalLoading[uniqueKey] = loading;
|
|
867
|
+
loading.then(void 0, () => {
|
|
868
|
+
if (globalLoading[uniqueKey] === loading) delete globalLoading[uniqueKey];
|
|
869
|
+
});
|
|
870
|
+
remoteEntryLoadingOrigins.set(loading, origin);
|
|
871
|
+
}
|
|
872
|
+
const remoteEntryLoading = globalLoading[uniqueKey];
|
|
873
|
+
if (remoteEntryLoadingOrigins.get(remoteEntryLoading) !== origin) try {
|
|
874
|
+
const result = await remoteEntryLoading;
|
|
875
|
+
await origin.loaderHook.lifecycle.afterLoadEntry.emit({
|
|
876
|
+
origin,
|
|
877
|
+
remoteInfo,
|
|
878
|
+
remoteEntryExports: result,
|
|
879
|
+
resourceContext
|
|
880
|
+
});
|
|
881
|
+
return result;
|
|
882
|
+
} catch (loadError) {
|
|
883
|
+
await origin.loaderHook.lifecycle.afterLoadEntry.emit({
|
|
884
|
+
origin,
|
|
885
|
+
remoteInfo,
|
|
886
|
+
resourceContext,
|
|
887
|
+
error: loadError
|
|
888
|
+
});
|
|
889
|
+
throw loadError;
|
|
840
890
|
}
|
|
841
|
-
return
|
|
891
|
+
return remoteEntryLoading;
|
|
842
892
|
}
|
|
843
893
|
function getRemoteInfo(remote) {
|
|
844
894
|
return {
|
|
@@ -899,6 +949,12 @@ function createAssetResult(context, url, status, error2) {
|
|
|
899
949
|
error: error2
|
|
900
950
|
};
|
|
901
951
|
}
|
|
952
|
+
function preloadAssetOnce(context, url, recordPreloadedAssets, preload) {
|
|
953
|
+
if (!recordPreloadedAssets) return preload();
|
|
954
|
+
if (getPreloadedAsset(url)) return Promise.resolve(createAssetResult(context, url, "cached"));
|
|
955
|
+
setPreloadedAsset(url);
|
|
956
|
+
return preload();
|
|
957
|
+
}
|
|
902
958
|
async function waitForRemoteEntryPreload(host, remoteInfo, entryRemoteInfo, context) {
|
|
903
959
|
const cachedRemote = host.moduleCache.get(entryRemoteInfo.name);
|
|
904
960
|
const url = entryRemoteInfo.entry;
|
|
@@ -985,7 +1041,7 @@ function createResourceContext(baseContext, resourceType) {
|
|
|
985
1041
|
function preloadAssets(remoteInfo, host, assets, useLinkPreload = true, baseContext = {
|
|
986
1042
|
initiator: "preloadRemote",
|
|
987
1043
|
id: remoteInfo.name
|
|
988
|
-
}) {
|
|
1044
|
+
}, recordPreloadedAssets = true) {
|
|
989
1045
|
const { cssAssets, jsAssetsWithoutEntry, entryAssets } = assets;
|
|
990
1046
|
const results = [];
|
|
991
1047
|
if (host.options.inBrowser) {
|
|
@@ -999,13 +1055,14 @@ function preloadAssets(remoteInfo, host, assets, useLinkPreload = true, baseCont
|
|
|
999
1055
|
as: "style"
|
|
1000
1056
|
};
|
|
1001
1057
|
cssAssets.forEach((cssUrl) => {
|
|
1002
|
-
|
|
1058
|
+
const context = createResourceContext(baseContext, "css");
|
|
1059
|
+
results.push(preloadAssetOnce(context, cssUrl, recordPreloadedAssets, () => waitForLinkPreload({
|
|
1003
1060
|
host,
|
|
1004
1061
|
remoteInfo,
|
|
1005
1062
|
url: cssUrl,
|
|
1006
1063
|
attrs: defaultAttrs2,
|
|
1007
|
-
context
|
|
1008
|
-
}));
|
|
1064
|
+
context
|
|
1065
|
+
})));
|
|
1009
1066
|
});
|
|
1010
1067
|
} else {
|
|
1011
1068
|
const defaultAttrs2 = {
|
|
@@ -1013,14 +1070,15 @@ function preloadAssets(remoteInfo, host, assets, useLinkPreload = true, baseCont
|
|
|
1013
1070
|
type: "text/css"
|
|
1014
1071
|
};
|
|
1015
1072
|
cssAssets.forEach((cssUrl) => {
|
|
1016
|
-
|
|
1073
|
+
const context = createResourceContext(baseContext, "css");
|
|
1074
|
+
results.push(preloadAssetOnce(context, cssUrl, recordPreloadedAssets, () => waitForLinkPreload({
|
|
1017
1075
|
host,
|
|
1018
1076
|
remoteInfo,
|
|
1019
1077
|
url: cssUrl,
|
|
1020
1078
|
attrs: defaultAttrs2,
|
|
1021
1079
|
needDeleteLink: false,
|
|
1022
|
-
context
|
|
1023
|
-
}));
|
|
1080
|
+
context
|
|
1081
|
+
})));
|
|
1024
1082
|
});
|
|
1025
1083
|
}
|
|
1026
1084
|
let preloadJsAsset = waitForScriptPreload;
|
|
@@ -1042,13 +1100,14 @@ function preloadAssets(remoteInfo, host, assets, useLinkPreload = true, baseCont
|
|
|
1042
1100
|
};
|
|
1043
1101
|
}
|
|
1044
1102
|
jsAssetsWithoutEntry.forEach((jsUrl) => {
|
|
1045
|
-
|
|
1103
|
+
const context = createResourceContext(baseContext, "js");
|
|
1104
|
+
results.push(preloadAssetOnce(context, jsUrl, recordPreloadedAssets, () => preloadJsAsset({
|
|
1046
1105
|
host,
|
|
1047
1106
|
remoteInfo,
|
|
1048
1107
|
url: jsUrl,
|
|
1049
1108
|
attrs: defaultAttrs,
|
|
1050
|
-
context
|
|
1051
|
-
}));
|
|
1109
|
+
context
|
|
1110
|
+
})));
|
|
1052
1111
|
});
|
|
1053
1112
|
}
|
|
1054
1113
|
return Promise.all(results);
|
|
@@ -1094,25 +1153,27 @@ var Module$1 = class {
|
|
|
1094
1153
|
this.remoteInfo = remoteInfo;
|
|
1095
1154
|
this.host = host;
|
|
1096
1155
|
}
|
|
1097
|
-
async getEntry(expose) {
|
|
1098
|
-
|
|
1156
|
+
async getEntry(expose, resourceContext) {
|
|
1157
|
+
const effectiveResourceContext = resourceContext || {
|
|
1158
|
+
initiator: "loadRemote",
|
|
1159
|
+
id: composeRemoteRequestId(this.remoteInfo.name, expose),
|
|
1160
|
+
resourceType: "remoteEntry",
|
|
1161
|
+
url: this.remoteInfo.entry,
|
|
1162
|
+
expose
|
|
1163
|
+
};
|
|
1099
1164
|
const remoteEntryExports = await getRemoteEntry({
|
|
1100
1165
|
origin: this.host,
|
|
1101
1166
|
remoteInfo: this.remoteInfo,
|
|
1102
1167
|
remoteEntryExports: this.remoteEntryExports,
|
|
1103
|
-
resourceContext:
|
|
1104
|
-
initiator: "loadRemote",
|
|
1105
|
-
id: composeRemoteRequestId(this.remoteInfo.name, expose),
|
|
1106
|
-
resourceType: "remoteEntry"
|
|
1107
|
-
}
|
|
1168
|
+
resourceContext: effectiveResourceContext
|
|
1108
1169
|
});
|
|
1109
1170
|
assert(remoteEntryExports, `remoteEntryExports is undefined
|
|
1110
1171
|
${lazyUtils.safeToString(this.remoteInfo)}`);
|
|
1111
1172
|
this.remoteEntryExports = remoteEntryExports;
|
|
1112
1173
|
return this.remoteEntryExports;
|
|
1113
1174
|
}
|
|
1114
|
-
async init(id, remoteSnapshot, rawInitScope, expose) {
|
|
1115
|
-
const remoteEntryExports = await this.getEntry(expose);
|
|
1175
|
+
async init(id, remoteSnapshot, rawInitScope, expose, resourceContext) {
|
|
1176
|
+
const remoteEntryExports = await this.getEntry(expose, resourceContext);
|
|
1116
1177
|
if (this.inited) {
|
|
1117
1178
|
await this.host.loaderHook.lifecycle.afterInitRemote.emit({
|
|
1118
1179
|
id,
|
|
@@ -491,6 +491,7 @@ const processModuleAlias = (name, subPath) => {
|
|
|
491
491
|
moduleName = moduleName + subPath;
|
|
492
492
|
return moduleName;
|
|
493
493
|
};
|
|
494
|
+
const MAX_PRELOADED_ASSETS = 2e3;
|
|
494
495
|
const CurrentGlobal = typeof globalThis === "object" ? globalThis : window;
|
|
495
496
|
const nativeGlobal = (() => {
|
|
496
497
|
try {
|
|
@@ -512,7 +513,7 @@ function includeOwnProperty(target, key) {
|
|
|
512
513
|
if (!includeOwnProperty(CurrentGlobal, "__GLOBAL_LOADING_REMOTE_ENTRY__")) definePropertyGlobalVal(CurrentGlobal, "__GLOBAL_LOADING_REMOTE_ENTRY__", {});
|
|
513
514
|
const globalLoading = CurrentGlobal.__GLOBAL_LOADING_REMOTE_ENTRY__;
|
|
514
515
|
function setGlobalDefaultVal(target) {
|
|
515
|
-
var _a, _b, _c, _d, _e, _f;
|
|
516
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
516
517
|
if (includeOwnProperty(target, "__VMOK__") && !includeOwnProperty(target, "__FEDERATION__")) definePropertyGlobalVal(target, "__FEDERATION__", target.__VMOK__);
|
|
517
518
|
if (!includeOwnProperty(target, "__FEDERATION__")) {
|
|
518
519
|
definePropertyGlobalVal(target, "__FEDERATION__", {
|
|
@@ -521,7 +522,8 @@ function setGlobalDefaultVal(target) {
|
|
|
521
522
|
moduleInfo: {},
|
|
522
523
|
__SHARE__: {},
|
|
523
524
|
__MANIFEST_LOADING__: {},
|
|
524
|
-
__PRELOADED_MAP__: /* @__PURE__ */ new Map()
|
|
525
|
+
__PRELOADED_MAP__: /* @__PURE__ */ new Map(),
|
|
526
|
+
__PRELOADED_ASSETS__: /* @__PURE__ */ new Set()
|
|
525
527
|
});
|
|
526
528
|
definePropertyGlobalVal(target, "__VMOK__", target.__FEDERATION__);
|
|
527
529
|
}
|
|
@@ -531,6 +533,7 @@ function setGlobalDefaultVal(target) {
|
|
|
531
533
|
(_d = target.__FEDERATION__).__SHARE__ ?? (_d.__SHARE__ = {});
|
|
532
534
|
(_e = target.__FEDERATION__).__MANIFEST_LOADING__ ?? (_e.__MANIFEST_LOADING__ = {});
|
|
533
535
|
(_f = target.__FEDERATION__).__PRELOADED_MAP__ ?? (_f.__PRELOADED_MAP__ = /* @__PURE__ */ new Map());
|
|
536
|
+
(_g = target.__FEDERATION__).__PRELOADED_ASSETS__ ?? (_g.__PRELOADED_ASSETS__ = /* @__PURE__ */ new Set());
|
|
534
537
|
}
|
|
535
538
|
setGlobalDefaultVal(CurrentGlobal);
|
|
536
539
|
setGlobalDefaultVal(nativeGlobal);
|
|
@@ -541,6 +544,15 @@ const getRemoteEntryExports = (name, globalName) => {
|
|
|
541
544
|
entryExports: CurrentGlobal[remoteEntryKey]
|
|
542
545
|
};
|
|
543
546
|
};
|
|
547
|
+
const getPreloadedAsset = (url) => CurrentGlobal.__FEDERATION__.__PRELOADED_ASSETS__.has(url);
|
|
548
|
+
const setPreloadedAsset = (url) => {
|
|
549
|
+
const preloadedAssets = CurrentGlobal.__FEDERATION__.__PRELOADED_ASSETS__;
|
|
550
|
+
preloadedAssets.add(url);
|
|
551
|
+
if (preloadedAssets.size > MAX_PRELOADED_ASSETS) {
|
|
552
|
+
const oldestUrl = preloadedAssets.values().next().value;
|
|
553
|
+
if (oldestUrl !== void 0) preloadedAssets.delete(oldestUrl);
|
|
554
|
+
}
|
|
555
|
+
};
|
|
544
556
|
const DEFAULT_SCOPE = "default";
|
|
545
557
|
const DEFAULT_REMOTE_TYPE = "global";
|
|
546
558
|
function composeRemoteRequestId(remoteName, expose) {
|
|
@@ -621,6 +633,7 @@ const runtimeDescMap = {
|
|
|
621
633
|
...runtimeDescMap
|
|
622
634
|
});
|
|
623
635
|
const importCallback = ".then(callbacks[0]).catch(callbacks[1])";
|
|
636
|
+
const remoteEntryLoadingOrigins = /* @__PURE__ */ new WeakMap();
|
|
624
637
|
const esmRemoteEntryLoadErrorMessages = [
|
|
625
638
|
"Failed to fetch dynamically imported module",
|
|
626
639
|
"Importing a module script failed",
|
|
@@ -772,15 +785,25 @@ function getRemoteEntryUniqueKey(remoteInfo) {
|
|
|
772
785
|
async function getRemoteEntry(params) {
|
|
773
786
|
const { origin, remoteEntryExports, remoteInfo, getEntryUrl, resourceContext, _inErrorHandling = false } = params;
|
|
774
787
|
const uniqueKey = getRemoteEntryUniqueKey(remoteInfo);
|
|
775
|
-
if (remoteEntryExports)
|
|
788
|
+
if (remoteEntryExports) {
|
|
789
|
+
await origin.loaderHook.lifecycle.afterLoadEntry.emit({
|
|
790
|
+
origin,
|
|
791
|
+
remoteInfo,
|
|
792
|
+
remoteEntryExports,
|
|
793
|
+
resourceContext,
|
|
794
|
+
cached: true
|
|
795
|
+
});
|
|
796
|
+
return remoteEntryExports;
|
|
797
|
+
}
|
|
776
798
|
if (!globalLoading[uniqueKey]) {
|
|
777
799
|
const loadEntryHook = origin.remoteHandler.hooks.lifecycle.loadEntry;
|
|
778
800
|
const loaderHook = origin.loaderHook;
|
|
779
|
-
|
|
801
|
+
const loading = loadEntryHook.emit({
|
|
780
802
|
origin,
|
|
781
803
|
loaderHook,
|
|
782
804
|
remoteInfo,
|
|
783
|
-
remoteEntryExports
|
|
805
|
+
remoteEntryExports,
|
|
806
|
+
resourceContext
|
|
784
807
|
}).then((res) => {
|
|
785
808
|
if (res) return res;
|
|
786
809
|
return (typeof ENV_TARGET !== "undefined" ? ENV_TARGET === "web" : isBrowserEnvValue) ? loadEntryDom({
|
|
@@ -798,46 +821,73 @@ async function getRemoteEntry(params) {
|
|
|
798
821
|
await origin.loaderHook.lifecycle.afterLoadEntry.emit({
|
|
799
822
|
origin,
|
|
800
823
|
remoteInfo,
|
|
801
|
-
remoteEntryExports: res
|
|
824
|
+
remoteEntryExports: res,
|
|
825
|
+
resourceContext
|
|
802
826
|
});
|
|
803
827
|
return res;
|
|
804
|
-
}).catch(async (
|
|
805
|
-
const
|
|
806
|
-
|
|
807
|
-
if (err instanceof Error && err.message.includes(RUNTIME_008) && !isScriptExecutionError && !_inErrorHandling) {
|
|
828
|
+
}).catch(async (loadError) => {
|
|
829
|
+
const isScriptExecutionError = loadError instanceof Error && loadError.message.includes("ScriptExecutionError");
|
|
830
|
+
if (loadError instanceof Error && loadError.message.includes(RUNTIME_008) && !isScriptExecutionError && !_inErrorHandling) {
|
|
808
831
|
const wrappedGetRemoteEntry = (params2) => {
|
|
809
832
|
return getRemoteEntry({
|
|
810
833
|
...params2,
|
|
811
834
|
_inErrorHandling: true
|
|
812
835
|
});
|
|
813
836
|
};
|
|
814
|
-
const
|
|
837
|
+
const recoveredRemoteEntryExports = await origin.loaderHook.lifecycle.loadEntryError.emit({
|
|
815
838
|
getRemoteEntry: wrappedGetRemoteEntry,
|
|
816
839
|
origin,
|
|
817
840
|
remoteInfo,
|
|
818
841
|
remoteEntryExports,
|
|
819
842
|
globalLoading,
|
|
820
|
-
uniqueKey
|
|
843
|
+
uniqueKey
|
|
821
844
|
});
|
|
822
|
-
if (
|
|
845
|
+
if (recoveredRemoteEntryExports) {
|
|
823
846
|
await origin.loaderHook.lifecycle.afterLoadEntry.emit({
|
|
824
847
|
origin,
|
|
825
848
|
remoteInfo,
|
|
826
|
-
remoteEntryExports:
|
|
849
|
+
remoteEntryExports: recoveredRemoteEntryExports,
|
|
850
|
+
resourceContext,
|
|
851
|
+
error: loadError,
|
|
827
852
|
recovered: true
|
|
828
853
|
});
|
|
829
|
-
return
|
|
854
|
+
return recoveredRemoteEntryExports;
|
|
830
855
|
}
|
|
831
856
|
}
|
|
832
857
|
await origin.loaderHook.lifecycle.afterLoadEntry.emit({
|
|
833
858
|
origin,
|
|
834
859
|
remoteInfo,
|
|
835
|
-
|
|
860
|
+
resourceContext,
|
|
861
|
+
error: loadError
|
|
836
862
|
});
|
|
837
|
-
throw
|
|
863
|
+
throw loadError;
|
|
838
864
|
});
|
|
865
|
+
globalLoading[uniqueKey] = loading;
|
|
866
|
+
loading.then(void 0, () => {
|
|
867
|
+
if (globalLoading[uniqueKey] === loading) delete globalLoading[uniqueKey];
|
|
868
|
+
});
|
|
869
|
+
remoteEntryLoadingOrigins.set(loading, origin);
|
|
870
|
+
}
|
|
871
|
+
const remoteEntryLoading = globalLoading[uniqueKey];
|
|
872
|
+
if (remoteEntryLoadingOrigins.get(remoteEntryLoading) !== origin) try {
|
|
873
|
+
const result = await remoteEntryLoading;
|
|
874
|
+
await origin.loaderHook.lifecycle.afterLoadEntry.emit({
|
|
875
|
+
origin,
|
|
876
|
+
remoteInfo,
|
|
877
|
+
remoteEntryExports: result,
|
|
878
|
+
resourceContext
|
|
879
|
+
});
|
|
880
|
+
return result;
|
|
881
|
+
} catch (loadError) {
|
|
882
|
+
await origin.loaderHook.lifecycle.afterLoadEntry.emit({
|
|
883
|
+
origin,
|
|
884
|
+
remoteInfo,
|
|
885
|
+
resourceContext,
|
|
886
|
+
error: loadError
|
|
887
|
+
});
|
|
888
|
+
throw loadError;
|
|
839
889
|
}
|
|
840
|
-
return
|
|
890
|
+
return remoteEntryLoading;
|
|
841
891
|
}
|
|
842
892
|
function getRemoteInfo(remote) {
|
|
843
893
|
return {
|
|
@@ -898,6 +948,12 @@ function createAssetResult(context, url, status, error2) {
|
|
|
898
948
|
error: error2
|
|
899
949
|
};
|
|
900
950
|
}
|
|
951
|
+
function preloadAssetOnce(context, url, recordPreloadedAssets, preload) {
|
|
952
|
+
if (!recordPreloadedAssets) return preload();
|
|
953
|
+
if (getPreloadedAsset(url)) return Promise.resolve(createAssetResult(context, url, "cached"));
|
|
954
|
+
setPreloadedAsset(url);
|
|
955
|
+
return preload();
|
|
956
|
+
}
|
|
901
957
|
async function waitForRemoteEntryPreload(host, remoteInfo, entryRemoteInfo, context) {
|
|
902
958
|
const cachedRemote = host.moduleCache.get(entryRemoteInfo.name);
|
|
903
959
|
const url = entryRemoteInfo.entry;
|
|
@@ -984,7 +1040,7 @@ function createResourceContext(baseContext, resourceType) {
|
|
|
984
1040
|
function preloadAssets(remoteInfo, host, assets, useLinkPreload = true, baseContext = {
|
|
985
1041
|
initiator: "preloadRemote",
|
|
986
1042
|
id: remoteInfo.name
|
|
987
|
-
}) {
|
|
1043
|
+
}, recordPreloadedAssets = true) {
|
|
988
1044
|
const { cssAssets, jsAssetsWithoutEntry, entryAssets } = assets;
|
|
989
1045
|
const results = [];
|
|
990
1046
|
if (host.options.inBrowser) {
|
|
@@ -998,13 +1054,14 @@ function preloadAssets(remoteInfo, host, assets, useLinkPreload = true, baseCont
|
|
|
998
1054
|
as: "style"
|
|
999
1055
|
};
|
|
1000
1056
|
cssAssets.forEach((cssUrl) => {
|
|
1001
|
-
|
|
1057
|
+
const context = createResourceContext(baseContext, "css");
|
|
1058
|
+
results.push(preloadAssetOnce(context, cssUrl, recordPreloadedAssets, () => waitForLinkPreload({
|
|
1002
1059
|
host,
|
|
1003
1060
|
remoteInfo,
|
|
1004
1061
|
url: cssUrl,
|
|
1005
1062
|
attrs: defaultAttrs2,
|
|
1006
|
-
context
|
|
1007
|
-
}));
|
|
1063
|
+
context
|
|
1064
|
+
})));
|
|
1008
1065
|
});
|
|
1009
1066
|
} else {
|
|
1010
1067
|
const defaultAttrs2 = {
|
|
@@ -1012,14 +1069,15 @@ function preloadAssets(remoteInfo, host, assets, useLinkPreload = true, baseCont
|
|
|
1012
1069
|
type: "text/css"
|
|
1013
1070
|
};
|
|
1014
1071
|
cssAssets.forEach((cssUrl) => {
|
|
1015
|
-
|
|
1072
|
+
const context = createResourceContext(baseContext, "css");
|
|
1073
|
+
results.push(preloadAssetOnce(context, cssUrl, recordPreloadedAssets, () => waitForLinkPreload({
|
|
1016
1074
|
host,
|
|
1017
1075
|
remoteInfo,
|
|
1018
1076
|
url: cssUrl,
|
|
1019
1077
|
attrs: defaultAttrs2,
|
|
1020
1078
|
needDeleteLink: false,
|
|
1021
|
-
context
|
|
1022
|
-
}));
|
|
1079
|
+
context
|
|
1080
|
+
})));
|
|
1023
1081
|
});
|
|
1024
1082
|
}
|
|
1025
1083
|
let preloadJsAsset = waitForScriptPreload;
|
|
@@ -1041,13 +1099,14 @@ function preloadAssets(remoteInfo, host, assets, useLinkPreload = true, baseCont
|
|
|
1041
1099
|
};
|
|
1042
1100
|
}
|
|
1043
1101
|
jsAssetsWithoutEntry.forEach((jsUrl) => {
|
|
1044
|
-
|
|
1102
|
+
const context = createResourceContext(baseContext, "js");
|
|
1103
|
+
results.push(preloadAssetOnce(context, jsUrl, recordPreloadedAssets, () => preloadJsAsset({
|
|
1045
1104
|
host,
|
|
1046
1105
|
remoteInfo,
|
|
1047
1106
|
url: jsUrl,
|
|
1048
1107
|
attrs: defaultAttrs,
|
|
1049
|
-
context
|
|
1050
|
-
}));
|
|
1108
|
+
context
|
|
1109
|
+
})));
|
|
1051
1110
|
});
|
|
1052
1111
|
}
|
|
1053
1112
|
return Promise.all(results);
|
|
@@ -1093,25 +1152,27 @@ var Module$1 = class {
|
|
|
1093
1152
|
this.remoteInfo = remoteInfo;
|
|
1094
1153
|
this.host = host;
|
|
1095
1154
|
}
|
|
1096
|
-
async getEntry(expose) {
|
|
1097
|
-
|
|
1155
|
+
async getEntry(expose, resourceContext) {
|
|
1156
|
+
const effectiveResourceContext = resourceContext || {
|
|
1157
|
+
initiator: "loadRemote",
|
|
1158
|
+
id: composeRemoteRequestId(this.remoteInfo.name, expose),
|
|
1159
|
+
resourceType: "remoteEntry",
|
|
1160
|
+
url: this.remoteInfo.entry,
|
|
1161
|
+
expose
|
|
1162
|
+
};
|
|
1098
1163
|
const remoteEntryExports = await getRemoteEntry({
|
|
1099
1164
|
origin: this.host,
|
|
1100
1165
|
remoteInfo: this.remoteInfo,
|
|
1101
1166
|
remoteEntryExports: this.remoteEntryExports,
|
|
1102
|
-
resourceContext:
|
|
1103
|
-
initiator: "loadRemote",
|
|
1104
|
-
id: composeRemoteRequestId(this.remoteInfo.name, expose),
|
|
1105
|
-
resourceType: "remoteEntry"
|
|
1106
|
-
}
|
|
1167
|
+
resourceContext: effectiveResourceContext
|
|
1107
1168
|
});
|
|
1108
1169
|
assert(remoteEntryExports, `remoteEntryExports is undefined
|
|
1109
1170
|
${safeToString(this.remoteInfo)}`);
|
|
1110
1171
|
this.remoteEntryExports = remoteEntryExports;
|
|
1111
1172
|
return this.remoteEntryExports;
|
|
1112
1173
|
}
|
|
1113
|
-
async init(id, remoteSnapshot, rawInitScope, expose) {
|
|
1114
|
-
const remoteEntryExports = await this.getEntry(expose);
|
|
1174
|
+
async init(id, remoteSnapshot, rawInitScope, expose, resourceContext) {
|
|
1175
|
+
const remoteEntryExports = await this.getEntry(expose, resourceContext);
|
|
1115
1176
|
if (this.inited) {
|
|
1116
1177
|
await this.host.loaderHook.lifecycle.afterInitRemote.emit({
|
|
1117
1178
|
id,
|
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-DSYKAGGD.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-CHnL6Q9P.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-DSYKAGGD.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-CHnL6Q9P.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.9.1",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
}
|
|
148
148
|
},
|
|
149
149
|
"dependencies": {
|
|
150
|
-
"@module-federation/sdk": "2.
|
|
150
|
+
"@module-federation/sdk": "2.9.1"
|
|
151
151
|
},
|
|
152
152
|
"peerDependencies": {
|
|
153
153
|
"react": ">=16.9.0",
|
|
@@ -175,13 +175,13 @@
|
|
|
175
175
|
"react": "18.3.1",
|
|
176
176
|
"react-dom": "18.3.1",
|
|
177
177
|
"react-router-dom": "6.30.3",
|
|
178
|
-
"react-router": "7.
|
|
178
|
+
"react-router": "7.18.2",
|
|
179
179
|
"typescript": "7.0.2",
|
|
180
180
|
"vite": "^5.4.21",
|
|
181
|
-
"hono": "4.
|
|
182
|
-
"@module-federation/runtime": "2.
|
|
183
|
-
"@module-federation/
|
|
184
|
-
"@module-federation/
|
|
181
|
+
"hono": "4.13.1",
|
|
182
|
+
"@module-federation/runtime": "2.9.1",
|
|
183
|
+
"@module-federation/runtime-core": "2.9.1",
|
|
184
|
+
"@module-federation/bridge-shared": "2.9.1"
|
|
185
185
|
},
|
|
186
186
|
"scripts": {
|
|
187
187
|
"dev": "vite",
|