sh_real_name_system_app/vite.config.js

23 lines
812 B
JavaScript
Raw Normal View History

2025-08-19 18:19:48 +08:00
import { defineConfig } from 'vite'
import removeConsole from 'vite-plugin-remove-console'
import uni from '@dcloudio/vite-plugin-uni'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [uni(), removeConsole()],
server: {
proxy: {
// 在此处编写代理规则
'/api': {
// target: 'http://112.29.103.165:1616', // 测试环境
// target: 'http://192.168.0.133:58080', // 梁超
2025-10-23 17:49:28 +08:00
// target: 'http://192.168.0.14:1999/hd-real-name', // 测试环境
target: 'http://192.168.0.234:38080/hd-real-name', // 方亮
2025-08-19 18:19:48 +08:00
changeOrigin: true,
rewrite: (path) => {
return path.replace(/\/api/, '')
},
},
},
},
})