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
There's a lot to unpack here, but I noticed when trying to test out the popover component that the storiesFromMarkdown() helper isn't doing what it's supposed to. I started digging, and here's what I've found so far:
It seems like Storybook added a raw loader rule for .md files, so ours was duplicating the "raw" conversion process and producing imported contents that look like module.exports = "<content here>". I discovered this by adding a breakpoint here and inspecting the value of content.
Once I got that working, I discovered some weird parsing issues with what looks like every code block. I can't tell if the issue is in html-to-react (which hasn't changed in 2 years!) or somewhere else (maybe in remark, which has undergone a major release since I added it at 8.0.0?), but it produces browser console errors that look like this:
💡 Turns out, it was this commit that hosed us. When Storybook added support for Markdown, they started transforming every file that matches /\.md$/ with both the markdown and html loaders. We'll need to splice out their webpack rule for this and replace it with the "raw" loader to get our thing working again.
There's a lot to unpack here, but I noticed when trying to test out the popover component that the
storiesFromMarkdown()
helper isn't doing what it's supposed to. I started digging, and here's what I've found so far:It seems like Storybook added a raw loader rule for
.md
files, so ours was duplicating the "raw" conversion process and producing imported contents that look likemodule.exports = "<content here>"
. I discovered this by adding a breakpoint here and inspecting the value ofcontent
.Once I got that working, I discovered some weird parsing issues with what looks like every code block. I can't tell if the issue is in html-to-react (which hasn't changed in 2 years!) or somewhere else (maybe in remark, which has undergone a major release since I added it at
8.0.0
?), but it produces browser console errors that look like this:...which I think is referring to this code block.
Anyway, whatever the problem is, it's nullifying all of the markdown-based stories, and it needs to get fixed ASAP. ⚡️
The text was updated successfully, but these errors were encountered: