template
This commit is contained in:
33
frontend/next.config.js
Normal file
33
frontend/next.config.js
Normal file
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* =============================================================================
|
||||
* 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;
|
||||
Reference in New Issue
Block a user