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
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
Sub-storybook A
| storyA1
Sub-storybook B
| storyB1
Sub-storybook C
| 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.
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/'
}
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..
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
-
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