From:  Michał Gołębiowski <m.goleb@gmail.com>
Date:  22 Oct 2013 01:08:11 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:  2001:6a0:5001:b:918a:dd67:6f9f:2d3c

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?

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.

At least allowing to specify the map location in the script tag, like:

    

would solve those two problems.