Skip to content

fix: stop shipping unreferenced branding images in store zips - #41

Merged
pedrosousa13 merged 2 commits into
mainfrom
fix/strip-unreferenced-icons
Jul 23, 2026
Merged

fix: stop shipping unreferenced branding images in store zips#41
pedrosousa13 merged 2 commits into
mainfrom
fix/strip-unreferenced-icons

Conversation

@pedrosousa13

Copy link
Copy Markdown
Owner

Problem

copyStatic() in scripts/build.mjs copied the entire icons/ directory into dist/, so every store zip shipped:

  • icons/JSON-Alexander.png — 435 KB, referenced nowhere
  • icons/json-bonsai.webp — 100 KB, README hero image only

That was ~80% of the package: 666 KB → 130 KB after this change. AMO reviewers also flag unused files.

Change

Copy only the three icons the manifest references (icon16/48/128.png) instead of the whole directory. Repo files are untouched — the README still uses icons/json-bonsai.webp.

Verification

  • npm run packageunzip -l json-bonsai-chrome.zip lists exactly: manifest, 3 bundles, content.css, 3 icons (8 files, 130 KB)
  • npm test and npm run typecheck green

icons/ also holds README branding images (JSON-Alexander.png,
json-bonsai.webp); cpSync of the whole directory shipped ~530KB of
unreferenced assets in every store zip.
@pedrosousa13
pedrosousa13 merged commit 9802224 into main Jul 23, 2026
2 checks passed
@pedrosousa13
pedrosousa13 deleted the fix/strip-unreferenced-icons branch July 23, 2026 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant