I have downloading the latest jQuery version "jQuery 1.10.2" and since then I am getting the following error in Chrome:
/jquery-1.10.2.min.map 404 (Not Found)
In order to fix this, I have found the issue report where it is explain that there is a source map file use for debugging.
One of the possible fixes is to deleted the comment in jQuery js where the file is included and other is to download the map file.
My questions is, if the source map file can be useful and help me debug, when it is loaded because if it is loaded each time when my jQuery is loaded, then why to use min version of the library, as this source map is bigger as the uncompressed version?
The source map file is used by chrome debugger to help developers debug the minified script file...
The idea is when you build for production, along with minifying and combining your JavaScript files, you generate a source map which holds information about your original files. When you query a certain line and column number in your generated JavaScript you can do a lookup in the source map which returns the original location. The DevTools can parse the source map automatically and make it appear as though you're running unminified and uncombined files.
read more here
So the map
file is loaded only when the debugger is active... meaning the file will be loaded only on dev environment not in the users systems
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