oedotme / generouted

Generated file-based routes for Vite
https://stackblitz.com/github.com/oedotme/generouted/tree/main/explorer
MIT License
1.02k stars 47 forks source link

Feature: I would like some routes to be lazy #173

Closed notcod closed 1 month ago

notcod commented 1 month ago

If you can implement or show me how to make some lazy routes. I want /blog to be lazy, so I will name folder blog.lazy and all routes inside will be lazy (or whole route will be separate file if possible) I made with custom integration for files that are .lazy to be lazy loaded, maybe you can implement it into core, here is gist https://gist.github.com/notcod/1ac86bdaa9b824a7f188b72064abd05b

oedotme commented 1 month ago

@notcod Thanks for the suggestion and sharing this integration!

I'd wait on adding this to core as there's already lazy and non-lazy integrations. Also having only one way to use lazy-loading would help to avoid any potential confusion.

Thanks again.