You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What's happening
I want to add a postcss plugin named "postcss-pxtorem“ in config file to convert px unit to rem, but it donsen't work What should happen
Should make the px unit convert to rem.
What's happening
I want to add a postcss plugin named "postcss-pxtorem“ in config file to convert px unit to rem, but it donsen't work
What should happen
Should make the px unit convert to rem.
To reproduce
Config list below:
const CracoLessPlugin = require("craco-less");
module.exports = {
plugins: [{ plugin: CracoLessPlugin }],
style: {
postcss: {
mode: "extends",
loaderOptions: {
postcssOptions: {
ident: "postcss",
plugins: [
[
"postcss-pxtorem",
{
rootValue: 375 / 10,
},
],
],
},
},
},
},
};
and I also test other config:
module.exports = {
plugins: [{ plugin: CracoLessPlugin }],
style: {
postcss: {
mode: "extends",
plugins: [
require("postcss-pxtorem")({
rootValue: 375 / 10,
propList: ["*"],
}),
],
},
},
};
Also dosen't work, I can confirm the CracoLessPlugin works, but i realy dont' know why the postcss-pxtorem dosen't work,
CRACO version
"@craco/craco": "^7.0.0",
"postcss": "^8.4.22",
"postcss-pxtorem": "^5.1.1",
Additional information
(anything else that could be useful for us to help you solve your problem)
The text was updated successfully, but these errors were encountered: