Svelte 5 migration
Upgrade your Svelte 4 app to Svelte 5. I'll handle the runes migration, set up testing and get your team comfortable with the new patterns.
What changes
| Svelte 4 | Svelte 5 |
|---|---|
$: reactive statements | $derived |
export let props | $props() |
<slot> | {#snippet} |
createEventDispatcher | callback props |
beforeUpdate / afterUpdate | $effect |
The official migration script (npx sv migrate svelte-5) does a lot of the mechanical work. The rest needs someone who
knows where it tends to go wrong.
How I approach it
- Audit the existing Svelte 4 codebase
- Plan an incremental migration
- Convert reactive statements to $state and $derived
- Update component props to $props()
- Replace slots with snippets
- Move stores to runes where it makes sense
- Update event handlers to the new syntax
- Set up Vitest browser mode testing
Planning a migration?
Tell me about your Svelte 4 codebase and I'll give you an idea of what's involved.