From 93264d94b79927b66c530054a47b42c231a19fd7 Mon Sep 17 00:00:00 2001 From: bunny <1319900154@qq.com> Date: Wed, 28 Feb 2024 20:11:08 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E9=9B=86=E6=88=90:=20=F0=9F=8E=A1=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0pathRewrite?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue.config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vue.config.js b/vue.config.js index c8b615d..c2d8d2f 100644 --- a/vue.config.js +++ b/vue.config.js @@ -27,10 +27,12 @@ module.exports = defineConfig({ '/api': { target: process.env.VUE_APP_URL, changeOrigin: true, + pathRewrite: { '^/api': '/api' }, }, '/mock': { target: process.env.VUE_APP_URL, changeOrigin: true, + pathRewrite: { '^/mock': '' }, }, }, },