import type { NextConfig } from "next"; const appUrl = process.env.NEXT_PUBLIC_APP_URL || "https://memegoat.fr"; const apiUrl = process.env.NEXT_PUBLIC_API_URL || "https://api.memegoat.fr"; const getHostname = (url: string) => { try { return new URL(url).hostname; } catch { return url; } }; const nextConfig: NextConfig = { /* config options here */ reactCompiler: true, images: { remotePatterns: [ { protocol: "https", hostname: getHostname(appUrl), }, { protocol: "https", hostname: getHostname(apiUrl), }, ], }, output: "standalone", }; export default nextConfig;