Open ydennisy opened 1 month ago
Could you reproduce this in stackblitz.com?
I had a similar error right now. Built my library with vite build --mode lib and had these globals inserted aswell. For me updating the "vite-plugin-dts" package to the current 4.0.3 did the trick.
Is this still relevant with language-tools @ 2.1.1
?
Vue - Official extension or vue-tsc version
2.0.29
VSCode version
1.91.1
Vue version
3.4.34
TypeScript version
5.5.4
System Info
Steps to reproduce
The issue is that
vue-tsc --declaration --emitDeclarationOnly
andvue-tsc --declaration --emitDeclarationOnly --watch
behave differently, specifically when running the--watch
version, there are extra global types emitted which TS in the consuming applications does not like as they conflict.To me it seems the issue lies somewhere here:
It seems that regex is not being executed with watch mode switched on and lots of extra types are pushed into the output causing issues when the vue component library is consumed.
What is expected?
No TS issues, no
Vue
global types to be emitted inside of components.What is actually happening?
The following types are included in one of the exported components:
Link to minimal reproduction
No response
Any additional comments?
This happens both when using
vue-tsc
directly and when using thevite
dts
plugin.