Skip to content

Commit

Permalink
fix: support exposed module paths with file extension
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-pribilinskiy committed Aug 29, 2022
1 parent aedae51 commit 292517a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/helpers/compileTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ export function rewritePathsWithExposedFederatedModules(
declaredModulePaths.forEach((importPath) => {
// Aliases are not included in the emitted declarations hence the need to use `endsWith`
const [exposedModuleKey, ...exposedModuleNameAliases] = Object.keys(federationConfig.exposes)
.filter(key => federationConfig.exposes[key].endsWith(importPath))
.filter(key => (
federationConfig.exposes[key].endsWith(importPath)
|| federationConfig.exposes[key].replace(/\.[^./]*$/, '').endsWith(importPath)
))
.map(key => key.replace(/^\.\//, ''));

let federatedModulePath = exposedModuleKey
Expand Down

0 comments on commit 292517a

Please sign in to comment.