Closed messenjer closed 3 years ago
Hello,
I also tested with a classic installation of storybook (without vite) and it's working.
vue create my-project
cd my-project
npx sb init
npm run storybook
Although the generated code does not seem to be very useful for the documentation of the component. For each story, it's the same code. It doesn't match the explanation of the functionality in the documentation. https://github.com/storybookjs/storybook/blob/next/docs/writing-docs/doc-blocks.md
I will try also with docPages https://storybook.js.org/docs/vue/writing-docs/docs-page if I find another solution.
Regards
Mathieu
Just shedding some light on this, @storybook/addon-docs uses the storySource and @storybook/source-loader to load source and modify the story (adding the storySource parameter to the story).
As the name suggests, the @storybook/source-loader is a Webpack loader.
So i guess this would have to be totaly re-written for Vite/Esbuild.
So i guess this would have to be totally re-written for Vite/Esbuild.
Yes, we are having some issues like this with storybook-quickly-builder.
We must therefore find alternatives. For the "No code available", now we use Format MDX for stories which work more or less ;-)
If your stories accept args as input and you are using one of the supported frameworks (most popular frameworks except vue3 at this time), it should dynamically generate a snippet based on the return value of the story function. No loader needed.
Same issue, any fix?
Same issue, any fix? and I use vue3 + tsx, my code here. help wanted! https://github.com/wont-org/vue3-el/blob/docs/sb/components/Button/index.stories.tsx
I think, the problem is vue-docgen-api. which used webpack. but vite haven't. @story/docs options is passed under that.
Looking forward to your solution
Hello,
In my storybook, the docs page does not display the component code. It displays "No code available" (see capture below)
I manage to reproduce it with a basic installation, I create a "vue3" project with Vite and then I install storybook with the storybook-builder-vite. In the default examples, I have the same problem.
Here is the commands, I execute in a new folder:
and my package.json
I try also with a react application, and I have the same issue
Is it a known problem? Where can I look to fix this, the "vite" configuration? or in the storybook code?
Thanks
Mathieu