From 61c2b6214103b343366761006d2c0f12bf61e50b Mon Sep 17 00:00:00 2001 From: ergosteur Date: Thu, 20 Aug 2026 15:36:00 -0400 Subject: [PATCH] fix: stop shipping source comments in the server bundle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `tsc` keeps comments by default, so the doc comment in archive-grouping.ts describing the sidecar layout was emitted into dist-server and copied into the runtime image. Every published container image on ghcr carries it — verified by pulling the dist-server layer of :latest and grepping it: app/src/lib/archive-grouping.js:10: * -> posts (base) That comment names real archived accounts, which is exactly what main was redacted to remove, so the redaction was incomplete while the build kept re-emitting them. The frontend was never affected: Vite strips comments, and the 432K dist layer greps clean. --removeComments takes dist-server from 0 comment lines. docs/ was never at risk; the multi-stage build copies only dist/ and dist-server/ into runtime. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01UXfdJu7QhSJLr47K7koTDF --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index edd84c6..7066b53 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "dev": "vite --port=3000 --host=0.0.0.0", "build": "vite build && npm run build:server", - "build:server": "tsc server.ts --esModuleInterop --module ESNext --target ES2022 --moduleResolution bundler --outDir dist-server", + "build:server": "tsc server.ts --esModuleInterop --module ESNext --target ES2022 --moduleResolution bundler --removeComments --outDir dist-server", "preview": "vite preview", "server": "tsx server.ts", "clean": "rm -rf dist",