2 Star 17 Fork 9

gcddblue / vue-admin-webapp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vue.config.js 961 Bytes
一键复制 编辑 原始数据 按行查看 历史
gcddblue 提交于 2019-08-04 22:30 . 打包出runtime
const path = require('path')
const resolve = function(dir) {
return path.join(__dirname, dir)
}
module.exports = {
publicPath:
process.env.NODE_ENV === 'production' ? '/vue-admin-webapp/' : '/',
outputDir: 'dist',
assetsDir: 'static',
lintOnSave: true, // 是否开启eslint保存检测
productionSourceMap: false, // 是否在构建生产包时生成sourcdeMap
chainWebpack: config => {
config.resolve.alias
.set('@', resolve('src'))
.set('views', resolve('src/views'))
config.optimization.runtimeChunk('single')
},
devServer: {
host: 'localhost',
port: '8080',
hot: true,
open: true,
overlay: {
warning: false,
error: true
},
proxy: {
[process.env.VUE_APP_BASE_API]: {
target: process.env.VUE_APP_BASE_API,
changeOrigin: true,
secure: false,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
}
}
}
}
}
JavaScript
1
https://gitee.com/gcddblue/vue-admin-webapp.git
git@gitee.com:gcddblue/vue-admin-webapp.git
gcddblue
vue-admin-webapp
vue-admin-webapp
master

搜索帮助