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

Feature codesplitting per route #2068

Merged
merged 5 commits into from
Dec 10, 2018

Conversation

patzick
Copy link
Collaborator

@patzick patzick commented Dec 8, 2018

Note

It's new copy of 2062. Accidentally merge there another changes so here's clean version of PR.

Short description and why it's useful

Code should be invoked only which is needed per route. The rest of if should be prefetched.

By default i prefetched:

  • home page
  • product page
  • category page
  • checkout page - as it was prefetched before, but another way

Screenshots of visual changes before/after (if there are any)

On demo page, served from server after build whis should be even better, but just on local is an improvement:

homepage before and after
home_before
home_after

category before and after
category_before
category_after

@pkarw
Copy link
Collaborator

pkarw commented Dec 8, 2018

Cool! @filrak WDYT?

@patzick
Copy link
Collaborator Author

patzick commented Dec 8, 2018

After resolving hydration problems, results are even better on PWA and SEO :)

For homepage:
homepage_v2

For category page:
category_v2

@patzick patzick added the LHC label Dec 8, 2018
@pkarw
Copy link
Collaborator

pkarw commented Dec 8, 2018

Awesome! By this chance can you also check the service worker registration code? Currently it’s registering the service worker ONLY on home page - it’s because the given service worker url is relative :/ it’s probably in service-worker-registration.js or in client-entry.js

Anyway: it’s cool you’ve solved the hydration problem

@filrak
Copy link
Collaborator

filrak commented Dec 8, 2018

This pull request deserves a bottle of vodka :D

@patzick
Copy link
Collaborator Author

patzick commented Dec 8, 2018

@pkarw sure, i'll try to fix this (already did some digging), i think it's better to work on this in another PR

@filrak thanks buddy, but you've made a lot better upgrades! ;D

@pkarw pkarw merged commit 5785e56 into vuestorefront:develop Dec 10, 2018
@patzick patzick deleted the feature/routing-codesplit branch December 10, 2018 20:35
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

3 participants