When using css module in vue, the style of the third-party UI library does not change.

problem recovery: I used the vant ui library to develop the mobile end. When I used css module in the vue single-text component, I changed the internal class style of vant, which had no effect. But my custom class has changed correctly.

(1) when I checked the this.$style, I found that the class of the vant I modified above had changed. As shown below:

clipboard.png

2vantclassclasscss module:

clipboard.png

3css:

clipboard.png

4css modulewebpack:

build/webpack.base.conf.js:

clipboard.png

(5) ask Dashenmen for advice.


what is configured here is only to deal with scss files. The classes you see on dom are actually processed in vue, that is, in components. If vant does not support css module, this is the case

.
Menu