rembrembdocs

This page is also available as Markdown at /docs/app/api-reference/config/next-config-js/mdxRs.md. For an index of all documentation, see /docs/llms.txt.

mdxRs

This feature is currently experimental and subject to change, it's not recommended for production. Try it out and share your feedback on GitHub.

Last updated April 10, 2026

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?