Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rollup-plugin-obfuscator

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-obfuscator

The most powerful rollup plugin for javascript-obfuscator

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.4K
decreased by-26.96%
Maintainers
1
Weekly downloads
 
Created
Source

rollup-plugin-obfuscator

npm

The most powerful rollup plugin for javascript-obfuscator.

yarn add --dev rollup-plugin-obfuscator javascript-obfuscator

or

npm install --save-dev rollup-plugin-obfuscator javascript-obfuscator

Features

  1. javascript-obfuscator is installed separately from the rollup plugin, so it will always be updatable (unlike the official rollup plugin which has been outdated for years!)
  2. You can decide if you prefer to apply obfuscation:
    • the traditional way, to the whole bundle
    • to each file separately, avoiding obfuscating your open-source dependencies, which results in a huge performance boost

Usage

import obfuscator from 'rollup-plugin-obfuscator';

export default {
	input: 'src/main.js',
	plugins: [
		obfuscator({
			options: {
				// Your javascript-obfuscator options here
				// See what's allowed: https://github.com/javascript-obfuscator/javascript-obfuscator
			},
		}),
	]
}

Options

global

Type: boolean
Default: false

Set to true if you want to obfuscate the whole bundle, false to obfuscate each file separately.

options

Type: Object
Default: {}

Options that will be passed to javascript-obfuscator. See allowed options here.

include

Type: String | RegExp | Array[...String|RegExp]
Default: ['**/*.js', '**/*.ts']

Which files to obfuscate. This parameter is ignored when global is true.

exclude

Type: String | RegExp | Array[...String|RegExp]
Default: ['node_modules/**']

Which files not to obfuscate. This parameter is ignored when global is true.

obfuscator

Type: JavascriptObfuscator
Default: require('javascript-obfuscator')

This plugin uses the version of javascript-obfuscator you installed alongside with it, but you are free to override it (for example, if you want to use a fork).

Keywords

FAQs

Package last updated on 04 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc