fix(tz): split pure helpers out of resolver to keep client bundle clean

`@/lib/tz/resolver` imported `prisma` at module top so any client
component that pulled `detectBrowserTimezone`, `listSupportedTimezones`,
`formatInUserTz`, `userDayKey`, or `DEFAULT_TIMEZONE` dragged
`node:module` into the browser bundle and broke the Turbopack build
(register page, timezone picker, admin general/login sections,
`@/lib/export`).

Pure helpers now live in `@/lib/tz/format` (no Prisma). The resolver
re-exports them so every server-side caller keeps its
`@/lib/tz/resolver` import path; the four client modules + the
export helper now import from `./format` directly.
This commit is contained in:
Marc-André Bombeck committed 2026-05-14 18:57:52 +02:00
1 parent ee560a435c
commit 7bede83d22
7 files changed
+251 -226

No files matched your search

+1 -1
View File
@@ -24,7 +24,7 @@ import { Label } from "@/components/ui/label";
import {
detectBrowserTimezone,
listSupportedTimezones,
} from "@/lib/tz/resolver";
} from "@/lib/tz/format";
import { useTranslations } from "@/lib/i18n/context";
const NATIVE_SELECT_CLASS =