vite.config.ts 543 B

123456789101112131415161718192021222324
  1. import { defineConfig } from 'vite'
  2. import react from '@vitejs/plugin-react'
  3. export default defineConfig(() => ({
  4. plugins: [react()],
  5. server: {
  6. port: 5173,
  7. proxy: {
  8. '/api': {
  9. target: process.env.VITE_API_TARGET || 'http://localhost:3843',
  10. changeOrigin: true,
  11. },
  12. '/ws': {
  13. target: (process.env.VITE_API_TARGET || 'http://localhost:3843').replace('http', 'ws'),
  14. ws: true,
  15. changeOrigin: true,
  16. },
  17. },
  18. },
  19. build: {
  20. outDir: 'dist',
  21. sourcemap: false,
  22. },
  23. }))