Update frontend new build dev, proc 7

This commit is contained in:
admin
2025-09-29 17:25:55 +07:00
parent 1c710015de
commit 60ea49ac4f

View File

@@ -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;