gulp-px2rem-plugin报错Cannot read property ‘forEach‘ of null
今天使用gulp-less+gulp-px2rem-plugin报了错,经测试后发现, 原因是我其中一个less文件编译的css为空(全是less函数也为空),使得gulp-px2rem-plugin报错(write callback called multiple times或者Cannot read property ‘forEach’ of null)
解决办法:
在gulp-px2rem-plugin源码index.js文件中26行加入空判断:array_style &&
arr.
原创
2021-03-21 11:13:39 ·
451 阅读 ·
0 评论