export const OUTPUT_DIR = 'dist' export const PROXY_CONFIG = { /** * @desc 本地后端服务 * @请求路径 http://localhost:3100/api/user * @转发路径 http://localhost:8082/user */ '/api': { target: 'http://localhost:8082', changeOrigin: true, rewrite: (path) => path.replace(new RegExp('^/api'), '/api'), }, /** * @desc 学校服务器后端服务 * @请求路径 http://localhost:3100/api/v2/user * @转发路径 http://219.228.76.122/api/user */ '/api/v2': { target: 'https://219.228.76.122', changeOrigin: true, rewrite: (path) => path.replace(new RegExp('^/api/v2'), '/api'), }, /** * @desc 阿里云服务器后端服务 */ '/api/v3': { target: 'http://106.15.36.190:80', changeOrigin: true, rewrite: (path) => path.replace(new RegExp('^/api/v3'), '/api'), }, /* 图片代理 */ '/oj': { target: 'http://localhost:8082', changeOrigin: true, rewrite: (path) => path.replace(new RegExp('^/oj'), '/oj'), }, /* ws代理 代理到 阿里云服务器80端口 */ '/ws': { target: 'ws://106.15.36.190:80', ws: true, //websocket代理设置 changeOrigin: true, }, }