const defaultSettings = require('./src/settings.js') const path = require('path') const name = defaultSettings.title || 'vue Admin Template' function resolve(dir) { return path.join(__dirname, dir) } module.exports = { publicPath: './', outputDir:"rh", devServer: { port: 8080, open: true // disableHostCheck: true, // proxy: { // 配置跨域 // '/': { // target: 'http://t.81ronggui.com:8082', // 这里后台的地址模拟的;应该填写你们真实的后台接口 // ws: false, // changOrigin: true, // 允许跨域 // pathRewrite: { // '^/': ''// 请求的时候使用这个api就可以 // } // } // } }, lintOnSave:false, configureWebpack: { name: name, resolve: { alias: { '@': resolve('src'), 'excel': path.resolve(__dirname, '../src/vendor'),//新增加一行 } } }, chainWebpack: (config) => { config.module .rule('svg') .exclude.add(resolve('src/icons')) .end() config.module .rule('icons') .test(/\.svg$/) .include.add(resolve('src/icons')) .end() .use('svg-sprite-loader') .loader('svg-sprite-loader') .options({ symbolId: 'icon-[name]' }) .end() } }