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

Use vue to introduce css, less related issues

亚连
Release: 2018-06-11 14:05:45
Original
1611 people have browsed it

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
Copy after login
 @import '~vux/src/styles/reset'
Copy after login

2. The final solution is in main.js中

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

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template