Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use plug-ins to locate node modules in vscode

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

Editor to share with you how to use the plug-in to locate the node module in vscode, I believe most people don't know much about it, so share this article for your reference. I hope you can learn a lot after reading this article. Let's go and learn about it.

When using VSCode to develop Node.js (including node side and front-end Vue/Angle/React), you often encounter a very painful thing:

When relying on a module, you want to skim through the source code and API of the module.

But the node_modules directory under the amazing number of modules, a variety of scroll bars scrolling, a variety of eyesight test.

So I found such a plug-in Search node_modules. Unfortunately, this plug-in can only search and locate by entering the module name by command.

But can you locate it directly from the import statement of the code, similar to holding down the ctrl + the left mouse button and clicking to go to the definition, which is so convenient:

Import xxx from 'xxx'var xxx = require (' xxx').

So I developed a plug-in that can quickly locate the node module: vscode-goto-node-modules.

Take a GIF and feel it:

Because TypeScript already has good jump support, the plug-in does not implement ts-related jumps.

The plug-in is also just a packages.json file.

Enter ravenq in the VSCode plug-in search to quickly find the plug-in:

These are all the contents of this article entitled "how to use plug-ins for locating node modules in vscode". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report