Vue Element使用less报错 Module not found Error Can't resolve 'less-loader'

Vue Element使用less报错 Module not found: Error: Can't resolve 'less-loader'

报错1:

Element中css源码

&:last-child {
margin-bottom: 0;
}

eslint提示,强迫症受不了啊。

} expectedcss(css-rcurlyexpected)

解决:
添加 lang="less"

源码:

<style lang="less" scoped>

报错2:

Module not found: Error: Can't resolve 'less-loader'

安装:

npm install --save-dev less-loader less

So easy!

版权声明

弈心博客


本文首发site_name,转载请附上博文链接!