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

[object Object] is not a PostCSS plugin

Open zj1234jz opened this issue 4 years ago • 2 comments
trafficstars

when i use postcss-pxtorem as a plugin has a error for it [object Object] is not a PostCSS plugin this is my postcss.config.js module.exports = { plugins: { "postcss-preset-env":{} , "postcss-pxtorem":{ rootValue: 75,// 因为适配方案是把 1/10的屏幕的宽度作为1rem, 而设计稿是 750, 所以 remUnit = 750/10 = 75 unitPrecision: 4,// 转换精度,小数点后3位 replace: true, propList: ['*'], }, } }

and my package.json was { "postcss": "^8.3.1", "postcss-import": "^11.0.0", "postcss-loader": "^2.0.8", "postcss-preset-env": "^6.7.0", "postcss-pxtorem": "^6.0.0", "webpack": "^5.38.1", "webpack-cli": "^4.7.2", }

i need help thanks

zj1234jz avatar Jun 10 '21 08:06 zj1234jz

I have the same problem, nedd help!

Fantasy1316 avatar Jul 22 '21 03:07 Fantasy1316

postcss-pixels-to-rem: postcss.plugin was deprecated. Migration guide: https://evilmartians.com/chronicles/postcss-8-plugin-migration

budarin avatar Nov 15 '21 21:11 budarin