From:  "Fitzgerald, Nick" <nfitzgerald@mozilla.com>
Date:  03 Oct 2013 00:15:41 Hong Kong Time
Newsgroup:  news.mozilla.org/mozilla.dev.js-sourcemap
Subject:  

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

NNTP-Posting-Host:  63.245.216.66

It seems I accidentally did not reply to the list >_<


-------- Original Message --------
Subject: 	Re: Allow utilizing fragments of the minified file name for
map file names
Date: 	Wed, 2 Oct 2013 17:06:23 +0200
From: 	Michał Gołębiowski 
To: 	fitzgen@mozilla.com



It seems you didn't post it to the list. :)

Adding such a pragma to the spec would solve a lot of things but not all
(e.g. when site owner copies just the minified file without a map & source).

jQuery team has started discussion about these issues in our bug
tracker: http://bugs.jquery.com/ticket/14415


On Mon, Sep 30, 2013 at 9:02 PM, Fitzgerald, Nick
> wrote:

    # Proposal for "//# implicitSourceMap"

    ## Rationale

    Renaming a source file and its source map is prone to errors because you
    must also update the the source file's "//# sourceMappingURL="
    reference to the source map, which tends to be easy to forget. A partial
    solution is to embed the source map in the source file as a data URI,
    however this is not viable in production environments where the embedded
    source map would bloat network requests.

    ## Proposal

    I propose we add this to the end of the "Linking Generated Code With
    Source Maps" section:

    """
    Alternatively, when a generated source is either loaded from a script
    with a "src" attribute or has a comment of the form "//#
    sourceURL=", it may include the implicit source map comment:

        //# implicitSourceMap

    To resolve the source mapping URL of a generated source's source map,
    append ".map" to the generated source's URL's path, and retain the
    generated source's URL's query string.

    For example, if the generated source's URL was:

        http://example.com/bundle?foo.js&bar.js

    Then the source mapping URL would be:

        http://example.com/bundle.map?foo.js&bar.js
    """

    --------------------------

    Michał: would this proposal solve the problem? Am I missing anything?

    John, Paul, Joe, et all: can we agree to implement this? Should be
    pretty straight forward...

    Nick


    On 9/27/13 9:51 AM, Michał Gołębiowski wrote:
    > Yet another example of 404 because files were renamed and source
    map URL in the file hasn't: getbootstrap.com 
    >
    > Can we get the hasImplicitSourceMap pragma? Or anything that will
    allow us to make the map name/path depend on the name of current file?
    > _______________________________________________
    > dev-js-sourcemap mailing list
    > dev-js-sourcemap@lists.mozilla.org
    
    > https://lists.mozilla.org/listinfo/dev-js-sourcemap




-- 
Michał Z. Gołębiowski