1 Star 0 Fork 0

Lou / hei-ma-to-tiao

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vue.config.js 830 Bytes
一键复制 编辑 原始数据 按行查看 历史
Lou 提交于 2021-11-09 20:25 . :tada:优化
const path = require('path')
// 自定义主题的文件路径
const coverPath = path.join(__dirname, './src/cover.less')
module.exports = {
css: {
loaderOptions: {
less: {
modifyVars: {
// 直接覆盖变量,注意:变量名之前不需要加 @ 符号
// NavBar
// "nav-bar-height": "46px",
// "nav-bar-background-color": "#007bff",
// "nav-bar-title-font-size": "14px",
// "nav-bar-title-text-color": "white",
hack: `true; @import "${coverPath}";`
}
}
}
},
// 增强 vue-cli 的 webpack 配置项
configureWebpack: {
// 打包优化
externals: {
// import 时的包名称: window 全局的成员名称
'highlight.js': 'hljs',
vue: 'Vue',
'vue-router': 'VueRouter'
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/loulmd/hei-ma-to-tiao.git
git@gitee.com:loulmd/hei-ma-to-tiao.git
loulmd
hei-ma-to-tiao
hei-ma-to-tiao
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891