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
perf(nuxt): use prerendered islands to serialise/revive payload #21461
Conversation
There's indeed an issue with slots This issue doesn't comes from this PR. We can have multiple nodes when querying I'll fix this probably in the incoming weekend |
/trigger release |
π Release triggered! You can now install nuxt@npm:nuxt3@pr-21461 |
π Linked issue
#19772
β Type of change
π Description
This PR aims to move server component HTML out of the payload and to use the separate (prerendered) island instead. No download is required for hydrating HTML. This should significantly decrease size of HTML (as it won't be located in page twice) and make using server components much more compelling for large layout elements.
We can now also remove the almost duplicate implementations of
NuxtServerComponent
andNuxtIsland
which originally diverged to allow static generation prefetching with payloads.Note: I would expect we can now refactorpackages/nuxt/src/components/runtime/server-component.ts
to a much more minimal implementation.I did unearth an issue with slots in server components which I will investigate shortly but I do not believe it is not a regression introduced by this PR.edit: it wasπ Checklist