mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-14 06:40:50 +00:00
fix(dashboard): split module maps into client-safe module to unblock build
The settings dashboard-layout client component imported WIDGET_MODULE_BY_ID from @/lib/dashboard/snapshot, which transitively pulls the server snapshot builder -> lib/db -> @prisma/adapter-pg -> pg -> node:dns. Turbopack tried to bundle pg for the browser and failed (Module not found: Can't resolve 'dns'), breaking next build and therefore e2e and both Docker arch builds. Move the two pure data maps (WIDGET_MODULE_BY_ID, SUMMARY_TYPE_MODULE) into @/lib/dashboard/widget-modules, which imports only the ModuleKey and MeasurementType types. snapshot.ts re-exports both for the server call sites and the existing tests; the client component imports from the new module.
This commit is contained in:
1 parent
0dbb70134c
commit
2057cb9d2b
3 files changed
+75
-42
No files matched your search
@@ -50,7 +50,7 @@ import {
|
||||
} from "@/components/ui/select";
|
||||
import { apiDelete, apiGet, apiPut } from "@/lib/api/api-fetch";
|
||||
import { useAuth } from "@/hooks/use-auth";
|
||||
import { WIDGET_MODULE_BY_ID } from "@/lib/dashboard/snapshot";
|
||||
import { WIDGET_MODULE_BY_ID } from "@/lib/dashboard/widget-modules";
|
||||
|
||||
/**
|
||||
* v1.4.47 W4 — pure reorder helper shared by the arrow buttons and the
|
||||
|
||||
Reference in new issue
Block a user