vite.config.ts 399 B

12345678910111213141516171819202122
  1. import { defineConfig } from 'vite';
  2. import react from '@vitejs/plugin-react';
  3. export default defineConfig({
  4. plugins: [react()],
  5. server: {
  6. port: 3000,
  7. proxy: {
  8. '/api': {
  9. target: 'http://127.0.0.1:9988',
  10. changeOrigin: true,
  11. },
  12. '/ws': {
  13. target: 'ws://127.0.0.1:9988',
  14. ws: true,
  15. },
  16. },
  17. },
  18. build: {
  19. outDir: 'dist',
  20. },
  21. });