Tyler Tyler - 1 year ago 157
TypeScript Question

Hide .js.map files in Visual Studio Code

I am working on a typescript project in Visual Studio code and would like to hide the

(and maybe even the
) files from appearing in the file explorer.

Is it possible to display only the
files in the file explorer?

Answer Source

In your settings (either user or workspace) there is a setting that you can tweak to hide anything you'd like...

    "files.exclude": {
        "**/.git": true,
        "**/.DS_Store": true

So you can add in the following to hide .js and .js.map files

"**/*.js": true,
"**/*.js.map": true


As @AlwaysLearning pointed out down below, most people probably only want to hide .js files when there is a matching .ts file.

So instead of doing:

"**/*.js": true

you might want to do:

"**/*.js": {"when": "$(basename).ts"}
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download