【发布时间】:2016-01-20 09:42:57
【问题描述】:
我正在尝试排除 Visual Studio Code 中 Explore 选项卡上的几个文件夹。为此,我在项目的根目录中添加了以下 jsconfig.json:
{
"compilerOptions": {
"target": "ES6"
},
"exclude": [
"node_modules"
]
}
但node_modules 文件夹在目录树中仍然可见。
我做错了什么?还有其他选择吗?
【问题讨论】:
-
似乎大多数答案都建议在 Workspace Settings 中更改此配置。但是,我不需要
node_modules出现在 any 项目中。所以我会在 User Settings 中全局设置它。