Skip to content

pejiang/vite-plugin-javascript-obfuscator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vite-plugin-javascript-obfuscator

Vite plugin for javascript-obfuscator

Installation

Install the package:

  • npm npm install --save-dev vite-plugin-javascript-obfuscator
  • yarn yarn add --dev vite-plugin-javascript-obfuscator

Usage

vite.config.js

import obfuscatorPlugin from 'vite-plugin-javascript-obfuscator'


export default defineConfig({
    // ... 
    plugins: [
        // other plugin ...
        obfuscatorPlugin({
            matchFile: path => {
                // Customize your rules    
                return /\.(ob-max)\.js$/.test(path)

                // Or return true to match all
                // return true
            },
            options: {
                // compact: true,
                // controlFlowFlattening: false,
                // controlFlowFlatteningThreshold: 0.75,
                // deadCodeInjection: false,
                // deadCodeInjectionThreshold: 0.4,
                // debugProtection: false,
                // debugProtectionInterval: 0,
                // ... [See more](https://github.com/javascript-obfuscator/javascript-obfuscator)
            }
        }),
    ]
    // ...
})

About

Vite plugin for javascript-obfuscator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%