How to use MDX on CF Pages?
I am trying to use CF Pages for my Next.js blog. I use MDX for that. I followed the instructions from Vercel (https://nextjs.org/docs/app/building-your-application/configuring/mdx)
and this is my
next.config.mjs
:
when I use the simple next dev
everything works fine. But the following error shows up If i simulate the CF Pages with the preview command (during compilation):
I tried to add the runtime config to the .mdx
files, but It does not change anything.
this is my mdx-components.tsx
:
I appreciate any kind of feedback on that. I tried to lookup old threads, but I did not found a solution to this1 Reply
the runtime export needs to be declared at a page level not a component level