You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In VitePress, each chunk has it's lean version without any static VNodes. It would be great, if we could have out-of-the-box in Vite too. And also get rid of all TextNodes and all stuff, that already comes in SSR html, leaving only interactive blocks.
Suggested solution
It would be great if we could type: vite build --lean
A standalone vite plugin is possible, but it will still require adapting your client code to work with the lean build, just like how VitePress does. BTW, I think MPA is more suitable for lean build than SPA, and that's why VitePress dropped vue-router, and tried to support MPA mode.
Anyway, it's currently a vue-only feature, and I think it should not be included in the vite core.
@meteorlxy yeah, i've made another feature request #8314 which will make it super easy for client code. And it should not be a MPA, it's more "SSG-SPA", like Evan called it. It's when on your initial visit you get generated html and then continue spa-routing.
Actually, i've made it work right now without any plugins, but it required to make some dirty hacks with nginx routing (i pasted solution in that issue).
Clear and concise description of the problem
In VitePress, each chunk has it's lean version without any static VNodes. It would be great, if we could have out-of-the-box in Vite too. And also get rid of all TextNodes and all stuff, that already comes in SSR html, leaving only interactive blocks.
Suggested solution
It would be great if we could type:
vite build --lean
And it would result in:
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: