-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: error in Vue 3 (& Nuxt 3) with Storybook v8 #26306
Comments
Hi, thanks for reporting this. do you have a reproduction repo you can share? If not, can you please create one via storybook.new? We prioritize bug reports that have reproduction. Thank you! 🙏 |
Here it is! This is the Storybook v7 deploy: https://my-nuxt-starter-storybook.netlify.app/ |
Had similar issue with project which has a differently named vite.config.js.
|
Yep I can confirm. I was just going to write the same fix @shoeyn suggested |
Hi everyone! This happens because Storybook 8 doesn't add framework-specific plugins to Vite. This is mentioned in https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#framework-specific-vite-plugins-have-to-be-explicitly-added You can create import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
export default defineConfig({
plugins: [vue()],
}); or you can add the plugin in |
It was a fresh install for me and I couldn't find any information on the matter in the docs as I didn't think to check the migration docs for a fresh install. |
Oh yeah, it should be mentioned somewhere in the docs (e.g. https://storybook.js.org/docs/get-started/vue3-vite#troubleshooting). And also for the other frameworks. |
cc @kylegach for the docs |
Should have been fixed here storybook-vue/storybook-nuxt@9d0b108 |
Describe the bug
RollupError: [vite:build-import-analysis] Failed to parse source for import analysis because the content contains invalid JS syntax. Install @vitejs/plugin-vue to handle .vue files.
To Reproduce
I migrated a working Storybook from latest v7 to latest v8
System
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: