TypeScript · 707 bytes Raw Blame History
1 import type { NextConfig } from "next";
2
3 const nextConfig: NextConfig = {
4 // Disable SSR for Leaflet components
5 transpilePackages: ['leaflet'],
6
7 // Environment variables
8 env: {
9 NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000',
10 },
11
12 // CORS headers for API routes (if we add any)
13 async headers() {
14 return [
15 {
16 source: '/api/:path*',
17 headers: [
18 { key: 'Access-Control-Allow-Origin', value: '*' },
19 { key: 'Access-Control-Allow-Methods', value: 'GET,POST,PUT,DELETE,OPTIONS' },
20 { key: 'Access-Control-Allow-Headers', value: 'Content-Type' },
21 ],
22 },
23 ];
24 },
25 };
26
27 export default nextConfig;