Skip to content

Commit

Permalink
chore: 配置 autoprefixer 和 browserslist
Browse files Browse the repository at this point in the history
  • Loading branch information
pany-ang committed Feb 12, 2025
1 parent 2179eb2 commit 48f3e82
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"@unocss/preset-rem-to-px": "65.4.3",
"@vant/auto-import-resolver": "1.2.1",
"@vitejs/plugin-vue": "5.2.1",
"autoprefixer": "10.4.20",
"eslint": "9.20.0",
"eslint-plugin-format": "1.0.1",
"husky": "9.1.7",
Expand All @@ -45,5 +46,8 @@
},
"lint-staged": {
"*": "eslint --fix"
}
},
"browserslist": [
"defaults"
]
}
36 changes: 36 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions postcss.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// 修改配置后重启服务生效
export default {
plugins: {
// 自动添加浏览器前缀
"autoprefixer": {},
// 移动端适配插件
"postcss-mobile-forever": {
// UI 设计稿宽度
viewportWidth: (file: string) => file.includes("vant") ? 375 : 750,
Expand Down

0 comments on commit 48f3e82

Please sign in to comment.