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

Support source maps

Open bminer opened this issue 11 years ago • 3 comments

It would be REALLY cool if node-obfuscator could generate source maps that link the obfuscated JavaScript code back to the appropriate source file/line/column, etc. for debugging purposes.

From what I understand, you could pass a source map option to node-obfuscator to eventually be passed along to uglifyjs; however, this source map would be for the concatenated JavaScript, not for the original source. With a little bit of work, it might be possible to map the uglifyjs source map back to the original source code.

Thoughts on this?

bminer avatar Jun 06 '14 17:06 bminer

Hmm.. may be able to add it in at obfuscator.register, as it's aware of both the filename and its contents. I like the idea, as it would make locating bugs much, much easier.

stephenmathieson avatar Jun 06 '14 18:06 stephenmathieson

+1

paambaati avatar Jul 20 '15 10:07 paambaati

+1 this would be super helpful

brian-mann avatar Oct 09 '15 01:10 brian-mann