GitXplorerGitXplorer
g

rollup-plugin-obfuscator

public
124 stars
10 forks
8 issues

Commits

List of commits on branch master.
Verified
1865d42622604b2bb4f7d3e901423b20ee17b4c2

Merge pull request #29 from getkey/dependabot/npm_and_yarn/rollup-4.22.4

ggetkey committed 4 months ago
Verified
e3c2b9fb255ea315549fabcb1ce700484d8fd1b9

Bump rollup from 4.6.1 to 4.22.4

ddependabot[bot] committed 4 months ago
Unverified
548ccec9290fa31eaff71b35c675b15a96ee32a7

Upgrade everything + version bump

ggetkey committed a year ago
Verified
a420ce3d2d31ccc2c6dd9836e17c7b6c8ad957c7

Merge pull request #22 from rastiqdev/master

ggetkey committed a year ago
Verified
c73fb5ae12154cb6ec2626e0f5200dced13703c2

Use and add support for Rollup 4

rrastiqdev committed a year ago
Verified
8eda9cd6d6ca07b41a022951ce0d204671e9b908

Merge pull request #21 from getkey/dependabot/npm_and_yarn/word-wrap-1.2.4

ggetkey committed a year ago

README

The README file for this repository.

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).