unplugin-vue-components
unplugin-vue-components copied to clipboard
Vue 2.7 components.d.ts module augmentation
Vue 2.7 no longer needs @vue/runtime-core
, which means that the generated components.d.ts
isn't recognised by Volar.
I've replaced
import '@vue/runtime-core'
export {}
declare module '@vue/runtime-core' {
with
export {}
declare module 'vue' {
and that fixes the issue.
I don't know if we can autodetect the version, otherwise maybe an option to override the module used here?
me too
This issue causes type inference to fail in Vue 2.7
Is there something I can provide to help this get worked on? Type inference is totally broken in Vue 2.7 without manually editing the generated file.
Using option 2.7 seemingly had no affect for me. The process did not work correctly. Pushing the option back to '2', from '2.7', had no affect either. I was only able to get it to function properly by explicitly adding @vue/runtime-core & pushing back to the 2 option. Otherwise volar was not able to infer the types.