Files
everything-is-suitable/everything-is-suitable-uniapp/vite.config.ts
T
zhangxiang 810081ac0a feat: 小程序端 UI 优化与纯客户端化改造
- 移除微信订阅推送功能(云函数/订阅管理页),回归纯客户端零后端架构
- 新增今日黄历默认展示卡片 TodayAlmanacCard(9 语言翻译)
- i18n 修复:启用 globalInjection 修复 $t 未注入,插值消息全部改为
  Messages Functions 适配小程序端(63 处)
- 修复底部导航切换失效与运势页数据不刷新
- 统一设计令牌(深褐主色 + 印红强调色),组件 UI 规范重构
- 图标 iconfont 化(FontAwesome 子集化,修复 Android 豆腐块)
- 新增 postcss-px2rpx 机型自适应(仅 mp-weixin 构建生效)
- 新增 5 个用户旅程 E2E 测试(31 用例)与验收报告
- 补充微信小程序项目配置(appid)
2026-08-28 07:51:02 +08:00

32 lines
773 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { defineConfig } from 'vite'
import Uni from '@dcloudio/vite-plugin-uni'
import px2rpx from 'postcss-px2rpx'
const uniPlugin = Uni.default || Uni
// 仅微信小程序构建启用 px→rpx 自适应转换(H5/其他端保持 px)
// 标准换算:375 设计稿基准,1px = 2rpxpostcss-px2rpx rpxUnit=0.5
const isMpWeixin = process.env.UNI_PLATFORM === 'mp-weixin'
export default defineConfig({
plugins: [...uniPlugin()],
css: {
postcss: isMpWeixin
? {
plugins: [
px2rpx({
rpxUnit: 0.5,
minPixelValue: 1,
mediaQuery: false,
}),
],
}
: undefined,
preprocessorOptions: {
scss: {
api: 'modern-compiler'
}
}
}
})