mdxRs
與 @next/mdx
搭配實驗性使用。使用新的 Rust 編譯器編譯 MDX 檔案。
next.config.js (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)
這有幫助嗎?(Was this helpful?)