Files
faumaray e80dbc2fda Update
Signed-off-by: faumaray <faumaray@gmail.com>
2026-07-15 19:50:44 +03:00

27 lines
887 B
TypeScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
// Dev workflow: run the bot with web.enabled, then `npm run dev` — the vite
// dev server proxies the bot's HTTP endpoints and WebSockets so the app runs
// against live state with hot reload. Production build lands in ../web-dist
// (consumed by EchoionWeb/CMakeLists.txt).
export default defineConfig({
plugins: [react()],
build: {
// Output inside frontend/ (gitignored); CMake copies it to bin/web
// and installs it. Kept in-tree so a C++-only build with
// -DECHOION_BUILD_WEB=OFF can still ship a prior snapshot.
outDir: 'web-dist',
emptyOutDir: true,
},
server: {
proxy: {
'/config.json': 'http://127.0.0.1:8080',
'/api': 'http://127.0.0.1:8080',
'/avatar': 'http://127.0.0.1:8080',
'/rpc': { target: 'ws://127.0.0.1:8080', ws: true },
},
cors: true
},
});