-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Svelte components do not integrate with MDX anymore after upgrade to v4 #9399
Comments
Are you also using Svelte 5 in Astro 3? Svelte 5 doesn't support HMR yet and it's still experimental |
@bluwy On the upgrade guide the command: Suggests updating svelte to a higher version. Also when using: Svelte 5 is suggested, maybe this might be a little misleading when setting up the project in the current state: |
I don't see that happening locally, it only suggests updating
That's being fixed at #9387 |
Thank you for you reply. But thank you again, for you quick reply. |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
all browsers
Describe the Bug
I recently migrated from Astro v3 to v4
I use svelte components.
Now the svelte components do not integrate with mdx anymore:
I created a simple svelte component CustomButton.svelte :
And it gets rendered as undefined.
But in .astro files it gets rendered
Reproduced with Minimal example on stackblitz from Astro-blog template.
When I rolled back to Astro v3 it worked again.
Also when trying to reinstall the dependencies (reproducable by refreshing the stackblitz minimal example)
It appears that there might be some issue with Vite 5 or svelte v5 and the svelte HMR plugin dependecies.
Maybe this could be related.
What's the expected result?
Svelte components being rendered in mdx.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/withastro-astro-dp9jem
Participation
The text was updated successfully, but these errors were encountered: