我试图在Visual Studio Code的“浏览”选项卡上排除几个文件夹。为此,我在项目的根目录中添加了以下jsconfig.json:
{
"compilerOptions": {
"target": "ES6"
},
"exclude": [
"node_modules"
]
}
但是“ node_modules”文件夹在目录树中仍然可见。我究竟做错了什么?还有其他选择吗?
workspace settings
标签将此代码添加到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
}
}
}
如果选择文件->首选项->用户设置,则为当前用户全局配置排除文件夹。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句