test: /\.(tsx?|jsx?)$/i,
exclude: /(node_modules|\.webpack)/,
include: path.resolve(__dirname, 'src'),
enforce: 'post',
use: [
{
loader: WebpackObfuscator.loader,
options: {
compact: true,
controlFlowFlattening: false,
controlFlowFlatteningThreshold: 0.75,
deadCodeInjection: true,
deadCodeInjectionThreshold: 1,
debugProtection: true,
debugProtectionInterval: true,
disableConsoleOutput: true,
domainLock: [],
identifierNamesGenerator: 'hexadecimal',
identifiersDictionary: [],
identifiersPrefix: '',
inputFileName: '',
log: false,
numbersToExpressions: true,
renameGlobals: false,
renameProperties: false,
reservedNames: [],
reservedStrings: [],
rotateStringArray: true,
seed: new Date().getTime(),
selfDefending: false,
shuffleStringArray: true,
simplify: true,
sourceMap: false,
sourceMapBaseUrl: '',
sourceMapFileName: '',
sourceMapMode: 'separate',
splitStrings: true,
splitStringsChunkLength: 10,
stringArray: true,
stringArrayEncoding: 'rc4',
stringArrayThreshold: 1,
target: 'node',
transformObjectKeys: true,
unicodeEscapeSequence: true,
},
},
],
I am using apollo client on my electron app and I have noticed that graphql tags do not get obfuscated, is this normal behaviour? Here is an example of the obfuscated result:
And here is the config that I use: