-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
feat: add volar support to ionic vue #24169
Comments
Fair enough to mark it as a feature request, I found it hard to determine if this is a bug or a feature request, so went with a bug. I would love this to be considered, since it greatly improves the DX (in my humble opinion), and a DX most Volar users might expect. Either way, thanks for the great framework. |
FYI: Visual Studio Code + Volar extension is the recommended IDE setup in the Vue docs. |
I see the But it seems to be resolved through this more recent issue and will be available in the next release: #25485 CC: @liamdebeasi |
Yes, the issue in #24169 (comment) should be resolved in Ionic 6.1.11. |
I can confirm this is working in nuxt-ionic with Volar. |
I can also confirm it's working with Ionic 6.1.11. Thanks! |
Great! There was a fix in Vue 3.0.1 that updated the default values of the props from Ionic Vue was still being built with Vue 3.0.0, so we did not get to take advantage of that fix until we updated the dev dependencies in 198f418. I am going to close this as the issue appears to be resolved. |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Prerequisites
Ionic Framework Version
Current Behavior
With Volar you get the best TypeScript support for Vue 3 in VSCode (better than Vetur). Including templates.
For regular Vue 3 components this works:
But for Ionic Vue components this doesn't work:
Expected Behavior
For the
collapse
prop ofion-header
I would expect to seecollapse?: 'condense' | 'fade'
as the typing and get errors when I enter something else. Plus I would expect to see the docblock containing "Describes the scroll effect that will be applied to the header.".I know I can use Vetur (which uses those Vetur json files), but Volar is much better for Vue 3 and has
<script setup>
support which I would like to start using.Steps to Reproduce
.vue
SFC fileCode Reproduction URL
https://github.com/elwinvaneede/ionic6-volar
Ionic Info
Additional Information
I think I've found the cause, through my work on the Graphite Design System. But I might be wrong of course.
The
@ionic/vue
package hasvue: 3.0.0
in the package-lock.json, instead of the latest Vue 3 version (3.2.21
at the time of writing).When I use the latest vue version in
@graphite/vue
I do get the expected typing through Volar, but also a lot of false type errors, which makes it unusable in Volar:When I use exactly
vue: 3.0.0
in@graphite/vue
the type errors go away so it makes it at least usable in Volar, but I also don't have any typings (just like Ionic Vue):The text was updated successfully, but these errors were encountered: