I am unable to understand the use of tsconfig.app.json in src folder in Angular-2 cli project. I know that tsconfig.json is use by typescript compiler, so why tsconfig.app.json?
Asked
Active
Viewed 8,580 times
24
-
Does this answer your question? [Difference between tsconfig.json and tsconfig.app.json files in Angular](https://stackoverflow.com/questions/54898013/difference-between-tsconfig-json-and-tsconfig-app-json-files-in-angular) – Michael Freidgeim Feb 27 '23 at 20:18
1 Answers
14
There are a few tsconfig.json files in the standard angular project. Here are the one you have asked about:
- The root
tsconfig.json
provides the base options that different config files derive from. - The app
tsconfig.app.json
provides the options used when working with code in theapp
folder. This allows you to further customize the options fromtsconfig.json
Other tsconfig files follow the same (base + customization) pattern.

basarat
- 261,912
- 58
- 460
- 511
-
Can you please elaborate "further customize the options from tsconfig.json" with an example. – raju Feb 15 '18 at 00:52
-
1`further customize the options from tsconfig.json` The customizations are mentioned in the file contents – basarat Feb 15 '18 at 00:53
-
"Other tsconfig files follow the same (base + customization) pattern." - `tsconfig.spec.json` probably being the most noteworthy. – Frank N Mar 01 '22 at 10:53