Skip to content

Commit

Permalink
fix(module-federation): tuple remotes should have global identifier a…
Browse files Browse the repository at this point in the history
…dded if missing
  • Loading branch information
Coly010 committed Jan 30, 2025
1 parent 10c14b6 commit 44c0905
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/module-federation/src/utils/remotes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ function handleArrayRemote(

// If remote location already has .js or .mjs extension
if (['.js', '.mjs', '.json'].includes(remoteLocationExt)) {
if (isRemoteGlobal && !remoteLocation.startsWith(`${mfRemoteName}@`)) {
return `${mfRemoteName}@${remoteLocation}`;
}
return remoteLocation;
}

Expand Down

0 comments on commit 44c0905

Please sign in to comment.