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
Adding the storybook framework addons and plugins was a mistake, I think. I've tried out the latest version of this builder, and now storybook thinks I'm a svelte project, when really I'm using react. It seems this is because storybook-builder-vite depends on @storybook/addon-svelte-csf, which in turn brings in @storybook/svelte, and storybook uses the presence of a framework library to determine what to run, and it blows up in my react project.
I'm kind of wondering if maybe we should leave it up to the consumer to add the plugins that they need for their framework. We can document the recommendations for the various frameworks, but then leave it up to users to add them. It's likely they'll already be using them in their production app already, after all.
The other possibility is to try to read their vite.config file and automatically extend that. But that's maybe a bigger step than we should try taking right now.
Or, we can remove the dependencies from our package.json, but still try to require them and add them in the config, maybe with a try/catch to throw a friendly message if they're not found. I'd suggest peerDependencies, but that's turned into a complete dumpster fire.
The text was updated successfully, but these errors were encountered:
Adding the storybook framework addons and plugins was a mistake, I think. I've tried out the latest version of this builder, and now storybook thinks I'm a svelte project, when really I'm using react. It seems this is because storybook-builder-vite depends on
@storybook/addon-svelte-csf
, which in turn brings in@storybook/svelte
, and storybook uses the presence of a framework library to determine what to run, and it blows up in my react project.I'm kind of wondering if maybe we should leave it up to the consumer to add the plugins that they need for their framework. We can document the recommendations for the various frameworks, but then leave it up to users to add them. It's likely they'll already be using them in their production app already, after all.
The other possibility is to try to read their vite.config file and automatically extend that. But that's maybe a bigger step than we should try taking right now.
Or, we can remove the dependencies from our package.json, but still try to require them and add them in the config, maybe with a try/catch to throw a friendly message if they're not found. I'd suggest peerDependencies, but that's turned into a complete dumpster fire.
The text was updated successfully, but these errors were encountered: