@module-federation/bridge-react 0.0.0-next-20250708033956 → 0.0.0-next-20250708104625
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -3
- package/dist/data-fetch-server-middleware.d.ts +9 -0
- package/dist/data-fetch-server-middleware.es.js +1 -1
- package/dist/data-fetch-utils.cjs.js +4 -1253
- package/dist/data-fetch-utils.d.ts +10 -1
- package/dist/data-fetch-utils.es.js +11 -1260
- package/dist/index.cjs.js +7 -433
- package/dist/index.d.ts +11 -11
- package/dist/index.es.js +20 -447
- package/dist/lazy-load-component-plugin-CttAWi8N.js +500 -0
- package/dist/lazy-load-component-plugin-hOC-Yus_.mjs +501 -0
- package/dist/lazy-load-component-plugin.cjs.js +6 -0
- package/dist/lazy-load-component-plugin.d.ts +16 -0
- package/dist/lazy-load-component-plugin.es.js +6 -0
- package/dist/lazy-utils.d.ts +9 -0
- package/dist/lazy-utils.es.js +19 -19
- package/dist/plugin.d.ts +9 -0
- package/dist/prefetch-Cx6MrkdU.mjs +1330 -0
- package/dist/prefetch-cGDaDkgV.js +1329 -0
- package/dist/router-v5.d.ts +9 -0
- package/dist/router-v6.d.ts +9 -0
- package/dist/router.d.ts +9 -0
- package/dist/{utils-Bk8hGjjF.mjs → utils-BTYYwZcb.mjs} +31 -31
- package/dist/v18.d.ts +9 -0
- package/dist/v19.d.ts +9 -0
- package/package.json +11 -11
- package/src/index.ts +3 -1
- package/src/lazy/createLazyComponent.tsx +88 -74
- package/src/lazy/data-fetch/index.ts +1 -0
- package/src/lazy/data-fetch/prefetch.ts +1 -1
- package/src/lazy/data-fetch/runtime-plugin.ts +80 -81
- package/src/lazy/index.ts +6 -2
- package/src/plugins/lazy-load-component-plugin.ts +72 -0
- package/vite.config.ts +2 -2
- package/dist/data-fetch-runtime-plugin.cjs.js +0 -73
- package/dist/data-fetch-runtime-plugin.d.ts +0 -6
- package/dist/data-fetch-runtime-plugin.es.js +0 -74
- package/dist/inject-data-fetch-CAvi-gSf.js +0 -79
- package/dist/inject-data-fetch-errCdqBS.mjs +0 -80
- package/src/.eslintrc.js +0 -9
|
@@ -65,7 +65,7 @@ export declare function injectDataFetch(): void;
|
|
|
65
65
|
|
|
66
66
|
export declare function prefetch(options: PrefetchOptions): Promise<void>;
|
|
67
67
|
|
|
68
|
-
declare type PrefetchOptions = {
|
|
68
|
+
export declare type PrefetchOptions = {
|
|
69
69
|
id: string;
|
|
70
70
|
instance: ReturnType<typeof getInstance>;
|
|
71
71
|
dataFetchParams?: DataFetchParams;
|
|
@@ -75,3 +75,12 @@ declare type PrefetchOptions = {
|
|
|
75
75
|
export declare function revalidateTag(tag: string): void;
|
|
76
76
|
|
|
77
77
|
export { }
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
declare module '@module-federation/runtime' {
|
|
81
|
+
interface FederationHost {
|
|
82
|
+
createLazyComponent<T, E extends keyof T>(options: Omit<CreateLazyComponentOptions<T, E>, 'instance'>): ReturnType<typeof createLazyComponent<T, E>>;
|
|
83
|
+
prefetch(options: Omit<PrefetchOptions, 'instance'>): ReturnType<typeof prefetch>;
|
|
84
|
+
collectSSRAssets(options: Omit<Parameters<typeof collectSSRAssets>[0], 'instance'>): ReturnType<typeof collectSSRAssets>;
|
|
85
|
+
}
|
|
86
|
+
}
|