Skip to content

A quick Laravel Mix extension for Webpack Obfuscator (Javascript Obfuscator) support

License

Notifications You must be signed in to change notification settings

imannms/laravel-mix-obfuscator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Mix Obfuscator

This extension provides instant Webpack Obfuscator (Javascript Obfuscator) support to your Mix (v2.1 and up) builds.

Usage

First, install the extension.

npm install laravel-mix-obfuscator --save-dev

Then, require it within your webpack.mix.js file, like so:

let mix = require('laravel-mix');

require('laravel-mix-obfuscator');

mix
    .js('resources/js/app.js', 'public/js')
    .less('resources/less/app.less', 'public/css')
    .obfuscator({
	exclude: [
	   path.resolve(__dirname, 'node_modules')
	]
     });

Config

mix.obfuscator({
    options: {},
    exclude: []
})

options

Type: object Default: {}

Javascript Obfuscator options.

More information about the Javascript Obfuscator options

exclude

Type: string[] Default: []

A file names or globs which indicates files to exclude from obfuscation.

It is not recommended to obfuscate vendor scripts and polyfills, since the obfuscated code is 15-80% slower (depends on options) and the files are significantly larger.

It is strongly recommended to exclude node_modules.

About

A quick Laravel Mix extension for Webpack Obfuscator (Javascript Obfuscator) support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published