Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add GlobalComponents dts #469

Merged
merged 6 commits into from Jan 25, 2024
Merged

Conversation

BTBMan
Copy link
Contributor

@BTBMan BTBMan commented Jan 25, 2024

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.

  1. Renaming auto-import.d.ts, make sure this file is after the components.d.ts.
  2. Changing the order of tsconfig.json include field.

I noticed if I add an empty GlobalComponents inside declare module 'vue' can also fix it.

Linked Issues

vuejs/language-tools#3383

Additional context

Signed-off-by: BTBMan <1498118157@qq.com>
Signed-off-by: BTBMan <1498118157@qq.com>
Copy link

stackblitz bot commented Jan 25, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@antfu antfu changed the title fix: add GlobalComponents fix: add GlobalComponents dts Jan 25, 2024
@antfu antfu merged commit d40f14b into unplugin:main Jan 25, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants