Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular CLI Typescript Compile on build

Just for clarification, when using the angular cli and typescript, when I run the command: ng build. Does that compile all the ts files to js? I noticed the "compileOnSave" property in the tsconfig.json is set to false.

There shouldn't be anything I have to do to compile the typescript files, correct? When exactly are they compiled?

**I am not sure why my question got a down vote. It is a legitimate question and the Angular CLI documentation does not explicit answer it.

**UPDATE: Upon further review, I noticed that I was getting some TS Lint errors on the first project I was working on, which is when I noticed it wasn't compiling. I believe the fact that it was not compiling may be related to that. Upon initializing a new project via the CLI, I can see that the TypeScript files do compile when the ng build command is run.

like image 742
blubberbo Avatar asked Oct 30 '22 07:10

blubberbo


1 Answers

Solved - see question Update. If you are noticing that the .ts files are not compiling, check the output pane and make sure there are no errors being output (for instance, with ts lint)

like image 153
blubberbo Avatar answered Nov 11 '22 13:11

blubberbo