perf: stop shipping the source map in published dist/#192
Merged
Conversation
Drop --source-map from the `build` script so the released bundle no longer ships dist/index.js.map (~7.5MB) or the sourcemap-register.js shim. Add a `build:debug` script that keeps the map for local bundle debugging only. The release-v1 job now runs `rm -rf dist` before building and stages with `git add -A -f dist/`, so the stale map/shim already committed on main are removed on the next release. Closes #161.
# Conflicts: # .agents/known-issues.md # .agents/security.md
# Conflicts: # .agents/known-issues.md
Contributor
Contributor
🔬 TestGlance✅ 740 passed across 1 job — 100.0% · ⏱️ 3.3s
🟡 test — details✅ 740 passed
vs
Updated 2026-07-05T20:13:02.558Z |
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
Stops shipping the ~7.5MB source map (and its
sourcemap-register.jsshim) in the publisheddist/, which every consumer oftestglance/action@v1downloads on each run. Closes #161.Changes
package.json:builddrops--source-map; newbuild:debugkeeps it for local bundle debugging only..github/workflows/ci.yml(release-v1):rm -rf distbefore build +git add -A -f dist/, so the stale map/shim already committed onmainare removed on the next release..agents/build-and-release.md,.agents/security.md, and marked known-issue D as Fixed.Impact
Committed/checked-out
dist/drops from ~14.2MB to ~6.6MB (~7.2MB, ~53%, removed per consumer checkout). Nosrc/or test changes.Test plan
pnpm build→dist/contains onlyindex.js+licenses.txt(no map/shim);sourcemap-registerrequire gone fromindex.jspnpm build:debug→ map + shim reappearpnpm test(737 passed),pnpm typecheck,pnpm lint,pnpm format:checkall pass