Home > Web Front-end > JS Tutorial > body text

Sharing examples of pitfalls and solutions encountered by vue when introducing css and less

小云云
Release: 2018-01-24 10:29:13
Original
3098 people have browsed it

When using vux to develop mobile pages, the public style less that introduced vux kept reporting errors. Through various Baidu and Google, they failed to solve it and took many detours. In the end, I realized that I was over the top and could introduce it in another way. This article mainly shares 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. Let’s follow the editor to take a look, I hope it can help everyone.

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. Final solution, in main.js

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

Related recommendations:

Summary of four ways to introduce css

Summary of how to introduce css style in web

Introduced in html Summary of css style methods

The above is the detailed content of Sharing examples of pitfalls and solutions encountered by vue when introducing css and less. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!