Transclusion not working with importMDX? #1328
-
I'm using CRA and instead of going to react-app-rewired path and configuring a lot of things, I decided and used the mdx.macro package instead. The problem is if I import a component in one of my MDX files, it throws an error
My doubt is this has something to do with using For a little bit of a setup: // App.js
import React, { lazy, Suspense } from "react";
import { importMDX } from "mdx.macro";
const Main = lazy(() => importMDX("configurators/flex/main.mdx"));
function App() {
return (
<Suspense fallback={<div>Loading...</div>}>
<Main />
</Suspense>
);
} // main.mdx
# Flex Configurator
import Copyright from "configurators/flex/Copyright.mdx";
<Copyright /> The I also went to use MDXProvider route to make my components available globally but to no avail. Anyone can shed some light on this, please? Thank you! Appreciate it. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Beta Was this translation helpful? Give feedback.
importMDX
is not maintained by us here, but provided by a different package:mdx.macro
. Maybe you’ll have better luck asking there.