xlcp-frontend/postcss.config.js

16 lines
612 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

module.exports = {
plugins: {
autoprefixer: {},
'postcss-pxtorem': {
rootValue: 16, // 设计稿基准值1rem = 16px
unitPrecision: 5, // rem 的小数位数
propList: ['*'], // 需要转换的属性,* 表示所有属性
selectorBlackList: [], // 忽略的选择器,可以使用正则表达式
replace: true, // 是否替换而不是添加
mediaQuery: false, // 是否在媒体查询中转换 px
minPixelValue: 0, // 设置要替换的最小像素值0 表示所有值都转换
exclude: /node_modules/i // 排除 node_modules 目录
}
}
}