# laravel-mix-obfuscator

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

Latest version **1.0.0** (published 2021-03-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install laravel-mix-obfuscator
pnpm add laravel-mix-obfuscator
yarn add laravel-mix-obfuscator
bun add laravel-mix-obfuscator
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2021-03-06 |
| First published | 2021-03-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | imannms |
| Maintainers | imannms |
| Keywords | laravel, laravel mix, mix, obfuscator |

## Links

- npm: https://www.npmjs.com/package/laravel-mix-obfuscator
- Repository: https://github.com/imannms/laravel-mix-obfuscator
- Homepage: https://github.com/imannms/laravel-mix-obfuscator#readme
- Issues: https://github.com/imannms/laravel-mix-obfuscator/issues
- npm.io page: https://npm.io/package/laravel-mix-obfuscator

## Recent versions

- 1.0.0 (latest) — 2021-03-06
- 0.0.3-alpha — 2021-03-06
- 0.0.2-alpha — 2021-03-06
- 0.0.1-alpha — 2021-03-06
- 0.0.1 — 2021-03-06

## README

# Laravel Mix Obfuscator
This extension provides instant [Webpack Obfuscator](https://github.com/javascript-obfuscator/webpack-obfuscator) ([Javascript Obfuscator](https://github.com/javascript-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:

```javascript
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

```javascript

mix.obfuscator({
    options: {},
    exclude: []
})

```

### options
Type: `object` Default: `{}`

Javascript Obfuscator options.

[More information about the Javascript Obfuscator options](https://github.com/javascript-obfuscator/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`.**

---
_Source: https://npm.io/package/laravel-mix-obfuscator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
