-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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: Make vite the default builder #22051
Conversation
f4a7d36
to
b9a1987
Compare
This needs thorough QA! |
Seems like you'd also want to update documentation around this at the same time. https://github.com/storybookjs/storybook/blob/next/docs/builders/webpack.md?plain=1#L5
|
@joeycozza it will be. Once this is merged I'll push a pull request adjusting it, thanks for the heads up. Appreciate it 🙏 |
Let's wait to patch this back until it's been thoroughly tested. |
default: | ||
case ProjectType.NEXTJS: | ||
case ProjectType.REACT_SCRIPTS: | ||
case ProjectType.WEBPACK_REACT: |
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.
I think you'd need to add more stuff here, such as: Angular, Aurelia, Ember, Marionette, Marko, Mithril, Rax, React_project, Riot, Server.
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.
Apart from doing thorough QA, it's important to note that differently than builder-webpack, which has webpack as a dependency, the builder-vite has vite as peer dependency. This means projects won't really work unless we made bigger changes to the CLI, to install Vite as well!
Fair point @yannbf This might not be a really complex change, @kasperpeulen are you planning to make this change? |
Given the behavior was changed here: #22492 |
What I did
New projects without a build setup still default to webpack. However, as vite is less prone to config problems (like a missing babelrc file) and in many cases faster, I think that it would makes sense to make vite the default now.
How to test
Create a new project, and run npx sb init, and see that it will get a vite builder.
Checklist
MIGRATION.MD
Maintainers
make sure to add the
ci:merged
orci:daily
GH label to it.["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]