Open bhvngt opened 7 months ago
I'm not sure Storybook itself supports Svelte 5 🙂
Svelte 5 is backward compatible with svelte 4. So I was trying to upgrade svelte without trying out any of the new svelte 5 syntax.
Here's the upstream issue: https://github.com/storybookjs/storybook/issues/24886
(might not be the same problem though)
We've added preliminary Svelte 5 support in the Storybook 8 alphas, you could try upgrading to those and see if that fixes the issue. If it does I think we can close it.
npx storybook@next upgrade --prerelease
Based on the errors you've reported it looks like a Storybook core issue and not related to this addon.
I got this error using storybook 8 with svelte 5 installed
Unable to index ./src/stories/Test.stories.svelte:
WARN TypeError: Cannot read properties of undefined (reading 'instance')
- ./src/lib/components/button/Button.stories.svelte: Cannot read properties of undefined (reading 'instance')
I tried this plugin on the latest 8.0.0-rc.2 release which supports svelte 5. I have used the latest 4.1.2 for my reproduction.
I am getting the same error as @eunukasiko.
Here's the link to the sandbox.
SB v8 now released. Would be great if Svelte5 were supported.
Since svelte 5 has reached release-candidate. Would this be a good time to add support for svelte 5?
This add-on makes story creation for svelte so much easier. So thanks a ton to all the contributors for creating this add-on. 👏👏👏
There's a work in progress #177
Describe the bug
When I try to run this plugin with svelte 5, it reports following error.
Steps to reproduce the behavior
svelte
tosvelte@next
storybook
Expected behavior
It should work with svelte 5
Environment
OSX 14.0
20.9
8.10.5
Additional context
Svelte 5 is cutting edge and is very new. So just filing this bug in case if it is a minor change to support it.