chore(mcp): drop sourcemap output from the published build - #106
Merged
Conversation
Nothing consumes it: Node doesn't read `.map` for stack traces without `--enable-source-maps` (not set anywhere in the bin), and the error path (dispatch.ts, index.ts's log()) only ever surfaces `.message`, never `.stack`. Meanwhile the map file outweighs the code it maps (679KB vs 317KB) and ships to npm since `files` includes `dist`, roughly doubling install size for a benefit nobody can reach today. Matches the direct competitor (figma-developer-mcp) and the official reference server implementation, neither of which ship one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sourcemap: truefrompackages/mcp/tsdown.config.ts— nothing consumes the.maptoday: Node only reads sourcemaps for stack traces with--enable-source-maps(not set anywhere in the bin), and the error path (dispatch.ts,index.ts'slog()) only ever surfaces.message, never.stack.filesincludesdist, roughly doubling published package size for a benefit nobody can currently reach.figma-developer-mcp) and the official@modelcontextprotocol/server-filesystemreference implementation both ship without one. (@sentry/mcp-serveris the one counterexample, but that's because Sentry's own SDK has its own sourcemap-consuming pipeline for crash reporting — a consumer Figwright doesn't have.)minifywas evaluated too (tested: 317KB → 197KB) and deliberately left off — the same "can the user actually feel it" bar that killed the plugin'ssideEffects: falseproposal applies here, and minifying would also wreck the one fallback we still have (manually reading a reporteddist/index.mjs:LINEagainst the readable, unminified bundle).Test plan
pnpm build— dist now contains onlyindex.mjs(317KB), no.mappnpm typecheck && pnpm lint && pnpm format:check && pnpm knip— all passpnpm test— 172 files / 1212 tests pass