Package Exports
- @rbf/parcel-optimizer-javascript-obfuscator
- @rbf/parcel-optimizer-javascript-obfuscator/src/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@rbf/parcel-optimizer-javascript-obfuscator) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Parcel v2 Plugin for javascript-obfuscator
Optimizer plugin for Parcel v2 to obfuscate
JavaScript files using
javascript-obfuscator
.
This plugin is based on
jabuco/parcel-plugin-obfuscate
,
which as of this writing is only compatible with Parcel
v1.
Configuration File
You can specify the
options
for javascript-obfuscator
in a file named javascript-obfuscator.config.json
at the root of your project.
Example
{
"compact": true,
"controlFlowFlattening": false,
"deadCodeInjection": false,
"debugProtection": false,
"disableConsoleOutput": false,
"forceTransformStrings": [],
"inputFileName": "",
"selfDefending": false,
"simplify": true,
"sourceMap": false,
"splitStrings": true,
"splitStringsChunkLength": 10,
"stringArray": true,
"stringArrayCallsTransform": true,
"stringArrayCallsTransformThreshold": 0.5,
"stringArrayEncoding": [
"base64",
"rc4"
],
"stringArrayIndexesType": [
"hexadecimal-number"
],
"stringArrayIndexShift": true,
"stringArrayRotate": true,
"stringArrayShuffle": true,
"stringArrayWrappersCount": 1,
"stringArrayWrappersChainedCalls": true,
"stringArrayWrappersParametersMaxCount": 2,
"stringArrayWrappersType": "variable",
"stringArrayThreshold": 0.75,
"target": "browser",
"unicodeEscapeSequence": false
}
Usage with Parcel
Include the plugin in your .parcelrc
and Parcel will
automatically download and install it from npm when necessary.
Example
{
"extends": "@parcel/config-default",
"optimizers": {
"*.js": [
"...",
"@rbf/parcel-optimizer-javascript-obfuscator"
]
}
}