Saber/vue.config.js

38 lines
728 B
JavaScript
Raw Normal View History

2019-02-14 11:38:09 +08:00
// 基础路径 注意发布之前要先修改这里
2019-02-21 22:19:04 +08:00
let url = 'http://localhost:8800'
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: {
proxy: {
'/api': {
target: url,
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
}