Javascript-obfuscator: how to package to .exe after obfuscate

Created on 6 Nov 2020  路  5Comments  路  Source: javascript-obfuscator/javascript-obfuscator

Hi,
I am trying to package my code with pkg after obfuscating my code but getting

Dynamic require may fail at run time, because the requested file
  is unknown at compilation time and not included into executable.
  Use a string literal as an argument for 'require', or leave it
  as is and specify the resolved file name in 'scripts' option.

what's the best practice to create an output that be easy to create .exe file?

enhancement

Most helpful comment

Released as ignoreRequireImports option in 2.8.0

All 5 comments

Hi. Right now you can use the conditional comments or reservedStrings to disable obfuscation of require.
But seems I have to create an option to ignore obfuscation of strings inside require imports.

an option would be great because it has problem with almost all of my require imports.

I'll create the PR with this feature tomorrow

Released as ignoreRequireImports option in 2.8.0

it is working now. thanks!

Was this page helpful?
0 / 5 - 0 ratings