Repository navigation
Vite: Raise minimum supported version to 7 - #36162
Merged
Merged
Conversation
Narrow the vite peer range from ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 to ^7.0.0 || ^8.0.0 in the 12 Vite-based builders, frameworks, and plugins. angular-vite already requires vite >=8.0.0 and is untouched. Root devDependencies already run vite ^7.0.4, so no version bump is needed; yarn.lock peer entries are regenerated accordingly.
Add a "Vite 5 and Vite 6" dropped-support entry next to the existing Vite 4 section: Storybook 11.0 requires Vite 7.0.0 or higher, lists the affected Vite-based frameworks/builders/plugins, and reminds users to match framework-specific Vite plugins to the Vite major.
valentinpalkovic
approved these changes
Sep 3, 2026
2 tasks done
valentinpalkovic
added a commit
that referenced
this pull request
Sep 3, 2026
Vite: Raise minimum supported version to 7
valentinpalkovic
added a commit
that referenced
this pull request
Sep 3, 2026
Vite: Raise minimum supported version to 7
This was referenced Sep 4, 2026
2 of 9 tasks
7 of 9 tasks
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
Why
Storybook's
nextmajor still advertises Vite 5 and 6 support in peer ranges, but nothing in the codebase supports that promise: there are no Vite 5/6-vs-7/8 runtime branches anywhere incode/(the only runtime gates are Vite 8 features), root devDependencies already runvite ^7.0.4, and every sandbox/template installs Vite 7. Keeping the wide range advertises compatibility we don't test and can't fix. This PR raises the minimum supported Vite to 7 by narrowing peer ranges — the floor lives entirely in the manifests, so no runtime code changes.What
Narrow the
vitepeer range from^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0to^7.0.0 || ^8.0.0in exactly the 12 Vite-based packages:@storybook/builder-vite@storybook/html-vite,@storybook/nextjs-vite,@storybook/preact-vite,@storybook/react-native-web-vite,@storybook/react-vite,@storybook/svelte-vite,@storybook/sveltekit,@storybook/tanstack-react,@storybook/vue3-vite,@storybook/web-components-vitevite-plugin-storybook-nextjsPlus:
yarn.lock— the workspace entries record peerDependencies, so the 12 peer lines were regenerated (yarn install --mode=update-lockfile); nothing else in the lockfile moved.MIGRATION.md— new "Vite 5 and Vite 6" dropped-support entry (SB11) directly above the SB9 "Vite 4" entry, with the affected-package list and the plugin-compatibility reminder. The Vitest section of MIGRATION.md is intentionally left alone; a sibling PR owns the Vitest floor entry.Deliberately untouched:
@storybook/angular-vite— itsdependencies.viteis already>=8.0.0, above the new floor.builder-vite/src/utils/vite-features.ts,vite-plugin-storybook-nextjstsconfigPaths handling) — they gate Vite 8+ features and stay.vite ^7.0.4, so no version bump is needed.Framework plugin peer verification
The repo's own
@vitejs/*plugin devDeps against the monorepo'svite ^7.0.4:vitepeer@vitejs/plugin-react(^4.3.2)@vitejs/plugin-vue(^4.4.0/^4.6.2)The
plugin-vuepeer range is stale relative to its actual compatibility: its declared range tops out at Vite 5, but the plugin demonstrably works under Vite 7 — I ran the vue3 renderer suite (which loadsplugin-vuethrough the monorepo's Vite 7-backed Vitest): 19 test files, 339 tests, all passing. This mismatch pre-dates this PR (vitehas been^7.0.4incode/package.jsonsince before it) and is unaffected here, because this PR intentionally changes zero dependencies. Neither plugin declares Vite 8 yet; for Vite 8 projects, matching the plugin major to the Vite major is the user's existing responsibility, which the new MIGRATION.md entry calls out.How to Review
package.jsondiffs are each a single line inpeerDependencies;yarn.lockchanges are exactly the 12 corresponding peer lines. Nothing else.##### Vite 4. The hunk sits in the Vite block (~line 1220) and does not go near the Vitest entry at ~line 1410, so it won't conflict with the sibling Vitest-floor PR.angular-vite, Vite 8 gates, devDependency bumps, and anything Vitest-related (sibling PR).Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
stories
unit tests
integration tests
end-to-end tests
Peer-range grep across the 12
package.jsons: all show^7.0.0 || ^8.0.0; repo-wide search shows zero^5.0.0 || ^6.0.0remnants in manifests (only historical changelog/lockfile-external hits remain).yarn install --mode=update-lockfileresolves cleanly; no new peer warnings vs. baseline.oxfmt check passes on all 12 edited
package.jsons.vue3 renderer unit suite (plugin-vue under Vite 7): 339/339 passing locally.
CI runs the full build + unit matrix and the sandbox
vitest-integrationjob (react-vite template), which exercises the narrowed ranges end-to-end.Manual testing
Caution
This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!
This PR changes package metadata and docs only — there is no runtime behavior to exercise by hand. To verify manually:
vite@6and then@storybook/react-vite@canary(or any of the 12 packages from this PR) — the package manager reports an unresolvablevitepeer; withvite@7it installs cleanly.MIGRATION.mdshows the new "Vite 5 and Vite 6" entry under "Dropped support", above the existing "Vite 4" entry, with a matching TOC link.Documentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal,ci:mergedorci:dailyGH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli-storybook/src/sandbox-templates.tsDeclare whether manual QA will be needed for this PR during the next release, through
qa:neededorqa:skipMake sure this PR contains one of the labels below:
Available labels
bug: Internal changes that fixes incorrect behavior.maintenance: User-facing maintenance tasks.dependencies: Upgrading (sometimes downgrading) dependencies.build: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup: Minor cleanup style change. Will not show up in release changelog.documentation: Documentation only changes. Will not show up in release changelog.feature request: Introducing a new feature.BREAKING CHANGE: Changes that break compatibility in some way with current major version.other: Changes that don't fit in the above categories.🔗 Obvious Project · 🧵 Obvious Thread