Storybook, monorepos, and page stories #29066
-
SummaryWith the popularity of monorepos such as turborepo, I'm starting to see a lot more storybook application isolated in their own app repo. This seems to work very well for shared packages like your design system (e.g. packages/ui) because the component gets shared between both applications: storybook and your web app (nextjs in my case). Naturally, any dependencies declared in the However, it becomes a bit less elements for components that are more tightly coupled to the web app. In the most extreme case, this could be the Page component, but the same logic applies to any component in the web app. Having the storybook find and import these components and their stories isn't an issue, but how dependency management should be handled is a bit less clear. In the storybook package.json file would I declare a dependency on the web app (I'm not even sure this is possible in with turborepos) or would I bubble up dependencies that are used in components I want to write stories for to the parent package.json file of the turborepo? The first approach seems the easily (if possible), but both feel less than perfect. Maybe just going back to the old approach (co-locating the storybook in the app repo) would work best? Curious to see if others have ran into this and if they have an opinion. Thanks Additional informationNo response Create a reproductionNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Duplicate of #22521. Let me know if you think we should keep this discussion open. |
Beta Was this translation helpful? Give feedback.
Duplicate of #22521.
Let me know if you think we should keep this discussion open.