From 15f626b40118edaebdc0f2be2c7b59c1e4c72d01 Mon Sep 17 00:00:00 2001 From: dancer <144584931+dancer@users.noreply.github.com> Date: Fri, 13 Mar 2026 23:39:12 +0000 Subject: [PATCH] conditional basepath with IS_DEMO env --- next.config.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/next.config.ts b/next.config.ts index 1f85e53..03483ab 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,11 +1,11 @@ import { withBotId } from "botid/next/config"; import type { NextConfig } from "next"; -const basePath = "/demo"; +const isDemo = process.env.IS_DEMO === "1"; +const basePath = isDemo ? "/demo" : ""; const nextConfig: NextConfig = { - basePath, - assetPrefix: "/demo-assets", + ...(isDemo && { basePath, assetPrefix: "/demo-assets" }), env: { NEXT_PUBLIC_BASE_PATH: basePath, },