I've setup resium in a react-vite storybook and it's working well for me to develop some custom components. I'm now trying to 'compose' the already published Resium storybook for the core components at https://resium.reearth.io/examples but am unable to do so.
// maint.ts
import type { StorybookConfig } from '@storybook/react-vite';
const config: StorybookConfig = {
refs: {
'external-reaviz': { // example of a working composed storybook
title: 'Reaviz',
url: 'https://reaviz.io',
expanded: false,
},
'external-resium': { // Trying to get resium storybook composition working
title: 'Resium',
url: 'https://resium.reearth.io/examples/',
expanded: false, // Optional, true by default
},
},
};
- The Resium storybook is hosted on the /examples subdirectory. The other storybooks I've successfully composed are on the base path. This probably isn't the cause but it is one thing different.
- I've noticed a CORS error when pointing directly to the index.html file. I'm wondering if your hosting CORS config may be limiting the ability to compose the storybook
- I'm using storybook v7. I don't think there should be an issue with this if you are still using v6 though.
![reference-external-storybooks-composition](https://github.com/reearth/resium/assets/80461348/ed41e0ff-8cef-46ff-b5af-e5de5b692dda)
![Screenshot 2023-10-03 020711](https://github.com/reearth/resium/assets/80461348/c485d666-0e8b-481b-8e85-6784176798b9)
![Screenshot 2023-10-03 020812](https://github.com/reearth/resium/assets/80461348/4578a049-4fdb-41a2-81c3-3e7b5bf0e941)
![Screenshot 2023-10-03 021725](https://github.com/reearth/resium/assets/80461348/b7b455a0-157b-44f1-8ba3-9125ff908928)
I've setup resium in a react-vite storybook and it's working well for me to develop some custom components. I'm now trying to 'compose' the already published Resium storybook for the core components at https://resium.reearth.io/examples but am unable to do so.
Some notes:
const config: StorybookConfig = { refs: { 'external-reaviz': { // example of a working composed storybook title: 'Reaviz', url: 'https://reaviz.io', expanded: false, }, 'external-resium': { // Trying to get resium storybook composition working title: 'Resium', url: 'https://resium.reearth.io/examples/', expanded: false, // Optional, true by default }, }, };