storybook-builder-vite | builder plugin to run and build Storybooks | Frontend Framework library
kandi X-RAY | storybook-builder-vite Summary
kandi X-RAY | storybook-builder-vite Summary
A builder plugin to run and build Storybooks with Vite
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of storybook-builder-vite
storybook-builder-vite Key Features
storybook-builder-vite Examples and Code Snippets
Community Discussions
Trending Discussions on storybook-builder-vite
QUESTION
The build with Vite and Vue works like a charm (so ist the path correct). However, it does not with storybook.
Here my config:
vite.config.js
...ANSWER
Answered 2022-Feb-19 at 21:45I have had exactly the same problem. Although many vite vue 3 boilerplates do it the same way you and I do, strangely it didn't work, maybe it's a certain vite version that might have bugs.
The only thing that worked for me was the import in main.ts
:
QUESTION
I couldn't find any information on how to make @emotion/react work in Storybook when using Vite as a bundler in a React application.
I'm getting errors like Invalid value for prop 'css' in
tag
in almost every story.
Even though, @emotion/react is working fine for the webapp itself.
Here's my vite.config.js
configuration:
ANSWER
Answered 2022-Jan-21 at 08:49The solution was found in storybook-builder-vite's github page here.
QUESTION
I'm refactoring a React webapp from CRA to using Vite and having issues with Storybook. The storybook's GUI opens, and I see a list of stories on the left panel. But whichever story I choose I get an error TypeError: fn.apply is not a function
in Canvas tab like shown here:
I found a similar issue on Storybook's GitHub, and tried to change names StorybookName
to storybookName
in all the stories, also checked all the React components in the stories to make sure all of them are correctly defined as functions.
When it was using CRA storybook worked fine, but with Vite it's not working. Maybe I'm missing some configuration for Vite, so here's my vite.config.js
as well:
ANSWER
Answered 2021-Dec-21 at 15:09I found the reason and it appears that all the configurations I had were correct. The problem was in the way how I aplied one of the decorators for Storybook. Basically, I wasn't correctly exporting one of the decorators and therefore was applying undefined
instead of a decorator.
So, for whoever faces this issue, please note that it's most of the time a problem with syntax. Check all your functions, components, decorators and so on and make sure they are all correctly defined and exported.
The error message itself doesn't give any clue where to dig, which is a big shame, so this one is pretty tough to debug.
QUESTION
We have a docker compose setup that runs our React app and Storybook in two separate containers.
Recently we changed our builder to Vite, and also updated Storybooks builder to the new Vite builder plugin.
When firing up the Storybook Docker I am getting the following error for all of our components with a Storybook file
...ANSWER
Answered 2021-Sep-10 at 00:55It turns out there is a small 'gotcha' when moving from Webpack to Vite with file extensions.
If any of your React components don't use the .jsx extension Vite won't find them.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install storybook-builder-vite
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page