Using the Rust-based MDX compiler (Experimental)
Next.js supports a new MDX compiler written in Rust. This compiler is still experimental and is not recommended for production use. To use the new compiler, you need to configure next.config.js when you pass it to withMDX:
next.config.js module.exports = withMDX({
  experimental: {
    mdxRs: true,
  },
})
Helpful Links
MDX
@next/mdx
remark
rehype