- pathRewrite是使用proxy进行代理时,对请求路径进行重定向以匹配到正确的请求地址
devServer: {port: port,proxy: {'/api': {target: 'http://172.17.17.120:7000/',changeOrigin: true,ws: false,pathRewrite: {'^/api': '/api'// 这种接口配置出来 http://172.17.17.120:7000/api/login'^/api': ''//这种接口配置出来 http://172.17.17.120:7000/login}},},open: true,overlay: {warnings: false,errors: true}},
