Anything I can do about a 6mb built JS?

coolio. you just did the update from 2 to 3 or did you maybe did some improvements too aka maybe you’ve got some useful interesting tips and tricks to share?

Unfortunately no, I can’t take any of the credit for the reduced file size. It just magically was smaller after I updated. :stuck_out_tongue: Sorry I don’t have any more useful tips to share.

3 Likes

Black magic is good sometimes :wink: Thx for the feedback

A significant chunk of that is likely due to ionic-native. You used to get all the code for every plugin, and now only the ones you use.

2 Likes

Are the sourcemap files of a browser platform build relevant at all for --prod? I was quite surprised by the sheer size of main.js. Especially in the context of PWA. On the other hand, bandwith is basically a non-issue these days. So there’s that.

I nod to that @oliver Oliver. On your bandwith comment, main.js is low compared to bad practices in terms of automatic reload of data, re-authentification for overly security issues, and more seen, that have basically no use.
That being said, the main goal of Ionic is to be cross-device, so it has its flaws (and un-needed files) for sure.
Now if your whole app make 6 Mb, look at Snapchat (at least 150Mb) and Instagram (on that scale, 120Mb or so).
Did I miss something?

1 Like

Use only rightfully minified js external libs and google fonts (select only the chars you need)? Anyways, 6 mega bytes is ok if you have a lot of features in your app. Depends, do you use so much only for JS? (Jquery, JqueryUI, and others?)