cuth / postcss-pxtorem

Convert pixel units to rem (root em) units using PostCSS
MIT License
2.02k stars 174 forks source link

The rootvalue function is not valid #83

Open caicailv opened 2 years ago

caicailv commented 2 years ago

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

hemengke1997 commented 1 year ago

any reproduction?

hemengke1997 commented 1 year ago

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

liejiayong commented 1 year ago

Is there any solution?

hemengke1997 commented 1 year ago

Is there any solution?

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