/** @type {import('next').NextConfig} */ const nextConfig = { poweredByHeader: false, experimental: { // Ship the (small) stylesheet inline so first paint never waits on a CSS request. inlineCss: true, }, images: { formats: ["image/avif", "image/webp"], minimumCacheTTL: 60 * 60 * 24 * 7, remotePatterns: [ { protocol: "https", hostname: "firebasestorage.googleapis.com", }, { protocol: "https", hostname: "www.notion.so", }, // Blog covers linked straight from their source (see coverImageUrl). { protocol: "https", hostname: "upload.wikimedia.org", }, { protocol: "https", hostname: "images.unsplash.com", }, ], }, async headers() { const cached = [ { key: "Cache-Control", value: "public, max-age=86400, stale-while-revalidate=604800", }, ]; return [ { source: "/data/:path*", headers: cached }, { source: "/emoji/:path*", headers: cached }, { source: "/mini.:ext", headers: cached }, ]; }, }; module.exports = nextConfig;