From 1a9bb3d47c6732389d7808f8d9033e0ad360c2ed Mon Sep 17 00:00:00 2001 From: Devil Date: Sat, 26 Jun 2021 13:34:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dvue.config.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 - web/vue.config.js | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 50c33370..73c5653a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ .idea/ /web/node_modules /web/dist -/web/vue.config.js .DS_Store # local env files diff --git a/web/vue.config.js b/web/vue.config.js index efa87735..283e698f 100644 --- a/web/vue.config.js +++ b/web/vue.config.js @@ -25,8 +25,7 @@ module.exports = { // 把key的路径代理到target位置 // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { // 需要代理的路径 例如 '/api' - // target: `${process.env.VUE_APP_BASE_PATH}:${process.env.VUE_APP_SERVER_PORT}/`, // 代理到 目标路 - target: `http://demo.gin-vue-admin.com/api/`, // 代理到 目标路径 + target: `${process.env.VUE_APP_BASE_PATH}:${process.env.VUE_APP_SERVER_PORT}/`, // 代理到 目标路径 changeOrigin: true, pathRewrite: { // 修改路径数据 ['^' + process.env.VUE_APP_BASE_API]: '' // 举例 '^/api:""' 把路径中的/api字符串删除