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

Tags: Project-level tags failure crashes Storybook #27510

Closed
shilman opened this issue Jun 2, 2024 · 0 comments · Fixed by #27511
Closed

Tags: Project-level tags failure crashes Storybook #27510

shilman opened this issue Jun 2, 2024 · 0 comments · Fixed by #27511

Comments

@shilman
Copy link
Member

shilman commented Jun 2, 2024

Originally posted by @shilman in #27418 (comment)

@daneah I think you've found a bug. What's happening:

Storybook loads preview.js at runtime (in the browser)

This case should work for any valid JavaScript. So importing & re-exporting, functions that generate stuff, etc. are all "supported" (we don't actually support these things, but they won't break).

Storybook does static analysis on preview.js to determine sort order and project-level tags (in Node)

This case has all kinds of restrictions on what we can statically analyze. The old sort order code is probably wrapped with a try/catch and displays some kind of warning in the console that what you're doing is unsupported. The new tags code introduced in 8.1.0 is not wrapped.

@shilman shilman changed the title Tags: Wrap project-level tags in a try/catch Tags: Project-level tags failure crashes Storybook Jun 2, 2024
@shilman shilman added the sev:S3 label Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant