javascript-obfuscator: Error after Obfuscation: Uncaught SyntaxError: Unexpected string

Hi, After a production build with Angular 8.3, if I obfuscate my main script, I get the next error:

Chrome:

Uncaught SyntaxError: Unexpected string :8101/main-es2015.f70397ecef4dd1524efd.js:1

The error message in Firefox is:

SyntaxError: missing formal parameter

Your Environment

  • Obfuscator version used: 0.21.0
  • Node version used: 12.14.1

Also happening with Node 10.16.3 and 0.18.0

Ty for any help 🙏

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (10 by maintainers)

Most upvoted comments

Released as 0.22.1, please try it

Code to reproduce

class Foo {
    'test'() {}
}

With stringArray option it becomes

class _0x1aa8c8 {
    _0x2942('0x0')() {
    }
}