/** @type {import('next').NextConfig} */
const nextConfig = {
  output: 'standalone',
  reactStrictMode: true,
  swcMinify: true,
  // Exclude SSE route from static generation
  experimental: {
    serverComponentsExternalPackages: ['chokidar']
  },
  // Handle API routes that shouldn't be statically generated
  async headers() {
    return [
      {
        source: '/api/posts/stream',
        headers: [
          {
            key: 'Cache-Control',
            value: 'no-cache, no-store, must-revalidate',
          },
        ],
      },
    ];
  },
}

module.exports = nextConfig 