fix(ui): default to relative paths for control UI assets
Changes the default base path from "/" to "./" so the control UI works correctly when served under a custom basePath (e.g., /jbclawd/). Previously, assets were referenced with absolute paths like /assets/..., which failed when the UI was served under a subpath. With relative paths (./assets/...), the browser resolves them relative to the HTML location, making the UI work regardless of the configured basePath.
This commit is contained in:
committed by
Peter Steinberger
parent
b85854d0fe
commit
7dcf19d902
@@ -14,7 +14,7 @@ function normalizeBase(input: string): string {
|
|||||||
|
|
||||||
export default defineConfig(({ command }) => {
|
export default defineConfig(({ command }) => {
|
||||||
const envBase = process.env.CLAWDBOT_CONTROL_UI_BASE_PATH?.trim();
|
const envBase = process.env.CLAWDBOT_CONTROL_UI_BASE_PATH?.trim();
|
||||||
const base = envBase ? normalizeBase(envBase) : "/";
|
const base = envBase ? normalizeBase(envBase) : "./";
|
||||||
return {
|
return {
|
||||||
base,
|
base,
|
||||||
publicDir: path.resolve(here, "public"),
|
publicDir: path.resolve(here, "public"),
|
||||||
|
|||||||
Reference in New Issue
Block a user