最近做新的项目,cnpm install 之后node_modules 中文件暴增,导致webstorm一直卡在“Scanning files to index ......”甚至几度崩溃,切换为IntelliJ IDEA结果一致。无奈+烦躁,在网上找了解决办法,感觉以后可能还会遇到,所以将解决过程整理了一下。
上面描述的问题归根到底就是文件过多,webstorm一直卡在建立索引这一步。

解决思路就是将文件过多的文件夹排除出建立索引的范围,按我的实际情况就是排除node_modules 文件夹了。如何排除?步骤如下:

网友评论