I installed UglifyJS2 in my ASP MVC 4 Project in Visual Studio as command line tool and used it to uglify a js file i wrote. I need to keep the function names as they are so i set --keep-fnames
.
So far so good after i tried the following command i got my uglified file containing the function names:
uglifyjs sample.js --compress --mangle --keep-fnames --output sample.min.js
But as soo as i edited the uncompressed file i recognized that there was a so called source map which automatically compresses the new version to the .min.js file.
I want to use this source map but the problem is it doesnt keep my function names of the original javascript file and i found no solution to set the compression options anywhere in this source map file, neither i found any soultion in the web...
EDIT
After a little bit of research i found out that the source map comes from an extension for visual studio (webessentials 2012). Still i did not found any documentation about how to config the source map (if it is even possible).