我正在尝试排除上的几个文件夹Explore
Visual Studio Code 中的选项卡。为此,我添加了以下内容jsconfig.json
到我的项目的根目录:
{
"compilerOptions": {
"target": "ES6"
},
"exclude": [
"node_modules"
]
}
But the node_modules
文件夹在目录树中仍然可见。
我究竟做错了什么?还有其他选择吗?
Use 文件.排除:
- Go to 文件 -> 首选项 -> 设置(或在 Mac 上代码 -> 首选项 -> 设置)
- 选择
workspace settings
tab
- 将此代码添加到
settings.json
右侧显示文件:
// Place your settings in this file to overwrite default and user settings.
{
"settings": {
"files.exclude": {
"**/.git": true, // this is a default value
"**/.DS_Store": true, // this is a default value
"**/node_modules": true, // this excludes all folders
// named "node_modules" from
// the explore tree
// alternative version
"node_modules": true // this excludes the folder
// only from the root of
// your workspace
}
}
}
如果你选择文件 -> 首选项 -> 用户设置然后为当前用户全局配置排除文件夹。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)