import type { NextConfig } from "next"; const nextConfig: NextConfig = { /* config options here */ turbopack: { root: "/", }, images: { // R2 public bucket — lets next/image optimize/resize the (large) reward // images instead of serving the multi-MB originals. remotePatterns: [{ protocol: "https", hostname: "s3.prabhupadasays.com" }], }, async rewrites() { return [ { source: "/api/script.js", destination: `${process.env.NEXT_PUBLIC_RYBBIT_HOST}/api/script.js`, }, { source: "/api/track", destination: `${process.env.NEXT_PUBLIC_RYBBIT_HOST}/api/track`, }, ]; }, }; export default nextConfig;