1

I tried with these build system configs but I wanna add the '--module commonjs' option to the compiler.

I tried this, but it doesn't work.

{
    "selector": "source.ts",
    "cmd": ["tsc.cmd","--module commonjs","$file"],
    "file_regex": "^(.*\\.ts?)\\s\\(([0-9]+)\\,([0-9]+)\\)\\:\\s(...*?)$"
}

error TS5023: Unknown compiler option 'module commonjs'. I got this error. it's like is not recognizing the '--' characters

Thanks in advance.

Community
  • 1
  • 1
sergio
  • 619
  • 6
  • 16

1 Answers1

2

You where pretty close! If you change --module commonjs to separate items it works correctly, see below.

"cmd": ["tsc.cmd","--module", "commonjs","$file"],
Dick van den Brink
  • 13,690
  • 3
  • 32
  • 43