Home  >  Article  >  Web Front-end  >  Use vue to introduce css, less related issues

Use vue to introduce css, less related issues

亚连
亚连Original
2018-06-11 14:05:451539browse

Below I will share with you a brief discussion of the pitfalls and solutions encountered by vue when introducing css and less. It has a good reference value and I hope it will be helpful to everyone.

When using vux to develop mobile pages, the public style less introduced in vux kept reporting errors. Through various Baidu and Google, there was no solution, and many detours were taken. In the end, I realized that I was over the top and could introduce it in another way.

1. How to use error reporting: in App

@ ./~/css-loader?{"minimize":false,"sourceMap":false}!./~/vux/src/styles/reset.
less 3:10-115
 @ ./~/css-loader?{"minimize":false,"sourceMap":false}!./~/vue-loader/lib/style-
compiler?{"id":"data-v-942b00fc","scoped":false,"hasInlineConfig":true}!./~/vux-
loader/src/style-loader.js!./~/vue-loader/lib/selector.js?type=styles&index=0!./
src/App.vue
 @ ./~/vue-style-loader!./~/css-loader?{"minimize":false,"sourceMap":false}!./~/
vue-loader/lib/style-compiler?{"id":"data-v-942b00fc","scoped":false,"hasInlineC
onfig":true}!./~/vux-loader/src/style-loader.js!./~/vue-loader/lib/selector.js?t
ype=styles&index=0!./src/App.vue
 @ ./src/App.vue
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js
 @import '~vux/src/styles/reset'

2. The final solution is in main.js中

require('../node_modules/vux/src/styles/reset.less');

The above is what I compiled for everyone. I hope it will be helpful to everyone in the future.

Related articles:

The problem of packaging errors using parcel.js

##Detailed interpretation of vue reconstruction technology

Using vuex and persistence

Use the input box in jquery to find keywords

About how to change skin in Vue ?

How to implement the specified assignment method using js and jQuery

How to optimize packaging using React and Webpack?

How to write the todolist component using vue?

How to achieve point diffusion using openlayers4?

The above is the detailed content of Use vue to introduce css, less related issues. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn