【问题标题】:How to use tsc with -b build and --outdir at the same time?如何同时使用 tsc 和 -b build 和 --outdir?
【发布时间】:2022-11-08 21:57:46
【问题描述】:

命令tsc -b --outdir folderName 失败并显示"tsc Compiler option '--outdir' may not be used with '--build'",并且所有文件都编译到 src 文件夹中。

如何防止这种情况发生?与tsc --noEmit 相同。

【问题讨论】:

    标签: typescript tsc


    【解决方案1】:

    请改用 tsconfig 编译器选项:

      "compilerOptions": {
        "skipLibCheck": true,
        "outDir": "folderName"
      },
    

    现在有了tsc -b,outDir 受到尊重。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-01-24
      • 2018-05-31
      • 2011-06-06
      • 1970-01-01
      • 2016-05-18
      • 2019-04-28
      • 2014-04-04
      相关资源
      最近更新 更多