Files
hack-nation/frontend/next.config.js

34 lines
938 B
JavaScript
Raw Normal View History

2026-02-03 21:57:43 +01:00
/**
* =============================================================================
* NEXT.JS CONFIGURATION
* =============================================================================
*
* This configures the Next.js build and runtime behavior.
*
* Key features:
* - API rewrites to proxy requests to FastAPI backend (avoids CORS issues)
* - Image optimization settings
* - Environment variables handling
*/
/** @type {import('next').NextConfig} */
const nextConfig = {
// Rewrites let us proxy API calls to the FastAPI backend
// This avoids CORS issues during development
async rewrites() {
return [
{
source: "/api/backend/:path*",
destination: "http://localhost:8000/api/:path*", // FastAPI backend
},
];
},
// Image optimization - add domains you'll load images from
images: {
domains: ["your-supabase-project.supabase.co"],
},
};
module.exports = nextConfig;