Menu

mdxRs (实验性)

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

用于实验性使用 @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);