使用elemeng-plus控制台报错:$weight
使用element-plus最开始按需使用,加入的组件少没有问题,但组件引入多了以后发现控制台会报下面的警告:
Deprecation Warning: $weight: Passing a number without unit % (0) is deprecated.
To preserve current behavior: $weight * 1%
More info: https://sass-lang.com/d/function-units
虽然修改文件后会忽视这个警告,但是每次都要来一遍很不爽。
网上找的都是说直接改掉这个地方,但是只能改本地,每次更新还会有同样的问题。
找了很多资料,都是解决bootstrap的,而且这个组件库人家修复了这个问题。
最后在:https://devs.keenthemes.com/question/sass-warning-cant-find-the-cause-of-the-problem
这个回答里面找到了解决办法,修改sass和sass-loader的版本:
"sass": "1.55.0",
"sass-loader": "13.2.0",