20 lines
731 B
JavaScript
20 lines
731 B
JavaScript
// module.exports = {
|
||
// plugins: {
|
||
// autoprefixer: {},
|
||
// "postcss-pxtorem": {
|
||
// rootValue: 192, // 根据设计图尺寸写,设计图是1920,就写192
|
||
// propList: ['*'], // 需要被转换的属性
|
||
// // selectorBlackList: ['el'] // 不进行px转换的选择器,不转换element的标签样式,根据自己项目需求来定义
|
||
// }
|
||
// }
|
||
// }
|
||
module.exports = {
|
||
plugins: [
|
||
require("postcss-px2rem-exclude")({
|
||
remUnit: 16, // 基准单位(设计稿 1rem = 16px)
|
||
remPrecision: 6, // 保留 6 位小数
|
||
exclude: /node_modules/,
|
||
minPixelValue: 1 // 大于 1px 才转换
|
||
}),
|
||
]
|
||
} |