-
-
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
CLI: Support community builders in sb init
#14651
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall it looks good, I'm just wondering what happens if you pass a wrong builder like --builder foo
@yannbf Then it tries to install a package called foo and fails 😉 |
Yea, I hope in that case nothing would happen (rollback with no files generated etc) and the user could just rerun the command with the correct name, although I don't think that's the case. |
|
Hey @vasileermicioi I believe the correct package name is |
yes, it works with as a side note, good performance for |
with vite builder hmr is not working for stories :( |
Thanks for your input! However, keep in mind that the vite builder is from the community and not oficial from storybook, so it's best to give feedback in the builder repository. The builder is very fresh, it's still in version 0.0.3 and will likely be polished as the time goes by. There's an issue related to HMR in the repo already: storybookjs/builder-vite#3 |
Issue: N/A
What I did
Now
sb init --builder
can take an arbitrary package such asstorybook-builder-vite
. It will add it tomain.js
and also install it as a dependency.The "core" builders of
webpack4
andwebpack5
are also supportedHow to test