1 Star 0 Fork 671

brookyu/pearProject

forked from vilson/pearProject 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vue.config.js 1.65 KB
一键复制 编辑 原始数据 按行查看 历史
const path = require('path');
function resolve(dir) {
return path.join(__dirname, dir)
}
module.exports = {
publicPath: process.env.NODE_ENV === 'production' ? process.env.VUE_APP_BUILD_PATH: '/',
productionSourceMap: false,
css: {
loaderOptions: {
less: {
modifyVars: {
blue: '#3a82f8',
'text-color': '#333'
},
javascriptEnabled: true
}
}
},
devServer: {
host: process.env.VUE_APP_DEV_HOST || '127.0.0.1',
port: process.env.VUE_APP_DEV_PORT || '8045',
https: false,
hotOnly: false,
proxy: { // 配置跨域
'/api2': {
//要访问的跨域的api的域名
target: `${process.env.VUE_APP_API_URL2}/`,
ws: true,
changOrigin: true,
pathRewrite: {
'^/api2': ''
}
},
'/api': {
//要访问的跨域的api的域名
target: `${process.env.VUE_APP_API_URL}/`,
ws: true,
changOrigin: true,
pathRewrite: {
'^/api': ''
}
}
},
},
configureWebpack: config => {
config.resolve = {
extensions: ['.js', '.vue', '.json', ".css"],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': resolve('src'),
'assets': resolve('src/assets'),
'components': resolve('src/components')
}
}
},
lintOnSave: false
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/brookyu2019/vue-projectManage.git
git@gitee.com:brookyu2019/vue-projectManage.git
brookyu2019
vue-projectManage
pearProject
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385