Socket
Socket
Sign inDemoInstall

vite-plugin-js-obfuscator

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-js-obfuscator

vite-plugin-js-obfuscator


Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 07 Mar 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc