import type { NextConfig } from "next"
import crypto from "crypto"

// Generate a random JWT secret on every dev server start to invalidate all prior sessions
if (process.env.NODE_ENV !== "production") {
  process.env.JWT_SECRET = crypto.randomUUID()
}

const nextConfig: NextConfig = {
  eslint: {
    ignoreDuringBuilds: false,
  },
  images: {
    remotePatterns: [
      {
        protocol: "https",
        hostname: "ui-avatars.com",
      },
    ],
  },
}

export default nextConfig
