- Blog listing: force-dynamic SSR, new photo cards with date badge + hover animation - Blog article: custom typography (h1-h3 styling, lists, blockquotes) without plugin - News.tsx: fix hero image mapping (direct upload, not .image sub-field) - Reviews.tsx: hover pauses auto-scroll, resumes on mouse leave; fix poster 404 - VideoSection: full viewport width, no container constraint - next.config.ts: add shumi.ai-impress.com to remotePatterns (fixes 400 on blog images) - Seed: add _status published for Payload drafts; force-posts flag; real blog photos - Locations.tsx: per-slug fallback images (fixes all cards showing dinopark photo) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
42 lines
1.3 KiB
TypeScript
42 lines
1.3 KiB
TypeScript
import { withPayload } from '@payloadcms/next/withPayload'
|
|
import type { NextConfig } from 'next'
|
|
|
|
const ONE_YEAR = 'public, max-age=31536000, immutable'
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: 'standalone',
|
|
reactStrictMode: true,
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: '/images/:path*',
|
|
headers: [{ key: 'Cache-Control', value: ONE_YEAR }],
|
|
},
|
|
{
|
|
source: '/_next/static/:path*',
|
|
headers: [{ key: 'Cache-Control', value: ONE_YEAR }],
|
|
},
|
|
]
|
|
},
|
|
webpack: (config) => {
|
|
config.watchOptions = {
|
|
...config.watchOptions,
|
|
ignored: /node_modules|importMap\.js|\.next/,
|
|
}
|
|
return config
|
|
},
|
|
images: {
|
|
formats: ['image/avif', 'image/webp'],
|
|
deviceSizes: [375, 640, 768, 1024, 1280, 1536, 1920],
|
|
imageSizes: [16, 32, 64, 96, 128, 256, 384, 512, 694],
|
|
minimumCacheTTL: 31536000,
|
|
remotePatterns: [
|
|
{ protocol: 'http', hostname: 'localhost', port: '3000', pathname: '/media/**' },
|
|
{ protocol: 'https', hostname: 'shumiland.com.ua', pathname: '/media/**' },
|
|
{ protocol: 'https', hostname: 'shumi.ai-impress.com', pathname: '/api/media/**' },
|
|
{ protocol: 'http', hostname: 'localhost', port: '3000', pathname: '/api/media/**' },
|
|
],
|
|
},
|
|
}
|
|
|
|
export default withPayload(nextConfig)
|