storybook: addon-storysource: not working without chaining

Storysource addon does not detect stories when they are created without chaining:

const stories = storiesOf('MyCoolButton', module);

stories.add('first story', () => (
  ...
));

stories.add('second story', () => (
  ...
));

stories.add('third story', () => (
  ...
));

Tested on @storybook/react@5.0.1, @storybook/addon-storysource@5.0.1

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 27 (18 by maintainers)

Most upvoted comments

@libetl has done amazing work on this stuff, v5.2 will include his work to bring the loader much needed upgrade 🎉

@shilman Thank you 😃 I’ve made a mistake on test regex. Now it is fine 👍

I think this will be available only in v6