I have added Angular to my Node Express app in VS Code. I did this through Angular CLI's ng new
.
In tsconfig.json
, outDir
points to ./dist/out-tsc
. There is another outDir
in angular-cli.json
.
When I run ng build
, Javascript files are generated in the outDir
indicated in angular-cli.json
. What is the outDir
in tsconfig.json
for? The folder ./dist/out-tsc
was not created.
What is the purpose of using tsconfig.json file ? tsconfig.json file is a file of JSON format which allows us to point the root level files and different compiler options to setup that require to compile a TypeScript based projects. The existence of this file in a project specifies that the given directory is the TypeScript project folder root.
Angular 9 Upgrade updates to tsconfig.app.json are undocumented. · Issue #37168 · angular/angular · GitHub Sign up for free to subscribe to this conversation on GitHub . Already have an account? Sign in .
A tsconfig.json file is permitted to be completely empty, which compiles all files included by default (as described above) with the default compiler options. Compiler options specified on the command line override those specified in the tsconfig.json file.
What is a tsconfig.json 1 Overview. The presence of a tsconfig.json file in a directory indicates that the directory is the root of a TypeScript project. 2 Using tsconfig.json or jsconfig.json. ... 3 Examples. ... 4 TSConfig Bases. ... 5 Details. ... 6 TSConfig Reference. ... 7 Schema. ...
What is the outDir in tsconfig.json for?
Nothing if using AngularCLI. The angular.json
(.angular-cli.json
prior to Angular 6) file controls the output configuration.
As indicated by:
The folder ./dist/out-tsc was not created.
If you use VS Code file watchers to compile your TS files on the fly/on request, then the tsconf.json file location will be used (depending on VSCode config of course). You can probably surmise that using one method or the other is a good idea. You may run into versioning difficulty if you use a combination of both methods.
Stick to the CLI.
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