Move Server-Only Code to $lib/server #2

Closed
opened 2026-04-03 12:22:13 +02:00 by schreifuchs · 0 comments
Owner

Where: src/lib/auth.ts
Why: It imports from ./server/db. Keeping server-side dependencies in the general $lib folder risks accidental imports by client components, breaking the Vite build and potentially leaking server logic.
Fix: Move and rename it to src/lib/server/session.ts (or authUtils.ts) and update imports in .server.ts files.

**Where:** `src/lib/auth.ts` **Why:** It imports from `./server/db`. Keeping server-side dependencies in the general `$lib` folder risks accidental imports by client components, breaking the Vite build and potentially leaking server logic. **Fix:** Move and rename it to `src/lib/server/session.ts` (or `authUtils.ts`) and update imports in `.server.ts` files.
schreifuchs added the ai-generated label 2026-04-03 12:26:21 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: schreifuchs/aktiteil#2