标签:引入 name options lang 需要 module processor option require
// index.less
@color-default: #30b985
const path = require(‘path‘);
module.exports = {
// ...
pluginOptions: {
‘style-resources-loader‘: {
preProcessor: ‘less‘,
// 引入需要全局加载的 less 文件
patterns: [path.resolve(__dirname, ‘./src/styles/var.less‘)],
},
},
import ‘./index.less‘
<style lang="less">
.class{
color: @color-default;
}
</style>
标签:引入 name options lang 需要 module processor option require
原文地址:https://www.cnblogs.com/wukun-sole/p/14486616.html