import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  // Enable standalone output for optimized Docker deployments
  output: "standalone",

  // Allow dev access from 127.0.0.1 in addition to localhost
  allowedDevOrigins: ["127.0.0.1"],

  // Disable React Strict Mode in production to avoid double-renders
  reactStrictMode: process.env.NODE_ENV !== "production",

  // Disable powered-by header for security
  poweredByHeader: false,

  // Production optimizations
  ...(process.env.NODE_ENV === "production" && {
    // Disable source maps in production
    productionBrowserSourceMaps: false,
  }),
};

export default nextConfig;
