| 1234567891011121314151617181920 |
- export default {
- plugins: {
- '@tailwindcss/postcss': {},
- 'postcss-pxtorem': {
- rootValue: 100, // 1rem = 100px
- unitPrecision: 5, // 小数精度
- propList: ['*'], // 所有属性都转换
- selectorBlackList: [
- /^html$/, // 不转换 html 标签
- /^body$/, // 不转换 body 标签
- ],
- replace: true, // 直接替换,不保留 px
- mediaQuery: false, // 不转换媒体查询中的 px
- minPixelValue: 2, // 小于 2px 的不转换(避免 1px 边框问题)
- exclude: /node_modules/i, // 排除 node_modules
- },
- autoprefixer: {},
- },
- }
|