Skip to content

Commit e53303b

Browse files
feat(angular): support alternate remoteEntry name in dynamic federation #13688 (#13899)
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
1 parent dc4a123 commit e53303b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/angular/mf/mf.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,12 @@ async function loadRemoteContainer(remoteName: string) {
5858
? remoteUrlDefinitions[remoteName]
5959
: await resolveRemoteUrl(remoteName);
6060

61-
const containerUrl = `${remoteUrl}${
62-
remoteUrl.endsWith('/') ? '' : '/'
63-
}remoteEntry.mjs`;
61+
let containerUrl = remoteUrl;
62+
if (!remoteUrl.endsWith('.mjs') && !remoteUrl.endsWith('.js')) {
63+
containerUrl = `${remoteUrl}${
64+
remoteUrl.endsWith('/') ? '' : '/'
65+
}remoteEntry.mjs`;
66+
}
6467

6568
const container = await loadModule(containerUrl);
6669
await container.init(__webpack_share_scopes__.default);

0 commit comments

Comments
 (0)