123456789101112131415161718192021222324252627282930 |
- import {
- defineConfig,
- } from 'vite'
- import uni from '@dcloudio/vite-plugin-uni'
- export default defineConfig({
- plugins: [
- uni()
- ],
- server: {
- cors: true, // 默认启用并允许任何源
- proxy: {
- '^/wxpay': { //微信支付
- target: 'http://192.168.1.3:8080', // 目标服务
- changeOrigin: true,
- // rewrite: path => path.replace(/^\/api/, ''),
- },
- '^/api': { //
- // "pathRewrite": {
- // "^": ""
- // },
- // target: 'http://192.168.100.63:8087/ifzt', // 目标服务
- target: 'https://qtzl.etcjz.cn/', // 目标服务
- changeOrigin: true,
- // rewrite: path => path.replace(/^\/api/, ''),
- }
- },
- host: '0.0.0.0',
- port: 3000,
- }
- })
|