且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Angular中tsconfig.json和tsconfig.app.json文件之间的区别

更新时间:2022-03-02 09:13:20

没有什么可以阻止您摆脱tsconfig.app.json.它只是一个附加的配置文件,可让您根据应用调整您的配置.这是例如当您在同一个angular-cli工作区中有多个应用程序时很有用.

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.

您可以在根文件夹中放置tsconfig.json,然后在子文件夹app-a中包含tsconfig.app.json文件,并在子文件夹app-b中拥有另一个应用程序,并拥有自己的tsconfig.app.json,其中包含一个变体的全局配置.

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.

配置上的差异可能例如是输出目录outDir或使用的includesexcludes.

the difference in configuration could e.g. be the output directory outDir or the includes or excludes used.