Conversation
…ound and fix issue with javascript global regexes and their persistent state
|
That's amazing! Nice idea with |
|
Sorry for the long delay. Ideally I'd like to merge this after petehunt/jsx-loader#19 gets through. Would you mind adding |
|
No problem. If |
|
Since we're waiting for petehunt/jsx-loader#19 and I had to move all hot loader code to top, I decided to collapse all hot loader code into one line so it doesn't obscure each file. This isn't as nice as source maps, but on the upside it works with This will require a few adjustments in your PR but before doing them, let's wait for JSX source map support to land. |
|
Thank you again! Source maps are in 0.5.0. |
Here's a basic implementation of source maps (fixes #3).
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
__hotUpdateAPIreferences to__HUAin order to match the character length ofReact. 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.