typescript outDir setting in tsconfig.json not working

后端 未结 4 897
臣服心动
臣服心动 2021-02-05 01:00

I can\'t seem to get the outDir flag working when used in package.json. Directory structure is pretty simple: tsconfig.json at the root le

4条回答
  •  失恋的感觉
    2021-02-05 01:12

    When you pass in files for compilation with tsc src/index.ts, your tsconfig.json is ignored.

    From the documentation:

    When input files are specified on the command line, tsconfig.json files are ignored.

    Your npm build script should just be tsc without passing any files.

提交回复
热议问题