Exclude specific bundles from plugin obfuscation
masterWhen using the plugin, you can provide an excludes argument (an Array or String) to bypass obfuscation for specific output files. The syntax follows the multimatch package. This is useful for preventing the obfuscation of specific entry points or bundles.
// webpack.config.js
'use strict';
const JavaScriptObfuscator = require('webpack-obfuscator');
module.exports = {
entry: {
'abc': './test/input/index.js',
'cde': './test/input/index1.js'
},
output: {
path: 'dist',
filename: '[name].js' // output: abc.js, cde.js
},
plugins: [
new JavaScriptObfuscator({
rotateStringArray: true
}, ['abc.js'])
]
};