Android-components: Minify WebExtension js/css files in release builds

Created on 7 Mar 2019  ·  3Comments  ·  Source: mozilla-mobile/android-components

Easiest way is to just do this for third-party libs and swap out the files. If we want to do this for our own js/css file in WebExtensions, then we have to bring in a build tool / gradle plugin.

<web-extensions> 🏗️ build 🐉 Fenix 🔎 Needs investigation

Most helpful comment

We want to minify the js/css files just for the release builds (not the source code) this way we can reduce the final apk size :)

All 3 comments

As an add-on developer, I've always left JS/CSS resources unminified and relished it. I'm surprised to see a different approach here. What's the benefit of minifying in this case?

We want to minify the js/css files just for the release builds (not the source code) this way we can reduce the final apk size :)

Got it, yeah, it surprises me that's worth the effort, but perhaps I underestimate the gains when an app is used by millions of people.

Was this page helpful?
0 / 5 - 0 ratings