From:  James Burke <>
Date:  15 Oct 2013 03:46:01 Hong Kong Time

Source map for minified bundle target


(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:

Test case is up here:

Zip file of the test:

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,