Files
turing_alert_web/vite.config.ts
2026-06-10 11:46:45 +08:00

42 lines
820 B
TypeScript

import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
server:{
// host:'192.168.28.44',
// host:'192.168.28.44',
host: '127.0.0.1',
port: 8001,
open:true,
cors: true,
// proxy: {
// '/api': "192.168.28.44:8000"
// }
proxy: {
'/api': {
target: 'http://192.168.28.32:8000',
changeOrigin: true,
},
'/media': {
target: 'http://192.168.28.32:8000',
changeOrigin: true,
},
'/ws': {
target: 'ws://192.168.28.32:8080',
ws: true,
}
}
}
})