import { createMDX } from "fumadocs-mdx/next"; const withMDX = createMDX(); /** @type {import('next').NextConfig} */ const config = { reactStrictMode: true, basePath: "/docs", // Visiting http://host/ (outside basePath) would otherwise 404 — redirect // to the docs root. basePath: false makes the source and destination // literal (not re-prefixed with `/docs`), so the redirect runs before // basePath routing kicks in. async redirects() { return [ { source: "/", destination: "/docs", basePath: false, permanent: false, }, ]; }, }; export default withMDX(config);