stylus样式编译问题./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-6-1!

今天维护一个公司之前的react项目 出现了如下警告
不明所以 o((⊙﹏⊙))o 记录下解决过程

在这里插入图片描述

./src/compontents/Pay/index.styl (./node_modules/css-loader/dist/cjs.js??ref–6-oneOf-6-1!./node_modules/postcss-loader/src??postcss!./node_modules/stylus-loader??ref–6-oneOf-6-3!./src/compontents/Pay/index.styl)

方法一:
尝试

npm uninstall node-sass;

npm install node-sass@4.14.1

node-sass这个包是干嘛的??不知道
试了一下没用 这个时候我仔细定睛一看
发现跟styl 跟这个格式的样式文件有关系;

方法二:
发现我自己的package.json 文件中没有相关的loader “stylus”: “^0.54.5”, “stylus-loader”: “^3.0.2”,
于是我安装后 再次测试 无效
stylus 这种样式 没用过,不知道好不好用 和less 和sass又有什么区别?有时间学习学习
stylus官网 http://stylus-lang.com/
stylus中文网 https://stylus-lang.net/

方法三:
翻一下报错后面的这句话 看看有没有什么突破点
在这里插入图片描述

Second Autoprefixer control comment was ignored. Autoprefixer applies control comment to whole
block, not to next rules.

第二个 Autoprefixer 控件注释被忽略。 Autoprefixer 将控制注释应用于整个块,而不是下一个规则。

好家伙 就是这个东西在作祟; 报错的styl样式文件中都有

  			 /* autoprefixer: off */
            -webkit-box-orient: vertical;
            /* autoprefixer: on */
            -webkit-line-clamp: 2;

将 带有 autoprefixer 的注释删除就好了;

但是话说autoprefixer 是个啥东西 百度了一下:

Autoprefixer:一个以最好的方式处理浏览器前缀的后处理程序 (⊙_⊙)?

还有很多东西都不会;
① styl 样式
② Autoprefixer
③ node-sass

有空一定补充学习

记录 共勉~❀❀

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值