-
-
Notifications
You must be signed in to change notification settings - Fork 593
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
Vetur doesn't detect augmentation of Vue when using typescript #1817
Comments
I've noticed this issue as well. In my case it's because I am using a multiroot workspace via 'Add Folder to Workspace'. When I take a project root into its own workspace, the problem goes away. Support for multiroot workspaces has been sought after for a while (#424), is there any progress on this? |
The workaround I've found is to deactivate linting from this plugin and to use eslint with the vue plugin |
Wasted 5+ hours trying to figure out what was going on. Loading my project in a VSCode workspace was the issue. Very curious if there is any workaround to get module augmentation to work in multi project workspace in VSCode? |
Forgot where I found it but also if the vue project is the first project folder in the workspace vetur will work correctly. |
Not really a workaround but you could make a plugin https://vuejs.org/v2/guide/plugins.html and add to its prototype, then Vue.use(yourplugin) you will get intellisense for it. I hope they fix this soon. |
Thanks @AlaaZorkane, you should follow https://vuejs.org/v2/guide/plugins.html. |
Info
Problem
I've had this problem but I'm guessing this happens with other plugins.
I've installed a plugin called vue-bus (https://github.com/yangmingshan/vue-bus). It adds the property $bus to Vue. But whenever I use it Vetur says the property doesn't exist but it compiles fine and works as expected
This plugin comes with shims files but I can't get Vetur to detect them. I've tried creating my own as specified in the Vue documentation but it didn't work either
Maybe I missed a step somewhere but I don't know what to do next. Any help appreciated
Here is a screenshot of the said error :
Reproducible Case
The text was updated successfully, but these errors were encountered: