How can I prevent VSCode from adding the import statement for auto-imported components?
I can choose not to auto-complete and then that's fine, but it's prone to error and end up in an error (image), how do you deal with it ?
5 Replies
Good question, I am also interested into the answer. I find this annoying. I’ll search and get back to you.
We definitely want to keep the auto-import in the nuxt config file (https://nuxt.com/docs/guide/concepts/auto-imports) but there should be a way to disable auto explicit imports.
Nuxt
Auto-imports · Nuxt Concepts
Nuxt auto-imports components, composables, helper functions and Vue APIs.
Maybe we can look into how to tweak vscode config so that it doesnt suggest to import from the component directory
You could add the following to your vscode workspace settings?
I need to try that!
This seems to work, thanks mate !