23 lines
799 B
JavaScript
23 lines
799 B
JavaScript
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', // 梁超
|
|
target: 'http://192.168.0.14:1999/hd-real-name', // 测试环境
|
|
// target: 'http://192.168.0.234:38080', // 方亮
|
|
changeOrigin: true,
|
|
rewrite: (path) => {
|
|
return path.replace(/\/api/, '')
|
|
},
|
|
},
|
|
},
|
|
},
|
|
})
|