Closed tmkasun closed 1 year ago
Hi, thank you.
There's an example here. Since next-mdx-remote doesn't allow imports the configuration is different, the important part is in this file.
P.S. Some of the things next-mdx-remote
does can also be done by MDX itself (see https://mdxjs.com/guides/mdx-on-demand/ for more info). If the problem is imports, perhaps that can be sidestepped with this (which does support imports)?
Thanks, @wooorm & @pomber It worked!
First, Thank you for maintaining such a nice code highlighter, I tried to integrate
codehike
in my blog site which usesnext-mdx-remote
for rendering the markdown, But I got errors while trying to integrate the codehike.I'm using the
serialize
function fromnext-mdx-remote
and getting the markdown content and passing it to theMDXRemote
component.This is my config (with
codehike
)With that, I got the below error
since it's saying
_missingMdxReference
I then wrapped the pages from '@mdx-js/react'After wrapping with the![image](https://user-images.githubusercontent.com/3313885/178147325-990f2e45-ecdb-48b8-add9-b8e5825dfbc4.png)
MDXProvider
component I got this errorCan someone please help me to integrate codehike with
next-mdx-remote
Thanks in advance