ithaka / pharos

JSTOR's design system
https://pharos.jstor.org
MIT License
119 stars 15 forks source link

Migrate to static `preview` files #765

Open daneah opened 4 months ago

daneah commented 4 months ago

The problem Storybook prefers that the preview configuration files be statically-defined, because for some purposes they statically parse the file rather than depending on its runtime behavior (see storybookjs/storybook#27510 and storybookjs/storybook#27418 discussions, and output from the current build process on develop)

The solution Remove the dynamic nature of each Storybook's preview.ts file, or create a pre-Storybook build step that transforms the dynamic contents into static ones.