diff --git a/frontend/next.config.js b/frontend/next.config.js index 22cd7c37..5fb66173 100755 --- a/frontend/next.config.js +++ b/frontend/next.config.js @@ -1,23 +1,26 @@ /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, - experimental: { - // เปิด app router (ค่าเริ่มต้นของ Next 15 อยู่แล้ว) - typedRoutes: false, - }, - // รองรับการรันหลัง reverse proxy และกำหนด base URL ผ่าน ENV + + // แนะนำย้ายค่าพวกนี้ไป .env(.local) แล้วใช้ process.env ฝั่งโค้ดแทน + // เก็บไว้ชั่วคราวได้ถ้ายังไม่ทำ .env env: { - NEXT_PUBLIC_API_BASE: - process.env.NEXT_PUBLIC_API_BASE || "http://localhost:8080", + NEXT_PUBLIC_API_BASE: process.env.NEXT_PUBLIC_API_BASE || "http://localhost:8080" }, - // ปรับขนาดภาพ/โดเมนถ้าจำเป็น + images: { remotePatterns: [ - // { protocol: "https", hostname: "lcbp3.np-dms.work" } + // { protocol: "https", hostname: "lcbp3.np-dms.work" }, ], }, - // เปิด SWC minify - swcMinify: true, + + // ลดโอกาส build ล้มเพราะ lint (เฉพาะ production build) + eslint: { + ignoreDuringBuilds: true, + }, + + // ถ้าไม่มี TypeScript ไม่ต้องใส่ส่วนนี้ + // typescript: { ignoreBuildErrors: true }, }; module.exports = nextConfig;