Use Case: sveltejs/kit - The SvelteKit Framework
Repository: https://github.com/sveltejs/kit Stack: TypeScript + Svelte Test Date: 2025-12-08 Loctree Version: 0.6.2-dev
Overview
Testing loctree on SvelteKit - validating virtual module resolution ($app/*, $lib/*).
Repository Scale
| Metric | Value |
|---|---|
| Files Scanned | 1,117 |
| Analysis Time | 26.92 seconds |
| Throughput | 41 files/sec |
Findings
Dead Code Detection
- High Confidence: 0
- False Positive Rate: ~0%
Virtual Module Resolution - MAJOR FIX
// Previously flagged as dead (WRONG):
export function enhance() { } // in packages/kit/src/runtime/app/forms.js
// Used via virtual module:
import { enhance } from '$app/forms'; // NOW CORRECTLY RESOLVED!
Version History
| Version | FP Rate | Status |
|---|---|---|
| 0.5.16 | 83% | Virtual modules broken |
| 0.5.17 | 67% | Slightly better |
| 0.6.1-dev | ~100% | REGRESSION |
| 0.6.2-dev | ~0% | FIXED! |
Commands Used
cd SvelteKit
loct # Create snapshot
loct dead --confidence high # Dead code analysis
loct twins # Duplicate detection
Verdict
EXCELLENT - Virtual module resolution is production-ready.
Key Insights
- Virtual Modules:
$app/forms,$lib/*correctly resolved - Framework Magic:
load(),prerenderexports recognized - Major Improvement: From 100% FP to ~0% FP
SvelteKit-Specific Features
Loctree now handles:
$app/forms,$app/navigation,$app/stores$lib/*path aliases+page.server.tsmagic exportsexport const prerender = truepatterns
π ππππππππππ. with AI Agents by VetCoders (c)2024-2026 LibraxisAI