Hi,
I use for minifying js https://lib.haxe.org/p/uglifyjs/ which is pretty good until I used in my JS app https://lib.haxe.org/p/jsasync/ library.
At minifying my js output i got this error:
Parse error at ../project/main.js:146,34
AsyncAwait.fetchURLAsText = async function(url,data) {
^
ERROR: Unexpected token: keyword «function», expected: punc «;»
at JS_Parse_Error.get (eval at <anonymous> (/usr/local/lib/node_modules/uglify-js/tools/node.js:18:1), <anonymous>:71:23)
at fatal (/usr/local/lib/node_modules/uglify-js/bin/uglifyjs:394:27)
at run (/usr/local/lib/node_modules/uglify-js/bin/uglifyjs:343:9)
at Object.<anonymous> (/usr/local/lib/node_modules/uglify-js/bin/uglifyjs:259:5)
at Module._compile (node:internal/modules/cjs/loader:1119:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1173:10)
at Module.load (node:internal/modules/cjs/loader:997:32)
at Module._load (node:internal/modules/cjs/loader:838:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:18:47
Code works fine without minifying.
Did you already meet with the same problem and what do you recommend to fix it, please?