-
-
Notifications
You must be signed in to change notification settings - Fork 80
Expand file tree
/
Copy pathpostcss.config.ts
More file actions
36 lines (36 loc) · 1.07 KB
/
postcss.config.ts
File metadata and controls
36 lines (36 loc) · 1.07 KB
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
// 修改配置后重启服务生效
export default {
plugins: {
// 自动添加浏览器前缀
"autoprefixer": {},
// 移动端适配插件
"postcss-mobile-forever": {
// UI 设计稿宽度
viewportWidth: (file: string) => file.includes("vant") ? 375 : 375,
// 限制视图的最大宽度
maxDisplayWidth: 750,
// 页面最外层选择器
appSelector: "#app",
// 是否对「页面最外层选择器」对应的元素进行描边
border: true,
// 转换单位后保留的小数点位数
unitPrecision: 3,
// 转换后的单位
mobileUnit: "vw",
// 需要转换的属性
propList: ["*"],
// 忽略的选择器
selectorBlackList: [".ignore", ".keep-px"],
// 忽略的属性
propertyBlackList: {
".van-icon": "font"
},
// 忽略的属性值
valueBlackList: ["1px"],
// 忽略的目录或文件
exclude: [],
// 包含块是根元素的选择器列表
rootContainingBlockSelectorList: [".van-tabbar", ".van-popup"]
}
}
}