Macil / browserify-hmr

Hot Module Replacement plugin for Browserify
MIT License
373 stars 26 forks source link

Emulate Webpack's module.id to make eg. react-hot-loader work #42

Closed joepie91 closed 5 years ago

joepie91 commented 5 years ago

Title says it all. This fixes react-hot-loader, and probably other things that rely on module.id existing.

joepie91 commented 5 years ago

Hmm. This might actually be breaking sourcemaps.

I'm not sure how to check, though - there seem to be a few outstanding Firefox bugs in source map parsing, so I don't know whether the source map errors are caused by one of those bugs, by this change, or by something else that browserify-hmr does.

Macil commented 5 years ago

Thanks for looking into this! I can fix it up over the weekend.

Macil commented 5 years ago

I've implemented this and another fix to get react-hot-loader supported. I've then updated the example to use react-hot-loader. (It was using an older deprecated project for react hmr support.)

joepie91 commented 5 years ago

Excellent, thanks!