The import .vue in the .vue file is located as 3 modules, same file but in different scopes
Closed this issue · 3 comments
Describe the bug
Bug 2
The import .vue
file in the .vue
file can be located, but 3 modules will be found, which are the same file but in different scopes:
Found 2 modules when click component name:
Found 2 modules when click component file path:
Click the first one to enter, all the contents in the <script>
tag will be selected:
Click the second one to enter, it will select the defineComponent
:
Click the third one to enter, it will select from the <script>
tag to the end of the file:
Bug 3
import Comp from './xxx/yyy'
If you do not write .vue
or index.vue
, the corresponding file cannot be recognized.
Bug 1
In the vscode editor, if you import a .vue
file in a .ts
or .js
file, you will not be able to locate the file, only shims-vue.d.ts
.
But there is no problem importing the .vue
file in the .vue
file:
Note that there is no entry.vue file in the dropbox:
https://user-images.githubusercontent.com/3344691/116192094-f4756c80-a75f-11eb-9393-ca88cebe2982.png
command + click to jump, it will jump to shims-vue.d.ts
:
https://user-images.githubusercontent.com/3344691/116192835-fc81dc00-a760-11eb-8d90-74a0534ccf95.png
To Reproduce
https://github.com/masquevil/stock
Info (please complete the following information):
System:
OS: macOS 11.0.1
CPU: (4) x64 Intel(R) Core(TM) i7-4650U CPU @ 1.70GHz
Memory: 415.90 MB / 8.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 15.14.0 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 7.11.1 - /usr/local/bin/npm
Browsers:
Chrome: 90.0.4430.93
Firefox: 72.0.2
Safari: 14.0.1
npmPackages:
@vitejs/plugin-vue: ^1.2.1 => 1.2.1
vite: ^2.1.5 => 2.1.5
Anybody here?
On a break. Will be back next month.
Bug 1 have been fixed by follow vuejs/vetur#2016
Bug 2&3 still exists