-
I have found two apps breaking with the new minification switch: imageclock and gpstrek.
Imageclock breaks because the code generated by the customizer (and evaled in the app) references things that have been renamed by the minifier. What is the best way around this? Defining those globally and deleting them on remove?
In gpstrek the minifier generates code like
for (let a of a.getPoints()) {
which not surprisingly results inUncaught Error: Cannot read property 'getPoints' of undefined
.a
is a function parameter in this case before getting redefined in the for loop.Edit: During experimenting with iconlaunch the minifier generated a constant named
g
into a block of code callingBangle.load
which in turn callsg.reset()
. That then fails because of the minifier-generated constant.
Ok, just added this to the dev app-loader as a setting. It broke the 'app.settings.js' files because their format meant the JS didn't have side-effects, so I had to do a quick hack to disable that. Otherwise it seems to work ok with the default apps - I'd be interested to see if it stops any from working.
Quick tip: You can change the setting and then do
Reinstall apps
to try everything with the changed firmwareedit: did a quick check with Anton clock and it doesn't appear to make any real difference to speed, but other apps may benefit...