How to reduce the size of package files in ionic2?

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

I tried to create an example application using ionic2 cli, but the application size is 2.5 MB, and after minification, the size is 1.5 MB, which is also very large, and loading the browser takes a lot of time.

I found that the main.js file is very large because it contains various other functions for creating a hybrid mobile application that is not required in my case. I am looking for files with ionic 2 package, which, in my opinion, are necessary only for creating a mobile web application (correct me if I am wrong). Please suggest the best way to reduce the size of the application.

+5
source share
2 answers

Check if it has source maps, and if so, try disabling its adding ...

0
source

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

0
source

Source: https://habr.com/ru/post/1258512/


All Articles