mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
21 lines
433 B
Plaintext
21 lines
433 B
Plaintext
---
|
|
title: mdxRs
|
|
description: Use the new Rust compiler to compile MDX files in the App Router.
|
|
---
|
|
|
|
For use with `@next/mdx`. Compile MDX files using the new Rust compiler.
|
|
|
|
```js filename="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)
|
|
```
|