25 lines
518 B
TypeScript
25 lines
518 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
host: true,
|
|
port: 3000,
|
|
strictPort: true,
|
|
allowedHosts: process.env.VITE_ALLOWED_HOSTS ? process.env.VITE_ALLOWED_HOSTS.split(',') : ['sasaprod', 'localhost'],
|
|
watch: {
|
|
usePolling: true
|
|
},
|
|
hmr: {
|
|
clientPort: 3500
|
|
},
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://backend:8000',
|
|
changeOrigin: true
|
|
}
|
|
}
|
|
}
|
|
})
|