[examples] Feature: sveltekit ssr example#7879
Merged
etrepum merged 9 commits intofacebook:mainfrom Oct 2, 2025
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
1c67ef0 to
3553e7a
Compare
3553e7a to
9cd5b7f
Compare
db06a28 to
8a8d674
Compare
002e542 to
9c533c1
Compare
…ltekit-ssr-hydration
|
@etrepum is attempting to deploy a commit to the Meta Open Source Team on Vercel. A member of the Team first needs to authorize it. |
zurfyx
approved these changes
Oct 2, 2025
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Svelte 5 + Lexical Extension Demo
This example demonstrates how you can use Lexical Extension signals
reactively with a
$prefix because they comply with the Svelte Store API.This example shows how you might do SSR to prerender the editor's HTML
and hydrate it client-side directly from the prerendered HTML (so you're not
sending the content twice). Note that this only works well when your importDOM
is lossless relative to the createDOM output.
It's also a rudimentary demo for how you can support Vite HMR to preserve
the editor's state during reloads (great for tweaking html/styles/etc.)
The README's stackblitz link won't work until merge but here's a version that will work from this PR's branch:
https://stackblitz.com/github/etrepum/lexical/tree/example-extension-sveltekit-ssr-hydration/examples/extension-sveltekit-ssr-hydration?file=src%2Froutes%2F%2Bpage.svelte
Test plan
Has some minimal e2e tests that run in the integration test suite