esbuild-obfuscator-plugin
Version:
JavaScript obfuscator plugin for esbuild
17 lines (14 loc) • 739 B
TypeScript
import { Plugin } from 'esbuild';
import { ObfuscatorOptions } from 'javascript-obfuscator';
interface ObfuscatorPluginOptions extends ObfuscatorOptions {
/** Whether to obfuscate output files. Defaults to `false`. */
obfuscateOutput?: boolean;
/** A glob pattern or function that returns a boolean indicating whether the file should be obfuscated. Default behavior is to obfuscate all files. */
filter?: ((path: string) => boolean) | string[];
/** Inject additional code into file when obfuscating. */
inject?: {
[path: string]: string[] | string;
};
}
declare function ObfuscatorPlugin(options: ObfuscatorPluginOptions): Plugin;
export { type ObfuscatorPluginOptions, ObfuscatorPlugin as default };