@module-federation/bridge-react 0.0.0-fix-capture-timeout-20260324112210 → 0.0.0-fix-valid-same-id-20260429034727
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 +2 -2
- package/dist/base.es.js +2 -2
- package/dist/data-fetch-utils.cjs.js +1 -1
- package/dist/data-fetch-utils.es.js +2 -2
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +2 -2
- package/dist/{lazy-load-component-plugin-BPc7MCM0.mjs → lazy-load-component-plugin-Bf_HsMyF.mjs} +1 -1
- package/dist/{lazy-load-component-plugin-CbkUlx8x.js → lazy-load-component-plugin-DZDwZ0Kz.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-HO3b1ofi.mjs → prefetch-ByDYONsx.mjs} +17 -8
- package/dist/{prefetch-B7nv4qbv.js → prefetch-DYFX9hl9.js} +17 -8
- package/package.json +11 -7
- package/.turbo/turbo-build.log +0 -85
- package/CHANGELOG.md +0 -818
- package/__tests__/bridge.spec.tsx +0 -160
- package/__tests__/createLazyComponent.spec.tsx +0 -209
- package/__tests__/prefetch.spec.ts +0 -156
- package/__tests__/router.spec.tsx +0 -82
- package/__tests__/setupTests.ts +0 -8
- package/__tests__/util.ts +0 -36
- package/jest.config.ts +0 -21
- package/src/base.ts +0 -50
- package/src/index.ts +0 -50
- package/src/lazy/AwaitDataFetch.tsx +0 -217
- package/src/lazy/constant.ts +0 -30
- package/src/lazy/createLazyComponent.tsx +0 -411
- package/src/lazy/data-fetch/cache.ts +0 -291
- package/src/lazy/data-fetch/call-data-fetch.ts +0 -13
- package/src/lazy/data-fetch/data-fetch-server-middleware.ts +0 -196
- package/src/lazy/data-fetch/index.ts +0 -16
- package/src/lazy/data-fetch/inject-data-fetch.ts +0 -109
- package/src/lazy/data-fetch/prefetch.ts +0 -112
- package/src/lazy/data-fetch/runtime-plugin.ts +0 -115
- package/src/lazy/index.ts +0 -35
- package/src/lazy/logger.ts +0 -6
- package/src/lazy/types.ts +0 -75
- package/src/lazy/utils.ts +0 -375
- package/src/lazy/wrapNoSSR.tsx +0 -10
- package/src/modern-app-env.d.ts +0 -2
- package/src/plugins/lazy-load-component-plugin.spec.ts +0 -21
- package/src/plugins/lazy-load-component-plugin.ts +0 -57
- package/src/provider/context.tsx +0 -4
- package/src/provider/plugin.ts +0 -22
- package/src/provider/versions/bridge-base.tsx +0 -153
- package/src/provider/versions/legacy.ts +0 -87
- package/src/provider/versions/v18.ts +0 -47
- package/src/provider/versions/v19.ts +0 -48
- package/src/remote/RemoteAppWrapper.tsx +0 -108
- package/src/remote/base-component/component.tsx +0 -2
- package/src/remote/base-component/create.tsx +0 -23
- package/src/remote/base-component/index.tsx +0 -10
- package/src/remote/createHelpers.tsx +0 -132
- package/src/remote/router-component/component.tsx +0 -104
- package/src/remote/router-component/create.tsx +0 -23
- package/src/remote/router-component/index.tsx +0 -10
- package/src/router/default.tsx +0 -73
- package/src/router/v5.tsx +0 -43
- package/src/router/v6.tsx +0 -74
- package/src/router/v7.tsx +0 -75
- package/src/types.ts +0 -147
- package/src/utils/index.ts +0 -44
- package/src/v18.ts +0 -9
- package/src/v19.ts +0 -9
- package/tsconfig.json +0 -42
- package/tsconfig.node.json +0 -11
- package/tsconfig.spec.json +0 -26
- package/vite.config.ts +0 -112
- package/vitest.config.ts +0 -27
package/dist/base.cjs.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const createHelpers = require("./createHelpers-9B0ttrN_.js");
|
|
4
|
-
const lazyLoadComponentPlugin = require("./lazy-load-component-plugin-
|
|
4
|
+
const lazyLoadComponentPlugin = require("./lazy-load-component-plugin-DZDwZ0Kz.js");
|
|
5
5
|
const lazyUtils = require("./utils-CFTy4LVE.js");
|
|
6
6
|
const dataFetchUtils = require("./data-fetch-utils.cjs.js");
|
|
7
|
-
const prefetch = require("./prefetch-
|
|
7
|
+
const prefetch = require("./prefetch-DYFX9hl9.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
1
|
import { c as createRemoteAppComponentFactory, a as createDeprecatedRemoteComponentFactory, R as RemoteAppWrapper } from "./createHelpers-D77sECmY.mjs";
|
|
2
2
|
import { b } from "./createHelpers-D77sECmY.mjs";
|
|
3
|
-
import { a, c, b as b2, l } from "./lazy-load-component-plugin-
|
|
3
|
+
import { a, c, b as b2, l } from "./lazy-load-component-plugin-Bf_HsMyF.mjs";
|
|
4
4
|
import { C, a as a2, E, c as c2, b as b3, d, g, r, s } from "./utils-D4k5eixv.mjs";
|
|
5
5
|
import { callDataFetch } from "./data-fetch-utils.es.js";
|
|
6
|
-
import { p } from "./prefetch-
|
|
6
|
+
import { p } from "./prefetch-ByDYONsx.mjs";
|
|
7
7
|
const createRemoteAppComponent = createRemoteAppComponentFactory(RemoteAppWrapper);
|
|
8
8
|
const createRemoteComponent = createDeprecatedRemoteComponentFactory(
|
|
9
9
|
createRemoteAppComponent
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const lazyUtils = require("./utils-CFTy4LVE.js");
|
|
4
|
-
const prefetch = require("./prefetch-
|
|
4
|
+
const prefetch = require("./prefetch-DYFX9hl9.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-D4k5eixv.mjs";
|
|
2
2
|
import { C, a, c, b, d, g, r } from "./utils-D4k5eixv.mjs";
|
|
3
|
-
import { d as dataFetchFunction } from "./prefetch-
|
|
4
|
-
import { i, p } from "./prefetch-
|
|
3
|
+
import { d as dataFetchFunction } from "./prefetch-ByDYONsx.mjs";
|
|
4
|
+
import { i, p } from "./prefetch-ByDYONsx.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,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const createHelpers = require("./createHelpers-9B0ttrN_.js");
|
|
4
|
-
const lazyLoadComponentPlugin = require("./lazy-load-component-plugin-
|
|
4
|
+
const lazyLoadComponentPlugin = require("./lazy-load-component-plugin-DZDwZ0Kz.js");
|
|
5
5
|
const lazyUtils = require("./utils-CFTy4LVE.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 prefetch = require("./prefetch-
|
|
10
|
+
const prefetch = require("./prefetch-DYFX9hl9.js");
|
|
11
11
|
function _interopNamespaceDefault(e2) {
|
|
12
12
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
13
13
|
if (e2) {
|
package/dist/index.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { R as RemoteAppWrapper, c as createRemoteAppComponentFactory, a as createDeprecatedRemoteComponentFactory } from "./createHelpers-D77sECmY.mjs";
|
|
2
2
|
import { b } from "./createHelpers-D77sECmY.mjs";
|
|
3
|
-
import { a, c, b as b2, l } from "./lazy-load-component-plugin-
|
|
3
|
+
import { a, c, b as b2, l } from "./lazy-load-component-plugin-Bf_HsMyF.mjs";
|
|
4
4
|
import { C, a as a2, E, c as c2, b as b3, d, g, r, s } from "./utils-D4k5eixv.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 { p } from "./prefetch-
|
|
9
|
+
import { p } from "./prefetch-ByDYONsx.mjs";
|
|
10
10
|
function e() {
|
|
11
11
|
const t = new PopStateEvent("popstate", { state: window.history.state });
|
|
12
12
|
window.dispatchEvent(t);
|
package/dist/{lazy-load-component-plugin-BPc7MCM0.mjs → lazy-load-component-plugin-Bf_HsMyF.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-ByDYONsx.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, M as MF_DATA_FETCH_STATUS, h as loadDataFetchModule, e 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-D4k5eixv.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-DZDwZ0Kz.js");
|
|
4
|
+
require("./prefetch-DYFX9hl9.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-Bf_HsMyF.mjs";
|
|
2
|
+
import "./prefetch-ByDYONsx.mjs";
|
|
3
3
|
export {
|
|
4
4
|
l as default,
|
|
5
5
|
l2 as lazyLoadComponentPlugin
|
|
@@ -492,6 +492,7 @@ const RUNTIME_008 = "RUNTIME-008";
|
|
|
492
492
|
const RUNTIME_009 = "RUNTIME-009";
|
|
493
493
|
const RUNTIME_010 = "RUNTIME-010";
|
|
494
494
|
const RUNTIME_011 = "RUNTIME-011";
|
|
495
|
+
const RUNTIME_012 = "RUNTIME-012";
|
|
495
496
|
const runtimeDescMap = {
|
|
496
497
|
[RUNTIME_001]: "Failed to get remoteEntry exports.",
|
|
497
498
|
[RUNTIME_002]: 'The remote entry interface does not contain "init"',
|
|
@@ -503,7 +504,8 @@ const runtimeDescMap = {
|
|
|
503
504
|
[RUNTIME_008]: "Failed to load script resources.",
|
|
504
505
|
[RUNTIME_009]: "Please call createInstance first.",
|
|
505
506
|
[RUNTIME_010]: 'The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.',
|
|
506
|
-
[RUNTIME_011]: "The remoteEntry URL is missing from the remote snapshot."
|
|
507
|
+
[RUNTIME_011]: "The remoteEntry URL is missing from the remote snapshot.",
|
|
508
|
+
[RUNTIME_012]: 'The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.'
|
|
507
509
|
};
|
|
508
510
|
({
|
|
509
511
|
...runtimeDescMap
|
|
@@ -544,7 +546,7 @@ function handleRemoteEntryLoaded(name, globalName, entry) {
|
|
|
544
546
|
});
|
|
545
547
|
return entryExports;
|
|
546
548
|
}
|
|
547
|
-
async function loadEntryScript({ name, globalName, entry, loaderHook, getEntryUrl }) {
|
|
549
|
+
async function loadEntryScript({ name, globalName, entry, remoteInfo, loaderHook, getEntryUrl }) {
|
|
548
550
|
const { entryExports: remoteEntryExports } = getRemoteEntryExports(name, globalName);
|
|
549
551
|
if (remoteEntryExports) return remoteEntryExports;
|
|
550
552
|
const url = getEntryUrl ? getEntryUrl(entry) : entry;
|
|
@@ -553,7 +555,8 @@ async function loadEntryScript({ name, globalName, entry, loaderHook, getEntryUr
|
|
|
553
555
|
createScriptHook: (url2, attrs) => {
|
|
554
556
|
const res = loaderHook.lifecycle.createScript.emit({
|
|
555
557
|
url: url2,
|
|
556
|
-
attrs
|
|
558
|
+
attrs,
|
|
559
|
+
remoteInfo
|
|
557
560
|
});
|
|
558
561
|
if (!res) return;
|
|
559
562
|
if (res instanceof HTMLScriptElement) return res;
|
|
@@ -588,6 +591,7 @@ async function loadEntryDom({ remoteInfo, remoteEntryExports, loaderHook, getEnt
|
|
|
588
591
|
entry,
|
|
589
592
|
globalName,
|
|
590
593
|
name,
|
|
594
|
+
remoteInfo,
|
|
591
595
|
loaderHook,
|
|
592
596
|
getEntryUrl
|
|
593
597
|
});
|
|
@@ -606,7 +610,8 @@ async function loadEntryNode({ remoteInfo, loaderHook }) {
|
|
|
606
610
|
loaderHook: { createScriptHook: (url, attrs = {}) => {
|
|
607
611
|
const res = loaderHook.lifecycle.createScript.emit({
|
|
608
612
|
url,
|
|
609
|
-
attrs
|
|
613
|
+
attrs,
|
|
614
|
+
remoteInfo
|
|
610
615
|
});
|
|
611
616
|
if (!res) return;
|
|
612
617
|
if ("url" in res) return res;
|
|
@@ -708,7 +713,8 @@ function preloadAssets(remoteInfo, host, assets, useLinkPreload = true) {
|
|
|
708
713
|
createLinkHook: (url, attrs) => {
|
|
709
714
|
const res = host.loaderHook.lifecycle.createLink.emit({
|
|
710
715
|
url,
|
|
711
|
-
attrs
|
|
716
|
+
attrs,
|
|
717
|
+
remoteInfo
|
|
712
718
|
});
|
|
713
719
|
if (res instanceof HTMLLinkElement) return res;
|
|
714
720
|
}
|
|
@@ -729,7 +735,8 @@ function preloadAssets(remoteInfo, host, assets, useLinkPreload = true) {
|
|
|
729
735
|
createLinkHook: (url, attrs) => {
|
|
730
736
|
const res = host.loaderHook.lifecycle.createLink.emit({
|
|
731
737
|
url,
|
|
732
|
-
attrs
|
|
738
|
+
attrs,
|
|
739
|
+
remoteInfo
|
|
733
740
|
});
|
|
734
741
|
if (res instanceof HTMLLinkElement) return res;
|
|
735
742
|
},
|
|
@@ -752,7 +759,8 @@ function preloadAssets(remoteInfo, host, assets, useLinkPreload = true) {
|
|
|
752
759
|
createLinkHook: (url, attrs) => {
|
|
753
760
|
const res = host.loaderHook.lifecycle.createLink.emit({
|
|
754
761
|
url,
|
|
755
|
-
attrs
|
|
762
|
+
attrs,
|
|
763
|
+
remoteInfo
|
|
756
764
|
});
|
|
757
765
|
if (res instanceof HTMLLinkElement) return res;
|
|
758
766
|
}
|
|
@@ -773,7 +781,8 @@ function preloadAssets(remoteInfo, host, assets, useLinkPreload = true) {
|
|
|
773
781
|
createScriptHook: (url, attrs) => {
|
|
774
782
|
const res = host.loaderHook.lifecycle.createScript.emit({
|
|
775
783
|
url,
|
|
776
|
-
attrs
|
|
784
|
+
attrs,
|
|
785
|
+
remoteInfo
|
|
777
786
|
});
|
|
778
787
|
if (res instanceof HTMLScriptElement) return res;
|
|
779
788
|
},
|
|
@@ -493,6 +493,7 @@ const RUNTIME_008 = "RUNTIME-008";
|
|
|
493
493
|
const RUNTIME_009 = "RUNTIME-009";
|
|
494
494
|
const RUNTIME_010 = "RUNTIME-010";
|
|
495
495
|
const RUNTIME_011 = "RUNTIME-011";
|
|
496
|
+
const RUNTIME_012 = "RUNTIME-012";
|
|
496
497
|
const runtimeDescMap = {
|
|
497
498
|
[RUNTIME_001]: "Failed to get remoteEntry exports.",
|
|
498
499
|
[RUNTIME_002]: 'The remote entry interface does not contain "init"',
|
|
@@ -504,7 +505,8 @@ const runtimeDescMap = {
|
|
|
504
505
|
[RUNTIME_008]: "Failed to load script resources.",
|
|
505
506
|
[RUNTIME_009]: "Please call createInstance first.",
|
|
506
507
|
[RUNTIME_010]: 'The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.',
|
|
507
|
-
[RUNTIME_011]: "The remoteEntry URL is missing from the remote snapshot."
|
|
508
|
+
[RUNTIME_011]: "The remoteEntry URL is missing from the remote snapshot.",
|
|
509
|
+
[RUNTIME_012]: 'The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.'
|
|
508
510
|
};
|
|
509
511
|
({
|
|
510
512
|
...runtimeDescMap
|
|
@@ -545,7 +547,7 @@ function handleRemoteEntryLoaded(name, globalName, entry) {
|
|
|
545
547
|
});
|
|
546
548
|
return entryExports;
|
|
547
549
|
}
|
|
548
|
-
async function loadEntryScript({ name, globalName, entry, loaderHook, getEntryUrl }) {
|
|
550
|
+
async function loadEntryScript({ name, globalName, entry, remoteInfo, loaderHook, getEntryUrl }) {
|
|
549
551
|
const { entryExports: remoteEntryExports } = getRemoteEntryExports(name, globalName);
|
|
550
552
|
if (remoteEntryExports) return remoteEntryExports;
|
|
551
553
|
const url = getEntryUrl ? getEntryUrl(entry) : entry;
|
|
@@ -554,7 +556,8 @@ async function loadEntryScript({ name, globalName, entry, loaderHook, getEntryUr
|
|
|
554
556
|
createScriptHook: (url2, attrs) => {
|
|
555
557
|
const res = loaderHook.lifecycle.createScript.emit({
|
|
556
558
|
url: url2,
|
|
557
|
-
attrs
|
|
559
|
+
attrs,
|
|
560
|
+
remoteInfo
|
|
558
561
|
});
|
|
559
562
|
if (!res) return;
|
|
560
563
|
if (res instanceof HTMLScriptElement) return res;
|
|
@@ -589,6 +592,7 @@ async function loadEntryDom({ remoteInfo, remoteEntryExports, loaderHook, getEnt
|
|
|
589
592
|
entry,
|
|
590
593
|
globalName,
|
|
591
594
|
name,
|
|
595
|
+
remoteInfo,
|
|
592
596
|
loaderHook,
|
|
593
597
|
getEntryUrl
|
|
594
598
|
});
|
|
@@ -607,7 +611,8 @@ async function loadEntryNode({ remoteInfo, loaderHook }) {
|
|
|
607
611
|
loaderHook: { createScriptHook: (url, attrs = {}) => {
|
|
608
612
|
const res = loaderHook.lifecycle.createScript.emit({
|
|
609
613
|
url,
|
|
610
|
-
attrs
|
|
614
|
+
attrs,
|
|
615
|
+
remoteInfo
|
|
611
616
|
});
|
|
612
617
|
if (!res) return;
|
|
613
618
|
if ("url" in res) return res;
|
|
@@ -709,7 +714,8 @@ function preloadAssets(remoteInfo, host, assets, useLinkPreload = true) {
|
|
|
709
714
|
createLinkHook: (url, attrs) => {
|
|
710
715
|
const res = host.loaderHook.lifecycle.createLink.emit({
|
|
711
716
|
url,
|
|
712
|
-
attrs
|
|
717
|
+
attrs,
|
|
718
|
+
remoteInfo
|
|
713
719
|
});
|
|
714
720
|
if (res instanceof HTMLLinkElement) return res;
|
|
715
721
|
}
|
|
@@ -730,7 +736,8 @@ function preloadAssets(remoteInfo, host, assets, useLinkPreload = true) {
|
|
|
730
736
|
createLinkHook: (url, attrs) => {
|
|
731
737
|
const res = host.loaderHook.lifecycle.createLink.emit({
|
|
732
738
|
url,
|
|
733
|
-
attrs
|
|
739
|
+
attrs,
|
|
740
|
+
remoteInfo
|
|
734
741
|
});
|
|
735
742
|
if (res instanceof HTMLLinkElement) return res;
|
|
736
743
|
},
|
|
@@ -753,7 +760,8 @@ function preloadAssets(remoteInfo, host, assets, useLinkPreload = true) {
|
|
|
753
760
|
createLinkHook: (url, attrs) => {
|
|
754
761
|
const res = host.loaderHook.lifecycle.createLink.emit({
|
|
755
762
|
url,
|
|
756
|
-
attrs
|
|
763
|
+
attrs,
|
|
764
|
+
remoteInfo
|
|
757
765
|
});
|
|
758
766
|
if (res instanceof HTMLLinkElement) return res;
|
|
759
767
|
}
|
|
@@ -774,7 +782,8 @@ function preloadAssets(remoteInfo, host, assets, useLinkPreload = true) {
|
|
|
774
782
|
createScriptHook: (url, attrs) => {
|
|
775
783
|
const res = host.loaderHook.lifecycle.createScript.emit({
|
|
776
784
|
url,
|
|
777
|
-
attrs
|
|
785
|
+
attrs,
|
|
786
|
+
remoteInfo
|
|
778
787
|
});
|
|
779
788
|
if (res instanceof HTMLScriptElement) return res;
|
|
780
789
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/bridge-react",
|
|
3
|
-
"version": "0.0.0-fix-
|
|
3
|
+
"version": "0.0.0-fix-valid-same-id-20260429034727",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -12,6 +12,10 @@
|
|
|
12
12
|
"url": "git+https://github.com/module-federation/core.git",
|
|
13
13
|
"directory": "packages/bridge/bridge-react"
|
|
14
14
|
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist/",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
15
19
|
"main": "./dist/index.cjs.js",
|
|
16
20
|
"module": "./dist/index.es.js",
|
|
17
21
|
"types": "./dist/index.d.ts",
|
|
@@ -127,10 +131,8 @@
|
|
|
127
131
|
}
|
|
128
132
|
},
|
|
129
133
|
"dependencies": {
|
|
130
|
-
"
|
|
131
|
-
"
|
|
132
|
-
"@module-federation/bridge-shared": "0.0.0-fix-capture-timeout-20260324112210",
|
|
133
|
-
"@module-federation/sdk": "0.0.0-fix-capture-timeout-20260324112210"
|
|
134
|
+
"lru-cache": "10.4.3",
|
|
135
|
+
"@module-federation/sdk": "0.0.0-fix-valid-same-id-20260429034727"
|
|
134
136
|
},
|
|
135
137
|
"peerDependencies": {
|
|
136
138
|
"react": ">=16.9.0",
|
|
@@ -151,6 +153,7 @@
|
|
|
151
153
|
}
|
|
152
154
|
},
|
|
153
155
|
"devDependencies": {
|
|
156
|
+
"react-error-boundary": "^4.1.2",
|
|
154
157
|
"@testing-library/react": "15.0.7",
|
|
155
158
|
"@testing-library/jest-dom": "6.6.3",
|
|
156
159
|
"@types/react": "18.2.79",
|
|
@@ -167,8 +170,9 @@
|
|
|
167
170
|
"vite-plugin-dts": "^4.3.0",
|
|
168
171
|
"hono": "4.12.7",
|
|
169
172
|
"vitest": "1.6.0",
|
|
170
|
-
"@module-federation/runtime": "0.0.0-fix-
|
|
171
|
-
"@module-federation/runtime-core": "0.0.0-fix-
|
|
173
|
+
"@module-federation/runtime": "0.0.0-fix-valid-same-id-20260429034727",
|
|
174
|
+
"@module-federation/runtime-core": "0.0.0-fix-valid-same-id-20260429034727",
|
|
175
|
+
"@module-federation/bridge-shared": "0.0.0-fix-valid-same-id-20260429034727"
|
|
172
176
|
},
|
|
173
177
|
"scripts": {
|
|
174
178
|
"dev": "vite",
|
package/.turbo/turbo-build.log
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> @module-federation/bridge-react@0.0.0-fix-capture-timeout-20260324112210 build /home/runner/work/core/core/packages/bridge/bridge-react
|
|
3
|
-
> vite build
|
|
4
|
-
|
|
5
|
-
[33mThe CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.[39m
|
|
6
|
-
[36mvite v5.4.21 [32mbuilding for production...[36m[39m
|
|
7
|
-
transforming...
|
|
8
|
-
../../../node_modules/.pnpm/react-error-boundary@4.1.2_react@18.3.1/node_modules/react-error-boundary/dist/react-error-boundary.esm.js (1:0): Module level directives cause errors when bundled, "use client" in "../../../node_modules/.pnpm/react-error-boundary@4.1.2_react@18.3.1/node_modules/react-error-boundary/dist/react-error-boundary.esm.js" was ignored.
|
|
9
|
-
[32m✓[39m 98 modules transformed.
|
|
10
|
-
Entry module "src/provider/plugin.ts" is using named and default exports together. Consumers of your bundle will have to use `chunk.default` to access the default export, which may not be what you want. Use `output.exports: "named"` to disable this warning.
|
|
11
|
-
Entry module "src/plugins/lazy-load-component-plugin.ts" is using named and default exports together. Consumers of your bundle will have to use `chunk.default` to access the default export, which may not be what you want. Use `output.exports: "named"` to disable this warning.
|
|
12
|
-
rendering chunks...
|
|
13
|
-
[32m
|
|
14
|
-
[36m[vite:dts][32m Start generate declaration files...[39m
|
|
15
|
-
computing gzip size...
|
|
16
|
-
[2mdist/[22m[36mlazy-load-component-plugin.cjs.js [39m[1m[2m 0.39 kB[22m[1m[22m[2m │ gzip: 0.23 kB[22m
|
|
17
|
-
[2mdist/[22m[36mplugin.cjs.js [39m[1m[2m 0.43 kB[22m[1m[22m[2m │ gzip: 0.27 kB[22m
|
|
18
|
-
[2mdist/[22m[36mv18.cjs.js [39m[1m[2m 0.54 kB[22m[1m[22m[2m │ gzip: 0.29 kB[22m
|
|
19
|
-
[2mdist/[22m[36mv19.cjs.js [39m[1m[2m 0.54 kB[22m[1m[22m[2m │ gzip: 0.29 kB[22m
|
|
20
|
-
[2mdist/[22m[36mdata-fetch-utils.cjs.js [39m[1m[2m 0.87 kB[22m[1m[22m[2m │ gzip: 0.41 kB[22m
|
|
21
|
-
[2mdist/[22m[36mindex-DbjGCKOr.js [39m[1m[2m 1.22 kB[22m[1m[22m[2m │ gzip: 0.53 kB[22m
|
|
22
|
-
[2mdist/[22m[36mlazy-utils.cjs.js [39m[1m[2m 1.27 kB[22m[1m[22m[2m │ gzip: 0.40 kB[22m
|
|
23
|
-
[2mdist/[22m[36mbase.cjs.js [39m[1m[2m 1.58 kB[22m[1m[22m[2m │ gzip: 0.51 kB[22m
|
|
24
|
-
[2mdist/[22m[36mrouter-v5.cjs.js [39m[1m[2m 1.98 kB[22m[1m[22m[2m │ gzip: 0.73 kB[22m
|
|
25
|
-
[2mdist/[22m[36mrouter.cjs.js [39m[1m[2m 3.13 kB[22m[1m[22m[2m │ gzip: 0.90 kB[22m
|
|
26
|
-
[2mdist/[22m[36mrouter-v7.cjs.js [39m[1m[2m 3.27 kB[22m[1m[22m[2m │ gzip: 0.95 kB[22m
|
|
27
|
-
[2mdist/[22m[36mrouter-v6.cjs.js [39m[1m[2m 3.28 kB[22m[1m[22m[2m │ gzip: 0.95 kB[22m
|
|
28
|
-
[2mdist/[22m[36mlogger-Dxblx6P-.js [39m[1m[2m 3.78 kB[22m[1m[22m[2m │ gzip: 1.22 kB[22m
|
|
29
|
-
[2mdist/[22m[36mindex.cjs.js [39m[1m[2m 5.25 kB[22m[1m[22m[2m │ gzip: 1.52 kB[22m
|
|
30
|
-
[2mdist/[22m[36mdata-fetch-server-middleware.cjs.js [39m[1m[2m 5.79 kB[22m[1m[22m[2m │ gzip: 1.73 kB[22m
|
|
31
|
-
[2mdist/[22m[36mcreateHelpers-9B0ttrN_.js [39m[1m[2m 7.32 kB[22m[1m[22m[2m │ gzip: 1.95 kB[22m
|
|
32
|
-
[2mdist/[22m[36mbridge-base-IlvdqYIj.js [39m[1m[2m 7.70 kB[22m[1m[22m[2m │ gzip: 2.11 kB[22m
|
|
33
|
-
[2mdist/[22m[36mlazy-load-component-plugin-CbkUlx8x.js [39m[1m[2m17.65 kB[22m[1m[22m[2m │ gzip: 4.21 kB[22m
|
|
34
|
-
[2mdist/[22m[36mprefetch-B7nv4qbv.js [39m[1m[2m31.69 kB[22m[1m[22m[2m │ gzip: 7.75 kB[22m
|
|
35
|
-
[2mdist/[22m[36mutils-CFTy4LVE.js [39m[1m[2m72.53 kB[22m[1m[22m[2m │ gzip: 15.19 kB[22m
|
|
36
|
-
[32m[36m[vite:dts][32m Start rollup declaration files...[39m
|
|
37
|
-
Analysis will use the bundled TypeScript version 5.8.2
|
|
38
|
-
*** The target project appears to use TypeScript 5.9.3 which is newer than the bundled compiler engine; consider upgrading API Extractor.
|
|
39
|
-
Analysis will use the bundled TypeScript version 5.8.2
|
|
40
|
-
*** The target project appears to use TypeScript 5.9.3 which is newer than the bundled compiler engine; consider upgrading API Extractor.
|
|
41
|
-
Analysis will use the bundled TypeScript version 5.8.2
|
|
42
|
-
*** The target project appears to use TypeScript 5.9.3 which is newer than the bundled compiler engine; consider upgrading API Extractor.
|
|
43
|
-
Analysis will use the bundled TypeScript version 5.8.2
|
|
44
|
-
*** The target project appears to use TypeScript 5.9.3 which is newer than the bundled compiler engine; consider upgrading API Extractor.
|
|
45
|
-
Analysis will use the bundled TypeScript version 5.8.2
|
|
46
|
-
*** The target project appears to use TypeScript 5.9.3 which is newer than the bundled compiler engine; consider upgrading API Extractor.
|
|
47
|
-
Analysis will use the bundled TypeScript version 5.8.2
|
|
48
|
-
*** The target project appears to use TypeScript 5.9.3 which is newer than the bundled compiler engine; consider upgrading API Extractor.
|
|
49
|
-
Analysis will use the bundled TypeScript version 5.8.2
|
|
50
|
-
*** The target project appears to use TypeScript 5.9.3 which is newer than the bundled compiler engine; consider upgrading API Extractor.
|
|
51
|
-
Analysis will use the bundled TypeScript version 5.8.2
|
|
52
|
-
*** The target project appears to use TypeScript 5.9.3 which is newer than the bundled compiler engine; consider upgrading API Extractor.
|
|
53
|
-
Analysis will use the bundled TypeScript version 5.8.2
|
|
54
|
-
*** The target project appears to use TypeScript 5.9.3 which is newer than the bundled compiler engine; consider upgrading API Extractor.
|
|
55
|
-
Analysis will use the bundled TypeScript version 5.8.2
|
|
56
|
-
*** The target project appears to use TypeScript 5.9.3 which is newer than the bundled compiler engine; consider upgrading API Extractor.
|
|
57
|
-
Analysis will use the bundled TypeScript version 5.8.2
|
|
58
|
-
*** The target project appears to use TypeScript 5.9.3 which is newer than the bundled compiler engine; consider upgrading API Extractor.
|
|
59
|
-
Analysis will use the bundled TypeScript version 5.8.2
|
|
60
|
-
*** The target project appears to use TypeScript 5.9.3 which is newer than the bundled compiler engine; consider upgrading API Extractor.
|
|
61
|
-
Analysis will use the bundled TypeScript version 5.8.2
|
|
62
|
-
*** The target project appears to use TypeScript 5.9.3 which is newer than the bundled compiler engine; consider upgrading API Extractor.
|
|
63
|
-
[32m[36m[vite:dts][32m Declaration files built in 49273ms.
|
|
64
|
-
[39m
|
|
65
|
-
[2mdist/[22m[36mlazy-load-component-plugin.es.js [39m[1m[2m 0.17 kB[22m[1m[22m[2m │ gzip: 0.15 kB[22m
|
|
66
|
-
[2mdist/[22m[36mplugin.es.js [39m[1m[2m 0.29 kB[22m[1m[22m[2m │ gzip: 0.18 kB[22m
|
|
67
|
-
[2mdist/[22m[36mv18.es.js [39m[1m[2m 0.44 kB[22m[1m[22m[2m │ gzip: 0.23 kB[22m
|
|
68
|
-
[2mdist/[22m[36mv19.es.js [39m[1m[2m 0.44 kB[22m[1m[22m[2m │ gzip: 0.23 kB[22m
|
|
69
|
-
[2mdist/[22m[36mlazy-utils.es.js [39m[1m[2m 0.64 kB[22m[1m[22m[2m │ gzip: 0.34 kB[22m
|
|
70
|
-
[2mdist/[22m[36mdata-fetch-utils.es.js [39m[1m[2m 0.68 kB[22m[1m[22m[2m │ gzip: 0.35 kB[22m
|
|
71
|
-
[2mdist/[22m[36mbase.es.js [39m[1m[2m 1.07 kB[22m[1m[22m[2m │ gzip: 0.46 kB[22m
|
|
72
|
-
[2mdist/[22m[36mindex-Bs2NxD2z.mjs [39m[1m[2m 1.16 kB[22m[1m[22m[2m │ gzip: 0.54 kB[22m
|
|
73
|
-
[2mdist/[22m[36mrouter-v5.es.js [39m[1m[2m 1.18 kB[22m[1m[22m[2m │ gzip: 0.45 kB[22m
|
|
74
|
-
[2mdist/[22m[36mrouter.es.js [39m[1m[2m 2.35 kB[22m[1m[22m[2m │ gzip: 0.63 kB[22m
|
|
75
|
-
[2mdist/[22m[36mrouter-v6.es.js [39m[1m[2m 2.45 kB[22m[1m[22m[2m │ gzip: 0.67 kB[22m
|
|
76
|
-
[2mdist/[22m[36mrouter-v7.es.js [39m[1m[2m 2.52 kB[22m[1m[22m[2m │ gzip: 0.69 kB[22m
|
|
77
|
-
[2mdist/[22m[36mlogger-DwWkXsWl.mjs [39m[1m[2m 3.71 kB[22m[1m[22m[2m │ gzip: 1.22 kB[22m
|
|
78
|
-
[2mdist/[22m[36mindex.es.js [39m[1m[2m 4.23 kB[22m[1m[22m[2m │ gzip: 1.33 kB[22m
|
|
79
|
-
[2mdist/[22m[36mdata-fetch-server-middleware.es.js [39m[1m[2m 5.73 kB[22m[1m[22m[2m │ gzip: 1.76 kB[22m
|
|
80
|
-
[2mdist/[22m[36mbridge-base-EnVXD4Hr.mjs [39m[1m[2m 7.11 kB[22m[1m[22m[2m │ gzip: 1.92 kB[22m
|
|
81
|
-
[2mdist/[22m[36mcreateHelpers-D77sECmY.mjs [39m[1m[2m 7.27 kB[22m[1m[22m[2m │ gzip: 1.96 kB[22m
|
|
82
|
-
[2mdist/[22m[36mlazy-load-component-plugin-BPc7MCM0.mjs [39m[1m[2m17.79 kB[22m[1m[22m[2m │ gzip: 4.33 kB[22m
|
|
83
|
-
[2mdist/[22m[36mprefetch-HO3b1ofi.mjs [39m[1m[2m31.71 kB[22m[1m[22m[2m │ gzip: 7.82 kB[22m
|
|
84
|
-
[2mdist/[22m[36mutils-D4k5eixv.mjs [39m[1m[2m71.78 kB[22m[1m[22m[2m │ gzip: 15.18 kB[22m
|
|
85
|
-
[32m✓ built in 52.07s[39m
|