这是indexloc提供的服务,不要输入任何密码
Skip to content
Discussion options

You must be logged in to vote

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

import { Button } from "@acme/button";
...

apps/docs/.storybook/main.ts

import { vanillaExtractPlugin }…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@AnweshGangula
Comment options

Answer selected by jonnystening
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants