yn_img_tools_app/vite.config.js

23 lines
780 B
JavaScript
Raw Normal View History

2025-04-01 09:00:33 +08:00
import { defineConfig } from 'vite'
2025-04-02 17:26:41 +08:00
import removeConsole from 'vite-plugin-remove-console'
2025-04-01 09:00:33 +08:00
import uni from '@dcloudio/vite-plugin-uni'
// https://vitejs.dev/config/
export default defineConfig({
2025-04-02 17:26:41 +08:00
plugins: [uni(), removeConsole()],
2025-04-01 09:00:33 +08:00
server: {
proxy: {
// 在此处编写代理规则
'/api': {
2025-04-17 09:38:55 +08:00
target: 'http://192.168.0.133:11997', // 梁超
2025-04-14 17:46:25 +08:00
// target: 'http://192.168.0.137:11997', // 方亮
2025-04-17 09:38:55 +08:00
// target: 'http://192.168.0.60:11997', // 赵福海
2025-04-08 17:51:41 +08:00
// target: 'http://192.168.0.39:11997', // 陈长文
2025-04-01 09:00:33 +08:00
changeOrigin: true,
rewrite: (path) => {
return path.replace(/\/api/, '')
},
},
},
},
})