[英]VSCode “files.exclude” not working for specific targets
In my workspace settings file I have 在我的工作区设置文件中
{
"files.exclude": {
"**/*.js": {
"when": "$(basename).ts"
},
"app/**/*.js.map": {
"when": "$(basename).ts"
}
}
}
I have also tried app/**/*.map
and $(basename).js
and it doesn't work. 我也尝试过
app/**/*.map
$(basename).js
和$(basename).js
,它不起作用。 How can I exclude .map files from being shown when I'm using TypeScript? 我在使用TypeScript时如何不显示.map文件?
Unfortunately, the $(basename) evaluates to "app/**/*.js" (with the asterisks expanded), only excluding the ".map" part, not ".js.map" as you might expect. 不幸的是,$(basename)的计算结果为“ app / ** / *。js”(星号已展开),仅排除了“ .map”部分,而不是您期望的“ .js.map”部分。
Try using "when": "$(basename)" for your .map files - that will work like "exclude .js.map files when a .js file exists." 尝试对.map文件使用“ when”:“ $(basename)”-与“ .js文件存在时排除.js.map文件”一样工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.