/** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, // Workspace packages ship TypeScript source, so Next must transpile them. transpilePackages: ["@agy/ui", "@agy/contracts"], env: { NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL ?? "", }, // v2: `/projects` is gone — one organization has exactly one application, so // there is no list to browse. A permanent redirect keeps old bookmarks (and // the browser history of anyone mid-flow) working instead of 404ing. async redirects() { return [ { source: "/projects", destination: "/app", permanent: true }, { source: "/projects/:path*", destination: "/app", permanent: true }, ]; }, async rewrites() { return [ { source: "/api/:path*", destination: "http://127.0.0.1:8000/api/:path*", }, ]; }, }; export default nextConfig;