kangax / html-minifier

Javascript-based HTML compressor/minifier (with Node.js support)
http://kangax.github.io/html-minifier/
MIT License
4.94k stars 571 forks source link

No support for ES6 features #1054

Closed pPanda-beta closed 2 years ago

pPanda-beta commented 4 years ago

I guess the version of uglifyjs doesn’t support es6.

Minimalistic test data :

<script>
const x = 123;
const y = () => {
    console.log("Nothing");
};
</script>

Expected output:

<script>const x=123,y=()=>{console.log("Nothing")};</script>

Suggestions: Please use babel-minify along with uglifyjs.

DanielRuf commented 4 years ago

Please see https://github.com/kangax/html-minifier/issues/1040

DanielRuf commented 4 years ago

uglifyjs.

This does not support ES6. And uglify-es has also many issues. terseris the new solution now.

XhmikosR commented 2 years ago

Closing as duplicate of #1040.