Skip to content

Conversation

@Master-Hash
Copy link

@Master-Hash Master-Hash commented Oct 23, 2025

This PR reduces the bundle size using # for the private properties instead of the private keyword when the code is minified.

The results of esbuild ./rapier.js --bundle --minify --target=esnext --format=esm --outfile=out.js:

-a---          2025/10/23    19:36         112241 old.js
-a---          2025/10/23    20:12         111075 new.js

which is about 1.04% smaller. If you can find more private methods/property, It can be even smaller.

The principle is explained here.

The PR is tested on my own app.

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