Open Kilims opened 3 years ago
I use like bellow in rollup.config.js
var pxtorem = require("postcss-pxtorem");
import postcss from "rollup-plugin-postcss";
export default {
input: "src/index.ts",
output: {
dir: "build",
format: "es",
sourcemap: true,
preserveModules: true,
preserveModulesRoot: "src",
},
plugins: [
postcss({
minimize: true,
plugins: [
pxtorem({
rootValue: 16,
unitPrecision: 6,
propList: ["*"],
}),
]
})
]
};
I have met the same issue,My project has two sets of UIs, one is vant and another is element-plus,i want to make pxto rem in vant , then i try to set selectorBlackList: [ '.el-']
and don‘t set html fontsize to making px to rem invalid, However, this method does not work for CSS variables,So I put up an issue and I hope someone can help me answer it。
by using this plugin , with webpack + antd/antd-mobile, my webpack.config.js will be :
which works well
by how to use this plugin by using rollup ?