vue-cli-plugin-javascript-obfuscator
v1.0.5
Published
Vue CLI plugin for JavaScript obfuscation using [email protected]
Downloads
16
Maintainers
Readme
vue-cli-plugin-javascript-obfuscator
A Vue CLI plugin to automatically obfuscate JavaScript files using [email protected].
Installation
To install the plugin, run the following command:
vue add javascript-obfuscatorConfiguration
After installing the plugin, you can configure it in your vue.config.js file under the pluginOptions field.
Example Configuration:
// vue.config.js
module.exports = {
pluginOptions: {
javascriptObfuscator: {
// Files to include in obfuscation (can be a string or an array of strings/regex patterns)
includes: [
'app.*.js',
'**/chunk-libs.*.js', // Matches chunk-libs files for obfuscation
],
// Options for the javascript-obfuscator
obfuscatorOptions: {
compact: true, // Minify the code
disableConsoleOutput: false, // Keep console output
rotateStringArray: true, // Rotate the string array during obfuscation
identifierNamesGenerator: 'hexadecimal', // Use hexadecimal naming for identifiers
selfDefending: true, // Make the obfuscated code harder to read
},
},
},
};