mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
Added .mjs and .cjs support (#1059)
This commit is contained in:
@@ -10,7 +10,9 @@ export class CLIUtils {
|
||||
*/
|
||||
public static readonly allowedConfigFileExtensions: string[] = [
|
||||
'.js',
|
||||
'.json'
|
||||
'.json',
|
||||
'.mjs',
|
||||
'.cjs'
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -24,7 +26,7 @@ export class CLIUtils {
|
||||
const isValidExtension: boolean = CLIUtils.allowedConfigFileExtensions.includes(configFileExtension);
|
||||
|
||||
if (!isValidExtension) {
|
||||
throw new ReferenceError('Given config path must be a valid `.js` or `.json` file path');
|
||||
throw new ReferenceError('Given config path must be a valid `.js|.mjs|.cjs` or `.json` file path');
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user