import { defineConfig } from 'vite' import react from '@vitejs/plugin-react-swc' // The built output is static and served by nginx from /var/www/blackbeard.observer; // there is no Node.js in production (architecture/generic.md §4). export default defineConfig({ plugins: [react()], build: { // Source maps ship: the bundle is public, the code is GPL, and a stack // trace from a miner's browser is worth far more than the bytes. sourcemap: true, }, server: { port: 5173, // `pnpm dev` talks to a locally-run blackbeard-api so the browser sees one // origin and the WebSocket upgrade needs no CORS dance — the same shape // nginx presents in production. proxy: { '/v1': { target: 'http://127.0.0.1:25864', changeOrigin: true, ws: true, }, }, }, })