26 lines
551 B
TypeScript
26 lines
551 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
allowedHosts: true,
|
|
proxy: {
|
|
'/api': {
|
|
target: process.env.VITE_API_URL || 'http://api:3200',
|
|
changeOrigin: true,
|
|
// No rewrite needed since NestJS has a global prefix 'api'
|
|
}
|
|
}
|
|
},
|
|
preview: {
|
|
allowedHosts: true,
|
|
proxy: {
|
|
'/api': {
|
|
target: process.env.VITE_API_URL || 'http://api:3200',
|
|
changeOrigin: true,
|
|
}
|
|
}
|
|
}
|
|
})
|