stellarexplorer
stellarexplorer copied to clipboard
Reduce distribution size
Uncompressed the full distribution with required dependencies is 1.45MB.
Try get this down a bit by analysing the bundled dependencies.
Attaching baseline report from source-map-explorer to compare changes too: bundle-before.txt
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?
dropped ~40k approx upgrading to react 16
switching to preact would heavily reduce the size too.
see compat module too: https://github.com/developit/preact-compat
#76 will reduce the bundle by 130k
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.
use code splitting features (PRPL pattern). see also react-loadable.