mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
Fixed require of external user config file #2
This commit is contained in:
@@ -5,6 +5,10 @@ v0.11.0
|
||||
* **New option:** `log` enables logging of the information to the console.
|
||||
* **New option:** `renameGlobals` allows to enable obfuscation of global variable and function names with declaration.
|
||||
|
||||
v0.10.1
|
||||
---
|
||||
* Fixed https://github.com/javascript-obfuscator/javascript-obfuscator/issues/76
|
||||
|
||||
v0.10.0
|
||||
---
|
||||
* **New option:** `deadCodeInjection`. With this option random blocks of dead code will add to the obfuscated code.
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -78,11 +78,15 @@ export class CLIUtils {
|
||||
* @returns {Object}
|
||||
*/
|
||||
public static getUserConfig (configPath: string): Object {
|
||||
const nativeRequire: Function = typeof __non_webpack_require__ === 'function'
|
||||
? __non_webpack_require__
|
||||
: require;
|
||||
let config: Object;
|
||||
|
||||
return nativeRequire(configPath);
|
||||
try {
|
||||
config = require(configPath);
|
||||
} catch (e) {
|
||||
config = __non_webpack_require__(configPath);
|
||||
}
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ import './unit-tests/utils/Utils.spec';
|
||||
* Functional tests
|
||||
*/
|
||||
import './functional-tests/javascript-obfuscator/JavaScriptObfuscator.spec';
|
||||
import './functional-tests/javascript-obfuscator-cli/JavaScriptObfuscatorCLI.spec';
|
||||
import './functional-tests/cli/JavaScriptObfuscatorCLI.spec';
|
||||
import './functional-tests/javascript-obfuscator-internal/JavaScriptObfuscatorInternal.spec';
|
||||
import './functional-tests/custom-nodes/console-output-nodes/ConsoleOutputDisableExpressionNode.spec';
|
||||
import './functional-tests/custom-nodes/domain-lock-nodes/DomainLockNode.spec';
|
||||
|
||||
Reference in New Issue
Block a user