A Rollup plugin that uses javascript-obfuscator to obfuscate bundled JavaScript code. Version 1.0.4 (latest) wraps javascript-obfuscator v4.x, allowing control over obfuscation options directly in the Rollup build pipeline. It supports source maps (inline or separate) and enables protection of emitted code with minimal setup. Differentiates by tightly integrating obfuscation within the bundle output, rather than requiring a separate post-build step.
npm install rollup-plugin-javascript-obfuscatorVerified import paths — ran on the pinned version, not inferred.
Complete Rollup build pipeline with obfuscation plugin applied to ES module bundle.
Use obfuscator options judiciously; avoid high-complexity transforms like controlFlowFlattening if performance is critical
npm install --save-dev javascript-obfuscator@^4.0.0
Replace 'entry' with 'input'
Test with source map enabled; use inline source maps for simpler setup
Create a custom declaration file or use @ts-ignore
npm install --save-dev javascript-obfuscator
Use default import: import obfuscatorPlugin from 'rollup-plugin-javascript-obfuscator'
Replace 'entry' with 'input' in your rollup configuration