Skip to content

Commit

Permalink
fix(dts-plugin): ignore .vue ext (#3008)
Browse files Browse the repository at this point in the history
  • Loading branch information
2heal1 committed Sep 28, 2024
1 parent affab37 commit 0216364
Show file tree
Hide file tree
Showing 3 changed files with 20,097 additions and 23,682 deletions.
5 changes: 5 additions & 0 deletions .changeset/brown-cameras-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@module-federation/dts-plugin': patch
---

fix(dts-plugin): ignore .vue ext
5 changes: 4 additions & 1 deletion packages/dts-plugin/src/core/lib/typeScriptCompiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ function writeTempTsConfig(
}

const removeExt = (f: string): string => {
const vueExt = '.vue';
const ext = extname(f);
if (ext === vueExt) {
return f;
}
const regexPattern = new RegExp(`\\${ext}$`);
return f.replace(regexPattern, '');
};
Expand Down Expand Up @@ -191,7 +195,6 @@ export const compileTs = async (
resolve(remoteOptions.context, normalizedFileName),
);
}

return [removeExt(relativeFileName), exposed];
}),
);
Expand Down
Loading

0 comments on commit 0216364

Please sign in to comment.