const path = require('path') const resolve = dir => { return path.join(__dirname, dir) } module.exports = { // open: true, publicPath: './', chainWebpack: config => { config.resolve.alias .set('_c', resolve('src/components')) // key,value自行定义,比如.set('@@', resolve('src/components')) }, // Proxy:{ // '/':{ // target:process.env.VUE_APP_BASE_API, // changeOrigin:true, // } // } // devServer: { // proxy: { // '/api/*': { // target: 'http://btgym.xingtongworld.com', //跨域请求的公共地址 // changeOrigin: true, //是否开启跨域,值为 true 就是开启, false 不开启 // pathRewrite: { // '^/api': '' //注册全局路径, 但是在你请求的时候前面需要加上 /api // } // } // }, // } }