mirror of
https://github.com/hanzoai/bot.git
synced 2026-10-30 17:24:26 +00:00
Comprehensive rename of all openclaw references to hanzo-bot equivalents: - Package: openclaw → @hanzo/bot - Binary: openclaw → hanzo-bot - Types: OpenClaw* → Bot* - Env vars: OPENCLAW_* → BOT_* - Android: ai.openclaw.android → ai.hanzo.bot.android - iOS/macOS: ai.openclaw.* → ai.hanzo.* - Swift modules: OpenClaw* → Bot* - Plugins: openclaw.plugin.json → bot.plugin.json - Paths: .openclaw/ → .hanzo/bot/ - URLs: github.com/openclaw → github.com/hanzoai
44 lines
1.0 KiB
TypeScript
44 lines
1.0 KiB
TypeScript
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import { defineConfig } from "vite";
|
|
|
|
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
|
|
function normalizeBase(input: string): string {
|
|
const trimmed = input.trim();
|
|
if (!trimmed) {
|
|
return "/";
|
|
}
|
|
if (trimmed === "./") {
|
|
return "./";
|
|
}
|
|
if (trimmed.endsWith("/")) {
|
|
return trimmed;
|
|
}
|
|
return `${trimmed}/`;
|
|
}
|
|
|
|
export default defineConfig(() => {
|
|
const envBase = process.env.BOT_CONTROL_UI_BASE_PATH?.trim();
|
|
const base = envBase ? normalizeBase(envBase) : "./";
|
|
return {
|
|
base,
|
|
publicDir: path.resolve(here, "public"),
|
|
optimizeDeps: {
|
|
include: ["lit/directives/repeat.js"],
|
|
},
|
|
build: {
|
|
outDir: path.resolve(here, "../dist/control-ui"),
|
|
emptyOutDir: true,
|
|
sourcemap: true,
|
|
// Keep CI/onboard logs clean; current control UI chunking is intentionally above 500 kB.
|
|
chunkSizeWarningLimit: 1024,
|
|
},
|
|
server: {
|
|
host: true,
|
|
port: 5173,
|
|
strictPort: true,
|
|
},
|
|
};
|
|
});
|