/** @type {import('next').NextConfig} */

const isExport = process.env.EXPORT_STATIC === "true";

const nextConfig = {
  reactStrictMode: true,
  trailingSlash: false,
  images: {
    unoptimized: true,
  },
  ...(isExport && { output: "export" }),

  // ✅ Neu: ESLint beim Build ignorieren
  eslint: {
    ignoreDuringBuilds: true,
  },

  env: {
    NEXT_PUBLIC_CPL_MODE: process.env.NEXT_PUBLIC_CPL_MODE,
  },
};

export default nextConfig;
