--js flag seems to be broken
Closed this issue · 5 comments
am97 commented
Hello,
Since minify v5.2.0, the --js
flag seems to no longer work. For example:
$ cat << EOT > hello.js
const hello = 'world';
for (let i = 0; i < hello.length; i++) {
console.log(hello[i]);
}
EOT
$ cat hello.js | minify --js
Promise { <pending> }
With minify v5.1.1 I get the expected result:
$ cat hello.js | minify --js
const hello="world";for(let l=0;l<hello.length;l++)console.log(hello[l]);
A workaround for minify v5.2.0 and v6.0.0 is to not use the --js
flag
$ minify hello.js
const hello="world";for(let l=0;l<hello.length;l++)console.log(hello[l]);
coderaiser commented
am97 commented
Yes, it is working now, thank you !
vitek-dev commented
Same issue on 11.2.1
coderaiser commented
@vitek-dev how it works for you?
coderaiser commented
I cannot reproduce this:
coderaiser@localcmd:~/minify$ echo 'if (a) alert()' | minify --js
a&&alert();