This page is also available as Markdown: request this page's URL with an
Accept: text/markdown header. For an index of Next.js documentation, see /docs/llms.txt.mdxRs
Last updated November 5, 2025
For experimental use with @next/mdx. Compiles MDX files using the new Rust compiler.
next.config.js
const withMDX = require('@next/mdx')()
/** @type {import('next').NextConfig} */
const nextConfig = {
pageExtensions: ['ts', 'tsx', 'mdx'],
experimental: {
mdxRs: true,
},
}
module.exports = withMDX(nextConfig)Was this helpful?