<!-- Love javascript-obfuscator? Please consider supporting our collective: 👉 https://opencollective.com/javascript-obfuscator/donate --> <!--- Provide a general summary of the issue in the Title above --> ## Expected Behavior <!--- Tell us what should happen --> ## Current Behavior <!--- Tell us what happens instead of the expected behavior --> The source map filename is wrong when I assigned a name. ## Steps to Reproduce <!--- Provide a link to a live example, or an unambiguous set of steps to --> <!--- reproduce this bug. Include code to reproduce, if relevant --> Here are the steps to reproduce this issue: 1. Create `a.js` ```js console.log('Hello World') ``` 2. Run the following command: ```js javascript-obfuscator .\a.js -o a.min.js --source-map=true --source-map-file-name=a.min.js.map ``` 3. The `a.min.js` is generated. ```js function a0_0x388e(){var _0x1d7b85=['250944uqaURh','1169253GDICiC','1101824uSWpIk','14EAccxX','249031YZzwdR','log','2906652QwanhJ','13940790qUNGBk','5nPBmvI','Hello\x20World','1963086IIXTWP','24wsUmaW'];a0_0x388e=function(){return _0x1d7b85;};return a0_0x388e();}var a0_0x29efc7=a0_0x3f6f;function a0_0x3f6f(_0x5bc38f,_0x4dc37e){var _0x388ee9=a0_0x388e();return a0_0x3f6f=function(_0x3f6f29,_0xcefc93){_0x3f6f29=_0x3f6f29-0x102;var _0x287cd8=_0x388ee9[_0x3f6f29];return _0x287cd8;},a0_0x3f6f(_0x5bc38f,_0x4dc37e);}(function(_0x5182ff,_0x55ec5a){var _0x55a395=a0_0x3f6f,_0x5f4f9b=_0x5182ff();while(!![]){try{var _0x323741=parseInt(_0x55a395(0x106))/0x1+-parseInt(_0x55a395(0x105))/0x2*(parseInt(_0x55a395(0x102))/0x3)+-parseInt(_0x55a395(0x104))/0x4+-parseInt(_0x55a395(0x10a))/0x5*(-parseInt(_0x55a395(0x10c))/0x6)+-parseInt(_0x55a395(0x108))/0x7+-parseInt(_0x55a395(0x10d))/0x8*(parseInt(_0x55a395(0x103))/0x9)+parseInt(_0x55a395(0x109))/0xa;if(_0x323741===_0x55ec5a)break;else _0x5f4f9b['push'](_0x5f4f9b['shift']());}catch(_0x3ed595){_0x5f4f9b['push'](_0x5f4f9b['shift']());}}}(a0_0x388e,0x4a4b8),console[a0_0x29efc7(0x107)](a0_0x29efc7(0x10b))); //# sourceMappingURL=a.js.map ``` 🔥 The issue is the `sourceMappingURL` is wrong. The file name should be `a.min.js.map`. But it's `a.js.map`. 4. The `a.min.js.map` is generated. ```json {"version":3,"sources":["sourceMap"],"names":["console"],"mappings":"4kCAAAA,OAAA,C,kBAAA,E,kBAAA,C","sourcesContent":["console.log('Hello World')"]} ``` ## Your Environment <!--- Include as many relevant details about the environment you experienced the bug in --> * Obfuscator version used: `4.1.1_2024-06-15T17:30:18.063Z` * Node version used: `v20.17.0` # Stack trace <!--- Include stack trace --> N/A ## Minimal working example that will help to reproduce issue <!--- Include code --> ```js console.log('Hello World') ```