1 Star 0 Fork 186

jack/mk-teamwork-ui

forked from wulon/mk-teamwork-ui 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vue.config.js 1.60 KB
一键复制 编辑 原始数据 按行查看 历史
const path = require('path');
function resolve(dir) {
return path.join(__dirname, dir)
}
const HOST = '0.0.0.0';
const PORT = '8045';
//const DEV_URL = 'http://teamworkapi.mokingsoft.com';
const DEV_URL = 'http://localhost:8888';
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,
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,
chainWebpack: config => {
// config.module.rules.delete('svg')
config.module.rule('iview') .test(/\.js$/) .use('babel').loader('babel-loader') .end() // 此处是添加内容重点
config.resolve.alias.set("@", resolve("src"))
}
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jack888/mk-teamwork-ui.git
git@gitee.com:jack888/mk-teamwork-ui.git
jack888
mk-teamwork-ui
mk-teamwork-ui
master

搜索帮助