I am working on a typescript project in Visual Studio code and would like to hide the .js.map
(and maybe even the .js
) files from appearing in the
When you are working with TypeScript, you often don’t want to see generated JavaScript files in the explorer or in search results. VS Code offers filtering capabilities with a files.exclude
setting (File > Preferences > Workspace Settings) and you can easily create an expression to hide those derived files:
"**/*.js": { "when": "$(basename).ts"}
Similarly hide generated .map
files by:
"**/*.js.map": { "when": "$(basename)"}
So you will have a configuration like in:
settings.json
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"**/*.js": { "when": "$(basename).ts"},
"**/*.js.map": { "when": "$(basename)"}
}
}
Link: https://code.visualstudio.com/docs/languages/typescript#_hiding-derived-javascript-files