From 391742ea6396aac95361cf737cc053bef7ecf0e5 Mon Sep 17 00:00:00 2001 From: danielcopper Date: Thu, 23 Jul 2026 21:33:21 +0200 Subject: [PATCH] build(frontend): strip comments from the production bundle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The @decky/rollup preset ships an unminified ESM bundle and pipes src/ comments verbatim into dist/index.js via @rollup/plugin-typescript, whose removeComments defaults to false. The plugin's dense doc-comments therefore counted against the 800 kB size-limit 1:1 — a budget taxing comment quality, with main sitting at 3.2 kB of headroom. Set removeComments in tsconfig so the TypeScript transpile drops comments from the emitted bundle only. Source is untouched; typecheck (--noEmit) and vitest (own transform) are unaffected. No functional comments exist in src/ (no @license / @preserve / __PURE__ / webpack magic), so nothing load-bearing is lost. Bundle: 799.74 kB -> 512.01 kB. --- tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/tsconfig.json b/tsconfig.json index dc64954e..1df5f197 100755 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "outDir": "dist", "module": "ESNext", + "removeComments": true, "target": "ES2020", "jsx": "react-jsx", "declaration": false,