frontarm / mdx-util

Utilities for working with MDX

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Transcluding other MDX using mdx.macro crashes the page

olivvybee opened this issue · comments

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: mdx-js/mdx#1328

How can we possibly fix this? If someone could point me in the right direction, I might probably be able to help.