remote-reload-utils 0.0.7 → 0.0.8
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/loadRemote2.d.ts +11 -0
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createInstance, ModuleFederationRuntimePlugin } from '@module-federation/enhanced/runtime';
|
|
2
|
+
import type { LoadRemoteOptions } from './types';
|
|
3
|
+
interface LoadResult {
|
|
4
|
+
scopeName: string;
|
|
5
|
+
mf: ReturnType<typeof createInstance>;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* 多版本共存的 loadRemote (优化版本)
|
|
9
|
+
*/
|
|
10
|
+
export declare function loadRemoteMultiVersion(options: LoadRemoteOptions, plugins: ModuleFederationRuntimePlugin[]): Promise<LoadResult>;
|
|
11
|
+
export {};
|
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ModuleFederationRuntimePlugin } from "@module-federation/enhanced/runtime";
|
|
1
2
|
export interface LoadRemoteOptions {
|
|
2
3
|
name: string;
|
|
3
4
|
pkg: string;
|
|
@@ -7,6 +8,7 @@ export interface LoadRemoteOptions {
|
|
|
7
8
|
localFallback?: string;
|
|
8
9
|
cacheTTL?: number;
|
|
9
10
|
revalidate?: boolean;
|
|
11
|
+
shared?: Record<string, ModuleFederationRuntimePlugin>;
|
|
10
12
|
}
|
|
11
13
|
export interface VersionCache {
|
|
12
14
|
[pkg: string]: {
|