From:  "Fitzgerald, Nick" <nfitzgerald@mozilla.com>
Date:  16 Oct 2013 06:11:56 Hong Kong Time
Newsgroup:  news.mozilla.org/mozilla.dev.js-sourcemap
Subject:  

Re: Source map for minified bundle target

NNTP-Posting-Host:  63.245.216.66

Loading your files in the source map visualizer, it does indeed look
like the mappings are fine.

I can set breakpoints in Firefox Nightly, but they get hit at unexpected
places. Most likely a bug in the debugger. Filed bugzil.la/927158.

No idea what is up with Chrome.

Nick

On 10/14/13 12:46 PM, James Burke wrote:
> (Apologies if this is a duplicate post, first post returned a mail delivery subsystem error):
>
> I work on RequireJS, and its optimizer has some level of support for source maps[1]. I got an error report about the main optimization target, a main.js, that is a result of bundling multiple scripts together then minifying, does not have its own unminified entry in browser developer tools[2].
>
> I created an example, and was wondering how best to fix the issue, or if it is just a browser bug. 
>
> What I see now is Firefox Nightly shows the original source of main.js as I would expect, where Chrome Canary shows the minified content. However, generally, I cannot seem to set and keep breakpoints in Firefox Nightly. So I suspect I am doing something wrong.
>
> In general, I use this tool to verify the contents of a .js and its .map file:
> http://sokra.github.io/source-map-visualization/#custom
>
> Test case is up here:
> http://requirejs.org/bugs/main-sourcemap/
>
> Zip file of the test:
> http://requirejs.org/bugs/main-sourcemap.zip
>
> The source map is a combination of two source map steps:
>
> single file JS files -> bundled JS file -> uglifyjs minification.
>
> So, main.js is a module that requires an 'a' and 'b' modules, that get combined with the 'main' module, then that result is minified.
>
> I am using the "sourcesContent" approach to keep the sources around through the different transforms.
>
> Thanks for any insights,
>
> James
>
> [1] http://requirejs.org/docs/optimization.html#sourcemaps
> [2] https://github.com/jrburke/r.js/issues/524
> _______________________________________________
> dev-js-sourcemap mailing list
> dev-js-sourcemap@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-js-sourcemap