You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm developing a large scale monorepo and I'm planning to use Storybook composition
For simplification, let's assume I have 2 packages A and B, both of which contain React components. Both packages contain storybook stories.
Each package can be built using Storybook resulting in 2 separate Storybook builds. I am planning to have separate Storybook which would compose the stories from A and B using the method describe in Storybook docs.
Additionally, package A depends on B - this means that stories from A can use also components from package B.
The problem: If there is a change in package B, I need to rebuild both Storybooks.
Storybook output bundles contain the code for presented UI components. Storybook build for A contains the compiled React components both for A and B - this is why rebuild for both packages would be required.
On each PR I am rebuilding changed packages, each of them is built into different formats - it would be great if I could make reuse of these bundles in runtime.
Is there recommended configuration to externalize user defined code from the storybook output bundles?
I am also open to introduce build configuration for my packages that would allow to build them in format consumable by Storybook in runtime.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I'm developing a large scale monorepo and I'm planning to use Storybook composition
For simplification, let's assume I have 2 packages A and B, both of which contain React components. Both packages contain storybook stories.
Each package can be built using Storybook resulting in 2 separate Storybook builds. I am planning to have separate Storybook which would compose the stories from A and B using the method describe in Storybook docs.
Additionally, package A depends on B - this means that stories from A can use also components from package B.
The problem: If there is a change in package B, I need to rebuild both Storybooks.
Storybook output bundles contain the code for presented UI components. Storybook build for A contains the compiled React components both for A and B - this is why rebuild for both packages would be required.
On each PR I am rebuilding changed packages, each of them is built into different formats - it would be great if I could make reuse of these bundles in runtime.
Is there recommended configuration to externalize user defined code from the storybook output bundles?
I am also open to introduce build configuration for my packages that would allow to build them in format consumable by Storybook in runtime.
Beta Was this translation helpful? Give feedback.
All reactions