Javascript-obfuscator: --config option does not work

Created on 31 Jul 2017  路  7Comments  路  Source: javascript-obfuscator/javascript-obfuscator

Webpack seems to convert 'require(configFileLocation)' in file JavaScriptObfuscatorCLI to !function(){var e=new Error('Cannot find module "."');throw e.code="MODULE_NOT_FOUND",e}().

bug high priority

Most helpful comment

thanks! feel free to remove exprContextCritical: false, from webpack config :)

All 7 comments

solution is to use __non_webpack_require__ instead; however, i cant figure out a way to use that without typescript complaining. Please see if you can figure out a way.

Interesting. With __non_webpack_require__ unit tests will fail.
We should found way that will work in runtime and in unit tests.

Expect 0.10.1 version later today.

thanks! feel free to remove exprContextCritical: false, from webpack config :)

Oh >_<. I'll remove it in next release when it will be done.

exprContextCritical: false still needed to hide this message.

Was this page helpful?
0 / 5 - 0 ratings