-
Hi, I've been trying to use Panda with Sveltekit and Storybook and I'm running into an issue where Storybook won't load my component story. I followed the Svelte setup instructions first, and then the Storybook instructions including updating the However, when I run storybook I and try to load my component I see this: The component does work when I add it to a page. Here's a link to my repo that has the issue: https://github.com/cmseeling/list-randomizer Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
@cmseeling Storybook/vite will have a better error in your terminal. Can't debug anything with this screenshot. Could you paste the full error. |
Beta Was this translation helpful? Give feedback.
-
Here's the Vite error:
It appears storybook is not obeying the server configuration options defined in
That's exactly how it was shown in the Svelte guide. So how do I get Storybook to obey the server configuration? Barring that, is there a way for Panda to generate the index.mjs file somewhere else that Storybook will be happy with? |
Beta Was this translation helpful? Give feedback.
-
@cmseeling the storybook config accepts a viteFinal object, could you try configuring there also // .storybook/main.ts
import type { StorybookConfig } from '@storybook/react-vite'
import { defineConfig, mergeConfig } from 'vite'
const config: StorybookConfig = {
//...
viteFinal: async (config) => {
return mergeConfig(
config,
defineConfig({
server: {
fs: {
allow: ['styled-system'],
},
},
}),
)
},
} I'm not sure if |
Beta Was this translation helpful? Give feedback.
-
That fixed it. Thank you! |
Beta Was this translation helpful? Give feedback.
@cmseeling the storybook config accepts a viteFinal object, could you try configuring there also
I'm not sure if
allow
needs a relative path tostyled-system
but you can try that out.