Global component definitions not recognized when declare module 'vue'
is defined twice in different files
#3383
Labels
good reproduction ✨
This issue provides a good reproduction, we will be able to investigate it first
upstream
I'm not sure if the title is the actual explanation of the issue, but that's what I found out while debugging.
Basically, I want to use
unplugin-auto-import
andunplugin-vue-components
in the same project. I generate their.d.ts
in a directory, eg..types
.The issue appears when
unplugin-auto-import
uses thevueTemplate
option. When enabled, it declaresComponentCustomProperties
in adeclare module 'vue'
. When this is the case, global components are no longer detected (marked asunknown
).Reproduction:
nr dev
to generate typessrc/App.vue
in VSCode, see that<HelloWorld>
isunknown
.test/auto-imports.d.ts
, remove the entiredeclare module 'vue'
block under// for vue template auto import
<HelloWorld>
is now properly recognizedThe text was updated successfully, but these errors were encountered: