Thanks for the update. This is actually something we're looking at - @opichals has already added support for using 'Terser' to GitHub. It's not available in the default Web IDE yet but I'll hopefully do a new IDE release that includes it really soon now.
The issue you're having is that 'Modules as Functions' inserts the modules into the main code as functions rather than Strings, which means the minifier actually starts minifying them and you get the errors.
You'd hope that closure could be configured to allow certain bits of ES6 but not others, but I haven't been able to do that yet. Perhaps just having a beta option to run Closure with ES6 output would be fine for most cases.
© Espruino, powered by microcosm.
Report a problem