4b86b2a660
- server-dev start/stop/deploy 및 Gitea push 자동 배포 - local-dev 로컬 개발 환경 Co-authored-by: Cursor <cursoragent@cursor.com>
30 lines
719 B
JavaScript
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;
|