侧边栏壁纸
  • 累计撰写 23 篇文章
  • 累计创建 7 个标签
  • 累计收到 0 条评论
标签搜索

目 录CONTENT

文章目录

Taro 因为Taro-ui 出现calc()警告

爱喝酸梅汤的小猫咪
2023-05-30 / 0 评论 / 0 点赞 / 344 阅读 / 145 字

===installation dependency===---"
yarn add --dev sass-migrator patch-package postinstall-postinstall

echo "use sass-migrator to fix problems"
./node_modules/.bin/sass-migrator division ./node_modules/taro-ui/dist/style/components/*.scss

echo "---===use patch-package to save this edit===---"
./node_modules/.bin/patch-package taro-ui

echo "---===use postinstall-postinstall to automatic operation in the future===---"
hasPostinstall=$(grep '"postinstall":' package.json)
if [[ "$hasPostinstall" != "" ]];then
echo "Make sure your package.json has following [script:{"postinstall": "patch-package", ...]"
else
scriptLine=$(grep -n '"scripts": {' package.json | cut -d : -f 1)
newScript=$(sed "$
a\ "postinstall": "patch-package"," package.json)
echo "$newScript" > package.json
echo "done!"
fi


执行
sh fix-scss.sh
完美解决
0
  • 0

评论区