commit
9574aa8a23
87 files changed
+14884
No files matched your search
@@ -0,0 +1,26 @@
|
||||
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',
|
||||
'/avatar': 'http://127.0.0.1:8080',
|
||||
'/rpc': { target: 'ws://127.0.0.1:8080', ws: true },
|
||||
'/ws': { target: 'ws://127.0.0.1:8080', ws: true },
|
||||
},
|
||||
cors: true
|
||||
},
|
||||
});
|
||||
Reference in new issue
Block a user