question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@storybook/addon-storysource doesn't work when storiesOf is imported as alias

See original GitHub issue

If you don’t use default storiesOf name @storybook/addon-storysource doesn’t find story source

import { storiesOf as storiesOfAlias } from '@storybook/react';

const stories = storiesOfAlias('Example', module);
stories.add('default', () => <div>Story source</div>);

This problem is related to searching of fixed name const STORIES_OF = 'storiesOf'; in file.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Everettsscommented, Aug 21, 2018

I’ve got some implementation only for this problem import { storiesOf as storiesOfAlias } from '@storybook/react';. I will take a look at some more general solutions.

0reactions
stale[bot]commented, Oct 11, 2018

Hey there, it’s me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Storybook can't resolve aliases · Issue #14087 - GitHub
Describe the bug Storybook can't resolve aliases. The build crashes. To Reproduce import Foo from "components/foo" => crash import Foo from "../.
Read more >
How to resolve aliases in Storybook? - Stack Overflow
Storybook works great, but as soon as I start importing files with aliases, it crashes. Example: import Foo from "@components/foo" => crash ...
Read more >
How to resolve a path alias in Storybook - +return
If you attempted to import a component with a path alias into the stories folder,. import React from 'react';. import { ComponentStory ...
Read more >
gatsby-plugin-alias-imports
This Gatsby plugin is a wrapper around the webpack feature for aliasing in your import statements. ... This works by simply injecting the...
Read more >
MIGRATION.md - Storybook - Fossies
SB 6.4 introduced experimental "auto-title", in which a story's location in the sidebar (aka title ) can be automatically inferred from its location...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found