Files
portfolio/next.config.ts
Dennis Konkol 604c5077d9 🚀 Migrate to ESLint CLI & Fix All Issues
 ESLint CLI Migration:
- Migrated from deprecated 'next lint' to modern 'eslint .'
- Updated package.json script: 'lint': 'eslint .'
- Updated eslint.config.mjs with Next.js ignores
- No more deprecation warnings

 Fixed ESLint Errors:
- Added displayName to React components in jest.setup.ts
- Replaced 'any' types with proper TypeScript types
- Fixed require() import in next.config.ts → ES6 import
- Fixed Difficulty enum values (Beginner → BEGINNER, etc.)

 Build Status:
- ESLint: 0 errors, 0 warnings 
- TypeScript: All type errors resolved 
- Build: Successful compilation 
- 22 routes generated successfully 

🎯 Ready for Next.js 16:
- No deprecated dependencies
- Modern ESLint configuration
- Future-proof codebase
2025-09-05 23:05:52 +00:00

53 lines
1.3 KiB
TypeScript

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);