Skip to content

Vite: Raise minimum supported version to 7 - #36162

Merged
valentinpalkovic merged 2 commits into
nextfrom
feat/vite-floor-7
Sep 3, 2026
Merged

valentinpalkovic merged 2 commits into
nextfrom
feat/vite-floor-7

Conversation

@obvious-autobuild

@obvious-autobuild obvious-autobuild Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

What I did

Why

Storybook's next major 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 in code/ (the only runtime gates are Vite 8 features), root devDependencies already run vite ^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 vite peer range from ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 to ^7.0.0 || ^8.0.0 in 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-vite
  • vite-plugin-storybook-nextjs

Plus:

  • 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 — its dependencies.vite is already >=8.0.0, above the new floor.
  • Vite 8 gates (builder-vite/src/utils/vite-features.ts, vite-plugin-storybook-nextjs tsconfigPaths handling) — they gate Vite 8+ features and stay.
  • All devDependencies — root devDeps already run vite ^7.0.4, so no version bump is needed.

Framework plugin peer verification

The repo's own @vitejs/* plugin devDeps against the monorepo's vite ^7.0.4:

Plugin Resolved Declared vite peer Satisfies Vite 7? Used in
@vitejs/plugin-react (^4.3.2) 4.7.0 `^4.2.0 ^5.0.0
@vitejs/plugin-vue (^4.4.0 / ^4.6.2) 4.6.2 `^4.0.0 ^5.0.0`

The plugin-vue peer 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 loads plugin-vue through the monorepo's Vite 7-backed Vitest): 19 test files, 339 tests, all passing. This mismatch pre-dates this PR (vite has been ^7.0.4 in code/package.json since 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

  • The 12 package.json diffs are each a single line in peerDependencies; yarn.lock changes are exactly the 12 corresponding peer lines. Nothing else.
  • MIGRATION.md: one new TOC line + one new section above ##### 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.
  • Excluded on purpose: runtime code, 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.0 remnants in manifests (only historical changelog/lockfile-external hits remain).

  • yarn install --mode=update-lockfile resolves 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-integration job (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:

  • Peer range: in a scratch project, install vite@6 and then @storybook/react-vite@canary (or any of the 12 packages from this PR) — the package manager reports an unresolvable vite peer; with vite@7 it installs cleanly.
  • Docs: MIGRATION.md shows the new "Vite 5 and Vite 6" entry under "Dropped support", above the existing "Vite 4" entry, with a matching TOC link.

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Declare whether manual QA will be needed for this PR during the next release, through qa:needed or qa:skip

  • Make 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

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.
@obvious-autobuild
obvious-autobuild Bot marked this pull request as ready for review September 3, 2026 17:30
@obvious-autobuild obvious-autobuild Bot changed the title feat(vite): raise minimum supported Vite to 7 Vite: Raise minimum supported version to 7 Sep 3, 2026
@obvious-autobuild obvious-autobuild Bot added ci:normal Run our default set of CI jobs (choose this for most PRs). qa:skip Pull Requests that do not need any QA. (e.g. documentation) maintenance User-facing maintenance tasks and removed BREAKING CHANGE labels Sep 3, 2026
@valentinpalkovic
valentinpalkovic merged commit 4bd806b into next Sep 3, 2026
175 of 187 checks passed
@valentinpalkovic
valentinpalkovic deleted the feat/vite-floor-7 branch September 3, 2026 19:10
@github-actions github-actions Bot mentioned this pull request 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:normal Run our default set of CI jobs (choose this for most PRs). maintenance User-facing maintenance tasks qa:skip Pull Requests that do not need any QA. (e.g. documentation)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants