import type { NextConfig } from "next"; import dotenv from "dotenv"; import path from "path"; // Lade die .env Datei aus dem Arbeitsverzeichnis dotenv.config({ path: path.resolve(__dirname, '.env') }); const nextConfig: NextConfig = { // Enable standalone output for Docker output: 'standalone', // Optimize for production compress: true, poweredByHeader: false, // Disable ESLint during build for Docker eslint: { ignoreDuringBuilds: process.env.NODE_ENV === 'production', }, // Environment variables env: { NEXT_PUBLIC_BASE_URL: process.env.NEXT_PUBLIC_BASE_URL }, serverRuntimeConfig: { GHOST_API_URL: process.env.GHOST_API_URL, GHOST_API_KEY: process.env.GHOST_API_KEY, MY_EMAIL: process.env.MY_EMAIL, MY_INFO_EMAIL: process.env.MY_INFO_EMAIL, MY_PASSWORD: process.env.MY_PASSWORD, MY_INFO_PASSWORD: process.env.MY_INFO_PASSWORD }, // Performance optimizations experimental: { optimizePackageImports: ['lucide-react', 'framer-motion'], }, // Image optimization images: { formats: ['image/webp', 'image/avif'], minimumCacheTTL: 60, }, }; import bundleAnalyzer from "@next/bundle-analyzer"; const withBundleAnalyzer = bundleAnalyzer({ enabled: process.env.ANALYZE === "true", }); module.exports = withBundleAnalyzer(nextConfig);