Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

739
Views
Difference between tsconfig.json and tsconfig.app.json files in Angular

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.

over 4 years ago · Santiago Trujillo
4 answers
Answer question

0

Just want to add one more point.

It seems the tsconfig.app.json(App specific one) will override the tsconfig.json(global one).

My issue was with the types declaration from node not in scope of my Angular project and I was getting compile errors saying Buffer is not found.

I first added the types declaration in tsconfig.json thinking it will take effect in every app. But I had to add it to my app-specific tsconfig.app.json file for it to take effect on my app.

over 4 years ago · Santiago Trujillo Report

0

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.

over 4 years ago · Santiago Trujillo Report

0

tsconfig.app.json is a configuration for the Angular application,

tsconfig.json is used for IDE integration

tsconfig.json can be removed

According to https://github.com/angular/angular-cli/wiki/stories-rc.0-update#one-tsconfig-per-app

over 4 years ago · Santiago Trujillo Report

0

The difference is that tsconfig.app.json is a file that is related to the Angular App in particular, while tsconfig.json is a more general file that contains general typescript configuration. It's especially useful when you have a micro frontends system, where there are multiple Angular subprojects, each of them with its own tsconfig.app.json configuration. But if you want you could perfectly merge these two files into one, actually you surely noticed that tsconfig.app.json contains the line:

  "extends": "./tsconfig.json"

which means that the whole App uses the configuration stated in tsconfig.app.json plus the configuration in tsconfig.json

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!