1.9 KiB
1.9 KiB
AEG-X-002 — Route Code-Splitting Refactoring
- WBS / Requirement: AEG-X-002 / REQ-PLAT-TOOL
- Classification: behavior-preserving frontend build refactoring
- Selected on: 2026-08-08
Source / Assumption / Unknown / Decision Required
- Source:
frontend/src/app/router.tsand the co-located trackedrouter.jsinitially statically import every route component; the actual 2026-08-08 production build reports a 501.14 kB gzip initial JavaScript chunk. A first TypeScript-only refactoring did not change build output, demonstrating that the Vite resolver uses the co-located JavaScript router entry in this repository. - Assumption: Vue Router's supported lazy route-component function preserves every route path, metadata, guard behavior, and component API while moving feature code out of the initial chunk.
- Unknown: an approved application performance budget is not present. Chunk reduction is an observation, not a performance-gate pass.
- Decision Required: none for this refactoring. Budget approval, visual evidence, and large-list interaction evidence remain separate work.
Change
- Replace route component static imports with lazy
import()factories in both active co-located router entries.
Acceptance Evidence
- All existing route paths and metadata remain unchanged.
pnpm testpassed: 26 files / 58 tests. Preserved output:evidence/AEG-X-002/frontend-regression-route-split_20260808.log.pnpm buildpassed. Preserved output:evidence/AEG-X-002/frontend-build-route-split_20260808.log.- The initial gzip JavaScript chunk changed from 501.14 kB to 423.76 kB and page chunks are emitted separately. Vite still warns because its default raw-size threshold is exceeded; the threshold was not changed and this is not an approved performance-gate pass.
No API, provider, policy, database, capability, or route authorization behavior changes.