build(ui): drop sourcemaps from prod bundle #153
Reference in New Issue
Block a user
Delete Branch "feature/ui-drop-prod-sourcemaps"
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?
The production UI build shipped
.mapfiles carrying fullsourcesContent, and the gateway/landing images servedist/verbatim — so anyone could fetch/app/assets/main-*.js.map(same assets under/vk/,/telegram/) and reconstruct the entire TypeScript/Svelte source at the edge.Change: gate
build.sourcemapoff formode === 'production'invite.config.ts. Dev and themocke2e build (vite build --mode mock) keep maps for debugging. Posture documented in ARCHITECTURE.md §12.Verified locally:
pnpm checkclean;pnpm build(prod) emits no.map;vite build --mode mockstill emits maps;pnpm test:unit361/361.Context: this is workstream A of the per-target-bundle investigation — the high-value anti-RE fix. The per-target split (B) was assessed and deferred (size win ~1-3 kB gz; vk-bridge already lazy-split, Telegram SDK external).