Socket
Socket
Sign inDemoInstall

vite-plugin-js-obfuscator

Package Overview
Dependencies
85
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vite-plugin-js-obfuscator

vite-plugin-js-obfuscator


Version published
Weekly downloads
5
increased by25%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

vite-plugin-js-obfuscator npm

A Vite Plugin for obfuscate js files (usage javascript-obfuscator project)

Usage

1. Install

yarn add --dev vite-plugin-js-obfuscator

or

npm install --save-dev vite-plugin-js-obfuscator

2. Configuring Vite

Modify configuration file vite.config.js

import obfuscator from 'vite-plugin-js-obfuscator'

export default {
  plugins: [
    obfuscator({
      exclude: ['static/chunk/_'],
      options: {
        compact: true,
        controlFlowFlattening: false,
        deadCodeInjection: false,
        debugProtection: false,
        debugProtectionInterval: 0,
        disableConsoleOutput: false,
        identifierNamesGenerator: 'hexadecimal',
        log: false,
        numbersToExpressions: false,
        renameGlobals: false,
        selfDefending: false,
        simplify: true,
        splitStrings: false,
        stringArray: true,
        stringArrayCallsTransform: false,
        stringArrayCallsTransformThreshold: 0.5,
        stringArrayEncoding: [],
        stringArrayIndexShift: true,
        stringArrayRotate: true,
        stringArrayShuffle: true,
        stringArrayWrappersCount: 1,
        stringArrayWrappersChainedCalls: true,
        stringArrayWrappersParametersMaxCount: 2,
        stringArrayWrappersType: 'variable',
        stringArrayThreshold: 0.75,
        unicodeEscapeSequence: false
    })
  ]
}

Options

Object for javascript-obfuscator options

Keywords

FAQs

Last updated on 07 Mar 2024

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