The Hidden Cost of Import Chains
dev.to
You open a seemingly simple file in your codebase: // src/api/user-profile.ts (52 lines) import { validateUser } from './validators'; import { formatResponse } from './formatters'; import { logRequest } from './logger'; export async function getUserProfile(userId: string) { validateUser(userId); const user = await fetchUser(userId); logRequest('getUserProfile', userId); return formatResponse(user); } Looks clean, right? Just 52 lines, three imports, straightforward logic. But w