@bytehide/vite-shield
v1.1.0
Published
Vite plugin for ByteHide Shield obfuscation.
Downloads
691
Readme
@bytehide/vite-shield
A Vite plugin for obfuscating JavaScript code using ByteHide Shield.
Installation
npm install @bytehide/vite-shield --save-dev
Usage
// vite.config.js
import { defineConfig } from 'vite';
import ByteHideShieldPlugin from '@bytehide/vite-shield';
export default defineConfig({
plugins: [
ByteHideShieldPlugin({
projectToken: 'TU_PROJECT_TOKEN',
distDir: 'dist',
replace: true,
obfuscatedExtension: '.obf',
exclude: [],
config: {
controlFlowFlattening: true,
debugProtection: true,
devtoolsBlocking: true,
},
}),
]
});
Configuration
projectToken
: Your ByteHide Shield project token (required)distDir
: Output directory for obfuscated files (default:dist
)replace
: Whether to replace original files with obfuscated versions (default:false
)obfuscatedExtension
: File extension for obfuscated files (default:.obf
)exclude
: List of filenames to exclude from obfuscation (default:[]
)config
: Shield configuration options (default:{}
)config.controlFlowFlattening
: Enable control flow flattening (default:true
)config.debugProtection
: Enable debug protection (default:false
)config.devtoolsBlocking
: Enable devtools blocking (default:false
)
Features
- JavaScript file obfuscation
- Watermarking for protected files
- Build-time obfuscation
License
MIT
Happy coding but keep it safe with @bytehide/vite-shield
! 🛡️