Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.8k
Dependencies: Updatevite-plugin-storybook-nextjs#32821
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
coderabbitaibot commentedOct 24, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the 📝 WalkthroughWalkthroughUpdated the vite-plugin-storybook-nextjs dependency from a canary version to a stable major version (3.0.0) in the Next.js Vite framework package configuration. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
nx-cloudbot commentedOct 24, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
View yourCI Pipeline Execution ↗ for commit93c3215
☁️Nx Cloud last updated this comment at |
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
code/yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (1)
code/frameworks/nextjs-vite/package.json(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,jsx,json,html,ts,tsx,mjs}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{js,jsx,json,html,ts,tsx,mjs}: Run Prettier formatting on changed files before committing
Run ESLint on changed files and fix all errors/warnings before committing (useyarn lint:js:cmd <file>)
Files:
code/frameworks/nextjs-vite/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: merged
- GitHub Check: Danger JS
- GitHub Check: Core Unit Tests, windows-latest
🔇 Additional comments (1)
code/frameworks/nextjs-vite/package.json (1)
81-87:No code changes needed—v3.0.0 explicitly supports Next.js 15 via peer dependencies.The yarn.lock shows v3.0.0 has peer dependency "next": "^14.1.0 || ^15.0.0 || ^16.0.0", which directly contradicts the review's concern about compatibility. The framework's devDependency
next: ^15.2.3falls safely within this supported range.The documented breaking change "Support next 16" is additive, not destructive—it adds support for a new Next.js version rather than dropping support for Next.js 15. The framework code already contains version detection logic for Next.js 16+ vs pre-16 branching, so no code updates are required.
The dependency is used via simple require/re-export in two locations (
preset.tsandvite-plugin/index.ts), with no API calls that would break between versions. The^3.0.0version range is appropriate and allows minor/patch updates consistent with the peer dependency constraints.Likely an incorrect or invalid review comment.
| "@storybook/react-vite":"workspace:*", | ||
| "styled-jsx":"5.1.6", | ||
| "vite-plugin-storybook-nextjs":"2.1.0--canary.62.12de69e.0" | ||
| "vite-plugin-storybook-nextjs":"^3.0.0" |
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.
🧩 Analysis chain
Verify breaking changes and Next.js 15 compatibility for vite-plugin-storybook-nextjs v3.
This is a major version bump (2.1.0-canary → 3.0.0) with unknown breaking changes. The project uses Next.js 15.2.3, which itself has breaking changes (async Request APIs). The PR checklist shows all test types unchecked and no manual testing steps provided, which is risky for a major dependency upgrade.
Please verify and document:
- Breaking changes in v3: What breaking changes exist in vite-plugin-storybook-nextjs v3.0.0?
- Next.js 15 compatibility: Is v3 tested and compatible with Next.js 15.2.3?
- Code migration needs: Does the framework code in
code/frameworks/nextjs-vite/require updates to work with v3? - Test coverage: Why are all automated tests unchecked? What testing was performed locally?
I'll search for the v3 release notes to understand the scope of changes:The search results provide some context but don't clearly show v3.0.0 breaking changes. Let me search more specifically:Based on the search results, I found that the vite-plugin-storybook-nextjs was updated to 2.0.7 in an earlier release, and the current PR updates it to 3.0.0, which is a major version bump. The search results show various NextJS-Vite issues but don't provide explicit breaking changes documentation. Let me check if there are any code changes required in the framework package itself:Let me now complete the review based on what I've gathered:
I'll gather the necessary information to verify the review comment about this vite-plugin-storybook-nextjs upgrade.
---🏁 Script executed:```shell#!/bin/bash# Check if there are any imports or usages of vite-plugin-storybook-nextjs in the framework code# to determine if code changes are needed for v3 upgradefind code/frameworks/nextjs-vite -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" \) -exec grep -l "vite-plugin-storybook-nextjs" {} \;Length of output: 135
🌐 Web query:
vite-plugin-storybook-nextjs v3.0.0 release notes breaking changes💡 Result:
v3.0.0 (released 2025‑10‑24) — breaking change: requires/supports Next.js 16 (See release note). [1]
Sources
[1] GitHub — vite-plugin-storybook-nextjs release v3.0.0.
🌐 Web query:
vite-plugin-storybook-nextjs Next.js 15 compatibility💡 Result:
Short answer: partially — the plugin declares support for Next.js >= 14.1.0, but Next.js 15 introduced breaking changes that currently cause problems in the Storybook + Vite toolchain (module resolution, compiled React paths, test/Vitest issues, plus other Next‑15 behaviour). Expect some features to work but others (Vitest addon, certain Next 15 internals like compiled React subpaths, some server‑component/runtime features) to fail or need workarounds. [1][2][3]
Details / references:
- vite-plugin-storybook-nextjs README (requires Next.js v14.1.0 or higher). [1]
- Storybook maintainers tracking Next.js 15 investigation and known incompatibilities. [2]
- Reported bug where Storybook/Vitest fails in Next.js 15 because Next compiles React into internal paths (causes module resolution errors). Workarounds (for now) include using Storybook UI testing instead of the Vitest addon. [3]
If you want, I can:
- check the exact versions in your project and suggest a concrete configuration/workaround, or
- search for any newly released fixes/PRs that target Next.js 15 compatibility.
I found a critical issue. Let me verify the Next.js version in the project:
---🏁 Script executed:```shell#!/bin/bash# Check the Next.js version in code/frameworks/nextjs-vite/package.jsongrep -A 1 '"next"' code/frameworks/nextjs-vite/package.json | head -5Length of output: 89
DO NOT MERGE: vite-plugin-storybook-nextjs v3.0.0 requires Next.js 16, but project uses 15.2.3.
vite-plugin-storybook-nextjs v3.0.0 requires/supports Next.js 16, making it incompatible with the current Next.js 15.2.3. The plugin is actively imported across 3 framework files (src/index.ts, src/preset.ts, src/vite-plugin/index.ts), so this incompatibility will break the build and tests.
Required fix:
- Upgrade to Next.js 16 in the same PR, OR
- Revert to vite-plugin-storybook-nextjs v2.x compatible with Next.js 15
🤖 Prompt for AI Agents
In code/frameworks/nextjs-vite/package.json around line 86, the dependency"vite-plugin-storybook-nextjs": "^3.0.0" requires Next.js 16 while the projectuses Next.js 15.2.3; this will break imports in src/index.ts, src/preset.ts, andsrc/vite-plugin/index.ts. Fix by either (A) upgrading Next.js to v16 in this PR:bump the next dependency in package.json to a v16 release, run install, updateany Next 16 migration changes required by the three affected files, and runtests; or (B) revert the plugin to a v2.x release compatible with Next.js 15:change the dependency to a 2.x version, run install, and verify the existingimports compile and tests pass.4a4b43c intonextUh oh!
There was an error while loading.Please reload this page.
…torybook-nextjsDependencies: Update `vite-plugin-storybook-nextjs`(cherry picked from commit4a4b43c)
Uh oh!
There was an error while loading.Please reload this page.
What I did
Bump
vite-plugin-storybook-nextjsto v3Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!
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.tsMake sure this PR containsone 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: Documentationonly 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/coreteam here.core team members can create a canary releasehere or locally with
gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>Summary by CodeRabbit