Closed gitdogogo closed 3 years ago
我的vue.config.js
const path = require('path') const theme = path.resolve(__dirname,'./src/theme/index.less') console.log(theme) module.exports = { outputDir: 'dist', publicPath: process.env.NODE_ENV === 'production' ? '/vant-demo/' : '/', css: { loaderOptions: { less: { modifyVars: { hack: `true; @import "${theme}";`, } } } } };
src/theme/index.less
@font-size-sm:'13px'; @font-size-md:'15px'; @font-size-lg:'17px'; @goods-action-button-danger-color:'#7232dd'; @goods-action-button-warning-color:'#3eaf7c';
升级本地依赖成demo中的版本就可以了
我的vue.config.js
src/theme/index.less