I'm a newbie in Angular. I used angular-cli
to learn about angular and I found the files tsconfig.json
and tsconfig.app.json
. Both of these are typescript related and I found this link useful.
But why two such files has been used? Why can't the configurations in these two files be combined in one file? Please help me figure this out.
The tsconfig. json file specifies the root files and the compiler options required to compile the project. JavaScript projects can use a jsconfig. json file instead, which acts almost the same but has some JavaScript-related compiler flags enabled by default.
The tsconfig. json is generally put in the root folder of the project.
Correct Answer : Option (C) : This file is used to give the options about TypeScript used for the Angular JS project.
there is nothing that prevents you from getting rid of the tsconfig.app.json
. it's just an additional config file that allows you to adjust your configuration on an app basis. this is e.g. useful when you have multiple apps in the same angular-cli
workspace.
you could have the root folder with the tsconfig.json
and then a sub folder app-a
with a tsconfig.app.json
file and another app in the sub-folder app-b
with it's own tsconfig.app.json
, which contains a variation of the global configuration.
the difference in configuration could e.g. be the output directory outDir
or the includes
or excludes
used.
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