Repository navigation
Addon Vitest: Pin storybook/test in optimizeDeps so its CJS-only deps are prebundled - #35572
Merged
valentinpalkovic merged 1 commit intoJul 24, 2026
Conversation
Contributor
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Vitest plugin’s Vite configuration explicitly includes ChangesVitest dependency optimization
Estimated code review effort: 1 (Trivial) | ~2 minutes 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. Comment |
valentinpalkovic
approved these changes
Jul 24, 2026
2 tasks done
1 of 9 tasks
Contributor
Package BenchmarksCommit: The following packages have significant changes to their size or dependencies:
|
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 186 | 186 | 0 |
| Self size | 79 KB | 79 KB | 🚨 +1 B 🚨 |
| Dependency size | 35.73 MB | 36.13 MB | 🚨 +399 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
storybook
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 73 | 73 | 0 |
| Self size | 21.39 MB | 21.31 MB | 🎉 -81 KB 🎉 |
| Dependency size | 36.75 MB | 31.22 MB | 🎉 -5.53 MB 🎉 |
| Bundle Size Analyzer | Link | Link |
@storybook/angular
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 185 | 185 | 0 |
| Self size | 160 KB | 160 KB | 🎉 -54 B 🎉 |
| Dependency size | 30.13 MB | 30.53 MB | 🚨 +399 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
@storybook/angular-vite
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 36 | 36 | 0 |
| Self size | 33.41 MB | 33.41 MB | 🎉 -2 KB 🎉 |
| Dependency size | 21.34 MB | 15.80 MB | 🎉 -5.54 MB 🎉 |
| Bundle Size Analyzer | Link | Link |
@storybook/ember
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 185 | 185 | 0 |
| Self size | 13 KB | 13 KB | 0 B |
| Dependency size | 31.08 MB | 31.48 MB | 🚨 +399 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
@storybook/nextjs
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 531 | 531 | 0 |
| Self size | 641 KB | 640 KB | 🎉 -1 KB 🎉 |
| Dependency size | 62.41 MB | 62.82 MB | 🚨 +411 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
@storybook/nextjs-vite
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 94 | 93 | 🎉 -1 🎉 |
| Self size | 1.42 MB | 1.37 MB | 🎉 -48 KB 🎉 |
| Dependency size | 23.91 MB | 23.85 MB | 🎉 -62 KB 🎉 |
| Bundle Size Analyzer | Link | Link |
@storybook/react-native-web-vite
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 125 | 122 | 🎉 -3 🎉 |
| Self size | 29 KB | 29 KB | 0 B |
| Dependency size | 25.90 MB | 24.91 MB | 🎉 -982 KB 🎉 |
| Bundle Size Analyzer | Link | Link |
@storybook/react-vite
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 83 | 83 | 0 |
| Self size | 32 KB | 32 KB | 🚨 +8 B 🚨 |
| Dependency size | 21.22 MB | 21.62 MB | 🚨 +398 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
@storybook/react-webpack5
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 272 | 272 | 0 |
| Self size | 23 KB | 23 KB | 0 B |
| Dependency size | 48.19 MB | 48.60 MB | 🚨 +411 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
@storybook/server-webpack5
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 198 | 198 | 0 |
| Self size | 15 KB | 15 KB | 0 B |
| Dependency size | 37.00 MB | 37.40 MB | 🚨 +399 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
@storybook/svelte-vite
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 20 | 20 | 0 |
| Self size | 54 KB | 54 KB | 🎉 -10 B 🎉 |
| Dependency size | 26.65 MB | 27.04 MB | 🚨 +386 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
@storybook/sveltekit
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 21 | 21 | 0 |
| Self size | 56 KB | 56 KB | 0 B |
| Dependency size | 26.71 MB | 27.09 MB | 🚨 +386 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
@storybook/tanstack-react
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 84 | 84 | 0 |
| Self size | 113 KB | 112 KB | 🎉 -959 B 🎉 |
| Dependency size | 21.25 MB | 21.65 MB | 🚨 +398 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
@storybook/vue3-vite
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 103 | 102 | 🎉 -1 🎉 |
| Self size | 34 KB | 34 KB | 🎉 -316 B 🎉 |
| Dependency size | 43.11 MB | 43.04 MB | 🎉 -73 KB 🎉 |
| Bundle Size Analyzer | Link | Link |
@storybook/cli
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 205 | 205 | 0 |
| Self size | 827 KB | 827 KB | 🚨 +52 B 🚨 |
| Dependency size | 91.60 MB | 85.99 MB | 🎉 -5.61 MB 🎉 |
| Bundle Size Analyzer | Link | Link |
@storybook/codemod
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 198 | 198 | 0 |
| Self size | 32 KB | 32 KB | 🚨 +36 B 🚨 |
| Dependency size | 90.08 MB | 84.46 MB | 🎉 -5.61 MB 🎉 |
| Bundle Size Analyzer | Link | Link |
create-storybook
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 74 | 74 | 0 |
| Self size | 1.09 MB | 1.09 MB | 🚨 +53 B 🚨 |
| Dependency size | 58.14 MB | 52.52 MB | 🎉 -5.61 MB 🎉 |
| Bundle Size Analyzer | node | node |
@storybook/preset-react-webpack
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 161 | 161 | 0 |
| Self size | 19 KB | 19 KB | 🚨 +1 B 🚨 |
| Dependency size | 32.70 MB | 33.10 MB | 🚨 +399 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
@storybook/react
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 59 | 59 | 0 |
| Self size | 1.48 MB | 1.49 MB | 🚨 +12 KB 🚨 |
| Dependency size | 12.30 MB | 12.30 MB | 🚨 +143 B 🚨 |
| Bundle Size Analyzer | Link | Link |
This was referenced Sep 5, 2026
Merged
brandhaug
added a commit
to brandhaug/b2b-saas-starter
that referenced
this pull request
Sep 5, 2026
## Dependency Updates | Package | From | To | Type | | --- | --- | --- | --- | | `storybook` | 10.5.10 | 10.6.0 | minor | ## Release Notes <details> <summary><b>storybook</b> (10.5.10 → 10.6.0)</summary> ## 10.6.0 > New skills architecture for agentic workflows Storybook 10.6 contains hundreds of fixes and improvements: - 💻 CLI bindings for agent tools/skills -🅰️ Angular-Vite MCP/skills support and improved docgen/snippets (experimental) - 🟢 Vue MCP/skills support and improved docgen/snippets (experimental) - 🧩 Tanstack / NextJS-Vite framework bugfixes - ⚡ Improved performance and reduced bundle size <details> <summary>List of all updates</summary> - Addon MCP: Stop silently dropping composed refs from MCP composition - [#36077](storybookjs/storybook#36077), thanks @<!---->kasperpeulen! - Addon Vitest: Pin storybook/test in optimizeDeps so its CJS-only deps are prebundled - [#35572](storybookjs/storybook#35572), thanks @<!---->Nic-Polumeyv! - Addon Vitest: Report test runs with failures as failed tool outcomes - [#36080](storybookjs/storybook#36080), thanks @<!---->kasperpeulen! - Addon Vitest: Resolve story test globs against the project root - [#36103](storybookjs/storybook#36103), thanks @<!---->kasperpeulen! - Addon-vitest: Filter Storybook instrumentation from reported stack traces - [#36120](storybookjs/storybook#36120), thanks @<!---->ghengeveld! - Angular Vite: Resolve tsConfig against the workspace root - [#36026](storybookjs/storybook#36026), thanks @<!---->ndelangen! - Angular-Vite: Run Compodoc on demand - [#35776](storybookjs/storybook#35776), thanks @<!---->valentinpalkovic! - Angular: Add an in-process docgen analyzer, replacing Compodoc under the flag - [#35805](storybookjs/storybook#35805), thanks @<!---->valentinpalkovic! - Angular: Bind only what the component accepts in story snippets, and report the rest - [#35943](storybookjs/storybook#35943), thanks @<!---->valentinpalkovic! - Angular: Decide the migration\'s zone.js import from the dependency tree - [#36008](https://github.com/story …[full notes](https://github.com/storybookjs/storybook/releases/tag/v10.6.0) </details> --- *This PR was auto-generated by [catalog-update-action](https://github.com/brandhaug/catalog-update-action).* Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
brandhaug
added a commit
to brandhaug/b2b-saas-starter
that referenced
this pull request
Sep 5, 2026
## Dependency Updates | Package | From | To | Type | | --- | --- | --- | --- | | `@storybook/react-vite` | 10.5.10 | 10.6.0 | minor | ## Release Notes <details> <summary><b>@<!---->storybook/react-vite</b> (10.5.10 → 10.6.0)</summary> ## 10.6.0 > New skills architecture for agentic workflows Storybook 10.6 contains hundreds of fixes and improvements: - 💻 CLI bindings for agent tools/skills -🅰️ Angular-Vite MCP/skills support and improved docgen/snippets (experimental) - 🟢 Vue MCP/skills support and improved docgen/snippets (experimental) - 🧩 Tanstack / NextJS-Vite framework bugfixes - ⚡ Improved performance and reduced bundle size <details> <summary>List of all updates</summary> - Addon MCP: Stop silently dropping composed refs from MCP composition - [#36077](storybookjs/storybook#36077), thanks @<!---->kasperpeulen! - Addon Vitest: Pin storybook/test in optimizeDeps so its CJS-only deps are prebundled - [#35572](storybookjs/storybook#35572), thanks @<!---->Nic-Polumeyv! - Addon Vitest: Report test runs with failures as failed tool outcomes - [#36080](storybookjs/storybook#36080), thanks @<!---->kasperpeulen! - Addon Vitest: Resolve story test globs against the project root - [#36103](storybookjs/storybook#36103), thanks @<!---->kasperpeulen! - Addon-vitest: Filter Storybook instrumentation from reported stack traces - [#36120](storybookjs/storybook#36120), thanks @<!---->ghengeveld! - Angular Vite: Resolve tsConfig against the workspace root - [#36026](storybookjs/storybook#36026), thanks @<!---->ndelangen! - Angular-Vite: Run Compodoc on demand - [#35776](storybookjs/storybook#35776), thanks @<!---->valentinpalkovic! - Angular: Add an in-process docgen analyzer, replacing Compodoc under the flag - [#35805](storybookjs/storybook#35805), thanks @<!---->valentinpalkovic! - Angular: Bind only what the component accepts in story snippets, and report the rest - [#35943](storybookjs/storybook#35943), thanks @<!---->valentinpalkovic! - Angular: Decide the migration\'s zone.js import from the dependency tree - [#36008](https://github.com/story …[full notes](https://github.com/storybookjs/storybook/releases/tag/v10.6.0) </details> --- *This PR was auto-generated by [catalog-update-action](https://github.com/brandhaug/catalog-update-action).* Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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
In Vitest browser mode, whether
storybook/test's CJS-only deps (aria-query,lz-string,pretty-format, all via@testing-library/dom) get prebundled depends on the project's node_modules layout. On npm's hoisted layout, in a project whose stories don't importstorybook/testdirectly, every story test fails at import:pnpm's isolated layout works because the scanner happens to discover
storybook/testthere: it shows up in the dep-optimizer metadata, on hoisted it doesn't. Pinning it makes all layouts behave like the working one. Diagnosed in vitejs/vite#23030; reproduces identically on Vite 7.3.6 and 8.1.5, so it's an addon-side gap, not a Vite 8 regression. Vitest pins the same package for its own preview provider.Checklist for Contributors
Testing
Manual testing
On https://github.com/OpenSourceScouting/design-system branch
repro/vite8-rolldown-cjs-interop(Storybook 10.5.2, Vitest 4.1.10, Vite 8.1.5, hoisted node_modules),vitest run --project storybookfails all 36 story files with the error above; with'storybook/test'in the published addon's include list, all 36 files (95 tests) pass. A pnpm isolated install passes before and after.