- ✅
Test.svelte
persists a Svelte store to local storage using thewindow
object. - ✅ I can import & use
Test.svelte
in/src/pages/good-to-go.astro
with theclient:only
directive, as per the docs:
import Test from "../components/Test.svelte";
<Test client:only />
- ✅ But when I run the same code in
/src/pages/no-go.mdx
, I get the "Window is not defined" error:
- ✅ (Svelte components that don't depend on
window
run as expected in a.mdx
file.)