✅ Test.svelte persists a Svelte store to local storage using the window object.
✅ I can import & use Test.svelte in an .astro file with the client:only directive as per the docs.
✅ When I run the same code in an .mdx file I get "window is not defined".
(Svelte components that don't depend on window run as expected in an .mdx file.)
Is there a way to access the window object with a .mdx file?
StackBlitz: https://stackblitz.com/edit/astro-jtddy8