2025-01-23 14:27:03 +01:00
|
|
|
import withBundleAnalyzer from "@next/bundle-analyzer"
|
|
|
|
|
import { type NextConfig } from "next"
|
|
|
|
|
|
|
|
|
|
import { env } from "./env.mjs"
|
|
|
|
|
|
|
|
|
|
const config: NextConfig = {
|
|
|
|
|
reactStrictMode: true,
|
|
|
|
|
logging: {
|
|
|
|
|
fetches: {
|
|
|
|
|
fullUrl: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
2025-03-04 15:53:46 +07:00
|
|
|
images: {
|
|
|
|
|
domains: ["raw.githubusercontent.com"], // ✅ อนุญาตโหลดรูปจาก GitHub
|
|
|
|
|
unoptimized: true, // ✅ ปิดการ Optimize รูปภาพ (ถ้าต้องการโหลด URL ตรง)
|
|
|
|
|
},
|
2025-01-23 14:27:03 +01:00
|
|
|
rewrites: async () => [
|
|
|
|
|
{ source: "/healthz", destination: "/api/health" },
|
|
|
|
|
{ source: "/api/healthz", destination: "/api/health" },
|
|
|
|
|
{ source: "/health", destination: "/api/health" },
|
|
|
|
|
{ source: "/ping", destination: "/api/health" },
|
|
|
|
|
],
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default env.ANALYZE ? withBundleAnalyzer({ enabled: env.ANALYZE })(config) : config
|