visual code - excluding files with several conditions

前端 未结 2 1137
我在风中等你
我在风中等你 2021-01-13 06:28

There is an option to exclude generated files with the \"when\" keyword, .e.g:

\"files.exclude\": {
  \"**/*.js\": { \"when\": \"$(basename).ts\"},
}
         


        
相关标签:
2条回答
  • 2021-01-13 07:16

    These are my settings if they help. It is quite a mess in creating these. I think that a regexp would be great, but we live in hard times ....

    "files.exclude": {
    "**/*.js": { "when": "$(basename).tsx"},
    "**/*?.js": { "when": "$(basename).ts"},
    "**/*.js.map": true
    }
    
    0 讨论(0)
  • 2021-01-13 07:21

    Try this:

    "**/*.js": { "when": "$(basename).ts"},
    "**/*?.js": { "when": "$(basename).tsx"}
    

    Source: Microsoft/vscode#1214

    0 讨论(0)
提交回复
热议问题