Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Hide Node ModulesNew to Visual Studio Code? Get it now.

Hide Node Modules

Chris Bibby

|
8,370 installs
| (15) | Free
Show/Hide Node Modules within the Explorer view
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Hide Node Modules README

This VSCode extension adds the ability to show and hide the node modules folder from within the explorer, via a context-menu, shortcut keys, command palette or status bar. The option to hide/show 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

How to use

Action Windows / Linux macOS Command Palette
Show/Hide 'node_modules' folder ctrl-alt-n command-alt-n Show/Hide Node Modules

How to manually unhide node_modules

If a folder/workspace 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

  • FlatIcon
  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2022 Microsoft