Currently, I am executing the following task:
{
"taskName": "tsc watch",
"command": "tsc -w",
"type": "shell",
"problemMatcher": "$tsc-watch"
}
using this specific tsconfig setup:
{
"compileOnSave": true,
"files": [
"src/index.ts"
],
"compilerOptions": {
"module": "commonjs",
"sourceMap": true,
"outDir": "dist/"
},
"exclude": [
"node_modules"
]
}
The file index.ts
contains just one line of code:
console.log('Is it working?');
Strangely, the "problems" tab is displaying HTML-related warnings from various npm modules. Can someone explain why this is happening and how to resolve it?
Edit1:
I discovered a temporary solution by excluding the node_modules folder from the explorer:
/* settings.json */
{
"files.exclude": {
"**/node_modules": true
}
}
However, I consider this a workaround and still seek a more permanent fix.