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 .ts
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"
}
vscode folder. Locate the line "**/node_modules": true within "files. exclude": { ... } Change the value to "**/node_modules": false.
You should not include folder node_modules in your . gitignore file (or rather you should include folder node_modules in your source deployed to Heroku). If folder node_modules: exists then npm install will use those vendored libraries and will rebuild any binary dependencies with npm rebuild .
Go to settings, search for files. exclude and ensure that you haven't excluded the directory in user settings and/or workspace settings. If you want search results to include node_modules by default, you'll need to remove the pattern from the search. exclude setting.
In Version 0.5 you can hide files and folders
Open Files->Preferences->User Settings and add something like
{
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"jspm_packages" : true,
"node_modules" : true
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With