Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does false do in aot build angular cli - Out of memory issue

Tags:

angular

build

What "false" do in ng build --prod --aot false command

I am working on an angular 4 app developed with ng cli, as it is a enterprise solution the app becomes so huge that it takes too much time to serve and build. I even got javascript out of memory issues and the I started using following command to build the app

ng build --prod --aot false

But I am not sure how it works

like image 253
Vikram Avatar asked Sep 20 '25 20:09

Vikram


1 Answers

AOT is by default true for production builds, if you want to deactivate is you can use:

ng build prod --no-aot 

or

ng build prod --aot=false

but using AOT will compile your templates to js before serving them, so the browser will load them very fast

like image 98
Fateh Mohamed Avatar answered Sep 22 '25 20:09

Fateh Mohamed