const path = require('path'); function resolve(dir) { return path.join(__dirname, dir); } module.exports = { devServer: { overlay: { warnings: false, errors: false }, proxy: { '/qwer': { target: 'http://m.maoyan.com', changeOrigin: true, pathRewrite: { '^/qwer': '' } }, '/api': { target: 'http://plat.yjyculture.com/C/', changeOrigin: true, pathRewrite: { '^/api': '' } }, } }, lintOnSave: false, chainWebpack: (config) => { config.resolve.alias .set('@', resolve('src')) } }