1 Star 0 Fork 762

非洲平头哥 / qiwen-file-web

forked from 奇文社区 / qiwen-file-web 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vue.config.js 1.23 KB
一键复制 编辑 原始数据 按行查看 历史
const path = require('path')
module.exports = {
// 选项...
publicPath: '/',
// 配置项不懂的地方,请查看 Vue CLI 官方文档 https://cli.vuejs.org/zh/config/#devserver
devServer: {
disableHostCheck: true,
host: '0.0.0.0',
port: 8081, // 本地开发环境 - 前端工程启动的端口;如果不想指定端口,期望启动追加,请注释 port 属性
// 配置代理,解决本地开发环境下跨域请求后台接口的问题,proxy 中的修改项修改完后需要重启项目才可生效
proxy: {
'/api': {
target: 'http://localhost:8080', // 本地开发环境 - 连接后台服务,协议 + IP + 端口
ws: true, //是否跨域
changeOrigin: true,
pathRewrite: {
'^/api': '/'
}
}
}
},
productionSourceMap: false,
pluginOptions: {
'style-resources-loader': {
preProcessor: 'stylus',
patterns: []
}
},
configureWebpack: (config) => {
config.resolve.alias = {
'@': path.resolve(__dirname, './src'),
_v: path.resolve(__dirname, './src/views'),
_c: path.resolve(__dirname, './src/components'),
_a: path.resolve(__dirname, './src/assets'),
_r: path.resolve(__dirname, './src/request'),
_public: path.resolve(__dirname, './public')
}
}
}
JavaScript
1
https://gitee.com/Alexander360/qiwen-file-web.git
git@gitee.com:Alexander360/qiwen-file-web.git
Alexander360
qiwen-file-web
qiwen-file-web
master

搜索帮助