From:  "Fitzgerald, Nick" <nfitzgerald@mozilla.com>
Date:  23 Oct 2013 02:38:08 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 10/21/13 10:08 AM, Michał Gołębiowski wrote:
> On Thursday, October 10, 2013 11:24:59 PM UTC+2, Fitzgerald, Nick wrote:
>> """
>>
>> Make it possible to have just a local .min.js file but use public
>>
>> .min.map and uncompressed .js file from a CDN for example. Again this
>>
>> isn't possible at the moment because the map refers back to the minified
>>
>> file, and that will be a local file, not be the one on the CDN.
>>
>> """
>>
>>
>>
>> This is totally possible, just set the sourceRoot to the CDN's directory
>>
>> that contains the original files. Or link to them directly in the
>>
>> sources list.
> Well, as long as the `file` property is required, that is not possible as the file on CDN obviously won't point to the proper file but to it's own. It will stop be a problem if it stops being required. Am I missing sth here?

Sure, but we are already putting the "file" property on the chopping
block, right? It seems like no one uses it and no one has a problem
getting rid of it.

>
> I still don't like the fact that the map path is put in the minified file, influencing its hash. Even if we put a reference to the file on our main CDN, like:
>
>     //# sourceMappingURL=http://code.jquery.com/jquery-2.0.3.min.js
>
> different CDNs might want to change that path, changing the hash in a process. This also causes errors for people that don't care about source maps but just wanted to copy a minified file to their site.

Good catch, I hadn't thought of this.

>
> At least allowing to specify the map location in the script tag, like:
>
>     
>
> would solve those two problems.

+1