File size: 464 Bytes
3c8d218
 
 
 
1e24842
 
3c8d218
 
1e24842
 
 
 
 
 
 
 
 
 
 
 
3c8d218
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcore from '@tailwindcss/vite'

const BACKEND = process.env.VITE_BACKEND_URL || 'http://localhost:8001'

export default defineConfig({
  plugins: [react(), tailwindcore()],
  server: {
    proxy: {
      '/api': {
        target: BACKEND,
        changeOrigin: true,
      },
      '/uploads': {
        target: BACKEND,
        changeOrigin: true,
      },
    },
  },
})