怎么样在vuepress组件中引入less全局变量

在vuepress中,引入了组件。但是组件的style中使用了全局的less变量 color: @red。
在vue中是在vue.config.js中如下配置
const path = require('path')module.exports = {
  pluginOptions: {
    "style-resources-loader": {
      preProcessor: "less",
      patterns: [path.resolve(__dirname, "./src/components/index.less")]
    }
  }
}
请问在 vuepress中应该怎么配置可以实现?
回答:
vuepress提供的基本配置文件.vuepress/config.js也提供了configureWebpack和chainWebpack2个字段,改为手动传递参数?
以上是 怎么样在vuepress组件中引入less全局变量 的全部内容, 来源链接: utcz.com/p/935869.html


