Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"mockjs": "^1.1.0",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.47",
"postcss-rem-to-pixel": "^4.1.2",
"prettier": "^3.3.3",
"standard-version": "^9.5.0",
"tailwindcss": "^3.4.14",
Expand Down
11 changes: 11 additions & 0 deletions pnpm-lock.yaml

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

5 changes: 5 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
export default {
plugins: {
tailwindcss: {},
// 解决tailwindcss默认的是rem,rem不会转换为vmin的问题
"postcss-rem-to-pixel": {
rootValue: 16, // 根元素字体大小(默认 16px)
propList: ["*"] // 转换所有属性的 rem 单位
},
// 使用 cnjm-postcss-px-to-viewport 规避 postcss.plugin was deprecated 警告
"cnjm-postcss-px-to-viewport": {
viewportWidth: 375, // 根据设计稿设定
Expand Down