stellarexplorer icon indicating copy to clipboard operation
stellarexplorer copied to clipboard

Reduce distribution size

Open chatch opened this issue 8 years ago • 7 comments

Uncompressed the full distribution with required dependencies is 1.45MB.

Try get this down a bit by analysing the bundled dependencies.

chatch avatar Aug 10 '17 08:08 chatch

Attaching baseline report from source-map-explorer to compare changes too: bundle-before.txt

chatch avatar Aug 10 '17 08:08 chatch

uri.js (48kb) - looks like it's bundled twice (once for stellar-sdk and once for react-scripts) ...

bluebird (77kb) is bundled but es6-promise (6kb) and 'promise' are also. is it possible to consolidate on one, maybe use es6-promise instead of bluebird?

chatch avatar Aug 10 '17 09:08 chatch

dropped ~40k approx upgrading to react 16

chatch avatar Oct 16 '17 08:10 chatch

switching to preact would heavily reduce the size too.

see compat module too: https://github.com/developit/preact-compat

chatch avatar Feb 24 '18 15:02 chatch

#76 will reduce the bundle by 130k

chatch avatar Jul 13 '18 11:07 chatch

a big chunk of the bundle now is the directory from stellarterm. one way to get that down is to remove the logo properties (base64 image data) and link to them externally (load on demand) somehow.

chatch avatar Jul 14 '18 11:07 chatch

use code splitting features (PRPL pattern). see also react-loadable.

chatch avatar Jul 16 '18 05:07 chatch