Skip to content
This repository has been archived by the owner on Apr 12, 2020. It is now read-only.

Lazy loading routes and router hooks #21

Closed
ansarizafar opened this issue May 17, 2019 · 2 comments
Closed

Lazy loading routes and router hooks #21

ansarizafar opened this issue May 17, 2019 · 2 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@ansarizafar
Copy link

Lazy loading is very important for bundle size. Does Svero supports lazy route loading? How can I display a progress bar during route loading? Is there any plan to add router hooks?

@kazzkiq
Copy link
Owner

kazzkiq commented May 22, 2019

If by lazy loading you mean code-splitting (a route's code is only loaded if it's called by the URL), then the answer is no.

If you need that level of control over what your client receives in terms of bundle size, you should try using a fully featured framework such as Sapper.

@kazzkiq kazzkiq closed this as completed May 22, 2019
@kazzkiq kazzkiq added enhancement New feature or request question Further information is requested labels May 22, 2019
@JohnnyFun
Copy link

JohnnyFun commented Sep 29, 2019

I bet you could work around it and make the "Route" component a light wrapper that calls import(...).then(dynamicComponent => ...) and then use <svelte:component this={dynamicComponent.default}/>?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants