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

build: improve code-splitting and chunks cache #2868

Merged
merged 4 commits into from Oct 27, 2022

Conversation

tiagoalvesdulce
Copy link
Member

Depends on decred/pi-ui#466

  • Lazy load routes (this separate routes in different chunks)
  • Split pi-ui from vendors chunk (since pi-ui is a UI lib and can change frequently so we cache it separately)
  • Cache vendors and pi-ui
  • Gzip

Bundle size before (1.5Mb):

Screen Shot 2022-10-22 at 17 49 32

Bundle size after (482Kb gziped):

Screen Shot 2022-10-24 at 14 11 36

@victorgcramos
Copy link
Member

Nice!

@tiagoalvesdulce tiagoalvesdulce marked this pull request as ready for review October 27, 2022 19:39
Copy link
Member

@victorgcramos victorgcramos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Good job!

@victorgcramos victorgcramos merged commit 9105f0a into decred:master Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants