Ai
1 Star 0 Fork 3

lx29/vue2-jd

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vue.config.js 1012 Bytes
一键复制 编辑 原始数据 按行查看 历史
lx29 提交于 2022-03-18 16:18 +08:00 . success 0.1.0
const path = require('path')
// less文件的路径
const myTheme = path.join(__dirname, './src/assets/css/vantTheme.less')
const defaultSettings = require('./src/config/settings.js')
const name = defaultSettings.title || 'JD' // page title
function resolve(dir) {
return path.join(__dirname, dir)
}
module.exports = {
devServer: {
open: true,
host: 'localhost',
port: 8080,
proxy: {
'/api': {
target: 'http://localhost:8888',
ws: true,
changOrigin: true,
pathRewrite: {
'^/api': ''
}
},
'/img': {
target: 'http://localhost:8888',
ws: true,
changOrigin: true,
pathRewrite: {
'^/img': '/img'
}
}
}
},
configureWebpack: {
name: name,
resolve: {
alias: {
'@': resolve('src')
}
}
},
css: {
loaderOptions: {
less: {
modifyVars: {
hack: `true; @import "${myTheme}";`
}
}
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/lx29/jd.git
git@gitee.com:lx29/jd.git
lx29
jd
vue2-jd
master

搜索帮助