Skip to content

Commit

Permalink
feat(angular): support alternate remoteEntry name in dynamic federation
Browse files Browse the repository at this point in the history
#13688 (#13899)

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
  • Loading branch information
Coly010 and leosvelperez committed Dec 20, 2022
1 parent dc4a123 commit e53303b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/angular/mf/mf.ts
Expand Up @@ -58,9 +58,12 @@ async function loadRemoteContainer(remoteName: string) {
? remoteUrlDefinitions[remoteName]
: await resolveRemoteUrl(remoteName);

const containerUrl = `${remoteUrl}${
remoteUrl.endsWith('/') ? '' : '/'
}remoteEntry.mjs`;
let containerUrl = remoteUrl;
if (!remoteUrl.endsWith('.mjs') && !remoteUrl.endsWith('.js')) {
containerUrl = `${remoteUrl}${
remoteUrl.endsWith('/') ? '' : '/'
}remoteEntry.mjs`;
}

const container = await loadModule(containerUrl);
await container.init(__webpack_share_scopes__.default);
Expand Down

0 comments on commit e53303b

Please sign in to comment.