/** @type {import('next').NextConfig} */
const backendHost = process.env.BACKEND_HOST || 'http://backend:3001';

const nextConfig = {
  reactStrictMode: true,
  async rewrites() {
    return [
      {
        source: '/api/:path*',
        destination: `${backendHost}/api/:path*`,
      },
    ];
  },
};

export default nextConfig;
