Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0

项目: taro3+vue3

描述:运行时警告 Deprecation Warning: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0_第1张图片

原因:sass版本的问题, 换成calc

方法一:sass-migrator

全局安装 sass-migrator, 在node_modules/.bin中运行 sass-migrator division ./node_modules/taro-ui-vue3/dist/style/components/*.scss ,然而并没有用,不知道是不是我打开方式不对…

方法二:手动

用了最笨的方法:手动修复
scss文件头部引入 @use “sass:math”;

把用到除法的地方换成math.div(参数1, 参数2)
Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0_第2张图片

最后,最重要的一步,用patch-package打补丁,不然重新安装之前修改的没有了…【patch-package传送门】

你可能感兴趣的:(#,taroUiVue3,sass报错,小程序)