MDX2 Import md files #2262
-
Hi, What is the new way to import md files with MDX. Before, I would import and use the md file like so. You can see where I import the CHANGELOG.md file and reference it like a component below.
When I do this with MDX2, I get the following error. It looks like MDX is not trying to insert the Changelog content as an element?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Nothing changed in how MDX handles file imports between version 1 and 2. Which build tool are you using? |
Beta Was this translation helpful? Give feedback.
Thanks @sir-captainmorgan21!
Some context,
@mdx-js/react
transforms MDX into JS/react components, it does not handle resolving the imports.Resolving imports (like
.md
and.json
files) is handled by storybook and webpack.I strongly suspect this is related to storybookjs/storybook#13144 (which I see you are already aware of) and/or storybookjs/storybook#19180.