import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  reactStrictMode: true, // Helps catch potential issues in dev
  images: {
    // Allow optimized images from your R2 bucket and other public sources
    remotePatterns: [
      {
        protocol: "https",
        hostname: "https://pub-073e648218324c01aa4098f0e5d0802e.r2.dev", // R2 bucket public endpoint
      },
      {
        protocol: "https",
        hostname: "**.r2.dev", 
      },
      {
        protocol: "https",
        hostname: "image.kulchaking.com",
      },
    ],
  },
  compiler: {
    removeConsole: process.env.NODE_ENV === "production", 
  },
  reactCompiler: true,
  poweredByHeader: false, 
  trailingSlash: false, 
  experimental: {
    optimizePackageImports: ["lucide-react", "framer-motion"], 
  },
};

export default nextConfig;
