pageExtensions 默认情况下,Next.js 接受具有以下扩展名的文件:.tsx, .ts, .jsx, .js。这可以修改为允许其他扩展名,如 markdown(.md, .mdx)。next.config.jsconst withMDX = require("@next/mdx")(); /** @type {import('next').NextConfig} */ const nextConfig = { pageExtensions: ["js", "jsx", "ts", "tsx", "md", "mdx"], }; module.exports = withMDX(nextConfig); PreviousoutputNextpoweredByHeader