Exclude In Visual Studio Code

In this post we are going to see how to exclude folders like node_modules, bower_components or files from Visual Studio Code(v:1.40.0) Explorer.

After opening a project in Visual Code Go to File > Preferences > Settings > Workspace

Add your particular pattern or edit the settings.json file like below. Choose user tab to apply the setting to VSCode for this user with same way.

{
    "files.exclude": {
        "**/*.js": {"when": "$(basename).ts"},
        "**/*.map": {"when": "$(basename).map"},
        "**/node_modules": true,
        "**/bower_components": true,
        "**/config": true
     }
}

Author:

Since March 2011, have 8+ years of professional experience on software development, currently working as Senior Software Engineer at s3 Innovate Pte Ltd.

Leave a Reply