How do I hide my node_modules folder in the Project panel?

I'd like to hide the node_modules folder in my project, as well as excluding it from searches.

 

At the moment, it shows all the time; I can't even hide it with scopes (in fact scopes expressions don't even seem to register for the folder - when you try to exclude it, the expression comes up empty):

I'm on the latest version of PHPStorm.

Feels like a bug, or at least an oversight.

Thanks,

Dave

0

Hi there,

AFAIK node_modules is automatically excluded from the project (that's why you do not see it in custom scopes -- Scopes screen in Settings/Preferences does not include or even list ignored folders at all) and then all packages/libs that are explicitly listed in your package.json are added as libraries (so you can have them in code completion etc).

To hide excluded folders in Project View panel ... just disable that option in Project View panel settings (cog/gear icon)

My only concern right now -- on your screenshot I see some "[demo]" and "library root" text next to it -- not sure about those (I'm not really a JS person and don;t really have such stuff in my projects) -- they may prevent it from "hiding".

2

请先登录再写评论。