mdxRs
experimental
使用新的 Rust 编译器在 App Router 中编译 MDX 文件。
与 @next/mdx 一起用于实验性用途。使用新的 Rust 编译器编译 MDX 文件。
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)