A simple tutorial on using less in vue2

亚连
Release: 2018-05-28 17:03:16
Original
2391 people have browsed it

This article mainly introduces a simple tutorial for using less in vue2. Since there is no need to manually configure webpack, using less in vue is very simple. You only need to install less and less-loadder.

First of all, let me explain that if the project is created usingnpm init webpackproject name, there is no need to manually configure webpack

, so using less in vue is very simple, you only need to install less , less-loader will do.

Steps

npm install less less-loader --save //将less和less-loader安装到开发依赖 npm run dev
Copy after login

If the installation is successful, you can use less in the vue component