You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

21 lines
402 B

import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni' //官方内置的,不用下载,下面代码粘贴直接用即可
export default defineConfig({
plugins: [
uni()
],
server: {
port: 1314,
proxy: {
'/api': {
target: 'http://192.168.1.106:8518/', // 目标服务
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, ''),
},
}
}
})