Socket
Socket
Sign inDemoInstall

laravel-mix-obfuscator

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    laravel-mix-obfuscator

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


Version published
Weekly downloads
29
increased by45%
Maintainers
1
Install size
4.86 kB
Created
Weekly downloads
 

Readme

Source

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.

Keywords

FAQs

Last updated on 06 Mar 2021

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc