vite.config.ts 553 B

123456789101112131415161718192021222324252627
  1. import { defineConfig } from 'vite'
  2. import react from '@vitejs/plugin-react'
  3. import { fileURLToPath, URL } from 'node:url'
  4. // https://vitejs.dev/config/
  5. export default defineConfig({
  6. plugins: [react()],
  7. resolve: {
  8. alias: {
  9. '@': fileURLToPath(new URL('./src', import.meta.url)),
  10. },
  11. },
  12. server: {
  13. port: 3000,
  14. proxy: {
  15. '/api': {
  16. target: 'http://localhost:9999',
  17. changeOrigin: true,
  18. },
  19. '/admin/': {
  20. target: 'http://localhost:9999',
  21. changeOrigin: true,
  22. },
  23. },
  24. },
  25. })