{"library":"rollup-plugin-obfuscator","title":"Rollup Plugin for JavaScript Obfuscator","description":"rollup-plugin-obfuscator is a powerful Rollup plugin designed to integrate `javascript-obfuscator` into the build process. Unlike some alternatives, this plugin requires `javascript-obfuscator` to be installed as a separate peer dependency, ensuring users can always utilize the latest version of the obfuscator. The current stable version is 1.1.0, with updates typically aligning with new releases or needs of `javascript-obfuscator`. A key differentiator is its ability to perform obfuscation either on the entire bundle or, more efficiently, on individual files while excluding open-source dependencies, leading to significant performance improvements during the build process. It provides granular control over which files are obfuscated via include/exclude patterns and supports all configuration options available in `javascript-obfuscator` itself.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install rollup-plugin-obfuscator"],"cli":null},"imports":["import obfuscator from 'rollup-plugin-obfuscator';","import type { RollupOptions } from 'rollup';","import type { ObfuscatorOptions } from 'javascript-obfuscator';"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import obfuscator from 'rollup-plugin-obfuscator';\n\nexport default {\n\tinput: 'src/main.js',\n\toutput: {\n\t\tdir: 'dist',\n\t\tformat: 'esm'\n\t},\n\tplugins: [\n\t\tobfuscator({\n\t\t\t// Obfuscate the entire bundle (default is file-by-file)\n\t\t\t// global: true,\n\t\t\toptions: {\n\t\t\t\t// Your javascript-obfuscator options here\n\t\t\t\t// See what's allowed: https://github.com/javascript-obfuscator/javascript-obfuscator\n\t\t\t\tcompact: true,\n\t\t\t\tcontrolFlowFlattening: true,\n\t\t\t\tdeadCodeInjection: true,\n\t\t\t\tidentifierNamesGenerator: 'hexadecimal',\n\t\t\t\tselfDefending: true,\n\t\t\t\tsideEffects: true,\n\t\t\t\tsplitStrings: true,\n\t\t\t\tstringArray: true,\n\t\t\t\tstringArrayThreshold: 0.75\n\t\t\t}\n\t\t}),\n\t]\n}","lang":"typescript","description":"This quickstart demonstrates how to apply obfuscation to a Rollup bundle using the `rollup-plugin-obfuscator`. It shows the basic plugin setup and includes common `javascript-obfuscator` options for a strong obfuscation.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}