question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Identifier has already been declared with mangled option

See original GitHub issue

Version: 0.25.2 Angular: 9

Options:

identifierNamesGenerator: 'mangled',
stringArray: true,
rotateStringArray: true,
shuffleStringArray: true,
selfDefending: true,

Using it with a fairly decent sized angular project that uses multiple bundles I’m running into the following errors when using the “mangled” option:

Uncaught SyntaxError: Identifier 'a' has already been declared

I also tried the “dictionary” option with a supplied list of identifiersDictionary while the obfuscate command succeeds it still fails at runtime with a “Identifier ‘xxx’ has already been declared”. However, its intermittent some builds work while other times fails.

Using “hexadecimal” works however it has a pretty big footprint. For example, a 500Kb gz gets to about 950 gz with hexadecimal.

Anyway the “mangled” option generator can be optimized?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:26 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
sanex3339commented, Mar 2, 2020

Will check it. Also, should update all plugins (webpack, gulp, grunt) to generate prefix for different bundles. Also, should describe it in the README.md

0reactions
sanex3339commented, Mar 9, 2020

sanex3339 at yandex.ru

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught SyntaxError: Identifier 'myOptions' has already been ...
The code of the script I have attached below. When I use var for declaring myOptions and myGlobals objects, the script runs without...
Read more >
Identifier "x" has already been declared" - Ep 11 - YouTube
JS Casts 11 - How to fix "Uncaught SyntaxError: Identifier "x" has already been declared " in JavaScript.
Read more >
ARM Compiler Errors and Warnings Reference Guide Version ...
The ARM Compiler Errors and Warnings Reference Guide provides lists of the errors and warnings that each of the compilation tools can generate....
Read more >
terser - npm
When mangling is enabled but you want to prevent certain names from being mangled, you can declare those names with --mangle reserved —...
Read more >
compilation error "i" has already been declared in the current ...
Reporter. Description. •. 19 years ago. User-Agent: Mozilla/5.0 (X11; U; IRIX64 IP35; en-US; rv:1.7) Gecko/20040617 Build Identifier: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found