Replies: 1 comment 2 replies
-
@MiZych if you get any solution let me know |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
Hi!
I am migrating storybook from react-webpack5 to Vite and I am encountering build errors. The start is working correctly and the storybook is running. The error is:
./sb-common-assets/fonts.css doesn't exist at build time, it will remain unchanged to be resolved at runtime
✓ 307 modules transformed.
x Build failed in 4.96s
=> Failed to build the preview
RollupError: Expected ';', '}' or
This i my package.json devDependencies:
"@storybook/addon-a11y": "^7.6.16",
"@storybook/addon-actions": "^7.6.16",
"@storybook/addon-essentials": "^7.6.16",
"@storybook/addon-links": "^7.6.16",
"@storybook/addons": "^7.6.16",
"@storybook/blocks": "^7.6.16",
"@storybook/builder-vite": "^7.6.16",
"@storybook/manager-api": "^7.6.16",
"@storybook/node-logger": "^7.6.16",
"@storybook/preset-create-react-app": "^7.6.16",
"@storybook/react": "^7.6.16",
"@storybook/react-vite": "^7.6.16",
"@storybook/test-runner": "^0.16.0",
"@storybook/theming": "^7.6.16",
"@typescript-eslint/parser": "^6.21.0",
"@vitejs/plugin-react": "^4.2.1",
"storybook": "^7.6.7",
"storybook-a11y-report": "^0.0.20",
"vite": "^5.1.0"
This is my vite.config.ts:
import { defineConfig} from 'vite'
import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
})
this is my main.ts:
import { StorybookConfig } from "@storybook/react-vite";
const config: StorybookConfig ={
stories: ["../src//*.mdx", "../src//*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/preset-create-react-app",
"@storybook/addon-a11y", //official a11y addon which automatically catches up to 57% of WCAG issue
],
core: {
builder: {
name: '@storybook/builder-vite',
options: {
viteConfigPath: 'vite.config.ts',
},
},
disableTelemetry: true
},
framework: {
name: "@storybook/react-vite",
options: {},
},
features: {
storyStoreV7: true,
buildStoriesJson: true
},
docs: {
autodocs: true,
}
};
export default config;
What can cause the trouble?
I tried to npm clean, reinstall packages but nothing helped me.
To Reproduce
No response
System
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions