From c71da9a9266027f2152ad7bb48dc8542d3888932 Mon Sep 17 00:00:00 2001 From: Krishna Ayyalasomayajula Date: Mon, 1 Jun 2026 19:28:26 -0500 Subject: [PATCH] chore: configure next.js for static export with next-mdx-remote --- next.config.ts | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/next.config.ts b/next.config.ts index e9ffa30..36721af 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,7 +1,19 @@ -import type { NextConfig } from "next"; +import type { NextConfig } from 'next' const nextConfig: NextConfig = { - /* config options here */ -}; + // Static export — generates out/ directory with plain HTML + output: 'export', + // Trailing slash for clean static URLs + trailingSlash: true, + // Images: unoptimized required for static export + images: { + unoptimized: true, + }, + // Dev mode workaround: next-mdx-remote crashes in dev with Turbopack/webpack + // This transpiles the package to fix the crash. Production is unaffected. + transpilePackages: process.env.NODE_ENV !== 'production' + ? ['next-mdx-remote'] + : undefined, +} -export default nextConfig; +export default nextConfig