K
K
Kirill Belash2022-02-03 10:47:59
Vue.js
Kirill Belash, 2022-02-03 10:47:59

How to go to a component on click?

Hello, the essence of the question is simple. Are there any extras for vscode, so that by clicking on the name of the component, open the file itself with it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vadim, 2022-02-03
@MrDecoy

There is additional The key is called Ctrl (Cmd on mac os) + click the left mouse button.
But for this, VS Code needs to cope with resolving paths, both relative and through aliases. But this is already a more difficult task, which, perhaps, you will not have. (For the solution of which you can google, but if it doesn’t work out, create a more appropriate question on the topic)
Pointed with ctrl held down - when clicked, it opens the component file.
61fb933dd0887650283681.png
And here is the import

import CheckoutAccessories from '~/components/pages/checkout/CheckoutAccessories'
I no longer want to open the code, since I did not bother.
But the component is always easy to open via Ctrl+P -> ctrl+v component name. -> enter

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question