Files
kovakyazilim/next.config.ts
T
Ege Can Komur 8b4129c233 fix: Pexels image domain + ConsentInit'i statik script src'e taşı
İki sorun düzeltildi:

1) next.config.ts'e images.pexels.com (+ unsplash) eklendi
   - Mevcut 6 referans projesinde Pexels görsel URL'leri var
   - 'Invalid src prop on next/image' hatası giderildi
   - images.unsplash.com da eklendi (gelecekte kullanım için)

2) ConsentInit artık /public/consent-default.js'i src ile yüklüyor
   - React 19 + Next.js 16'da inline <script>{code}</script> ve
     <script dangerouslySetInnerHTML> her ikisi de 'Encountered a script
     tag while rendering React component' warning'i üretiyor
   - Statik dosya + <script src> pattern'i React'ın temiz şekilde
     kabul ettiği yöntem — warning yok, davranış aynı
   - GTM de aynı şekilde async src kullanıyor (önceki inline snippet
     yerine direkt GTM URL'i)
   - Consent default hala synchronous (script src defer/async olmadan)
     — gtag('consent','default') hiçbir analytics yüklenmeden çalışır
   - noscript iframe fallback korundu
2026-05-20 18:53:55 +03:00

20 lines
532 B
TypeScript

import type { NextConfig } from "next";
import path from "node:path";
const nextConfig: NextConfig = {
turbopack: {
root: path.join(__dirname),
},
images: {
remotePatterns: [
{ protocol: "https", hostname: "db.kovaksoft.com" },
{ protocol: "https", hostname: "kovakyazilim.com" },
{ protocol: "https", hostname: "**.kovaksoft.com" },
{ protocol: "https", hostname: "images.pexels.com" },
{ protocol: "https", hostname: "images.unsplash.com" },
],
},
};
export default nextConfig;