AIstudioProxyAPI / static /frontend /vite.config.ts
peijun1's picture
Deploy AI Studio Proxy API to Hugging Face Spaces
a5784e9
Raw
History Blame Contribute Delete
562 Bytes
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import path from 'path'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
server: {
proxy: {
'/v1': 'http://localhost:2048',
'/api': 'http://localhost:2048',
'/health': 'http://localhost:2048',
'/ws': {
target: 'ws://localhost:2048',
ws: true,
},
},
},
build: {
outDir: 'dist',
sourcemap: true,
},
})