12345678910111213141516171819202122232425262728293031 |
- // module.exports = {
- // plugins: {
- // autoprefixer: {},
- // // https://github.com/evrone/postcss-px-to-viewport/blob/HEAD/README_CN.md
- // // https://www.shangmayuan.com/a/455cef3107c848f9a6190e82.html
- // 'postcss-px-to-viewport': {
- // unitToConvert: 'px', // 需要转换的单位,默认为"px"
- // viewportWidth: 750, // 设计稿的宽度
- // unitPrecision: 4,// 单位转换后保留的精度
- // viewportUnit: 'vw', //(String) 希望使用的视口单位
- // fontViewportUnit: 'vw', //(String) 字体使用的视口单位
- // }
- // }
-
- // }
- // postcss.config.js
- module.exports = {
- plugins: {
- autoprefixer: {},
- // postcss-pxtorem 插件的版本需要 >= 5.0.0
- 'postcss-pxtorem': {
- rootValue({ file }) {
- return 37.5;
- //return file.indexOf('vant') !== -1 ? 37.5 : 75;
- },
- propList: ['*'],
- },
- },
- };
|