webpack-obfuscator icon indicating copy to clipboard operation
webpack-obfuscator copied to clipboard

sourceMap not working when used as a loader?

Open Andy9822 opened this issue 4 years ago • 2 comments

Hi,

I've been using webpack-obfuscator for a couple of months and this week decided to enable sourceMap due to unreadable stacktrace being generated at our Sentry. So, it would be nice to have this sourceMap generation I thought... But it's not working.

I've been reading the issues and it seems you didn't have support for it a few months ago, it was also mentioned in the README.MD, but now it's supposed to be working. I upgraded the package version to its latest but couldn't make it work.

I'm using webpack-obfuscator as a loader, exactly as it is described in the README.MD and it works perfectly for everything else but when enabled sourceMap it just doesnt't generate anything, even with or without custom sourceMapFileName property.

Andy9822 avatar Feb 25 '21 14:02 Andy9822

I had done a test with javascript-obfuscator a while ago and I realized that it only generates the sourceMap when it runs via CLI. When executed as a webpack loader or as a webpack plugin, the settings for sourceMap seems to be ignored. Is this the expected behavior ?

desk467 avatar Mar 01 '21 14:03 desk467

The loader does not support source maps. PR welcomed. Btw, the plugin should support source maps after this PR: https://github.com/javascript-obfuscator/webpack-obfuscator/pull/104

sanex3339 avatar May 17 '21 06:05 sanex3339