From 210d4b91f390f70cd246f09c45c9d077d0dca4ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A8=8A=E5=80=A1=E7=9B=9B?= <11481212+fan-chuangsheng@user.noreply.gitee.com> Date: Thu, 1 Dec 2022 12:45:41 +0000 Subject: [PATCH] update vue.config.js. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 樊倡盛 <11481212+fan-chuangsheng@user.noreply.gitee.com> --- vue.config.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/vue.config.js b/vue.config.js index 4856ed0..c2276d4 100644 --- a/vue.config.js +++ b/vue.config.js @@ -36,7 +36,15 @@ module.exports = { warnings: false, errors: true }, - before: require('./mock/mock-server.js') + proxy: { + [process.env.VUE_APP_BASE_API ]: { + target: 'http://127.0.0.1:8080', + changeOrigin: true, + pathRewrite: { + [ '^' + process.env.VUE_APP_BASE_API ]: '' + } + } + } }, configureWebpack: { // provide the app's title in webpack's name field, so that