#Storybookjs integration

2 messages · Page 1 of 1 (latest)

hoary wind
#

Any tips on how to integrate a storybook into my starlight site? Not sure what installation to proceed with and there are many random errors. I installed react and vue for astro. Then I tried installing storybook with the Vite builder. Then the storybook page gives errors like "Failed to fetch dynamically imported module: http://localhost:6006/src/stories/Button.stories.js". Then in the terminal it will say or sometimes say "Failed to fetch dynamically imported module: http://localhost:6006/src/stories/index.mdx" which makes sense since astro runs on 4321. In the terminal I get issues like "[vite] Internal server error: failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extenstion." Is there any straightforward way to just integrate a storybook into my Starlight site?

languid bramble
#

I don’t know if it’s possible to integrate Storybook in the same site as Astro as they both kind of do the same thing.