/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: true,
  swcMinify: true,
  output: 'standalone',
  compiler: {
    emotion: true,
  },
  images: {
    domains: ['localhost', 'blobkteventstorage.blob.core.windows.net'],
    formats: ['image/webp', 'image/avif'],
  },
  env: {
    NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8080',
  },
  // CORS 우회를 위한 API Proxy 설정
  async rewrites() {
    return [
      {
        source: '/api/proxy/:path*',
        destination: 'http://localhost:8084/api/:path*',
      },
    ]
  },
}

module.exports = nextConfig
