Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How vue adds less dependencies to scaffolding

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

Xiaobian to share with you how vue add less dependence on scaffolding, I believe most people still do not know how, so share this article for everyone's reference, I hope you have a lot of harvest after reading this article, let's go to understand it together!

Add method: 1. Use "npm install less-loader --save" command to install less dependency;2. Modify "webpack.base.conf.js" file to configure loader to load dependency so that it supports external less.

This tutorial operating environment: Windows 7 system, vue2.9.6 version, DELL G3 computer.

vue Add less dependencies to scaffolding:

1. Installation with less dependency

npm install less less-loader --save

2. Modify the webpack.base.conf.js file, configure the loader to load dependencies, so that it supports external less, and add it to the model.

{ test: /\.less$/, loader: 'style-loader! css-loader! less-loader'},

Note:

TypeError: loaderContext.getResolve is not a function

This is because the less-loader version is too high, uninstall it, download a lower version again, and uninstall and install the lower version together.

That's all for "how vue adds less dependency to scaffolding", thanks for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report