Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(tracker): use terser for minification #111

Merged
merged 6 commits into from
Aug 2, 2024
Merged

perf(tracker): use terser for minification #111

merged 6 commits into from
Aug 2, 2024

Conversation

ayuhito
Copy link
Member

@ayuhito ayuhito commented Aug 2, 2024

This replaces Google Closure Compiler with Terser to minify the tracking code which significantly improved bundle size.

File Size Compressed (gzip) Compressed (brotli)
default.js (old) 1775 bytes (1.73kb) 895 bytes (0.87 KB) 733 bytes (0.72 KB)
default.js (new) 1583 bytes (1.55kb) 792 bytes (0.77 KB) 642 bytes (0.63 KB)

Additionally, since Closure Compiler was the only dependency we had that could not run on Bun, we can completely remove any references to Node.js in this whole repository for a much simpler development experience (this caused problems in CI previously).

tracker/scripts/size.mjs Dismissed Show dismissed Hide dismissed
tracker/scripts/size.mjs Dismissed Show dismissed Hide dismissed
@ayuhito ayuhito merged commit 3b67322 into main Aug 2, 2024
7 checks passed
@ayuhito ayuhito deleted the tracker/terser branch August 2, 2024 13: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