Turbo 'design-system' example w/ Storybook 7 + vanilla-extract ? #4119
-
|
Hey all Wondering if anyone has managed to get the https://github.com/vercel/turbo/tree/main/examples/design-system example running with Storybook 7 and vanilla-extract? Can do Turbo DS example with Storybook 7, but getting this error when hooking up vanilla-extract... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hmm.... in my case it seems to be related to the way components are imported in story files. The import path needs to include the e.g. The dynamic alias I'd set up in the storybook vite config was missing the I have story files alongside component files, slightly different file structure to the Turbo 'design-system' example. My components are packaged individually and also prefer importing my components via package name (like in the real world). Anyway, got it working like this... packages/components/button/src/Button.stories.tsx apps/docs/.storybook/main.ts Feel free to let me know if there's another/better way 👍 |
Beta Was this translation helpful? Give feedback.
Hmm.... in my case it seems to be related to the way components are imported in story files. The import path needs to include the
/src/.e.g.
import { Button } from "@acme/core/src";The dynamic alias I'd set up in the storybook vite config was missing the
/src🤦♂️I have story files alongside component files, slightly different file structure to the Turbo 'design-system' example. My components are packaged individually and also prefer importing my components via package name (like in the real world).
Anyway, got it working like this...
packages/components/button/src/Button.stories.tsx
apps/docs/.storybook/main.ts