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

refactor(router): use # for private props to reduce the minified bundle size #3660

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

EdamAme-x
Copy link
Contributor

Related: #3596

Bundle Size

19.2kb => 18.7kb (1kb = 1024b)
0.5kb less

gitpod@honojs-hono-3kgrjey8wtg:/workspace/hono/sandbox$ ls . -l
total 40
-rw-r--r-- 1 gitpod gitpod 18767 Nov 12 04:19 after.js
-rw-r--r-- 1 gitpod gitpod 19211 Nov 12 04:05 before.js

The author should do the following, if applicable

  • Add tests
  • Run tests
  • bun run format:fix && bun run lint:fix to format the code
  • Add TSDoc/JSDoc to document the code

Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.69%. Comparing base (7e17b76) to head (c099418).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3660   +/-   ##
=======================================
  Coverage   91.69%   91.69%           
=======================================
  Files         159      159           
  Lines       10138    10140    +2     
  Branches     2976     2878   -98     
=======================================
+ Hits         9296     9298    +2     
  Misses        840      840           
  Partials        2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@yusukebe yusukebe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@yusukebe
Copy link
Member

@EdamAme-x

Nice work! Thanks!

@yusukebe yusukebe merged commit 7b30835 into honojs:main Nov 12, 2024
16 checks passed
@EdamAme-x
Copy link
Contributor Author

EdamAme-x commented Nov 13, 2024

The bundle size is definitely smaller🎉 (1kb less from 4.6.8)
image

@yusukebe
Copy link
Member

Super cool! Great job @EdamAme-x !

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.

2 participants