javascript - Missing .map resource? -
this question has answer here:
i've started having problem projects. when index page loads contains reference jquery source file, console logs error: get http://localhost:3000/js/lib/jquery-1.10.2.min.map 500 (internal server error)
.
this doesn't affect application @ all, it's annoying see whenever open console. know coming from?
edit: note i'm not explicitly referencing .map file, pointing <script src="js/lib/jquery-1.10.2.min.js"></script>
jquery started using source maps.
for example, let's @ minified jquery 2.0.3 file's first few lines.
/*! jquery v2.0.3 | (c) 2005, 2013 jquery foundation, inc. | jquery.org/license //@ sourcemappingurl=jquery.min.map */
excerpt introduction javascript source maps:
have ever found wishing keep client-side code readable , more importantly debuggable after you've combined , minified it, without impacting performance? can through magic of source maps.
basically it's way map combined/minified file unbuilt state. when build production, along minifying , combining javascript files, generate source map holds information original files. when query line , column number in generated javascript can lookup in source map returns original location. developer tools (currently webkit nightly builds, google chrome, or firefox 23+) can parse source map automatically , make appear though you're running unminified , uncombined files.
emphasis mine
it's incredibly useful, , download if user opens dev tools.
solution
remove source mapping line, or nothing. isn't problem.
side note: server should return 404, not 500. point security problem if happens in production.
Comments
Post a Comment