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.
Motivation
Storycap current version(= v4.3.x) switches dependent module between
@storybook/addon
and@storybook/preview-api
like this:https://github.com/reg-viz/storycap/blob/237a78176b7c7493d2fc61201c9a97191f6aaaf9/packages/storycap/src/client/with-screenshot.ts#L2-L9
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 useimport { makeDecorator } from "@storybook/preview-api"
.To @indigolain
Thank you for taking the time to discuss this problem.