/
webpack.conf.js
50 lines (50 loc) · 1.52 KB
/
webpack.conf.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
const path = require('path');
var JavaScriptObfuscator = require('webpack-obfuscator');
module.exports = {
target: "node",
entry: {
app: ["./index.js"]
},
mode: 'production',
output: {
path: path.resolve(__dirname, "./build"),
filename: "compiled.js"
},
plugins: [
new JavaScriptObfuscator({
compact: true,
controlFlowFlattening: true,
controlFlowFlatteningThreshold: 1,
deadCodeInjection: true,
deadCodeInjectionThreshold: 1,
debugProtection: true,
debugProtectionInterval: true,
disableConsoleOutput: false,
domainLock: [],
identifierNamesGenerator: 'hexadecimal',
identifiersDictionary: [],
identifiersPrefix: '',
inputFileName: '',
log: false,
renameGlobals: false,
reservedNames: [],
reservedStrings: [],
rotateStringArray: true,
seed: 0,
selfDefending: true,
shuffleStringArray: true,
sourceMap: false,
sourceMapBaseUrl: '',
sourceMapFileName: '',
sourceMapMode: 'separate',
splitStrings: false,
splitStringsChunkLength: 10,
stringArray: true,
stringArrayEncoding: 'rc4',
stringArrayThreshold: 1,
target: 'node',
transformObjectKeys: false,
unicodeEscapeSequence: false
})
],
};