From:  "Fitzgerald, Nick" <>
Date:  11 Oct 2013 05:24:59 Hong Kong Time

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


On 10/2/13 6:21 PM, wrote:
> It looks like Nick Fitzgerald proposed the //#implicitSourceMap directive to eliminate the need for the min file to contain the explicit name of the map file. However, there is the reverse path as well; the map file currently contains the explicit name of both the minified and unminified script files.

As far as I know, everyone ignores the "file" property anyways, so I'm
in favor of removing it. By the time you have the source map, you
already know what file linked to it, so it does seem kind of pointless
in retrospect.

How would you solve implicitly linking to original source files? I can't
think of a nice way to implement it off the top of my head. I'm open to
suggestions :)

I think a lot of problems could be side-stepped (in the mean time, at
least) if CDNs:

(a) used more robust automation instead of moving things around by hand

(b) used directory structures like
      |- jquery.js
      |- jquery.min.js

instead of
  |- jquery-.js
  |- jquery-.min.js

That way, assuming you weren't using absolute URLs in your source map,
you could move  directories safely without modifying the source

> The jQuery discussion about removing the sourcemap comment in the next release is here: . We could continue to generate a map so it would be usable if the the user could manually turn on the map from dev tools and/or edited the min file. The //#implicitSourceMap directive only (partially) addresses the first bullet in the ticket.

Make it possible to have just a local .min.js file but use public 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.

Last two bullet points have nothing to do with spec, and only