Use the Less simple tutorial in Vue2

First, explain a little, if it is created using the NPM Init WebPack project name, there is no need to manually configure WebPack

, so it is very simple to use LES. If you need to install Less, Less-Loader is available

NPM Install Less Less-loader –save // ​​Installing LESS and LESS-Loader to Development dependent NPM Run DEV
  If the installation is successful, it can use LESS in the VUE component  

.hello {a {color: red;}}
 Supplement:    How to use LESS 
in VUE [ 10] http://element.EleMe.IO/ / /
Elementui is based on Vue2

VUE to use Less

First Vue development environment has been installed successfully

After all things are ready:

Step 1:

Installing Less Dependence,

NPM Install Less Less-Loader –save

Modify the webpack.config.js file, configure Loader loading dependencies, allowing it to support the outside LESS, add

{Test: /\.less! “Style-LoadER! CSS-Loader! Less-loadinger “,},

Now basically installed completed, then add lang =” LASS in the Style tag when used “You can write the code of the Less (SCOPED is effective in the style tag)

  (or @Import './index.less"; // Introduce a global Less file). (Directly introduced in HTML:  

                    
© Copyright Notice
THE END
Just support it if you like
like0
share
comment Grab the couch

Please log in to comment