Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tsc --build + specify tsconfig.json

Tags:

typescript

I want to run

tsc --build

But I want to have tsc use a different tsconfig.json file.

npx tsc --build --project tsconfig-abc.json

But I get this error

error TS5094: Compiler option '--project' may not be used with '--build'.

I've tried adding the build option to tsconfig but that doesn't seem to work?

  "buildOptions": {
    "build" : true
  },
like image 846
Code Of Light Avatar asked Nov 21 '25 21:11

Code Of Light


1 Answers

The answer is simply to provide the file name at the end - no param name.

tsc --build tsconfig-simple.json
like image 70
Code Of Light Avatar answered Nov 24 '25 22:11

Code Of Light



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!