Skip to content
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

The import .vue in the .vue file is located as 3 modules, same file but in different scopes #227

Closed
masquevil opened this issue Apr 28, 2021 · 3 comments
Labels
bug Something isn't working Stale

Comments

@masquevil
Copy link

masquevil commented Apr 28, 2021

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 name
Found 2 modules when click component file path:
Found 2 modules when click path

Click the first one to enter, all the contents in the <script> tag will be selected:
selected area 1

Click the second one to enter, it will select the defineComponent:
selected area 2

Click the third one to enter, it will select from the <script> tag to the end of the file:
selected area 2

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 
@masquevil masquevil added the bug Something isn't working label Apr 28, 2021
@masquevil
Copy link
Author

Anybody here?

@znck
Copy link
Collaborator

znck commented May 21, 2021

On a break. Will be back next month.

@masquevil
Copy link
Author

Bug 1 have been fixed by follow vuejs/vetur#2016
Bug 2&3 still exists

@masquevil masquevil changed the title The import .vue file in the .ts file will not be able to locate The import .vue in the .vue file is located as 3 modules, same file but in different scopes Jun 14, 2021
@znck znck added the Stale label Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Projects
None yet
Development

No branches or pull requests

2 participants