Skip to main content

mdxRs(实验)

警告:mdxRs 配置是一项实验性功能。这种配置策略将来可能会发生变化。

¥Warning: The mdxRs configuration is an experimental feature. This configuration strategy will likely change in the future.

用于 @next/mdx 的实验性使用。使用新的 Rust 编译器编译 MDX 文件。

¥For experimental use with @next/mdx. Compiles MDX files using the new Rust compiler.

const withMDX = require('@next/mdx')()

/** @type {import('next').NextConfig} */
const nextConfig = {
pageExtensions: ['ts', 'tsx', 'mdx'],
experimental: {
mdxRs: true,
},
}

module.exports = withMDX(nextConfig)