Skip to content

Drop legacy Storybook (<= v6) support  #860

Closed
@Quramy

Description

@Quramy

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions