Fix Docker build failure caused by server-only import reaching client bundle #123

Merged
chrisp merged 1 commit from claude/docker-build-output-vjywdf into main 2026-07-01 22:54:33 +00:00
Owner

scoring-event.ts exported getEventTypeLabel, a pure display helper used
directly in route components, from the same module that imports
scoring-calculator.ts (which now pulls in the Discord notification
service, a .server-only module). Because that whole chain was
value-imported into the client bundle, Vite's server-only-module guard
failed the build. Move getEventTypeLabel into a new client-safe
scoring-event-types.ts module with no server dependencies, and import
it directly where it's rendered.

scoring-event.ts exported getEventTypeLabel, a pure display helper used directly in route components, from the same module that imports scoring-calculator.ts (which now pulls in the Discord notification service, a .server-only module). Because that whole chain was value-imported into the client bundle, Vite's server-only-module guard failed the build. Move getEventTypeLabel into a new client-safe scoring-event-types.ts module with no server dependencies, and import it directly where it's rendered.
chrisp added 1 commit 2026-07-01 22:47:03 +00:00
Fix Docker build failure caused by server-only import reaching client bundle
All checks were successful
🚀 Deploy / 🧪 Test (pull_request) Successful in 3m3s
🚀 Deploy / ʦ🔍 Typecheck & Lint (pull_request) Successful in 1m19s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
ef7a71485c
scoring-event.ts exported getEventTypeLabel, a pure display helper used
directly in route components, from the same module that imports
scoring-calculator.ts (which now pulls in the Discord notification
service, a .server-only module). Because that whole chain was
value-imported into the client bundle, Vite's server-only-module guard
failed the build. Move getEventTypeLabel into a new client-safe
scoring-event-types.ts module with no server dependencies, and import
it directly where it's rendered.
chrisp merged commit f527fc8f7f into main 2026-07-01 22:54:33 +00:00
chrisp deleted branch claude/docker-build-output-vjywdf 2026-07-01 22:54:33 +00:00
Sign in to join this conversation.
No description provided.