const basePath = "/docedit/note";
/** @type {import('next').NextConfig} */
const nextConfig = {
// สำหรับ Docker (docker/web.Dockerfile) — build แล้วได้ .next/standalone รันด้วย node server.js
output: "standalone",
// serve ใต้ /docedit/note — /next/navigation เติมให้เอง แต่ fetch/EventSource/
// plain /workerSrc ต้องผ่าน withBasePath() (utils/base-path.ts)
basePath,
// expose ให้โค้ดใช้ (inline ตอน build) — ค่าจริงประกาศที่เดียวที่ไฟล์นี้
env: { NEXT_PUBLIC_BASE_PATH: basePath },
// N4 อัปโหลดไฟล์ผ่าน Server Action — default 1MB ไม่พอสำหรับ PDF/สแกนศาล (ต้องตรงกับ MAX_UPLOAD_BYTES ใน app/actions/files.ts)
experimental: {
serverActions: {
bodySizeLimit: "100mb",
},
},
};
export default nextConfig;