Webapp-starter/frontend/next.config.ts
2025-05-07 20:05:04 +08:00

20 lines
467 B
TypeScript

import type { NextConfig } from "next";
const nextConfig: NextConfig = {
/* config options here */
async rewrites() {
// Only apply proxy in development environment
if (process.env.NODE_ENV === "development") {
return [
{
source: "/service/:path*",
destination: "http://localhost:8080/service/:path*", // assuming Go backend runs on port 8080
},
];
}
return [];
},
};
export default nextConfig;