perf(bundle): replace broad storage and utils imports

This commit is contained in:
2026-07-14 18:13:55 +08:00
parent e270be9bd9
commit 0033625866
85 changed files with 136 additions and 97 deletions
+12 -5
View File
@@ -24,12 +24,19 @@ The command uses the built-in Next.js Turbopack analyzer and writes:
Compressed sizes below are Turbopack module estimates. `Eager` is the route's synchronous client graph; `async` is code behind at least one dynamic import.
| Route | Eager before | Eager baseline | Change | Async baseline |
| Route | Before direct imports | Eager baseline | Change | Async baseline |
| --- | ---: | ---: | ---: | ---: |
| `/splash` | 644.4 KiB | 644.4 KiB | 0.0 KiB | 14.3 KiB |
| `/chat` | 666.2 KiB | 666.2 KiB | 0.0 KiB | 14.7 KiB |
| `/subscription` | 660.7 KiB | 657.0 KiB | -3.7 KiB | 20.7 KiB |
| `/tip` | 653.9 KiB | 650.4 KiB | -3.5 KiB | 20.7 KiB |
| `/splash` | 647.2 KiB | 646.2 KiB | -1.0 KiB | 14.3 KiB |
| `/chat` | 670.5 KiB | 669.8 KiB | -0.7 KiB | 14.7 KiB |
| `/subscription` | 660.1 KiB | 658.4 KiB | -1.7 KiB | 20.6 KiB |
| `/tip` | 653.3 KiB | 651.6 KiB | -1.7 KiB | 20.6 KiB |
The direct-import pass replaces root `@/utils` and `@/data/storage` barrel
imports with symbol-level module paths. Turbopack already eliminated most unused
barrel exports, so the immediate size reduction is modest. The explicit paths
keep future barrel exports from silently expanding the client graph. Dexie and
UA Parser remain in the analyzed routes through active feature dependencies and
require separate feature-boundary work to remove from the eager graph.
Module loading baseline: