2019-02-14 11:38:09 +08:00
|
|
|
module.exports = {
|
2019-02-22 19:27:28 +08:00
|
|
|
lintOnSave: true,
|
|
|
|
productionSourceMap: false,
|
|
|
|
chainWebpack: (config) => {
|
|
|
|
//忽略的打包文件
|
|
|
|
config.externals({
|
|
|
|
'vue': 'Vue',
|
|
|
|
'vue-router': 'VueRouter',
|
|
|
|
'vuex': 'Vuex',
|
|
|
|
'axios': 'axios',
|
|
|
|
'element-ui': 'ELEMENT',
|
|
|
|
})
|
|
|
|
const entry = config.entry('app')
|
|
|
|
entry
|
|
|
|
.add('babel-polyfill')
|
|
|
|
.end()
|
|
|
|
entry
|
|
|
|
.add('classlist-polyfill')
|
|
|
|
.end()
|
|
|
|
entry
|
|
|
|
.add('@/mock')
|
|
|
|
.end()
|
|
|
|
},
|
|
|
|
devServer: {
|
2019-07-06 08:04:28 +08:00
|
|
|
// 端口配置
|
|
|
|
port: 1888,
|
2019-05-16 23:44:00 +08:00
|
|
|
// 反向代理配置
|
2019-02-22 19:27:28 +08:00
|
|
|
proxy: {
|
|
|
|
'/api': {
|
2019-07-01 22:58:49 +08:00
|
|
|
target: 'http://localhost',
|
2019-02-22 19:27:28 +08:00
|
|
|
ws: true,
|
|
|
|
pathRewrite: {
|
|
|
|
'^/api': '/'
|
2019-02-14 11:38:09 +08:00
|
|
|
}
|
2019-02-22 19:27:28 +08:00
|
|
|
}
|
2019-02-14 11:38:09 +08:00
|
|
|
}
|
2019-02-22 19:27:28 +08:00
|
|
|
}
|
2019-02-14 17:36:47 +08:00
|
|
|
}
|