mdx-util
mdx-util copied to clipboard
Transcluding other MDX using mdx.macro crashes the page
Using mdx.macro, if I have the following two files:
transcluded.mdx
This is some **markdown** content.
main.mdx
import Transcluded from '../../../src/transcluded.mdx';
<Transcluded />
then I get the following warning and error in the console, and the page crashes.
Warning: </static/media/Transcluded.312f719b.mdx /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.
in /static/media/Transcluded.312f719b.mdx (at Main.mdx:18)
react-dom.development.js:7935 Uncaught (in promise) DOMException: Failed to execute 'createElement' on 'Document': The tag name provided ('/static/media/Transcluded.312f719b.mdx') is not a valid name.
So I came here after asking from and being referred to come back here: https://github.com/mdx-js/mdx/discussions/1328
How can we possibly fix this? If someone could point me in the right direction, I might probably be able to help.