chore: conditionalize mfe config behind demo env var (#1463)

This commit is contained in:
Jeremy 2026-03-20 03:21:31 -07:00 committed by GitHub
parent f9652b452a
commit 691c3cb05f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 11 deletions

View file

@ -1,11 +1,23 @@
import { withBotId } from "botid/next/config";
import type { NextConfig } from "next";
const basePath = "/demo";
const basePath = process.env.IS_DEMO === "1" ? "/demo" : "";
const nextConfig: NextConfig = {
basePath,
assetPrefix: "/demo-assets",
...(basePath
? {
basePath,
assetPrefix: "/demo-assets",
redirects: async () => [
{
source: "/",
destination: basePath,
permanent: false,
basePath: false,
},
],
}
: {}),
env: {
NEXT_PUBLIC_BASE_PATH: basePath,
},

View file

@ -1,10 +1,3 @@
{
"framework": "nextjs",
"redirects": [
{
"source": "/",
"destination": "/demo",
"permanent": false
}
]
"framework": "nextjs"
}