From:  "Fitzgerald, Nick" <nfitzgerald@mozilla.com>
Date:  07 May 2013 07:17:36 Hong Kong Time
Newsgroup:  news.mozilla.org/mozilla.dev.js-sourcemap
Subject:  

Re: Allow utilizing fragments of the minified file name for map file names

NNTP-Posting-Host:  63.245.216.66

On 4/19/13 12:59 PM, dave.methvin@gmail.com wrote:
> On Friday, April 19, 2013 3:53:05 PM UTC-4, Michał Gołębiowski wrote:
>> This has already caused a few problems for us in jQuery.
>>
> To be specific, jQuery submitted a file for the Google CDN which was named jquery-2.0.0.min.js with a map named jquery-2.0.0.min.map and the map location was broken when the file was renamed to jquery.min.js for use on the CDN. This is a really common situation, for people to assume that renaming both files should be a "safe" thing to do and the computer will just figure out the right thing.

Thoughts:

* IMO, it is impractical to just take every foo/bar.js and see if there 
is a foo/bar.map because the extra http request overhead (think when 
there are dozens/hundreds or scripts on a page), possibly slowing down 
the displaying of sources in debuggers depending on implementation, 
questions as to what to do when there is both a @sourceMappingURL and a 
foo/bar.map, etc

* The possibility exists of adding a new @hasImplicitSourceMap style 
comment directive that would basically say that if the current script is 
foo/bar.js then there should be a source map located at foo/bar.map, 
which would make the whole renaming both the generated js and the source 
map scenario easier to deal with. I'm wary of adding these @ directives 
because once you do they tend to never go away and they have the 
potential to add a bunch of cruft that debugger authors will have to 
deal with. That said, if this is the best solution, then I'm all for it.

I'm interested in hearing more opinions on this subject.

Nick