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)
這是否有幫助?