perf(build): stop publishing sourcemaps (50.0MB → 16.6MB)#208
Merged
Conversation
dist/index.js.map and dist/cli.js.map were ~17MB each — 34MB of a 50MB install, 68% of the tarball — downloaded by everyone who runs npx @blockrun/clawrouter or installs anything depending on us. sourcemap: true stays in tsup.config.ts; maps are still generated for local debugging and CI, they just no longer ship. The bundles keep their sourceMappingURL comment; a missing map is silently ignored at runtime. Verified the packed tarball runs normally and under node --enable-source-maps. Found while auditing why @blockrun/mcp paid ~50MB (~15% of its install tree) for a router it never called.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe package version is bumped to ChangesRelease packaging
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Why
Two thirds of what we publish is sourcemaps.
dist/index.js.mapdist/cli.js.mapEvery
npx @blockrun/clawrouter, every OpenClaw plugin install, and every package that depends on us pays that.What
"!dist/**/*.map"in package.jsonfiles.50.0MB → 16.6MB unpacked (3.4MB packed, 41 files).
sourcemap: truestays intsup.config.ts— maps are still generated for local debugging and CI, they just don't ship. The bundles keep their//# sourceMappingURL=comment; a missing map is silently ignored at runtime.Verified
Installed the packed tarball fresh:
No behaviour change.
Context
Found while auditing why
@blockrun/mcpwas paying ~50MB — about 15% of its whole 328MB install tree — for a router it never called. See blockrun-llm-ts#11, which stops installing ClawRouter for consumers that don't route. This change cuts the cost for everyone who does install it.Summary by CodeRabbit