using electron outside of /main.js
Currently obfuscating my electron app using webpack-obfuscator - my config file is as follows:
**// webpack.config.js 'use strict';
const nodeExternals = require('webpack-node-externals'); const path = require('path'), Obfuscate = require('webpack-obfuscator'); // const ObfuscateOption = require('../obfuscation_config.js'); module.exports = { entry: { electron: './main.js', script: './scripts/index.js', }, output: { path: path.resolve(__dirname, '..', 'build'), filename: '[name].js', // output: abc.js, cde.js }, target: 'electron-main', plugins: [ new Obfuscate({ compact: true, controlFlowFlattening: true, controlFlowFlatteningThreshold: 0.75, deadCodeInjection: true, deadCodeInjectionThreshold: 0.4, debugProtection: false, debugProtectionInterval: false, disableConsoleOutput: false, identifierNamesGenerator: 'hexadecimal', log: false, numbersToExpressions: true, renameGlobals: false, rotateStringArray: true, selfDefending: true, shuffleStringArray: true, simplify: true, splitStrings: true, splitStringsChunkLength: 10, stringArray: true, stringArrayEncoding: ['base64'], stringArrayWrappersCount: 2, stringArrayWrappersChainedCalls: true, stringArrayWrappersType: 'variable', stringArrayThreshold: 0.75, /transformObjectKeys: true,/ unicodeEscapeSequence: false, }), ],
externals: [nodeExternals({ modulesFromFile: true })],
}; **
however, i now need to use the electron net api in another file, not in the /build folder the obfuscation creates - how would i go about this? thanks