conditional basepath with IS_DEMO env
This commit is contained in:
parent
27f2f9a9df
commit
15f626b401
1 changed files with 3 additions and 3 deletions
|
|
@ -1,11 +1,11 @@
|
||||||
import { withBotId } from "botid/next/config";
|
import { withBotId } from "botid/next/config";
|
||||||
import type { NextConfig } from "next";
|
import type { NextConfig } from "next";
|
||||||
|
|
||||||
const basePath = "/demo";
|
const isDemo = process.env.IS_DEMO === "1";
|
||||||
|
const basePath = isDemo ? "/demo" : "";
|
||||||
|
|
||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
basePath,
|
...(isDemo && { basePath, assetPrefix: "/demo-assets" }),
|
||||||
assetPrefix: "/demo-assets",
|
|
||||||
env: {
|
env: {
|
||||||
NEXT_PUBLIC_BASE_PATH: basePath,
|
NEXT_PUBLIC_BASE_PATH: basePath,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue