fix: add GlobalComponents dts by BTBMan · Pull Request #469 · unplugin/unplugin-auto-import (original) (raw)
Description
Add an empty GlobalComponents inside declare module 'vue'.
If I have both auto-import.d.ts and components.d.ts files, set vueTemplate: true for auto-import plugin. After that volar can't detect the export GlobalComponents in components.d.ts.
Before this PR, There are two ways to resolve it.
- Renaming
auto-import.d.ts, make sure this file is after thecomponents.d.ts. - Changing the order of
tsconfig.jsoninclude field.
I noticed if I add an empty GlobalComponents inside declare module 'vue' can also fix it.