I am giving my first try at TypeScript compiling and I am trying to do it within Visual Studio Code with a tsconfig file.
I have read the documentation at the TypeScript site and believe I have formatted my file the correct way but the error I keep getting in the output is:
error TS6053: File 'c:/Users/username/devbox/home/tsc-play/**/*.ts' not found. 2:46:11 PM - Compilation complete. Watching for file changes.
However, in that folder there is a 'hello.ts' file.
Here is the code for my tsconfig.json file:
{
"compilerOptions": {
"target": "es5",
"outFile": "dist/bundle.js",
"watch": true
},
"compileOnSave": true,
"files": [
"src/*.ts"
]
}
You need to change the "files" to "include" in your tsconfig file.
The files
flag looks for specific files while include
can use glob syntax.
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