postcss-pxtorem icon indicating copy to clipboard operation
postcss-pxtorem copied to clipboard

The rootvalue function is not valid

Open caicailv opened this issue 3 years ago • 4 comments

When I used version 6.0.0, an error occurred, In the vite + Vue framework, I want to use two different proportions for the UI framework But in the end, all the documents used the ratio of 50 This problem was resolved when I tried to switch to version 5.1.1 postCssPxToRem({ rootValue({ file }) { let num = file.includes('vant') ? 50 : 100 return num }, propList: ['*'], }),

caicailv avatar May 19 '22 08:05 caicailv

any reproduction?

hemengke1997 avatar Aug 20 '22 01:08 hemengke1997

maybe you could try https://github.com/hemengke1997/postcss-pxtorem

hemengke1997 avatar Aug 20 '22 02:08 hemengke1997

Is there any solution?

liejiayong avatar Aug 22 '22 03:08 liejiayong

Is there any solution?

yep! You can try this https://github.com/hemengke1997/postcss-pxtorem and let me know if you have any problems

hemengke1997 avatar Aug 22 '22 03:08 hemengke1997