Piyush Jain
Piyush Jain

Reputation: 147

how to reduce size of bundle files in ionic2?

I am building a mobile web application using ionic2 and angular2. I do not need mobile app.

I have tried building sample application using ionic2 cli but the size of the application is 2.5MB and after minification the size is 1.5MB which is also very large and it takes very long time to load on browser.

I found that the file main.js is very large as it contains various other features to build hybrid mobile app which is not required in my case. I am looking for ionic 2 bundle files which i think is only required to build mobile web application (correct me if i am wrong). Please suggest the best way to reduce the size of the application.

Upvotes: 6

Views: 657

Answers (2)

erdongritian
erdongritian

Reputation: 1

Use gzip, you can deploy it in nginx, and enable gzip.

Upvotes: 0

Alex Ryltsov
Alex Ryltsov

Reputation: 3013

Check if it has source maps, and if it is, try to disable adding it...

Upvotes: 0

Related Questions