28 lines
760 B
JavaScript
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 }
|