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

前端 未结 3 1878
攒了一身酷
攒了一身酷 2021-01-01 09:48

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

3条回答
  •  悲&欢浪女
    2021-01-01 10:10

    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

提交回复
热议问题