-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpostcss.config.js
40 lines (37 loc) · 1.86 KB
/
postcss.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
const postcssNormalize = require('postcss-normalize');
// hideNothingWarning: true
// 开发时貌似默认不搞这个,所以会警告,禁止就行了
module.exports = {
sourceMap: false,
plugins: [
// require('postcss-flexbugs-fixes'),
// require('postcss-preset-env')({
// autoprefixer: {
// flexbox: 'no-2009',
// },
// stage: 3,
// }),
postcssNormalize(),
require('tailwindcss')
// 移动端解决方案
// require('postcss-px-to-viewport')({
// unitToConvert: 'px', // 需要转换的单位,默认为"px"
// viewportWidth: 1920, // 视窗的宽度,对应的是我们设计稿的宽度
// viewportHeight: 969, // 视窗的高度,根据375设备的宽度来指定,一般指定667,也可以不配置
// unitPrecision: 13, // 指定`px`转换为视窗单位值的小数位数(很多时候无法整除)
// propList: ['*'], // 能转化为vw的属性列表
// viewportUnit: 'vw', // 指定需要转换成的视窗单位,建议使用vw
// fontViewportUnit: 'vw', // 字体使用的视口单位
// selectorBlackList: ['.ignore-', '.ig-'], // 指定不转换为视窗单位的类,可以自定义,可以无限添加,建议定义一至两个通用的类名
// minPixelValue: 1, // 小于或等于`1px`不转换为视窗单位,你也可以设置为你想要的值
// mediaQuery: false, // 允许在媒体查询中转换`px`
// replace: true, // 是否直接更换属性值,而不添加备用属性
// exclude: [
// ], // 忽略某些文件夹下的文件或特定文件,例如 'node_modules' 下的文件
// landscape: false, // 是否添加根据 landscapeWidth 生成的媒体查询条件 @media (orientation: landscape)
// landscapeUnit: 'vw', // 横屏时使用的单位
// }
// )
],
hideNothingWarning: true
}