-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
48 lines (47 loc) · 1.79 KB
/
webpack.config.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
const JavaScriptObfuscator = require('webpack-obfuscator');
const path = require('path');
module.exports = {
// ! note: try to use a mode (development or production).
// Idk why but if I enable one of this modes, I get broken code... but this stuff for second issue from me :d ... maybe later...
// mode: "development", // "development" || "production" || "none" => by default.
entry: {
app: ['./index.js'],
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dist'),
},
plugins: [
new JavaScriptObfuscator({
compact: true,
controlFlowFlattening: true,
controlFlowFlatteningThreshold: 1,
deadCodeInjection: true,
deadCodeInjectionThreshold: 1,
debugProtection: false,
debugProtectionInterval: false,
disableConsoleOutput: false,
identifierNamesGenerator: 'hexadecimal',
log: true,
numbersToExpressions: true,
optionsPreset: 'default',
renameGlobals: true,
renameProperties: true,
rotateStringArray: true,
seed: 0,
selfDefending: true,
shuffleStringArray: true,
simplify: true,
splitStrings: true,
// Note: I test with 1 and with 5 values. But in currently moment bug didn't resolve by inc this value to 5 or greater... IDK WHY. Fuck this.
// IDK. This obfuscator ... maybe ... break this world :eyes:
splitStringsChunkLength: 1,
stringArray: true,
stringArrayEncoding: "rc4",
stringArrayThreshold: 1,
target: 'browser',
transformObjectKeys: true,
unicodeEscapeSequence: true
}, [])
]
};