-
SummaryI am building a vue storybook component library with vite called
I added a component to this library. This component,
However, when I consume this library
Additional informationNo response Create a reproductionNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I am not very familiar with Vue, but I think I get what you are asking. From the way your question is worded it sounds like you may be thinking about what Storybook is, incorrectly. Storybook is an application that consumes your components to create stories. Those stories are primarily for documenting and testing the components that you would publish for use in an application. When you build Storybook, the output is the Storybook application that uses your components in it's stories. If you define aliases in If you are creating a component library then you want to think of Storybook as your documentation and testing tool, so it isn't used by applications that depend on your library. Hosting the built Storybook application as documentation can be very helpful to developers that want to look at the stories to see how to use the libraries components. Your component library should be published the same as you would without Storybook, just like how you don't publish your library's unit tests as part of your library. You may be able to fix the error by configuring aliases in the application that is using your library, but I assume Vue probably has a tool for building library components that would bundle them for publishing with aliases already resolved. |
Beta Was this translation helpful? Give feedback.
I am not very familiar with Vue, but I think I get what you are asking. From the way your question is worded it sounds like you may be thinking about what Storybook is, incorrectly.
Storybook is an application that consumes your components to create stories. Those stories are primarily for documenting and testing the components that you would publish for use in an application. When you build Storybook, the output is the Storybook application that uses your components in it's stories.
If you define aliases in
.storybook/main.js
, that is only for configuring the Storybook application.If you are creating a component library then you want to think of Storybook as your documentation and testi…