1 Star 0 Fork 3.9K

sumuncle / pig-ui

forked from lengleng / pig-ui 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vue.config.js 1.28 KB
一键复制 编辑 原始数据 按行查看 历史
/**
* 配置该文件可以参考:
* https://cli.vuejs.org/zh/config/#%E7%9B%AE%E6%A0%87%E6%B5%8F%E8%A7%88%E5%99%A8
*
*/
const url = 'http://pig-gateway:9999'
// 基础路径,发布前修改这里,当前配置打包出来的资源都是相对路径
let publicPath = './'
module.exports = {
publicPath: publicPath,
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()
},
// 配置转发代理
devServer: {
proxy: {
'/auth': {
target: url,
ws: true,
pathRewrite: {
'^/auth': '/auth'
}
},
'/admin': {
target: url,
ws: true,
pathRewrite: {
'^/admin': '/admin'
}
},
'/code': {
target: url,
ws: true,
pathRewrite: {
'^/code': '/code'
}
},
'/gen': {
target: url,
ws: true,
pathRewrite: {
'^/gen': '/gen'
}
}
}
}
}
JavaScript
1
https://gitee.com/sumuncle/pig-ui.git
git@gitee.com:sumuncle/pig-ui.git
sumuncle
pig-ui
pig-ui
master

搜索帮助