ml-intern / frontend /vite.config.ts
akseljoonas's picture
akseljoonas HF Staff
feat: merge HF Space improvements
79b2fcc
raw
history blame
603 Bytes
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import path from 'path'
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
server: {
port: 5173,
proxy: {
'/api': {
target: 'http://localhost:7860',
changeOrigin: true,
ws: true, // Proxy WebSocket connections (/api/ws/...)
},
'/auth': {
target: 'http://localhost:7860',
changeOrigin: true,
},
},
},
build: {
outDir: 'dist',
sourcemap: false,
},
})