I am new to configuring webpack and I am trying to integrate my ionic 4 app with the javascript-obfuscator / webpack-obfuscator. I would like to know how to integrate it. I have tried the following configurations but none of them works.
module.exports = (config, options) => {
config.plugins.push(new JavaScriptObfuscator({
rotateStringArray: true, // please customizable with options
}, ['exclude_bundle.js']));
}
/* ‘use strict’;
const JavaScriptObfuscator = require(‘webpack-obfuscator’);
module.exports = {
entry: {
'abc': 'index.js',
//'cde': './test/input/index1.js'
},
output: {
path: '/www',
filename: '[name].js' // output: abc.js, cde.js
},
plugins: [
new JavaScriptObfuscator({
rotateStringArray: true
}, ['abc.js'])
]
}; */
/* var WebpackObfuscator = require(‘webpack-obfuscator’);
// webpack loader rules array
rules: [
{
test: /\.js$/,
exclude: [
path.resolve(__dirname, 'excluded_file_name.js')
],
enforce: 'post',
use: {
loader: WebpackObfuscator.loader,
options: {
rotateStringArray: true
}
}
}
] */
1 post - 1 participant