davidB / yuicompressor-maven-plugin

maven's plugin to compress (Minify / Ofuscate / Aggregate) Javascript files and CSS files using YUI Compressor
http://davidb.github.io/yuicompressor-maven-plugin/
GNU Lesser General Public License v2.1
122 stars 48 forks source link

yui does not accept LET javascript reserved word #94

Open icossinib opened 6 years ago

icossinib commented 6 years ago

With this code:

for (var i = 0, len = this.selectedVariants.length; i < len; i++) {
    let oldId = this.selectedVariants[i];
    $('variant-result-' + oldId).removeClass('selected');
    this.selectedVariants.splice(i, 1);
}

being line 159 : let oldId = this.selectedVariants[i];

I get the following error:

file.js:line 164:column 10:missing ; before statement
                let oldId = this.selectedVariants[i];

the error dissapears when let is removed/switched to var.

gonzalesc commented 4 years ago

it happens to me too.

amodolo commented 3 years ago

i have the same problem. Have you found any solution (except avoid the use of let in the js file)?