31 lines
655 B
TypeScript
31 lines
655 B
TypeScript
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: 5174,
|
|
proxy: {
|
|
'/api/v1': {
|
|
target: 'http://localhost:8000',
|
|
changeOrigin: true,
|
|
},
|
|
'/health': {
|
|
target: 'http://localhost:8000',
|
|
changeOrigin: true,
|
|
},
|
|
'/bexapi': {
|
|
target: 'https://bexell-scheduling.dongsk.top',
|
|
changeOrigin: true,
|
|
rewrite: (p) => p.replace(/^\/bexapi/, '/api'),
|
|
},
|
|
},
|
|
},
|
|
})
|