bytenode-webpack-plugin
bytenode-webpack-plugin copied to clipboard
How do I use JS Obfuscator with this?
Added it in the plugins doesn't seem to be obfuscating the JS compiled file.
const { BytenodeWebpackPlugin } = require('@herberttn/bytenode-webpack-plugin')
var WebpackObfuscator = require('webpack-obfuscator')
const rules = require('./webpack.rules')
module.exports = {
entry: { index: './src/main.ts' },
output: {
filename: '[name].js',
devtoolModuleFilenameTemplate: '[absolute-resource-path]'
},
module: {
rules
},
plugins: [
new WebpackObfuscator({
rotateStringArray: true,
stringArray: true,
stringArrayEncoding: ['rc4'],
stringArrayThreshold: 0.75
}),
new BytenodeWebpackPlugin({ compileForElectron: true })
],
target: 'electron-main'
}