Files
blog-nextjs/next.config.mjs
gbanyan ed63ec7d9a Remove unnecessary Partial Prerendering (PPR) configuration
- Remove cacheComponents: true from next.config.mjs
- Update README.md to remove PPR references
- All pages are fully static-generated, PPR provides no benefit

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 14:57:08 +08:00

37 lines
807 B
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
// Image optimization configuration
images: {
remotePatterns: [],
formats: ['image/avif', 'image/webp'],
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
},
// Compiler optimizations
compiler: {
// Remove console.log in production
removeConsole: process.env.NODE_ENV === 'production' ? {
exclude: ['error', 'warn'],
} : false,
},
// Headers for better caching
async headers() {
return [
{
source: '/assets/:path*',
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=31536000, immutable',
},
],
},
];
},
};
export default nextConfig;