Rollup plugin that obfuscates JavaScript output after the bundle is generated. Current stable version is 1.0.0. It leverages javascript-obfuscator under the hood and supports dynamic import obfuscation, inclusion/exclusion patterns, and source map handling. Unlike other obfuscation plugins that operate during the build process, this plugin post-processes the output, making it compatible with various output formats and easier to integrate. It ships TypeScript types and requires Node >=16 and Rollup <5.
npm install rollup-plugin-post-obfuscatorVerified import paths — ran on the pinned version, not inferred.
Basic Rollup config using the obfuscator plugin with typical options including include/exclude patterns and custom javascript-obfuscator options.
Use Rollup 4 or earlier.
Set obfuscator({ outDir: output.dir }) or ensure consistency.Test with source maps or disable them if obfuscation breaks them.
Test with your specific format; consider using 'es' or 'cjs'.
Run 'npm install --save-dev rollup-plugin-post-obfuscator'
Use 'import obfuscator from ...' not '{ obfuscator }'.Downgrade Rollup to 4.x.