Home >Web Front-end >JS Tutorial >Sharing examples of pitfalls and solutions encountered by vue when introducing css and less
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
@import '~vux/src/styles/reset'
2. Final solution, in main.js
require('../node_modules/vux/src/styles/reset.less');
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!