import type { NextConfig } from "next"; const apiUrl = process.env.NEXT_PUBLIC_API_URL ?? process.env.API_URL ?? 'http://localhost:3005'; const nextConfig: NextConfig = { compiler: { styledComponents: true, }, async rewrites() { return [ { source: '/api/:path*', destination: `${apiUrl}/api/:path*`, }, ]; }, }; export default nextConfig;