Skip to content

Commit 0216364

Browse files
authored
fix(dts-plugin): ignore .vue ext (#3008)
1 parent affab37 commit 0216364

File tree

3 files changed

+20097
-23682
lines changed

3 files changed

+20097
-23682
lines changed

.changeset/brown-cameras-decide.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@module-federation/dts-plugin': patch
3+
---
4+
5+
fix(dts-plugin): ignore .vue ext

packages/dts-plugin/src/core/lib/typeScriptCompiler.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@ function writeTempTsConfig(
7474
}
7575

7676
const removeExt = (f: string): string => {
77+
const vueExt = '.vue';
7778
const ext = extname(f);
79+
if (ext === vueExt) {
80+
return f;
81+
}
7882
const regexPattern = new RegExp(`\\${ext}$`);
7983
return f.replace(regexPattern, '');
8084
};
@@ -191,7 +195,6 @@ export const compileTs = async (
191195
resolve(remoteOptions.context, normalizedFileName),
192196
);
193197
}
194-
195198
return [removeExt(relativeFileName), exposed];
196199
}),
197200
);

0 commit comments

Comments
 (0)