WebStorm - 制作 node_modules "library root" 但也将其排除在索引之外
WebStorm - make node_modules "library root" but also exclude it from indexing
有没有一种方法可以配置 WebStorm 项目,使 node_modules
被选为 library root
但它也被排除在索引之外?
我发誓我看到一个项目表明 node_modules
既是 library root
又是 excluded
但我不知道如何设置它。有人知道怎么做吗?
不,这不可能。因为 library root
表示 "index a part of node_modules corresponding to direct dependencies from package.json, and exclude the rest part of it (i.e. indirect dependencies - dependencies of dependencies)" 而 excluded
表示 "exclude the whole node_modules (i.e. both direct and indirect dependencies)".
如果您想要 node_modules excluded
,只需转到 "Settings | Languages & Frameworks | JavaScript | Libraries" 并取消选择相应的 node_modules 库。
有没有一种方法可以配置 WebStorm 项目,使 node_modules
被选为 library root
但它也被排除在索引之外?
我发誓我看到一个项目表明 node_modules
既是 library root
又是 excluded
但我不知道如何设置它。有人知道怎么做吗?
不,这不可能。因为 library root
表示 "index a part of node_modules corresponding to direct dependencies from package.json, and exclude the rest part of it (i.e. indirect dependencies - dependencies of dependencies)" 而 excluded
表示 "exclude the whole node_modules (i.e. both direct and indirect dependencies)".
如果您想要 node_modules excluded
,只需转到 "Settings | Languages & Frameworks | JavaScript | Libraries" 并取消选择相应的 node_modules 库。