NestJS couldn't log some class names
Author: hkaraogluCreated Nov 9, 2023Updated Apr 4, 2025
in NestJS, when I start app app in production mode (so by using obfuscated js file), it logs class names as _0x.....
Examples:
- PrimaryDbContextModule -> _0x23db20
- AppModule -> _0x202e0a
- LoggerModule -> _0x2e3cc7
Expected Behavior
Current Behavior
Steps to Reproduce
webpack.config.js
const WebpackObfuscator = require('webpack-obfuscator');
module.exports = function (options)
{
return {
...options,
devtool: 'inline-source-map',
plugins: [
new WebpackObfuscator({
rotateStringArray: true,
sourceMap: true,
optionsPreset: 'high-obfuscation',
disableConsoleOutput: false,
}, [])
]
}
}Your Environment
- Obfuscator version used: v4.1.0
- Node version used: v18.17.0
Stack trace
Minimal working example that will help to reproduce issue
Source: javascript-obfuscator/javascript-obfuscator