diff --git a/vue.config.js b/vue.config.js index 4856ed02a7c768f87ad651f9a689672b38fefaab..c2276d429bde5a7788bad1c7dd425f0e28477466 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