Ever since I installed jQuery 1.9 and now 2.0 in an ASP.NET MVC4 project using Nuget in Visual Studio 2012, an additional .map file has been included in the scripts folder. I noticed in the console log that there is an error relating to jquery-2.0.0.min.map namely:
Uncaught SyntaxError: Unexpected token :
It's on line 1, but since this is a one line file that's to be expected.
I'd like to get rid of this error - do I actually need this .map file? Can I safely wave goodbye to it?
Crispin
You don't need the .min.map file for normal functionality. What the map file does is allow you to view the unminified version of the source code when you're loading the minified version, which is primarily useful in production.
http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/ https://developers.google.com/chrome-developer-tools/docs/javascript-debugging#source-maps
It's perfectly safe to delete the file if you don't want it, it won't affect your code at all. The very worst case scenario is that you have Chrome Devtools open and see a 404 for the sourcemap file if you have sourcemaps enabled, but this won't happen for normal end users who don't have those dev tools open.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With