Open spring011 opened 2 years ago
Maybe you could add 'console.log(file)' inside the rootValue function to see the file path when error occurs ~
Maybe you could add 'console.log(file)' inside the rootValue function to see the file path when error occurs ~
when use console.log, the print is no problem.
I have the same problem. Have you solved it now?
I have the same problem. Have you solved it now?
I did
I solved this problem by reducing the version to 5.1.1
@hemengke1997 具体是什么原因导致的这个问题呢?
@hemengke1997 具体是什么原因导致的这个问题呢?
这个库的hook调用有点儿问题,你可以试试我fork的库:https://github.com/hemengke1997/postcss-pxtorem
You can just downgrade to v5.1.1 and it'll be fine
My scenario is converting px to rem, and sometimes it will be converted to rem
under v6.0.0
, and sometimes px
will not be converted. Currently, the conversion output of v5.1.1
is very stable.
Configure rootValue by function, There are some errors that px converts to rem. I use development environment:postcss-pxtotem v6.0.0, vite2.0+, vue3. At the same time,I use vue3 component library vant3.0+。to match the Vant style,I do as follow in file postcss.config.js:
Access the page in the browser,that is no problem. As shown in the figure below,browser got a index.6f88061b.css file that dose not refer to Vant component library。index.6f88061b.css file is about page logic and when make px converts to rem in this file the calculator uses rootValue 75. example, height of
.top_tile
class is 2.8rem.Everything is all right.however, somtimes there are some errors when I access page browser.The page content becomes larger resulting in out-of-browser size.and browser got another css file named index.82969300.css not index.6f88061b.css. height of
.top_tile
class becomes twice the height.now the height is 5.6rem.