🚀 Socket Launch Week 🚀 Day 5: Introducing Socket Fix.Learn More
Socket
Sign inDemoInstall
Socket

rollup-plugin-code-obfuscator

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-code-obfuscator

Plugin for Rollup to obfuscate JS code

1.0.2
latest
npm
Version published
Maintainers
1
Created
Source

rollup-plugin-code-obfuscator

pnpm add --save-dev rollup-plugin-code-obfuscator javascript-obfuscator

Features

  • 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!)
  • 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-code-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

options

Type: Object
Default: {}

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

include

Type: String | RegExp | Array[...String|RegExp]
Default: [/\.vue$/, /\.[jt]sx$/,/\.[jt]s$/]

exclude

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

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

rollup-plugin

FAQs

Package last updated on 06 Nov 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