UNPKG

2.21 kBMarkdownView Raw
1#javascript-obfuscator plugin for Webpack
2
3[![npm version](https://badge.fury.io/js/webpack-obfuscator.svg)](https://badge.fury.io/js/webpack-obfuscator)
4
5### Installation
6
7Install the package with NPM and add it to your devDependencies:
8
9`npm install --save-dev webpack-obfuscator`
10
11### Usage:
12
13```javascript
14var WebpackObfuscator = require('webpack-obfuscator');
15
16// ...
17
18// webpack plugins array
19plugins: [
20 new WebpackObfuscator({
21 rotateUnicodeArray: true
22 }, ['excluded_bundle_name.js'])
23],
24```
25
26### obfuscatorOptions
27Type: `Object` Default: `null`
28
29Options for [javascript-obfuscator](https://github.com/sanex3339/javascript-obfuscator). Should be passed exactly like described on their page.
30
31### excludes
32Type: `Array` or `String` Default: `[]`
33
34Examples: `['excluded_bundle_name.js', '**_bundle_name.js']` or `'excluded_bundle_name.js'`
35
36Can be used to bypass obfuscation of some files.
37
38### License
39Copyright (C) 2016 [Timofey Kachalov](http://github.com/sanex3339).
40
41Redistribution and use in source and binary forms, with or without
42modification, are permitted provided that the following conditions are met:
43
44 * Redistributions of source code must retain the above copyright
45 notice, this list of conditions and the following disclaimer.
46 * Redistributions in binary form must reproduce the above copyright
47 notice, this list of conditions and the following disclaimer in the
48 documentation and/or other materials provided with the distribution.
49
50THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
51AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
52IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
53ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
54DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
55(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
56LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
57ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
58(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
59THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\No newline at end of file