1. Install less dependency: 2. Modify the webpack.base.config.js file, configure the loader to load dependencies, make it support external less, and add to the original code // This method displays the style tag style in the console { test: /\.less$/, loader: "style-loader!css-loader!less-loader", options: { sourceMap: true } //You can see in the console which less file the current tag style comes from} 3. Use in the project Add lang="less" to the style tag in the vue file to use less in the tag, or import less externally Problems encountered: Cause: The installed version of less-loader is too high. Solution:
Or just modify the version number in the package.json file and then npm install This is the end of this article about the use of less in vue. For more relevant content on the use of vue less, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: About the IE label LI text wrapping problem
>>: Complete steps for deploying confluence with docker
Without further ado, let me give you the code. Th...
This article shares the encapsulation code of Jav...
Table of contents 1. Problem Discovery 2. View de...
Table of contents Preface 1. Demand and Effect ne...
This article shares the installation and configur...
What is bond NIC bond is a technology that is com...
Table of contents What is Routing Basic use of pu...
Adding the attribute selected = "selected&quo...
Linux finds a specific program where is The where...
I re-read the source code of the Fabric project a...
As of now, the latest version of CentOS is CentOS...
introduce This article is based on React + antd t...
The code looks like this: .process{ border:1px so...
This article introduces the sample code of CSS pi...
Route Jump this.$router.push('/course'); ...