This repository was archived by the owner on Mar 19, 2026. It is now read-only.
Description Describe the bug
When building a Storybook with rolldown-vite (here the plain react + ts example), it fails after the build because the globals can't be applied.
Reproduction
https://github.com/TheAlexLichter/rolldown-vite-reproductions/tree/storybook-globals
Steps to reproduce
After cloning the repo:
pnpm i
pnpm storybook:build
Serve the storybook instance via pnpm storybook:serve
Open on localhost:3000
See error in the console
When running it via pnpm storybook:dev things work as expected. Same without rolldown-vite.
System Info
System:
OS: macOS 15.3.2
CPU: (12) arm64 Apple M2 Max
Memory: 95.63 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.15.0 - /usr/local/bin/node
Yarn: 1.22.22 - /opt/homebrew/bin/yarn
npm: 10.9.2 - /usr/local/bin/npm
pnpm: 10.10.0 - /opt/homebrew/bin/pnpm
bun: 1.0.30 - /opt/homebrew/bin/bun
Browsers:
Chrome: 136.0.7103.114
Safari: 18.3.1
npmPackages:
@vitejs/plugin-react: ^4.4.1 => 4.4.1
vite: ^6.3.5 => 6.3.5
Used Package Manager
pnpm
Logs
No response
Validations
Reactions are currently unavailable
Describe the bug
When building a Storybook with
rolldown-vite(here the plain react + ts example), it fails after the build because the globals can't be applied.Reproduction
https://github.com/TheAlexLichter/rolldown-vite-reproductions/tree/storybook-globals
Steps to reproduce
After cloning the repo:
pnpm ipnpm storybook:buildpnpm storybook:servelocalhost:3000When running it via
pnpm storybook:devthings work as expected. Same withoutrolldown-vite.System Info
System: OS: macOS 15.3.2 CPU: (12) arm64 Apple M2 Max Memory: 95.63 MB / 32.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 22.15.0 - /usr/local/bin/node Yarn: 1.22.22 - /opt/homebrew/bin/yarn npm: 10.9.2 - /usr/local/bin/npm pnpm: 10.10.0 - /opt/homebrew/bin/pnpm bun: 1.0.30 - /opt/homebrew/bin/bun Browsers: Chrome: 136.0.7103.114 Safari: 18.3.1 npmPackages: @vitejs/plugin-react: ^4.4.1 => 4.4.1 vite: ^6.3.5 => 6.3.5Used Package Manager
pnpm
Logs
No response
Validations