cuth/postcss-pxtorem

The rootvalue function is not valid

Opened this issue · 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: ['*'], }),

any reproduction?

Is there any solution?

Is there any solution?

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