Files
biztaghavisite/next.config.ts
Ali Taghavi f08d3b1fde
Some checks failed
Deploy to VPS / deploy (push) Has been cancelled
phase3-4 done
2026-04-24 11:28:48 +03:30

39 lines
1.1 KiB
TypeScript

import type { NextConfig } from "next";
import createNextIntlPlugin from "next-intl/plugin";
const withNextIntl = createNextIntlPlugin("./src/lib/i18n/request.ts");
const nextConfig: NextConfig = {
output: "standalone",
images: {
remotePatterns: [
{ protocol: "https", hostname: "cdn.sanity.io" },
],
formats: ["image/avif", "image/webp"],
deviceSizes: [640, 750, 828, 1080, 1200, 1920],
minimumCacheTTL: 60 * 60 * 24 * 30, // 30 days
},
experimental: {
optimizePackageImports: ["lucide-react", "framer-motion", "@sanity/image-url"],
},
compress: true,
poweredByHeader: false,
headers: async () => [
{
source: "/(.*)",
headers: [
{ key: "X-DNS-Prefetch-Control", value: "on" },
{ key: "X-Content-Type-Options", value: "nosniff" },
{ key: "X-Frame-Options", value: "SAMEORIGIN" },
{ key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },
],
},
{
source: "/_next/static/(.*)",
headers: [{ key: "Cache-Control", value: "public, max-age=31536000, immutable" }],
},
],
};
export default withNextIntl(nextConfig);