AoT/rollup compilation slows down livereload. Can it be disabled when using ionic serve?

I’ve noticed that the AoT compilation step slows down the build process significantly. Running ionic serve with beta11, the browser used to refresh after a file save in under 2 seconds, but now running rc0 I find myself waiting over 10 -12 seconds each time. Now I see the following message output which is different from the beta

[22:16:16]  bundle dev update started ...
[22:16:26]  bundle dev update finished in 9.73 s

I assume this bundle dev step is the AoT compiler. While I understand the advantages of using AoT compilation, it isn’t necessarily advantageous to use it when using ionic serve and livereload. When developing an ionic app and frequently reviewing small changes in the browser, individual builds are often used one time before being overwritten by the next small change.

It doesn’t make sense to use an optimization step that shaves a fraction of a second off the browser load time in exchange for adding 10 seconds to the build time when that build is going to be used once. It simply increases the total wait time.

Anyhow my point is It would be nice to have an option to turn this step off, either a command line switch or a config file option. I have been trying to figure out how to do this but I haven’t been able to find any documentation on how to do so.

Any help would be appreciated.


I second that, it’s a pain now, just changing html takes really long!

1 Like

painfully slow! I also assume it has to do with rollup taking out all the unnecessary components.

1 Like

Also, I’ve noticed a number of other posts complaining about broken builds with rc0 that seem to pertain to problems with Rollup (I am experiencing one such problem now angular2-moment.)

for example, see

Being able to disable this AoT/Rollup step would allow development/testing to continue until the bundling problems could be resolved at a later date.

1 Like

My builds get slower over time. Almost looks like a memory leak. The livereload node process starts using >100% CPU after I have been working for a while. Builds get consecutively slower until a build eventually errors out (if I have the patience to wait that long). At this point, I just quit the process and restart it periodically. Agree that it would be nice to disable optimizations.


I´m getting 3 - 5s to build.

My bundle dev update and templateUpdate times start out fast but get slower and slower while ionic serve is running. I have to quit it and run again to speed back up. I usually do that once the numbers get around 30 seconds, but yesterday I did have it go well over 120 seconds a couple of times. Not fun when all I did was update one element in an HTML file.

1 Like

Can you run npm install @ionic/app-scripts@latest? Or at least do this tomorrow, since we’re in the process of releasing a new version :slight_smile:

This issue should be fixed.



In comparison to Ionic 1, this problem has been a huge step backward for my developer productivity.

Waiting anywhere from 5 to 30 seconds between code/html changes and being able to view them bring the flow of development to a grinding crawl.

Please point us to a way we can de-optimize the bundles for running “serve”.

One of the big selling points for Ionic vs native development used to be “no compile step” when developing and previewing the code. Of course, there needs to be some compile when using typescript, but all the optimization, tree-shaking, minifying, should be unnecessary at development time.

Can we just spit out a huge bundled js file nice and fast, with no optimizations? And if we split out the vendor code to a separate file from our app code, then that bundle can be created even faster.

Just my $0.02


Did anybody fix this? It’s on rc2 now, but the build is still really slow due to the AOT.

In ionic serve, every change took me about 8s to refresh the page, it’s painful.

To make things worse many third party libraries are not AOT ready (missing a metadata file) and such as fail to compile. I need to switch back to non AOT even for production because I require those libraries.