You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While I have been able to get .story.js files working nicely, any attempt to use a .mdx file as a story has resulted in a warning logged like:
Module not found: Error: Can't resolve 'babel-loader' in '/path/to/project'
And while storybook does still start, the .mdx story does not appear. I feel like the error message/trace is probably inaccurate similar to the css error as well.
Modify the config to enable to accept mdx stories by changing the regex on this line to /stories\.(js|mdx)/
Add a xxx.stories.mdx file
Observe the warning and lack of appearance in the interface
Expected behavior
I'd expect for mdx stories to render as expected in storybook normally, and if there is an issue with their rendering, for the error trace to correctly indicate the problem.
System information
OS: macOS
Version of Next.js: 9.4.4
Version of Node.js: 12.13.0
The text was updated successfully, but these errors were encountered:
Quick update, I got this working, it was a user error. Oddly, in order to get mdx stories working, babel-loader and react-is must be explicitly installed alongside the docs addon. Not sure why they didn't just make them dependencies, but 🤷🏼♂️
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
vercel
locked as resolved and limited conversation to collaborators
Jan 29, 2022
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Bug report
Describe the bug
While I have been able to get
.story.js
files working nicely, any attempt to use a.mdx
file as a story has resulted in a warning logged like:And while storybook does still start, the
.mdx
story does not appear. I feel like the error message/trace is probably inaccurate similar to the css error as well.To Reproduce
/stories\.(js|mdx)/
xxx.stories.mdx
fileExpected behavior
I'd expect for mdx stories to render as expected in storybook normally, and if there is an issue with their rendering, for the error trace to correctly indicate the problem.
System information
The text was updated successfully, but these errors were encountered: