-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Closed
Copy link
Labels
Description
Describe the bug
There is an error when using the $derived
rune within a snippet.
Reproduction
{#snippet s(a)}
{@const b = $derived(a)}
<h1>Hello {b}!</h1>
{/snippet}
{@render s('world')}
{#snippet s(a)}
{@const b = $derived.by(() => a)}
<h1>Hello {b}!</h1>
{/snippet}
{@render s('world')}
Logs
rune_outside_svelte The `$derived` rune is only available inside `.svelte` and `.svelte.js/ts` files https://svelte.dev/e/rune_outside_svelte
System Info
Tested in Svelte REPL at `2025-01-17T02:55Z`
Severity
annoyance