https://bugzilla.wikimedia.org/show_bug.cgi?id=45514
Web browser: ---
Bug ID: 45514
Summary: Support source maps for debugging production
ResourceLoader JS
Product: MediaWiki
Version: 1.21-git
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: Unprioritized
Component: ResourceLoader
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Classification: Unclassified
Mobile Platform: ---
Source maps are a technique for mapping combined and minified JavaScript back
to the original files. This could be very useful for debugging ResourceLoader
in production mode. This can be necessary since behavior is different from
debug mode (in ways other than minification).
This is already supported in the Chrome debugger and Closure compiler, Mozilla
is working on it (https://bugzilla.mozilla.org/show_bug.cgi?id=670002), and
some other stacks have code to generate the maps.
The spec is at
https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?hl=en_US&pli=1#
and a good overview is at
http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/ .
The minified file points to the source map with a line like:
//@ sourceMappingURL=/path/to/file.js.map
or a header like:
X-SourceMap: /path/to/file.js.map
If we use a dynamic URL, that should allow doing it in production. It would
build the source maps on demand (just like the minification) for people that
have them enabled (and are debugging), without slowing the site for anyone
else.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l