next.config.js 899 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /** @type {import('next').NextConfig} */
  2. const nextConfig = {
  3. poweredByHeader: false,
  4. experimental: {
  5. // Ship the (small) stylesheet inline so first paint never waits on a CSS request.
  6. inlineCss: true,
  7. },
  8. images: {
  9. formats: ["image/avif", "image/webp"],
  10. minimumCacheTTL: 60 * 60 * 24 * 7,
  11. remotePatterns: [
  12. {
  13. protocol: "https",
  14. hostname: "firebasestorage.googleapis.com",
  15. },
  16. {
  17. protocol: "https",
  18. hostname: "www.notion.so",
  19. },
  20. ],
  21. },
  22. async headers() {
  23. const cached = [
  24. {
  25. key: "Cache-Control",
  26. value: "public, max-age=86400, stale-while-revalidate=604800",
  27. },
  28. ];
  29. return [
  30. { source: "/data/:path*", headers: cached },
  31. { source: "/emoji/:path*", headers: cached },
  32. { source: "/mini.:ext", headers: cached },
  33. ];
  34. },
  35. };
  36. module.exports = nextConfig;