UglifyJS-online icon indicating copy to clipboard operation
UglifyJS-online copied to clipboard

Static property

Open ulyssesric opened this issue 2 years ago • 1 comments

Apparently the latest version failed to handle static fields in class.

Try to minify sample codes from developer.mozilla.org:

class ClassWithStaticMethod {
  static staticProperty = 'someValue';
  static staticMethod() {
    return 'static method has been called.';
  }
  static {
    console.log('Class static initialization block called');
  }
}

and get the error: "Parse error: Unexpected token: operator (=)"

ulyssesric avatar Jun 16 '23 06:06 ulyssesric

The issue is that we're stuck on an old version. I'll merge a PR updating to the latest version, if you submit one.

Skalman avatar Jun 28 '23 20:06 Skalman

This has been fixed in https://github.com/Skalman/UglifyJS-online/pull/18.

Skalman avatar Jul 17 '24 18:07 Skalman