Describe the bug
Hello, i'm trying to upgrade my project to the Vite 8 with Rolldown, and after upgrading Storybook does not work.
The console message said:
chromaui/addon-visual-tests was loaded twice, this could have bad side-effects
And generated project-annotations.js has 2 identical imports
And error caused by that:
Uncaught SyntaxError: Identifier 'preview_24597' has already been declared (at project-annotations.js:8:1)
Disabling '@chromatic-com/storybook', in storybook config resolves the issue.
To reproduce
// .storybook/main.ts
import type { StorybookConfig } from '@storybook/react-vite'
import react from '@vitejs/plugin-react'
const config: StorybookConfig = {
stories: [
'../packages/**/*.mdx',
'../packages/**/*.stories.@(js|jsx|mjs|ts|tsx)',
],
addons: [
'@storybook/addon-links',
'@chromatic-com/storybook',
'@storybook/addon-a11y',
'@storybook/addon-docs',
],
core: {
disableTelemetry: true,
disableWhatsNewNotifications: true,
},
viteFinal: (config) => {
config!.resolve = {
...config!.resolve,
tsconfigPaths: true,
}
config!.plugins!.push(react())
return config
},
framework: {
name: '@storybook/react-vite',
options: {},
},
}
export default config
Just run Storybook in dev mode and see the console errors.
Environment
"storybook": "^10.3.3",
"@storybook/addon-a11y": "^10.3.3",
"@storybook/addon-docs": "^10.3.3",
"@storybook/addon-links": "^10.3.3",
"@storybook/addon-onboarding": "^10.3.3",
"@storybook/react-vite": "^10.3.3",
"@chromatic-com/storybook": "^5.1.0",
"vite": "^8.0.2",
"@vitejs/plugin-react": "^6.0.1",
Package Manager: pnpm@9.15.4
Describe the bug
Hello, i'm trying to upgrade my project to the Vite 8 with Rolldown, and after upgrading Storybook does not work.
The console message said:
And generated
project-annotations.jshas 2 identical importsAnd error caused by that:
Disabling
'@chromatic-com/storybook',in storybook config resolves the issue.To reproduce
Just run Storybook in dev mode and see the console errors.
Environment
Package Manager: pnpm@9.15.4