perf: defer heavy modules and add performance baselines

Lazy-load Stripe and the chat reply animation, remove the unused Lottie runtime, and add repeatable bundle and Web Vitals baseline tooling.
This commit is contained in:
2026-07-14 10:55:08 +08:00
parent 0fe74b5371
commit b4904e738b
12 changed files with 846 additions and 31 deletions
+2 -1
View File
@@ -21,6 +21,8 @@
"test:e2e:ui": "playwright test --ui",
"test:e2e:real": "E2E_REAL_BACKEND=1 PLAYWRIGHT_BASE_URL=${PLAYWRIGHT_BASE_URL:-https://frontend-test.banlv-ai.com} E2E_API_BASE_URL=${E2E_API_BASE_URL:-https://proapi.banlv-ai.com} playwright test --project=real-backend",
"test:e2e:prod": "E2E_REAL_BACKEND=1 PLAYWRIGHT_BASE_URL=${PLAYWRIGHT_BASE_URL:-https://cozsweet.com} E2E_API_BASE_URL=${E2E_API_BASE_URL:-https://proapi.banlv-ai.com} playwright test --project=prod-smoke",
"perf:bundle": "next experimental-analyze --output && node scripts/performance/report-bundle.mjs",
"perf:vitals": "node scripts/performance/collect-web-vitals.mjs",
"generate-barrels": "barrelsby --delete -c barrelsby.json"
},
"dependencies": {
@@ -33,7 +35,6 @@
"classnames": "^2.5.1",
"dexie": "^4.4.3",
"esbuild": "^0.25.0",
"lottie-react": "^2.4.1",
"lucide-react": "^1.18.0",
"next": "16.2.7",
"next-auth": "^4.24.14",