1 Star 1 Fork 2

VTJ.PRO/MyMobileWeb

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vue.config.js 687 Bytes
一键复制 编辑 原始数据 按行查看 历史
josephvong1008 提交于 2021-08-01 18:02 . 优化样式引入
const path = require('path')
const basicConfig = require('@xdh/my/core/vue.config')
module.exports = {
...basicConfig,
// 以下代码为定制VantUI 全局样式,其中 less-loader 必须为5.0版本;
// 参考网址:https://blog.csdn.net/qq_32555123/article/details/105513209
css: {
extract: process.env.NODE_ENV === 'production', // ? false : true,
sourceMap: true,
loaderOptions: {
less: {
modifyVars: {
// 使用 hack 方式 将 src/style/vant目录下的 自定义主题less文件替换VantUI原有的变量
hack: `true; @import "${path.join(__dirname, './src/style/vant/theme.less')}"`
}
}
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/newgateway/my-mobile-web.git
git@gitee.com:newgateway/my-mobile-web.git
newgateway
my-mobile-web
MyMobileWeb
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385