Hide Node Modules
Hide Node Modules
A VSCode extension that adds the ability to show and hide the node_modules folder from within the file explorer, via a context-menu, shortcut keys, command palette or status bar. The option to show or hide the node_modules folder is only available if a package.json or package-lock.json is detected within the current workspace folder.

Features
- Show and hide the
node_modulesfolder - Explorer context menu
- Auto hide
node_moduleswhen opening a new folder - Status bar indicator when hiding a
node_modulesfolder - Setting configurable between workspace and global
How to use
| Action | Windows / Linux | macOS | Command Palette |
|---|---|---|---|
| Hide Node Modules | ctrl-alt-n | cmd-alt-n | > Hide Node Modules |
| Show Node Modules | ctrl-alt-n | cmd-alt-n | > Show Node Modules |
How to manually unhide node_modules
If a folder is opened in VSCode without the Hide Node Modules extension but had previously used it to hide the node_modules folder, VSCode will keep it hidden - the extension uses an option within the VSCode settings.json file to control visibility of the node_modules folder.
To unhide the node_modules folder without using the extension:
- Open the
settings.jsonfile located within the.vscodefolder - Locate the line
"**/node_modules": truewithin"files.exclude": { ... } - Change the value to
"**/node_modules": false - Save the file
The node_modules folder should now be visible again within the explorer.
Acknowledgements
- Folder Icons provided by: Hide icons created by Those Icons - Flaticon