/** @type {import('next').NextConfig} */
const nextConfig = {
  async rewrites() {
    return [
      {
        source: '/ingest/static/:path*',
        destination: 'https://analytics.hyggecraftery.com/static/:path*',
      },
      {
        source: '/ingest/:path*',
        destination: 'https://analytics.hyggecraftery.com/:path*',
      },
      {
        source: '/ingest/decide',
        destination: 'https://analytics.hyggecraftery.com/decide',
      },
    ]
  },
  skipTrailingSlashRedirect: true,
}

export default nextConfig
