vue-cli3 less全局变量
1. vue add style-resources-loader
2.
const path = require("path");//这一段需要自行添加 module.exports = { pluginOptions: { ‘style-resources-loader‘: { preProcessor: ‘less‘, patterns: [ path.resolve(__dirname, "src/style/global.less")//需要自行添加 ] } } }
3.
<style lang="less" scoped> @import ‘/assets/styles/varibles.less‘; //全局变量存放的文件(要加~) </style>
相关推荐
前端 2020-08-03
骷髅狗 2020-08-02
wghou 2020-06-21
wghou 2020-06-16
覆雪蓝枫 2020-06-16
骷髅狗 2020-06-14
骷髅狗 2020-06-12
sixyearsorless 2020-05-27
zhanghaibing00 2020-05-27
maiktom 2020-05-26
比格杰森 2020-05-26
e度空间 2020-05-17
maiktom 2020-05-11
buttonChan 2020-05-10
Enjoyendless 2020-05-08
sixyearsorless 2020-05-07
骷髅狗 2020-04-24
骷髅狗 2020-04-23