NuxtJS components V2 auto-import support
Hi !
NuxtJS recently updated its auto-import module (@nuxtjs/components) from V1 to V2 (now included in the main nuxt dependency) They want to uniformize Vue.js components naming which is great as all projects work with different naming conventions.
Currently, NuxtJS component V1 is supported by WebStorm (the filename defines it). But the new naming convention is not supported.
Components V1 :
/components/subdirectory/SubdirectoryComponent.vue
=> We can autoimport in another page the component with : <SubdirectoryComponent /> or <subdirectory-component />
=> The CTRL + Click on <subdirectory-component /> works!
Components V2 :
/components/subdirectory/Component.vue (components V1 naming is still supported be not recommended).
=> The CTRL + Click on <SubdirectoryComponent /> or <subdirectory-component /> is broken. Even if the name attribute is specified to the component (export default { name: 'SubdirectoryComponent ' })
https://github.com/nuxt/components#nested-components
What would be great would be that webstorm either understand the Vue.js name attribute or defines the component name from the path.
thanks in advance for your reply ! :)
Please sign in to leave a comment.
I've created a request for supporting this convention, https://youtrack.jetbrains.com/issue/WEB-50959; please follow it for updates
Thanks for created this more explicit issue!
I added me as watcher.