chore: configure next.js for static export with next-mdx-remote

This commit is contained in:
2026-06-01 19:28:26 -05:00
parent 2d1ed19343
commit c71da9a926

View File

@@ -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