unplugin-auto-import: Vue 3.3 breaks auto import types in `vueTemplate`

Hello,

I recently upgraded my project to Vue 3.3. I saw on the blog post (https://blog.vuejs.org/posts/vue-3-3) that there have been some changes to the JSX namespace (https://blog.vuejs.org/posts/vue-3-3#jsx-import-source-support).

I’m not getting types for global imports inside <template>s. I have vueTemplate: true, inside the Vite config, but I’m getting errors when using variables from auto-imports.d.ts. They work fine inside <script setup>s.

My stack is Vue 3.3.1 + Vite (latest).

Here’s an example:

image

Looking forward to a timely solution.

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 12
  • Comments: 15 (3 by maintainers)

Commits related to this issue

Most upvoted comments

I would love to see a minimal reproduction if someone could make one. Not sure if it’s some regression related to Volar, as we are extending the ComponentCustomProperties interface.

/cc @johnsoncodehk if you have any clue

https://github.com/vuejs/language-tools/issues/3190#issuecomment-1554037716

This issue would soon become another “me too” movement. with the comments everywhere 🥲

Nuxt says report to Volar. Volar says report to unplugin-auto-imports and you say report to Volar.

Here is the original issue on nuxt nuxt/nuxt#20827

me too!!