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

Warn user about missing preview-stats.json when running with --only-changed #868

Closed
gurschitz opened this issue Dec 5, 2023 · 1 comment
Labels
needs triage Tracking: Issue needs confirmation

Comments

@gurschitz
Copy link

gurschitz commented Dec 5, 2023

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 the preview-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.
CleanShot 2023-12-05 at 13 41 35
It's easy to miss since it looks visually very much like the warning when TurboSnap is disabled due to rebuild.
Screenshot 2023-12-05 at 13 29 31

So I think it would be best if the command just fails in this case altogether, what do you think?

@winkerVSbecks
Copy link
Member

This was fixed in a recent release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Tracking: Issue needs confirmation
Projects
None yet
Development

No branches or pull requests

2 participants