[Bug] esbuild.pure strips console.error in production builds #145
Labels
No labels
blocked:depends-p1
blocked:gate-research
blocked:lint-failed
blocked:needs-decision
blocked:needs-human
blocked:verify-failed
bug
data-loss
documentation
enhancement
feature-request
in-progress
needs-decompose
needs-triage
pwa
quickfix
security
security/high
security/medium
test
test-coverage
triage-approved
vault
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/kimi_agent_kin_app_sync#145
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
The Vite config at
vite.config.tssetsesbuild.pure: ["console.error"], which strips allconsole.error()calls from the production bundle. This means every runtime error in production is invisible — no stack traces, no error logging to any monitoring tool, no way for developers to diagnose user-reported crashes.Impact
AddPersonDrawerbug (#147) — the JS errors from the broken button click were swallowed with no console outputLocation
vite.config.tsline 14-16:Fix
Remove the
esbuild.pureoption entirely, or scope it to production builds only and wire a proper error reporting call instead of stripping:Or better, replace with a dedicated error-reporting service that captures errors without suppressing them entirely.
Already fixed — was removed from vite.config.ts during the lazy-load crash fix. Console errors now visible in dev mode.
Already fixed — esbuild.pure was removed from vite.config.ts during the lazy-load crash fix.