Hiding .js and .map files in VS Code while

What settings can I use in Visual Studio code to hide certain .js and .map files?

enter image description here

+4
source share
3 answers

You can configure the files.exclude properties in User Preferences .

Add this to your user settings file.

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

You can open the settings file from the command pallet (ctrl + shift + p) and search for settings.

+11
source

You probably don’t want to blindly hide all files, .jsand .maponly those generated from the linked file .ts, as shown in the screenshot.

, :

{
  "files.exclude": {
    "**/.git": true,
    "**/.DS_Store": true,
    "**/*.js.map": true,
    "**/*.js": {"when": "$(basename).ts"}
  }
}
+17

settings.json .vs code, .

File → Settings → Settings →

Pay attention to the drop-down menu on the right. Click on it and select workspace settings.

You can insert json settings.

{
    "files.exclude": {
        "**/.git": true,
        "**/.DS_Store": true,
        "**/*.js.map": true,
        "**/*.js": {"when": "$(basename).ts"},
        "**/node_modules/": true, <-- To hide node modules files
        "**/*.spec.ts": true <-- To hide cli generated files
    }
}

Make sure you save the file.

+2
source

All Articles