Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some dependencies #41

Closed
IanVS opened this issue Jun 23, 2021 · 0 comments · Fixed by #42
Closed

Remove some dependencies #41

IanVS opened this issue Jun 23, 2021 · 0 comments · Fixed by #42

Comments

@IanVS
Copy link
Member

IanVS commented Jun 23, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant