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