I'm searching a Flask-Assets
filter that allows me to uglify javascript and support ES6 syntax. I tried to use uglifyjs-es
binary instead of uglifyjs
but I can't figure out how to configure my filter to use the uglifyjs-es
binary.
I've this:
my_app_js = Bundle(
'js/MyApp.js',
filters='uglifyjs',
output='my_app_js.js'
)
From the Webassets documentation :
UglifyJS is an external tool written for NodeJS; this filter assumes that the uglifyjs executable is in the path. Otherwise, you may define a UGLIFYJS_BIN setting
Maybe the solution is there but I can't figure out where and how to change that UGLIFYJS_BIN
setting, any idea ?
Also, I read here that uglifyjs-es
project isn't maintenained anymore. terser seems to be the alternative, but could it be used as a filter too ?
Edit
If you know a good alternative to uglifyjs-es
with a code example, you win a bounty ;)