{
"compilerOptions": {
"target": "ES6"
},
"exclude" : [
"node_modules"
]
}
But the “node_modules” folder is still visible in the directory tree. What am I doing wrong? Are there other options?
>Go to file – >Preferences -> Settings (or on the Mac code -> Preferences -> Settings)
>Select the Workspace Settings tab
>Add this code to the settings.json file shown on the right: p>
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"**/.git": true, // this is a default value
"**/.DS_Store": true, // this is a default value
"** /node_modules": true, // this excludes all folders
// named "node_modules" from
// the explore tree
// alternative version
"node_modules ": true // this excludes the folder
// only from the root of
// your workspace
}
}
If you choose a file – >Preferences -> User Settings Then you configure the exclusion folder globally for the current user.
I am trying to exclude on the “Browse” tab in Visual Studio Code Multiple folders. For this, I added the following jsconfig.json to the root of the project:
{
"compilerOptions": {< br /> "target": "ES6"
},
"exclude": [
"node_modules"
]
}
But The “node_modules” folder is still visible in the directory tree. What am I doing wrong? Are there other options?
Use files.exclude:
>Go to File -> Preferences -> Settings (or on Mac code- >Preferences -> Settings)
>Select the Workspace Settings tab
>Add this code to the settings.json file shown on the right:
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"**/.git": true, / / this is a default value
"**/.DS_Store": true, // this is a default value
"**/node_modules": true, // this excludes all folders
// named "node_modules" from
// the explore tree
// alternative version
"node_modules": true // this excludes the folder
// only from the root of
// your workspace
}
}
If you choose File-> Preferences-> User Settings then you are global for the current user Configure excluded folders.