Skip to content

perf: reduce ESM bundle and package size - #524

Merged
ghiscoding merged 1 commit into
mainfrom
refactor/audit-build-size
Aug 22, 2026
Merged

perf: reduce ESM bundle and package size#524
ghiscoding merged 1 commit into
mainfrom
refactor/audit-build-size

Conversation

@ghiscoding

Copy link
Copy Markdown
Owner

Summary

  • Optimize the ESM-only build for ES2022 and improve tree shaking
  • Reduce published package size by limiting packaged files
  • Remove embedded source content from JavaScript source maps while preserving declaration maps and source resolution
  • Add gzip and Brotli bundle-size budgets enforced in CI
  • Harden the HTML sanitizer fallback against unsafe output
  • Preserve virtual-scroll behavior and add regression coverage
  • Simplify DOM utilities and avoid redundant layout measurements
  • Remove unnecessary Vite demo configuration

Size impact

  • JavaScript: 47,702 → 46,697 bytes
  • JavaScript gzip: 13,283 → 13,039 bytes
  • JavaScript Brotli: 11,959 → 11,762 bytes
  • npm package: 122,952 → 93,031 bytes (~24% smaller)
  • npm unpacked size: 556,002 → 417,174 bytes (~25% smaller)
  • Tree-shaken utility import: 1,911 → 73 minified bytes

Validation

  • Full Playwright suite: 92/92 passed
  • Security tests passed
  • Bundle-size checks passed
  • Library and demo builds passed
  • TypeScript checks passed
  • Biome formatting and lint checks passed
  • JavaScript and declaration source-map paths verified

LLM

Implementation and review assisted by GPT-5.6 Sol.

@ghiscoding
ghiscoding merged commit 922b9e5 into main Aug 22, 2026
3 checks passed
@ghiscoding
ghiscoding deleted the refactor/audit-build-size branch August 22, 2026 00:01
@github-actions

Copy link
Copy Markdown

🎉 This pull request is included in version 5.2.2 📦
🔗 The release notes are available at: GitHub Release 🚀

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