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

Code splitting by route - Closes #519 #678

Closed
wants to merge 11 commits into from

Conversation

alepop
Copy link
Contributor

@alepop alepop commented Apr 4, 2018

What was the problem?

We have a big Lisk Hub js bundle that load all components for different routes

How did I fix it?

Created asyncComponent that allows import component only then it needed.

How to test it?

  • Open network tab in dev inspector
  • Click different routes and see that code chunks is loaded

Before code splitting:
screen shot 2018-04-04 at 17 00 09

After:
screen shot 2018-04-04 at 16 56 38

Review checklist

@slaweet slaweet changed the base branch from development to 0.5.0 April 4, 2018 14:47
@slaweet
Copy link
Contributor

slaweet commented Apr 4, 2018

Initial load page size reduced from 4.4 MB [0] to 3.4 MB [1], that's a good chunk of data 👍 .

Just some unit tests need to be updated.

[0] https://tools.pingdom.com/#!/c1Tls4/https://jenkins.lisk.io/test/lisk-hub/development/
[1] https://tools.pingdom.com/#!/dEpHmc/https://jenkins.lisk.io/test/lisk-hub/PR-678/

@alepop alepop force-pushed the 519-code-splitting-by-route branch from d6cc5f5 to f06cbc1 Compare April 9, 2018 14:54
@alepop alepop force-pushed the 519-code-splitting-by-route branch 2 times, most recently from c449a33 to 835dcfa Compare April 10, 2018 11:42
@alepop
Copy link
Contributor Author

alepop commented Apr 10, 2018

@slaweet rebased

@alepop alepop force-pushed the 519-code-splitting-by-route branch from 835dcfa to 41cccb0 Compare April 10, 2018 17:28
@slaweet slaweet changed the base branch from 0.5.0 to 0.6.0 April 23, 2018 14:03
@slaweet slaweet changed the base branch from 0.6.0 to 0.7.0 April 27, 2018 13:11
@alepop
Copy link
Contributor Author

alepop commented Apr 28, 2018

@slaweet is this still relevant if Lisk Hub now will be only shipped as a desktop app?

@slaweet
Copy link
Contributor

slaweet commented May 2, 2018

@alepop IMO it's not relevant anymore. I'll close it now. We can always reopen the pr if the situation changes.

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

Successfully merging this pull request may close these issues.

3 participants