Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce distribution size #12

Open
chatch opened this issue Aug 10, 2017 · 7 comments
Open

Reduce distribution size #12

chatch opened this issue Aug 10, 2017 · 7 comments

Comments

@chatch
Copy link
Owner

chatch commented Aug 10, 2017

Uncompressed the full distribution with required dependencies is 1.45MB.

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

@chatch chatch self-assigned this Aug 10, 2017
@chatch
Copy link
Owner Author

chatch commented Aug 10, 2017

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

@chatch
Copy link
Owner Author

chatch commented Aug 10, 2017

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
Copy link
Owner Author

chatch commented Oct 16, 2017

dropped ~40k approx upgrading to react 16

@chatch
Copy link
Owner Author

chatch commented Feb 24, 2018

switching to preact would heavily reduce the size too.

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

@chatch
Copy link
Owner Author

chatch commented Jul 13, 2018

#76 will reduce the bundle by 130k

@chatch
Copy link
Owner Author

chatch commented Jul 14, 2018

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
Copy link
Owner Author

chatch commented Jul 16, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant