gaearon/react-hot-loader — pull request #23 by jRiest (2014-08-27 03:49:45+00:00)
Title: Implement source maps

Here's a basic implementation of source maps (fixes gaearon/react-hot-loader#3).

[jsx-loader](https://github.com/petehunt/jsx-loader) isn't emitting source maps yet but I have pull request open (petehunt/jsx-loader#19) which would add that. With this pull request it will pick up the source map whenever jsx-loader sends it, otherwise it'll just proceed without a source map like it does currently.

In order to keep the mapping really simple, I switched all `__hotUpdateAPI` references to `__HUA` in order to match the character length of `React`. This simplifies that transform so we don't have to update the source mappings that come from jsx-loader wherever we make a replacement, but we could do that instead if necessary.