Allow to provide minifier (Terser) options
bootleq opened this issue · comments
莊喬 commented
Hi, I have some scripts use return
on top level thus can't be converted.
Then I find we can tell Terser to enable bare_returns
to accept it.
https://github.com/terser/terser#parse-options
Would it be good to add a CLI option like --minify
to delegate to Terser?
I am willing to prepare a PR, maybe introduce yargs to help handling the options.