-
Notifications
You must be signed in to change notification settings - Fork 106
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
Support CSF3 automatic titles #77
Comments
This is being addressed in #76. |
Oops, I pointed to the wrong PR, it's actually #182. |
IanVS
pushed a commit
that referenced
this issue
Apr 10, 2022
# Issues Fixes #77. Hi, maintainers and contributors! After #172, I found another issue relating Storybook 6.4. As of Storybook 6.4, `stories` can be an array of `StoriesSpecifier` object, but the builder can't handle it. The `StoriesSpecifier` is defined and used below. https://github.com/storybookjs/storybook/blob/80410528e8911ec4e1708899aec96ae8196d829e/lib/core-common/src/types.ts#L377-L382 https://github.com/storybookjs/storybook/blob/80410528e8911ec4e1708899aec96ae8196d829e/lib/core-common/src/types.ts#L257-L274 ```js module.exports = { stories: [ { directory: '../src', files: '*.story.tsx', titlePrefix: 'foo' } ] }; ``` This PR enables that syntax.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Storybook 6.4 introduces a new way to find stories, to support automatic title generation for CSF3.
This currently breaks in the Vite builder, since it assumes the paths are always strings.
This throws an error:

Caused by this line:
https://github.com/eirslett/storybook-builder-vite/blob/main/packages/storybook-builder-vite/codegen-iframe-script.js#L33
Stories can also be defined in a shorter string manner, but this will also break. The magic globbing logic should be applied to this one.
Results in:

The text was updated successfully, but these errors were encountered: