castor
castor copied to clipboard
build: use vite for storybook
Purpose
Speed up development, webpack
was taking ~60s to build, Vite
takes ~1s.
Approach
Use storybook-builder-vite
and change some configs.
Testing
- CI should pass
-
yarn start
should work very much the same (but way faster)
Risks
Not beta, but still early in Storybook.
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/onfido-oss/castor/dKYhfYje2cptNcpzFuGDq37SGeZZ
✅ Preview: https://castor-git-build-vite-onfido-oss.vercel.app
[Deployment for 2337079 failed]
It breaks all Core stories and the code snippets shown, I'm not sure why.
This is a major blocker. I'll try to solve it later but I'm not sure what's changed.
Seems to be related to decorators.
@josokinas seems that not much has happened on storybook-builder-vite
so far.
I decided to change the config to use Vite in development (local) for a faster and better DX, but continue to use webpack in production because I couldn't find a fix for the issues described before.
Do you think that's good for now?
Yep, fine, good to go 👍
Actually it still borks some CSS, story decorators and our custom HTML to React prepareForInline
function, even locally.
Applied HOLD
label and will give it more time to stabilise :/