Warn user about missing preview-stats.json
when running with --only-changed
#868
Labels
needs triage
Tracking: Issue needs confirmation
Feature request
It would be great if the CLI could show a warning or error when running with
--only-changed
and the built storybook doesn't have thepreview-stats.json
.We ran into a situation where we didn't notice for a while that our TurboSnap wasn't working anymore on our project. We recently migrated our Storybook from using webpack to using vite, and since TurboSnap was set up way before that, and because of that it wasn't obvious to us that we needed to add
vite-plugin-turbosnap
to make it work again.Since to me it sounds like TurboSnap only works with
preview-stats.json
anyways (it's even mentioned in the tooltip in chromatic, but no one from our team saw that early enough), it would be great to get feedback on this as early as possible, ideally from the CLI. Does this make sense?Edit:
Looks like the CLI actually prints a warning, but no one of our team has perceived this.
It's easy to miss since it looks visually very much like the warning when TurboSnap is disabled due to rebuild.
So I think it would be best if the command just fails in this case altogether, what do you think?
The text was updated successfully, but these errors were encountered: