perf(mp): 移除 Zod 依赖,轻量验证替代 — 包体积 -300KB
- 新增 utils/validate.ts 轻量验证工具(<1KB vs Zod 360KB) - daily-monitoring: Zod schema → validateNum() 直接验证 - input: Zod schema → num()/validateStr() 直接验证 - config/index.ts: 移除 Zod include 编译配置 效果:总体积 1.8MB→1.5MB(-17%),pkg-health 分包 432KB→84KB(-81%)
This commit is contained in:
@@ -33,9 +33,7 @@ export default defineConfig(async (merge) => {
|
||||
mini: {
|
||||
compile: {
|
||||
exclude: [],
|
||||
include: [
|
||||
require.resolve('zod').replace(/[\\/]index\.cjs$/, ''),
|
||||
],
|
||||
include: [],
|
||||
},
|
||||
postcss: {
|
||||
pxtransform: { enable: true, config: {} },
|
||||
|
||||
Reference in New Issue
Block a user