'use strict' const path = require('path') function resolve(dir) { return path.join(__dirname, dir) } module.exports = { publicPath: '/', outputDir: 'dist', assetsDir: 'static', chainWebpack: config => { config.resolve.alias .set("@", resolve("src")) }, devServer: { proxy: { [process.env.VUE_APP_BASE_API]: { target: "http://127.0.0.1:8000", changeOrigin: true, // pathRewrite: { // `^${process.env.VUE_APP_BASE_API}`: '/work' //重定向 // } } } } }