Skip to content
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

fix: use Vite by default for Svelte and Vue #20966

Closed
wants to merge 1 commit into from

Conversation

benmccann
Copy link
Contributor

What I did

New Vue and Svelte projects use Vite by default. Those ecosystems are heavily invested in Vite and promote it as the default builder

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
  • Make sure to add/update documentation regarding your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Maintainers

  • If this PR should be tested against many or all sandboxes,
    make sure to add the ci:merged or ci:daily GH label to it.
  • Make sure this PR contains one of the labels below.

["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]

@benmccann benmccann force-pushed the default-builder branch 2 times, most recently from 2a56af0 to c3bef7e Compare February 6, 2023 17:19
if (name?.includes('vite')) {
return 'vite';
}
return frameworkPackage.includes('svelte') || frameworkPackage.includes('vue3') ? 'vite' : 'webpack5';
Copy link
Contributor Author

@benmccann benmccann Feb 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should probably change from vue3 to vue if #20970 is merged

Copy link
Contributor

@JReinhold JReinhold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this will make an actual difference, since we've only ever had three builders, @storybook/builder-webpack4, @storybook/builder-webpack5 and @storybook/builder-vite, so there will always be either webpack or vite in the builder name.

Note that this here is only for the automigrations that runs when users upgrade from v6 to v7, this is not related to the init command at all. That command will pick the builder based on the existence of a Vite config file, implemented here: https://github.com/storybookjs/storybook/blob/next/code/lib/cli/src/detect.ts#L110 was that maybe what you actually wanted to change?

@benmccann
Copy link
Contributor Author

ah, yes. that was what I wanted to change. thanks for the pointer

@benmccann benmccann closed this Feb 7, 2023
@benmccann benmccann deleted the default-builder branch February 7, 2023 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants