@storybook/addon-storysource doesn't work when storiesOf is imported as alias
See original GitHub issueIf 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:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.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!