import type { NextConfig } from 'next'

const nextConfig: NextConfig = {
  // Standalone output (STANDALONE=1, used by scripts/package-cpanel.sh) bundles
  // the server + node_modules into .next/standalone for the upload-a-zip flow.
  // Default builds omit it so `next start` (PM2 / deploy.sh on the server) works.
  output: process.env.STANDALONE === '1' ? 'standalone' : undefined,
  // The cPanel host's glibc is too old for sharp's native binary, and the app
  // renders no next/image content — skip the optimizer so the Mac-built
  // standalone bundle runs on Linux without platform-specific binaries.
  images: { unoptimized: true },
}

export default nextConfig
