module.exports = { lintOnSave: false, publicPath: '/', chainWebpack: config => { config.module .rule('images') .use('url-loader') .loader('url-loader') .tap(options => Object.assign(options, { limit: 1 })) }, configureWebpack: { externals: { 'BMap': "BMap" }, resolve: { alias: { 'assets': '@/assets', 'common': '@/common', 'components': '@/components', 'network': '@/network', 'views': '@/views', 'plugins': '@/plugins', } } }, devServer: { proxy: { '/api': { target: 'http://'+process.env.VUE_APP_BASE_URL, // 允许跨域 changeOrigin: true, ws: true, pathRewrite: { '^/api': '' } } } } }