From 05e3e7c1358d4f8c41ffe2bc90e6107ca60ba4b0 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 6 Jul 2026 03:10:30 +0000 Subject: [PATCH] fix(build): stop publishing dangling source/declaration maps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The published tarball ships `dist` only (package.json "files"), not `src`, but the build emitted .js.map and .d.ts.map files that all reference ../src/*.ts. Those source files are absent from the package, so every map was a dangling pointer: debugger source mapping and IDE "Go to Definition" (the whole purpose of declaration maps) resolved to files that don't exist. Disable sourceMap and declarationMap in tsconfig.build.json (keeping declaration:true — the .d.ts types are public API). This removes 12 broken map files from the tarball and cuts unpacked size 49.5kB -> 28.6kB. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_0121jPWdufr9tbgebBZAa5f9 --- tsconfig.build.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tsconfig.build.json b/tsconfig.build.json index 3f5e5ea..a6a3194 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -1,5 +1,14 @@ { "extends": "./tsconfig.json", + "compilerOptions": { + // The published tarball ships `dist` only (see package.json "files"), not + // `src`. Emitting source maps / declaration maps here would ship dangling + // pointers to `../src/*.ts` that don't exist in the package, breaking + // debugger source mapping and IDE "Go to Definition". Keep `declaration` + // (the .d.ts types are part of the public API) but drop the maps. + "sourceMap": false, + "declarationMap": false + }, "include": ["src/**/*.ts"], "exclude": ["node_modules", "dist", "src/__tests__", "vitest.config.ts"] }