summaryrefslogtreecommitdiff
path: root/vite.config.ts
blob: 69d80d1367eafef8a94204aaefdcbfb07bbaed90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [react()],
  server: {
    proxy: {
      // Proxy /api requests to the backend server (running on port 3000 now)
      '/api': {
        target: 'http://localhost:3000', // Adjust to match backend PORT from .env
        changeOrigin: true, // Recommended for virtual hosted sites
        secure: false, // Don't verify SSL certs if backend uses self-signed cert in dev
      },
    },
  },
});