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>
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user