Can we use this AOT mode for dev or qa mode by passing --aot flags in ng build command like "ng build --env=dev --aot". Actually I have tried but its not compiling with 'AOT'? Could any one suggest some solution?
Asked
Active
Viewed 220 times
-1
-
Could you provide more information? What error are you getting? – DeborahK Sep 12 '17 at 07:27
-
There was no error. Its just compiling in normal JIT and bundle files generated under dist folder – Sathiya Vasagam S Sep 12 '17 at 07:41
-
Yes the `--aot` flag is working well. – maxime1992 Sep 12 '17 at 07:44
-
when I build using ng build --prod the dist size is small , but the same using --aot flag the size is comparatively high – Sathiya Vasagam S Sep 12 '17 at 07:46
1 Answers
0
Yes, you can by adding this flag
ng build --aot=true
the default value for --aot is false. (in non prod environments)
You can see more detail for the build options here https://github.com/angular/angular-cli/blob/master/docs/documentation/build.md

Isuru Fonseka
- 601
- 4
- 15
-
Thanks. ya Agree,but its with out minified. Can we minify as well using ng build? official docs says we cant do Minification using angular-cli. – Sathiya Vasagam S Sep 12 '17 at 17:54