@snugug @astro @sveltejs can you clarify what you mean by „in my script tag“?
async Svelte in Astro works pretty well so far. I’ve tested these constellations and for islands I wrote some lines here: https://fubits.dev/notes/svelte-5-patterns-async-remote/#updates
@snugug @astro @sveltejs that’s a conceptual problem, not an async Svelte one.
Svelte is a frontend framework. Astro is a meta-framework like SvelteKit / Next / Nuxt.
Astro‘s content API belongs in Astro-land.
Frontend in Astro lives in client islands (unless wrapped in Server Islands).
You can only pass entries to Svelte (maybe even as a Promise) as props/children.
And pre-rendering would be tricky.
There’s an experimental API tho https://docs.astro.build/en/reference/container-reference/
@snugug @astro @sveltejs hm, here’s a working example with async fetch and different client directives https://fubits.dev/svelte-async-server-island/
What helped me grok the relationship between Astro and async Svelte was starting with a very minimal example in StackBlitz. Maybe you could create a reproducible example of your bug.