Files
exAichatbot_agent/chatbotApp-chatbot2.0-agent/web/next.config.mjs
T
Macbook 4b86b2a660 Agent 2.0 exdev 서버 배포 스택
- server-dev start/stop/deploy 및 Gitea push 자동 배포
- local-dev 로컬 개발 환경

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-21 22:57:30 +09:00

30 lines
719 B
JavaScript

/** @type {import('next').NextConfig} */
const basePath = process.env.NEXT_PUBLIC_BASE_PATH || "";
const remoteApiOrigin = (
process.env.CHATBOT_API_UPSTREAM ||
process.env.NEXT_PUBLIC_CHATBOT_API_BASE ||
"https://chatbot.exdev.co.kr"
).replace(/\/chatbot\/?$/, "");
const nextConfig = {
output: "export",
basePath,
assetPrefix: basePath || undefined,
trailingSlash: true,
reactStrictMode: true,
poweredByHeader: false,
images: { unoptimized: true },
async rewrites() {
if (process.env.NODE_ENV !== "development") return [];
return [
{
source: "/chatbot/:path*",
destination: `${remoteApiOrigin}/chatbot/:path*`,
},
];
},
};
export default nextConfig;