1 Star 0 Fork 663

载攸道 / pearProject

forked from vilson / pearProject 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vue.config.js 1.36 KB
一键复制 编辑 原始数据 按行查看 历史
545522390@qq.com 提交于 2019-01-16 16:42 . 更新安装文档
const path = require('path');
function resolve(dir) {
return path.join(__dirname, dir)
}
const HOST = '127.0.0.1';
const PORT = '8045';
const DEV_URL = 'http://127.0.0.1/pearProjectApi/index.php';
module.exports = {
publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
productionSourceMap: false,
css: {
loaderOptions: {
less: {
modifyVars: {
blue: '#3a82f8',
'text-color': '#333'
},
javascriptEnabled: true
}
}
},
devServer: {
host: HOST,
port: PORT,
https: false,
hotOnly: false,
proxy: { // 配置跨域
'/api': {
//要访问的跨域的api的域名
target: `${DEV_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: undefined
};
PHP
1
https://gitee.com/zaiyoudao/vue-projectManage.git
git@gitee.com:zaiyoudao/vue-projectManage.git
zaiyoudao
vue-projectManage
pearProject
master

搜索帮助