111
This commit is contained in:
36
obfuscate.config.js
Normal file
36
obfuscate.config.js
Normal file
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* JavaScript 混淆配置
|
||||
* 用于增加代码阅读难度,防止代码被轻易破解
|
||||
*/
|
||||
module.exports = {
|
||||
compact: true,
|
||||
controlFlowFlattening: true,
|
||||
controlFlowFlatteningThreshold: 0.75,
|
||||
deadCodeInjection: true,
|
||||
deadCodeInjectionThreshold: 0.4,
|
||||
debugProtection: false, // 设置为 true 会阻止调试,但可能影响性能
|
||||
debugProtectionInterval: 0,
|
||||
disableConsoleOutput: false, // 设置为 true 会移除 console,但可能影响调试
|
||||
identifierNamesGenerator: 'hexadecimal',
|
||||
log: false,
|
||||
numbersToExpressions: true,
|
||||
renameGlobals: false,
|
||||
selfDefending: false, // 设置为 false,避免与 pkg 冲突
|
||||
simplify: true,
|
||||
splitStrings: true,
|
||||
splitStringsChunkLength: 10,
|
||||
stringArray: true,
|
||||
stringArrayCallsTransform: true,
|
||||
stringArrayEncoding: ['base64'],
|
||||
stringArrayIndexShift: true,
|
||||
stringArrayRotate: true,
|
||||
stringArrayShuffle: true,
|
||||
stringArrayWrappersCount: 2,
|
||||
stringArrayWrappersChainedCalls: true,
|
||||
stringArrayWrappersParametersMaxCount: 4,
|
||||
stringArrayWrappersType: 'function',
|
||||
stringArrayThreshold: 0.75,
|
||||
transformObjectKeys: true,
|
||||
unicodeEscapeSequence: false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user