20 lines
434 B
TypeScript
20 lines
434 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
const backend = process.env.BACKEND_URL ?? 'http://127.0.0.1:8080';
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
'/api': { target: backend, changeOrigin: true },
|
|
'/ws': { target: backend, ws: true, changeOrigin: true },
|
|
},
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
sourcemap: true,
|
|
},
|
|
});
|