trading/dashboard/vite.config.ts

22 lines
477 B
TypeScript
Raw Normal View History

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
const API_TARGET = process.env.VITE_API_TARGET || 'http://localhost:8000'
export default defineConfig({
plugins: [react(), tailwindcss()],
server: {
proxy: {
'/api': {
target: API_TARGET,
changeOrigin: true,
},
'/ws': {
target: API_TARGET.replace('http', 'ws'),
ws: true,
},
},
},
})