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

WIP: Dynamic module loading #2164

Closed
wants to merge 9 commits into from

Conversation

filrak
Copy link
Collaborator

@filrak filrak commented Jan 11, 2019

Related issues

Short description and why it's useful

Now VSModules can be seamlesly lazy loaded. The dynamic loading is based on actions.
How it works:

  • somewhere in the theme we are dispatching action e.g wishlist/load
  • VS is checking if module wishlist is registered
  • if it is it's just dispatching the action (normal behavior)
  • if it's not it lazy loads module, registers it and dispatches the action

With this approach VS modules can be lazily loaded seamlessly and users don''t need to take care of the registration themselves. They just need to register module as a lazy one in modules.index.ts and vs will take care of lazy loading it in a right moment. This will end up with HUGE reduction of bundle size.

To add

  • dynamic loading based on getters.

@pkarw
Copy link
Collaborator

pkarw commented Jan 11, 2019

This is serious thing! I’m wondering about the performance results afterwards!
How to add the modules to prefetching list (for the offline mode)?

Great job @filrak! The modules proved its value once again

@filrak
Copy link
Collaborator Author

filrak commented Jan 13, 2019

@pkarw this feature needs to be finished and polished tho so this PR will not be merged into 1.7

@filrak filrak added this to the 1.8 milestone Jan 13, 2019
@pkarw
Copy link
Collaborator

pkarw commented Jan 13, 2019

@filrak OK

@pkarw pkarw modified the milestones: 1.8, Feature waitinglist, 1.9 Feb 2, 2019
@filrak filrak closed this Feb 21, 2019
@patzick patzick modified the milestones: 1.9, 1.8.3 Feb 26, 2019
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