Skip to content

Add missing vite peer dependency in vite-based frameworks#34589

Merged
JReinhold merged 1 commit into
storybookjs:nextfrom
stof:vite_peer_deps
Apr 27, 2026
Merged

Add missing vite peer dependency in vite-based frameworks#34589
JReinhold merged 1 commit into
storybookjs:nextfrom
stof:vite_peer_deps

Conversation

@stof
Copy link
Copy Markdown
Contributor

@stof stof commented Apr 17, 2026

What I did

This adds the vite peer dependency in Vite-based frameworks that don't have it yet (most Vite-based frameworks already have it), forwarding the peer dependency of @storybook/builder-vite.

This is necessary for environments where peer dependencies are strictly enforced (Yarn PnP, pnpm, ...) and avoids a warning during yarn installs even when not using PnP.

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

Manual testing

Caution

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

  1. Run a sandbox with one of the impacted frameworks (e.g. yarn task --task sandbox --start-from auto --template html-vite/default-js)
  2. Run `yarn explain peer-requirements |grep vite
  3. See that the error about not providing the vite requirement to @storybook/builder-vite is gone

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

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

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 17, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fffa27ca-b1f9-45f7-abe1-e9d8dba3ad27

📥 Commits

Reviewing files that changed from the base of the PR and between d226aa9 and fbae015.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (3)
  • code/frameworks/html-vite/package.json
  • code/frameworks/preact-vite/package.json
  • code/frameworks/web-components-vite/package.json

📝 Walkthrough

Walkthrough

Three Vite-based Storybook framework packages add explicit vite peer dependency constraints (^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0) to their package.json files, supporting multiple Vite major versions.

Changes

Cohort / File(s) Summary
Vite Framework Peer Dependencies
code/frameworks/html-vite/package.json, code/frameworks/preact-vite/package.json, code/frameworks/web-components-vite/package.json
Added vite peer dependency constraint `^5.0.0

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • Vite: Support Vite 8 #33788: Extends vite peer dependency ranges to include ^8.0.0 across multiple Vite-based Storybook framework packages, using the same peer dependency version constraint approach.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@JReinhold JReinhold added the ci:daily Run the CI jobs that normally run in the daily job. label Apr 22, 2026
@JReinhold JReinhold self-assigned this Apr 22, 2026
@storybook-app-bot
Copy link
Copy Markdown

Package Benchmarks

Commit: fbae015, ran on 22 April 2026 at 19:24:24 UTC

The following packages have significant changes to their size or dependencies:

@storybook/cli

Before After Difference
Dependency count 184 184 0
Self size 782 KB 782 KB 0 B
Dependency size 68.18 MB 68.20 MB 🚨 +21 KB 🚨
Bundle Size Analyzer Link Link

@storybook/codemod

Before After Difference
Dependency count 177 177 0
Self size 32 KB 32 KB 🚨 +36 B 🚨
Dependency size 66.70 MB 66.72 MB 🚨 +21 KB 🚨
Bundle Size Analyzer Link Link

@JReinhold JReinhold merged commit d1b3f88 into storybookjs:next Apr 27, 2026
219 of 228 checks passed
@github-project-automation github-project-automation Bot moved this from Empathy Queue (prioritized) to Done in Core Team Projects Apr 27, 2026
@github-actions github-actions Bot mentioned this pull request Apr 27, 2026
16 tasks
@stof stof deleted the vite_peer_deps branch April 27, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug builder-vite ci:daily Run the CI jobs that normally run in the daily job. html preact web-components

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants