Files
PAGIVA/next.config.ts
T
Loma Bot Ops 4a673ebb28 Support sub-path deploy via NEXT_PUBLIC_BASE_PATH (loma.chat/pagiva)
Adds basePath config, withBase/appUrl helpers, base-path-aware cookies,
OAuth redirects, manifest, service worker and cron runner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:48:42 +07:00

17 lines
576 B
TypeScript

import type { NextConfig } from "next";
// Sub-path deploy (e.g. "/pagiva" for https://loma.chat/pagiva). Build-time only.
const basePath = (process.env.NEXT_PUBLIC_BASE_PATH ?? "").replace(/\/+$/, "");
const nextConfig: NextConfig = {
output: "standalone",
...(basePath ? { basePath } : {}),
outputFileTracingIncludes: {
// Prisma 7 generates a hash-named client module that @vercel/nft can't
// discover via static analysis — force-include it everywhere Prisma is used.
"/*": ["./node_modules/@prisma/client/**/*"],
},
};
export default nextConfig;