vue3 auto imports from "vue/dist/vue" instead of "vue"
I have recently stated using vue3 with WebStorm 2021.3.2. I used vue-cli to create the project. When I use a vue method WebStorm knows to add an import to the top of the script section. However it adds the wrong path. It is adding import {method} from "vue/dist/vue" this fails. The path I need it to use is simply import {method} from "vue". I have spent a while trying to fix this. Can anyone help me change this? Any assistance would be welcome.
Please sign in to leave a comment.
please could you share a code snippet (as text) the issue can be reproduced with? Can you repeat it in a new project?
Can second this, happens in several unrelated projects and is quite irritating as it prevents a successful build.
Iirc it mainly occurs when pasting code from another file, even when the correct import is already used in the file...
Same issue here. Happening with several unrelated projects as well.
Can't reproduce
Please share a test project (including .idea folder) the issue can be repeated with
This is the project:
https://github.com/betoop/vite-project-4445444141970
It was created through `pnpm create vite` as a regular vue project.
Worths to mention I'm using `pnpm`. Same occurs with `npm`. haven't tested on `yarn`.
To reproduce the issue:
Thanks, reproduced; please follow https://youtrack.jetbrains.com/issue/WEB-55236 for updates