import type { NextConfig } from "next"; const nextConfig: NextConfig = { // Disable SSR for Leaflet components transpilePackages: ['leaflet'], // Environment variables env: { NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000', }, // CORS headers for API routes (if we add any) async headers() { return [ { source: '/api/:path*', headers: [ { key: 'Access-Control-Allow-Origin', value: '*' }, { key: 'Access-Control-Allow-Methods', value: 'GET,POST,PUT,DELETE,OPTIONS' }, { key: 'Access-Control-Allow-Headers', value: 'Content-Type' }, ], }, ]; }, }; export default nextConfig;