-
Notifications
You must be signed in to change notification settings - Fork 34
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
[Feature] Add Vite-Builder Support #64
Comments
I think there's already support. You can see an example project here: https://github.com/michaelwooley/storybook-experimental-vite |
@benmccann when doing
for that repository, I see traces of webpack. Is storybook somehow ditching the vite builder once this package is installed/enabled/used? |
It uses Vite, but is still pulling in webpack anyway. Should hopefully be fixed in Storybook 7 |
That's right, in Storybook 6, webpack is still used to build the "manager" part of the UI, which no longer happens in SB 7. |
@j3rem1e what would you think about adding vite-builder support into this addon? Currently, we have a custom vite-plugin in the What would you think about making this addon-svelte-csf package a bit more general, including the vite plugin here, and adding a |
@IanVS yep, that's a good idea ^^ |
Typescript-based svelte components did not generate docs correctly, and svelte-native stories were not possible. ## What I did In the transition to 7.0, we neglected to load svelte options from `svelte.config.js` (and `svelteOptions` from storybook overrides) and pass them to the svelte docgen plugin, which means that svelte components written with typescript did not work correctly. Also, while we brought over the `csfPlugin` for svelte, we never actually used it. So, svelte-native stories would be broken even if `@storybook/addon-svelte-csf` was added. The fix here is a bit of a temporary one, hopefully. It uses the same strategy from the 6.5 vite-builder, but it would be better if we could add vite-support to the addon directly, which I've suggested in storybookjs/addon-svelte-csf#64 (comment). ## How to test Currently we do not have a svelte-vite typescript sandbox, nor do we have any svelte-native stories. But, I bootstrapped my own project, and copied over the `dist` folder from the `svelte-vite` framework in this branch, and confirmed that both docgen and svelte-native stories do not work without these changes, and do work with them.
#72 was merged and said it closes this issue. I'm confused as to why GitHub didn't auto-close this issue. Maybe it was just a GitHub glitch? Should this issue be closed or is there more to do here? |
I think the problem is that I used the storybook monorepo convention of |
Vite-Builder is one of the office builder, pls add support.❤️
The text was updated successfully, but these errors were encountered: