MonkeyBonkey MonkeyBonkey - 1 year ago 165
TypeScript Question

How to ignore `node_modules` folder during TypeScript build in VSCode

I'm using visual studio code IDE and typescript, how do I get it to ignore the node_modules folder during build? Or have it build

files on save? It is showing a lot of errors because it's trying to compile node_modules tsd.

Currently my tasks.json is

"version": "0.1.0",

// The command is tsc.
"command": "tsc",

// Show the output window only if unrecognized errors occur.
"showOutput": "silent",

// Under windows use tsc.exe. This ensures we don't need a shell.
"windows": {
"command": "tsc.exe"

"isShellCommand": true,

// args is the HelloWorld program to compile.
"args": [],

// use the standard tsc problem matcher to find compile problems
// in the output.
"problemMatcher": "$tsc"

Answer Source

you can now use (in your tsconfig.json file):

"exclude": [

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download