Closed kivenli closed 1 year ago
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)
Postcss plugin not working too!
@lvchenyang I've provided possible workaround here #506
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)