Skip to main content

Hide Node Modules

Rating Review Ratings Marketplace Installs OpenVSX Downloads

Last Github Commit Last Updated Known Vulnerabilities

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.

Hide Node Modules VSCode Extension

Features

  • Show and hide the node_modules folder
  • Explorer context menu
  • Auto hide node_modules when opening a new folder
  • Status bar indicator when hiding a node_modules folder
  • Setting configurable between workspace and global

How to use

ActionWindows / LinuxmacOSCommand Palette
Hide Node Modulesctrl-alt-ncmd-alt-n> Hide Node Modules
Show Node Modulesctrl-alt-ncmd-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:

  1. Open the settings.json file located within the .vscode folder
  2. Locate the line "**/node_modules": true within "files.exclude": { ... }
  3. Change the value to "**/node_modules": false
  4. Save the file

The node_modules folder should now be visible again within the explorer.

Acknowledgements

Repository