perf(client): defer chat persistence dependencies

This commit is contained in:
2026-07-15 17:58:06 +08:00
parent 86ffbbcdbc
commit 05ca15be48
15 changed files with 115 additions and 81 deletions
+12 -4
View File
@@ -17,13 +17,21 @@ const routes = parseList(
const enforceBudgets = process.env.PERF_BUNDLE_ENFORCE === "1";
const eagerClientJsBudgets = new Map([
["/splash", 650 * 1024],
["/chat", 675 * 1024],
["/subscription", 665 * 1024],
["/tip", 660 * 1024],
["/splash", 605 * 1024],
["/chat", 645 * 1024],
["/subscription", 625 * 1024],
["/tip", 620 * 1024],
]);
const auditTargets = [
{
name: "UA parser",
matches: (path) => path.includes("/node_modules/ua-parser-js/"),
},
{
name: "Dexie",
matches: (path) => path.includes("/node_modules/dexie/"),
},
{
name: "Stripe React SDK",
matches: (path) => path.includes("/node_modules/@stripe/react-stripe-js/"),