Skip to content

Commit 7c1de8a

Browse files
author
Wouter van Kuipers
committed
feat: provide an option to load the remoteEntry.json via a deploy url
1 parent 78dac9d commit 7c1de8a

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

libs/native-federation-runtime/src/lib/init-federation.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ export async function initFederation(
5353
? await loadManifest(remotesOrManifestUrl + cacheTag)
5454
: remotesOrManifestUrl;
5555

56-
const hostInfo = await loadFederationInfo(`./remoteEntry.json${cacheTag}`);
56+
const deployUrl = options?.deployUrl ? options.deployUrl : '.';
57+
58+
const hostInfo = await loadFederationInfo(
59+
`${deployUrl}/remoteEntry.json${cacheTag}`,
60+
);
5761

5862
const hostImportMap = await processHostInfo(hostInfo);
5963

libs/native-federation-runtime/src/lib/model/federation-info.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export interface FederationInfo {
2727

2828
export interface InitFederationOptions {
2929
cacheTag?: string;
30+
deployUrl?: string;
3031
}
3132

3233
export interface ProcessRemoteInfoOptions extends InitFederationOptions {

0 commit comments

Comments
 (0)