Is it possible to minify Baby Buddy's javascript? #491
Replies: 2 comments
-
Hm yeah it looks CF is stripping something extra out of the combined vendor JS. I haven’t reviewed the static files tooling in ages so there are probably advancements there we are not taking advantage of. I’m gonna convert this to an issue — worth looking at closer. |
Beta Was this translation helpful? Give feedback.
-
For a past project based on PHP/nodejs I used UglifyJS to compress down the static JS files. An example of UglifyJS's compression can be found here: https://www.keycdn.com/support/uglifyjs In researching something similar for Django, it appears that Django Compressor supports an UglifyJS wrapper and a number of JS compressors. At a glance, Django Compressor appears to be a promising tool to compress javascript. I wish I could write a PR for this but I have zero experience working with frameworks like Django and little time to learn Django, currently. |
Beta Was this translation helpful? Give feedback.
-
Using Cloudflare with Baby Buddy, Baby Buddy running inside of Docker with an external reverse proxy, Cloudflare is able to minify about 80 KiB from the vendor JS file.
Would it be possible to have everyone run a minified vendor JS file? Minified files generally run quicker and can reduce power consumption when on mobile compared to non-minified JS files.
I am curious if it is possible to share the benefits of the minified JS with those not using Cloudflare?
Before and after screenshots are attached, using https://web.dev/measure to verify the Cloudflare JS minification.
Beta Was this translation helpful? Give feedback.
All reactions