简体   繁体   English

cli 参数 --generateTrace 的 tsconfig 等效项是什么?

[英]What is the tsconfig equivalent for the cli parameter --generateTrace?

If you run tsc manually and use the param:如果您手动运行tsc并使用参数:

tsc --generateTrace traceDir

you can create a new traceDir directory with paired trace and types files.您可以使用配对的跟踪和类型文件创建一个新的traceDir目录。 A recent analysis package from Microsoft typescript-analyze-trace can analyse those files. Microsoft typescript-analyze-trace的最新分析包可以分析这些文件。

Questions:问题:

I wanted to configure generateTrace within tsconfig.json and couldn't find the equivalent property.我想在tsconfig.json中配置generateTrace并且找不到等效的属性。

Is there a similar configuration option also in an angular app?角度应用程序中是否也有类似的配置选项? I guess I can use the same property within angularCompilerOptions (if I knew what it is called)?我想我可以在angularCompilerOptions中使用相同的属性(如果我知道它叫什么)?

I'm sure you've already seen this我确定你已经看过了

https://www.typescriptlang.org/docs/handbook/compiler-options.html https://www.typescriptlang.org/docs/handbook/compiler-options.html

generateTrace is a flag, not an option so it wouldn't have a parallel in the tsconfig file. generateTrace 是一个标志,而不是一个选项,因此它在 tsconfig 文件中不会有并行。

What you could try doing is adding this command to one of your script shorthands, ie npm buildWithTrace : npm build projectName && tsc --generateTrace您可以尝试做的是将此命令添加到您的脚本速记之一,即 npm buildWithTrace : npm build projectName && tsc --generateTrace

But otherwise, this doesn't seem to be possible yet.但除此之外,这似乎还不可能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM