Closed
Description
I obfuscate my code use config
{
compact: true,
controlFlowFlattening: true,
controlFlowFlatteningThreshold: 1,
debugProtection: false,
debugProtectionInterval: false,
disableConsoleOutput: false,
identifierNamesGenerator: 'hexadecimal',
log: true,
renameGlobals: false,
rotateStringArray: true,
selfDefending: true,
stringArray: true,
stringArrayEncoding: 'rc4',
stringArrayThreshold: 1,
transformObjectKeys: true,
unicodeEscapeSequence: false,
sourceMap: true,
sourceMapMode: 'inline',
}
after I decode the base64 encoded sourceMap, I found "sources":["sourceMap"], this made all the error stack shows the correct line number with wrong filename ''sourceMap"
Expected Behavior
the error stack from a file a.js
should have error stack with filename a.js
Current Behavior
the error stack from a file a.js
have error stack with filename sourceMap.js
Steps to Reproduce (for bugs)
- create a file 'a.js'
- the first line of 'a.js' should
require('source-map-support').install();
. - throw error in 'a.js', use
console.log()
print the error stack - do obfuscate with the config above
- run the obfuscated
a.js
- the error stack show the bug
Your Environment
- Version used:
node: 8.10.0
javascript-obfuscator: latest