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

前端 未结 3 1860
攒了一身酷
攒了一身酷 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:29

    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.

提交回复
热议问题