-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[Bug]: Instantiating a component with new
is no longer valid in Svelte 5.
#24886
Comments
@benmccann is there a recommended approach to migrating this while still being compatible with Svelte 4? I'd expect as soon as we try to do I think we can make this work by doing version detection via |
Actually we're strongly proposing we make this a breaking change for Storybook 8.0 so we don't have to juggle multiple Svelte versions. The migration from Storybook 7 to 8 should be easy for users. Do you have any input or objections @benmccann? |
@JReinhold it seems that i have some early-working code for the Storybook Svelte 5 renderer with these changes. Just tested the Tomorrow i will try to test Svelte 5 code to see how stories look. |
Describe the bug
Just created an empty SvelteKit Library project with Beta version of Svelte 5 enabled and installed Storybook.
This is what i get when viewing demo component stories:
To Reproduce
Choose Svelte 5 beta.
System
No response
Additional context
I managed to find that this particular code causes the error:
https://github.com/storybookjs/storybook/blob/main/code/renderers/svelte/src/render.ts#L69
According to docs, this:
should be changed to this:
The text was updated successfully, but these errors were encountered: