Mark node_modules as excluded by default in webstorm 10

Each time I download a project from github, I run npm install, which runs reindex in the node_modules folder that is being created. This indexing slows down my computer. An ugly workaround is to create an empty node_modules folder, exclude it, and then run npm install. How to disable indexing for the node_modules folder in the EVERY project by default? Webstorm does this for Meteor projects with .meteor/local , so I assume this is possible.

+6
source share
2 answers

We usually recommend excluding this folder if it is used for auxiliary purposes (running grunt / gulp / karma, etc.). But we cannot exclude it by default, since users developing Node.js applications usually need to have completion / types that allow work for node_modules.

If you want it to be excluded from all your projects by default, just add node_modules to the ' Ignore files and folders ' list in Settings/Editor/File types

Update: from 2016.x, node_modules are automatically excluded by default. The direct dependencies listed in package.json are configured as a JavaScript library to complete

+5
source

webstorm treats the node_module directory as the root directory of the library, so when you right-click on it there is no label directory. we can change it to a simple directory by removing the configuration item whose type is the project from Preference> Language and Structure> Javascript> Libraries, and then mark the node_module directory as excluded.

+1
source

All Articles