Skip to content

Commit e91127c

Browse files
update packages
1 parent 26a6e62 commit e91127c

File tree

21 files changed

+44
-232
lines changed

21 files changed

+44
-232
lines changed
Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,27 @@
1-
import type { PackageType as PackageType_0, RemoteKeys as RemoteKeys_0 } from './remote1/apis.d.ts';
2-
import type { PackageType as PackageType_1, RemoteKeys as RemoteKeys_1 } from './remote2/apis.d.ts';
3-
declare module '@module-federation/runtime' {
4-
type RemoteKeys = RemoteKeys_0 | RemoteKeys_1;
5-
type PackageType<T, Y = any> = T extends RemoteKeys_0
6-
? PackageType_0<T>
7-
: T extends RemoteKeys_1
8-
? PackageType_1<T>
9-
: Y;
10-
export function loadRemote<T extends RemoteKeys, Y>(packageName: T): Promise<PackageType<T, Y>>;
11-
export function loadRemote<T extends string, Y>(packageName: T): Promise<PackageType<T, Y>>;
12-
}
13-
declare module '@module-federation/enhanced/runtime' {
14-
type RemoteKeys = RemoteKeys_0 | RemoteKeys_1;
15-
type PackageType<T, Y = any> = T extends RemoteKeys_0
16-
? PackageType_0<T>
17-
: T extends RemoteKeys_1
18-
? PackageType_1<T>
19-
: Y;
20-
export function loadRemote<T extends RemoteKeys, Y>(packageName: T): Promise<PackageType<T, Y>>;
21-
export function loadRemote<T extends string, Y>(packageName: T): Promise<PackageType<T, Y>>;
22-
}
23-
declare module '@module-federation/runtime-tools' {
24-
type RemoteKeys = RemoteKeys_0 | RemoteKeys_1;
25-
type PackageType<T, Y = any> = T extends RemoteKeys_0
26-
? PackageType_0<T>
27-
: T extends RemoteKeys_1
28-
? PackageType_1<T>
29-
: Y;
30-
export function loadRemote<T extends RemoteKeys, Y>(packageName: T): Promise<PackageType<T, Y>>;
31-
export function loadRemote<T extends string, Y>(packageName: T): Promise<PackageType<T, Y>>;
32-
}
1+
import type { PackageType as PackageType_0,RemoteKeys as RemoteKeys_0 } from './remote1/apis.d.ts';
2+
import type { PackageType as PackageType_1,RemoteKeys as RemoteKeys_1 } from './remote2/apis.d.ts';
3+
declare module "@module-federation/runtime" {
4+
type RemoteKeys = RemoteKeys_0 | RemoteKeys_1;
5+
type PackageType<T, Y=any> = T extends RemoteKeys_0 ? PackageType_0<T> :
6+
T extends RemoteKeys_1 ? PackageType_1<T> :
7+
Y ;
8+
export function loadRemote<T extends RemoteKeys,Y>(packageName: T): Promise<PackageType<T, Y>>;
9+
export function loadRemote<T extends string,Y>(packageName: T): Promise<PackageType<T, Y>>;
10+
}
11+
declare module "@module-federation/enhanced/runtime" {
12+
type RemoteKeys = RemoteKeys_0 | RemoteKeys_1;
13+
type PackageType<T, Y=any> = T extends RemoteKeys_0 ? PackageType_0<T> :
14+
T extends RemoteKeys_1 ? PackageType_1<T> :
15+
Y ;
16+
export function loadRemote<T extends RemoteKeys,Y>(packageName: T): Promise<PackageType<T, Y>>;
17+
export function loadRemote<T extends string,Y>(packageName: T): Promise<PackageType<T, Y>>;
18+
}
19+
declare module "@module-federation/runtime-tools" {
20+
type RemoteKeys = RemoteKeys_0 | RemoteKeys_1;
21+
type PackageType<T, Y=any> = T extends RemoteKeys_0 ? PackageType_0<T> :
22+
T extends RemoteKeys_1 ? PackageType_1<T> :
23+
Y ;
24+
export function loadRemote<T extends RemoteKeys,Y>(packageName: T): Promise<PackageType<T, Y>>;
25+
export function loadRemote<T extends string,Y>(packageName: T): Promise<PackageType<T, Y>>;
26+
}
27+
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
export type RemoteKeys = 'remote1/button' | 'remote1/app';
2-
type PackageType<T> = T extends 'remote1/app'
3-
? typeof import('remote1/app')
4-
: T extends 'remote1/button'
5-
? typeof import('remote1/button')
6-
: any;
1+
2+
export type RemoteKeys = 'remote1/button' | 'remote1/app';
3+
type PackageType<T> = T extends 'remote1/app' ? typeof import('remote1/app') :T extends 'remote1/button' ? typeof import('remote1/button') :any;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export * from './compiled-types/app';
2-
export { default } from './compiled-types/app';
1+
export * from './compiled-types/App';
2+
export { default } from './compiled-types/App';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
export * from './compiled-types/button';
2-
export { default } from './compiled-types/button';
2+
export { default } from './compiled-types/button';
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
import './App.css';
2-
declare const App: (info?: { abc?: string }) => import('react/jsx-runtime').JSX.Element;
2+
declare const App: (info?: {
3+
abc?: string;
4+
}) => import("react/jsx-runtime").JSX.Element;
35
export default App;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export default function Button(): import('react/jsx-runtime').JSX.Element;
1+
export default function Button(): import("react/jsx-runtime").JSX.Element;
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
export type RemoteKeys = 'remote2/button';
2-
type PackageType<T> = T extends 'remote2/button' ? typeof import('remote2/button') : any;
1+
2+
export type RemoteKeys = 'remote2/button';
3+
type PackageType<T> = T extends 'remote2/button' ? typeof import('remote2/button') :any;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
export * from './compiled-types/button';
2-
export { default } from './compiled-types/button';
2+
export { default } from './compiled-types/button';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export default function Button(): import('react/jsx-runtime').JSX.Element;
1+
export default function Button(): import("react/jsx-runtime").JSX.Element;

react-manifest-example/remote1/rsbuild.config.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ export default defineConfig({
1818
name: 'remote1',
1919
exposes: {
2020
'./button': './src/button.tsx',
21-
'./app': './src/app.tsx',
22-
},
23-
manifest: {
24-
filePath: 'manifestpath',
21+
'./app': './src/App.tsx',
2522
},
2623
shared: [
2724
'react',

0 commit comments

Comments
 (0)