import type { NextConfig } from 'next' const nextConfig: NextConfig = { async rewrites() { const builderUrl = process.env.NEXT_PUBLIC_AGENTBUILDER_URL || 'http://localhost:5173' return [ { source: '/api/:path*', destination: `${builderUrl}/api/:path*`, }, ] }, } export default nextConfig