- Move themeColor and viewport to separate viewport export in layout.tsx - Improve Docker build process with npm ci and proper dependency handling - Add Docker-friendly Next.js configuration settings - Resolve constructor error and metadata warnings
28 lines
728 B
JavaScript
28 lines
728 B
JavaScript
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
output: 'standalone',
|
|
experimental: {
|
|
optimizePackageImports: ['lucide-react'],
|
|
},
|
|
compiler: {
|
|
removeConsole: process.env.NODE_ENV === 'production' ? {
|
|
exclude: ['error', 'warn'],
|
|
} : false,
|
|
},
|
|
// Enable SWC minification for better performance
|
|
swcMinify: true,
|
|
// Optimize images
|
|
images: {
|
|
formats: ['image/avif', 'image/webp'],
|
|
unoptimized: process.env.NODE_ENV === 'production',
|
|
},
|
|
// Enable compression
|
|
compress: true,
|
|
// Production source maps (smaller)
|
|
productionBrowserSourceMaps: false,
|
|
// Ensure proper handling in Docker
|
|
trailingSlash: false,
|
|
poweredByHeader: false,
|
|
}
|
|
|
|
module.exports = nextConfig |