wx_mp_option/vite.config.js

20 lines
580 B
JavaScript
Raw Permalink Normal View History

2025-03-10 17:45:43 +08:00
import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [uni()],
server: {
proxy: {
// 在此处编写代理规则
'/api': {
2025-04-02 08:49:50 +08:00
// target: 'http://192.168.0.38:21666', // 测试服务
target: 'http://192.168.0.14:21666', // 测试服务
2025-03-10 17:45:43 +08:00
changeOrigin: true,
rewrite: (path) => {
return path.replace(/\/api/, '')
},
},
},
},
})