-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
SvelteKit: Automatically support Kit-specific features #20239
Conversation
Is this part of the 7.0 beta project? What column does this belong in? |
I had to allow for I also extracted that into it's own PR: #20294 |
@JReinhold I do not see the situation you describe happening. Maybe there's a step missing in your steps to reproduce? I ran your steps on this branch and got this static-storybook: |
what is making unit tests fail?!?! |
I just tested and it worked fine for me as well. I did run into a separate issue: #20595. But I didn't see the "no story" UI, so I think this could be merged after being rebased
I wouldn't have known this was a thing you could do without reading the PR description. Should we add it to the |
Alright, then let's clean it up and merge it, see if it was just my setup that was bad. Did you try having a story that actually imported and used all the supported SvelteKit modules? I wonder if that could cause it, as I had such a story. (I'll see if I can dig it out from somewhere)
I think this is generally documented a few places in the Storybook docs, mainly here: https://storybook.js.org/docs/react/sharing/publish-storybook |
No, I didn't. It's possible that could be the cause |
@JReinhold I just did |
This PR keeps the
vite-plugin-sveltekit-setup
that handles many SvelteKit-specific features, so they get supported out of the box in Storybook.Currently this PR is blocked by the issue that built Storybooks will always show the "No story" warning on initial load/reload. Navigating between stories afterwards works, and everything works fine in dev.
This issue is also causing the iframe viewmode to be broken.
Once that has been fixed, this should be good to merge.
To test this out:
git checkout origin/sveltekit-keep-compile-plugin
yarn task --task sandbox --template svelte-kit/skeleton-js --start-from install
cd sandbox/svelte-kit-default-js
yarn build-storybook
npx http-serve storybook-static