1import type { NextConfig } from "next";23const isDev = process.env.NODE_ENV === "development";45const nextConfig: NextConfig = {6 // Static export: the Python API (FastAPI StaticFiles, html=True) serves apps/web/out7 // with directory index.html fallback, so every route must end with a slash.8 output: "export",9 trailingSlash: true,10 images: { unoptimized: true },11 reactStrictMode: true,12 poweredByHeader: false,13 // Dev only: proxy the API to the local FastAPI instance. Ignored by `next build` (static export).14 ...(isDev15 ? {16 async rewrites() {17 return [{ source: "/api/:path*", destination: "http://127.0.0.1:8600/api/:path*" }];18 },19 }20 : {}),21};2223export default nextConfig;24