Compositions seems to be mixing stories #13696
Unanswered
BartJanvanAssen
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey 👋,
I'm working on this storybook project with several compositions (5-10) but when i compose these stories something tends to break. I have this structure:
Main storybook
| storyRoot1
| storyRoot2
| storyRoot3
| storyA1
| storyB1
| storyC1
I notice that the stories under the root are not rendering in the root storybook but rendered in one of the children (for example Sub-storybook C). It is likely to do with my way of hosting but like to check into here if someone noticed this before.
Hosting this project like:
https://domain/*.js => MainStorybook
https://domain/A/*.js => Sub-storybook A
https://domain/B/*.js => Sub-storybook B
https://domain/C/*.js => Sub-storybook C
making this happen using the webpack public path variable like (in case of Sub-storybook A):
if (window.location.hostname !== 'localhost') {
webpack_public_path = 'https://domain/A/'
}
refs are attached to the root storybook like:
refs: {
'A': {
title: "Project A",
url: "https://domain/A"
},
'B': {
title: "Project B",
url: "https://domain/B"
},
'C': {
title: "Project C,
url: "https://domain/C"
}
},
Then in a cloud function attached to https://domain/* I'm redirecting to the deployed storybook files. I think that root storybook has some issues with this approach but can't seem to find it yet..
Beta Was this translation helpful? Give feedback.
All reactions