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
Preface Recently I started using robot framework ...
How to reset the initial value of the auto-increm...
Preface Today I will share with you a holy grail ...
Robots.txt is a plain text file in which website ...
Detailed explanation of mysql count The count fun...
jQuery realizes the effect of theater seat select...
Table of contents 1.kvm deployment 1.1 kvm instal...
Note: It is recommended that the virtual machine ...
When building a website, HTML language may seem un...
After VMware is abnormally shut down, it prompts ...
Table of contents 1. Bootstrap5 breakpoints 1.1 M...
1. Demand We have three tables. We need to classi...
Question 1: When entering net start mysql during ...
Introduction to Linux alarm function Above code: ...
On the server, in order to quickly log in to the ...