chore: conditionalize mfe config behind demo env var (#1463)
This commit is contained in:
parent
f9652b452a
commit
691c3cb05f
2 changed files with 16 additions and 11 deletions
|
|
@ -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,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,10 +1,3 @@
|
|||
{
|
||||
"framework": "nextjs",
|
||||
"redirects": [
|
||||
{
|
||||
"source": "/",
|
||||
"destination": "/demo",
|
||||
"permanent": false
|
||||
}
|
||||
]
|
||||
"framework": "nextjs"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue