-
-
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
Feature: Add Builder-Vite #14024
Comments
100% interested in exploring this. Our builder abstraction is still immature--lots to figure out to make this a reality. |
I'll just leave this link here: there is some community work going on for Vite support: https://github.com/SasanFarrokh/storybook/tree/vite-support |
And here's a WIP strawman for how we plan to incorporate new builders into the Storybook ecosystem: https://docs.google.com/document/d/1M3pFGLCnZLec78p3fFkWvei-ajnpn1BXjzjd93TGvRs/edit?usp=sharing I'm hoping that we can agree on a mechanism for allowing community builders this week and release it in 6.3-alpha next week. |
Vite's builder from eirslett has an open HMR issue on the Storybook's side.
Ideally, 3rd party builders replace Webpack completely; that's how I believe most of us would think
|
@shilman could you please share @storybookjs plans on fixing it?
Using nodemon to reload It'd be reassuring to know Storybook acknowledges the existence of HMR issue and plans to work on it thru community or itself. |
@o-alexandrov is there an open issue in the storybook monorepo? if so, can you share a link, and if not, can you create one? |
@o-alexandrov Ok I understand the question better now after chatting with @IanVS This is primarily a vite-builder issue. Builders are 100% responsible for Storybook's preview iframe in the current architecture, and as far as I know have all the information they need to implement HMR for both components and stories. There may be more changes needed on the Storybook side. For example, we've been making change on the storybook side to make our libraries/addons more ESM-friendly, driven by builder-vite (or some other builder-X) requirements. But until I hear otherwise this is not a Storybook issue. @IanVS is going to start looking at this issue tomorrow in the vite builder. As usual, we will do our best to turn around any issues in Storybook core as quickly as possible to keep this work unblocked. I'm going to close this issue for now, and further discussion on any aspect of the Vite builder can happen on the builder-vite repo: https://github.com/eirslett/storybook-builder-vite I'll open a new issue if/when we decide to integrate builder-vite into core. Thanks! |
I just popped by to say, Vite is proving to be the next best thing since sliced bread, I hope that one day storybook officially runs on Vite by default ;) |
@blowsie not ruling it out by any means! |
Is your feature request related to a problem? Please describe
ESM build tools are becoming ever more popular, we have the likes of Vite and Snowpack, which have significant performance and feature improvements over some of the offerings from other tools such as webpack.
Vue 3 and React both have first-class support from Vite
When developing a project with Vite you have to create a simple vite config, to add storybook you would have to maintain a webpack config also.
Describe the solution you'd like
To support Vite projects, ideally consuming the projects vite config.
Describe alternatives you've considered
Are you able to assist to bring the feature to reality?
I would happily contribute as much as I am technically capable, or provide demo cases and testing.
Additional context
Vite
https://vitejs.dev/
https://www.youtube.com/watch?v=xXrhg26VCSc
The text was updated successfully, but these errors were encountered: