flnxi-Wu/scripts/obfuscate-config.js
2026-05-26 14:51:00 +08:00

28 lines
760 B
JavaScript

/**
* Production obfuscation options.
*
* Keep this conservative: the goal is to raise reverse-engineering cost for
* server-side license and paid-feature code without making Next.js output
* brittle or dramatically increasing bundle size.
*/
const obfuscatorOptions = {
compact: true,
controlFlowFlattening: false,
deadCodeInjection: false,
debugProtection: false,
disableConsoleOutput: false,
identifierNamesGenerator: 'hexadecimal',
renameGlobals: false,
rotateStringArray: true,
selfDefending: false,
simplify: true,
splitStrings: false,
stringArray: true,
stringArrayEncoding: ['base64'],
stringArrayThreshold: 0.35,
transformObjectKeys: false,
unicodeEscapeSequence: false,
}
module.exports = { obfuscatorOptions }