import type { NextConfig } from 'next'; const nextConfig: NextConfig = { reactStrictMode: true, // Enable standalone output for Docker output: 'standalone', // React Compiler disabled for now (requires babel-plugin-react-compiler) // experimental: { // reactCompiler: true, // }, // Image optimization images: { formats: ['image/avif', 'image/webp'], }, // Bundle analyzer (conditional) ...(process.env.ANALYZE === 'true' && { webpack(config) { const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer'); config.plugins.push( new BundleAnalyzerPlugin({ analyzerMode: 'static', openAnalyzer: false, }) ); return config; }, }), }; export default nextConfig;