trullock / NUglify

NUglify is a HTML, JavaScript and CSS minification Library for .NET (fork of AjaxMin + new features)
Other
396 stars 79 forks source link

Class method names cannot use reserved keywords #329

Open handerss-spotfire opened 2 years ago

handerss-spotfire commented 2 years ago

Trying to compress JavaScript where a class method is named after a keyword, e.g. delete, results in the error Expected identifier: delete.

Uglify.Js("class Foo { delete() { } }");

Not sure if this behavior is expected or not.

trullock commented 2 years ago

Is delete the only effected keyword?`

Apart from #130

handerss-spotfire commented 2 years ago

I also tested with import and the same type of error occurs.

leppie commented 2 years ago

Add do, for, while and class and new to the list.