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

Lazy Load Routes #8

Open
sethharris4989 opened this issue Jun 8, 2019 · 1 comment
Open

Lazy Load Routes #8

sethharris4989 opened this issue Jun 8, 2019 · 1 comment

Comments

@sethharris4989
Copy link

This may be outside of the scope of the project, but can you give any insights or advice on getting code splitting/lazy loading routes to this theme?

Bundle sizes can get out of control, so having this would put this theme over the top of anything else I've found.

Thanks!

@schuhwerk
Copy link

Just came across this post by accident. I had the same problem/question. Lazy loading routes is probably not a good idea, because it delays the time until you first see posts.
So I added a global variable (in another theme) with wp-localize script and translated them from php to vue-router. You could probably prepare all routes in PHP and use that to initialize your Router (in JS).

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

No branches or pull requests

2 participants