vanjs-org / van

🍦 VanJS: World's smallest reactive UI framework. Incredibly Powerful, Insanely Small - Everyone can build a useful UI app in an hour.
https://vanjs.org
MIT License
3.77k stars 87 forks source link

van minification #347

Closed sirenkovladd closed 1 month ago

sirenkovladd commented 1 month ago

Small changes that make vanjs smaller min.js 2035B -> 1976B (59 bytes)

min.js.gz 1078B -> 1070B (8 bytes)

image

image

✅ Test passed

Tao-VanJS commented 1 month ago

Thanks for the contribution! I will find some time to merge it and do a release.

Tao-VanJS commented 1 month ago

Actually, the gzipped minified bundle size increases after I applied the changes in the PR. In 1.5.0, I can get the size of 1055 bytes in the minified bundle. But after applying changes in this PR, it increases to 1070 bytes.

I'm using Apple gzip 428, running in macOS 14.1.1 (Sonoma), Apple M1.

Tao-VanJS commented 1 month ago

I broke down all the changes in this PR and made the changes that are helpful for the size reduction.

1.5.1 was released for the change.