【问题标题】:In tsc --build how to overcome --incremental and --tsBuildInfoFile在 tsc --build 如何克服 --incremental 和 --tsBuildInfoFile
【发布时间】:2021-09-13 04:03:40
【问题描述】:

我的打字稿应用程序的不同部分位于不同的子目录中。在顶级目录中,tsconfig.json 引用了各种子 tsconfig。我通过tsc --build 构建了应用程序,这非常有效。所有子项目都定义了incremental: true,有些还定义了tsBuildInfoFile

现在我想强制重建。 tsc -p subproj --incremental false --tsBuildInfoFile null 对每个子项目都很简单,但是如何将这些选项传递给--build

当我尝试时,我收到:

client/tsconfig.json:16:9 - error TS5069: Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or option 'composite'.

16         "incremental": true,
           ~~~~~~~~~~~~~

client/tsconfig.json:17:9 - error TS5069: Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or option 'composite'.

17         "tsBuildInfoFile": "./tsconfig.tsbuildinfo",

谢谢!

【问题讨论】:

    标签: typescript tsc


    【解决方案1】:

    更改 incremental 会破坏相关选项。要强制重建,请使用选项--force

    【讨论】:

      猜你喜欢
      • 2022-11-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-23
      • 2019-05-11
      • 2023-03-29
      • 2018-09-29
      • 1970-01-01
      相关资源
      最近更新 更多