It looks like the terser config is tool agressive and although I researched the options I didn't find a reasonable way for it to not to strip the onInit() method if not called (having the top_level mangling on at the same time for the best compression ratio).
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
@Gordon There is https://github.com/espruino/EspruinoTools/pull/80 which I'd appreciate getting feedback on. Would that be a way to go to integrate or are other ideas, requirements or comments.
One known issue: