Home >Development Tools >VSCode >Share the plug-in for locating node modules in vscode: vscode-goto-node-modules
Related recommendations: "vscode tutorial", "nodejs tutorial"
Using VSCode to develop Node.js ( When developing (including node and front-end Vue/Angle/React), I often encounter a very painful thing:
When I depend on a module, I want to briefly browse the source code and API of this module.
But there are an astonishing number of modules in the node_modules directory, and various scroll bars are scrolling, which tests your eyesight.
So I found such a plug-in Search node_modules. Unfortunately, this plug-in can only be searched and positioned by entering the module name through the command.
But can you directly locate the function from the import statement of the code, similar to holding down ctrl and left-clicking the mouse to go to the definition? This is so convenient:
import xxx from 'xxx' var xxx = require('xxx') ...
So, I developed it myself A plug-in is installed to quickly locate node modules: Share the plug-in for locating node modules in vscode: vscode-goto-node-modules.
Let’s get a GIF to feel it:
Since TypeScript already has good jump support, the plug-in does not implement ts-related jumps.
Plug-ins are also just packages.json files.
Enter ravenq
in the VSCode plug-in search to quickly search for the plug-in:
For more programming-related knowledge, please visit: Programming Teaching! !
The above is the detailed content of Share the plug-in for locating node modules in vscode: vscode-goto-node-modules. For more information, please follow other related articles on the PHP Chinese website!