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

Drop legacy Storybook (<= v6) support #860

Closed
Quramy opened this issue Mar 26, 2024 · 0 comments
Closed

Drop legacy Storybook (<= v6) support #860

Quramy opened this issue Mar 26, 2024 · 0 comments

Comments

@Quramy
Copy link
Member

Quramy commented Mar 26, 2024

Motivation

Storycap current version(= v4.3.x) switches dependent module between @storybook/addon and @storybook/preview-api like this:

let makeDecorator: MakeDecorator | undefined;
try {
makeDecorator = require('@storybook/addons').makeDecorator;
} catch {}
try {
makeDecorator = require('@storybook/preview-api').makeDecorator;
} catch {}

But this is so "hacky" and fragile to maintain because this depends on some bundlers(e.g. webpack or rollup) module resolver implementation.

If we drop Storybook v6 support, we can eliminate this differential require expression and can use import { makeDecorator } from "@storybook/preview-api".

To @indigolain

Thank you for taking the time to discuss this problem.

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

No branches or pull requests

1 participant