Closed murl-digital closed 4 months ago
You cannot use Svelte snippets in an Astro file. They're a Svelte-file only feature as they need to be compiled by the Svelte compiler. You should use Astro's slots feature instead, which is compatible when passed to the Svelte component's slots.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
Describe the Bug
I have a usecase where I want a second named slot (snippet in the case of svelte 5), but trying to do so the way the svelte 5 docs wants me to results in an esbuild error, and a different error about a validate snippet function not existing in some cases.
What's the expected result?
To be able to use svelte snippets in an astro component
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-3etiww?file=src%2Fpages%2Findex.astro
Participation