milankinen / livereactload

Live code editing with Browserify and React
MIT License
865 stars 61 forks source link

Always loading react-hot-loader production AppContainer #159

Open boba-keyost opened 7 years ago

boba-keyost commented 7 years ago

If loader ignores changes in node_modules packages then it uses default require function to load 'react-hot-loader' module. And this module doesn't have 'module.hot' property so it always loads production version.

milankinen commented 7 years ago

Hello! Sorry but I couldn't get the problem yet. Could you rephrase the issue?

boba-keyost commented 7 years ago

Hm, ok. If you're using multiple bundles with reloadable application and non reloadable vendor libs(e.g. react etc.) you should add react-hot-loader package to reloadable bundle.

milankinen commented 7 years ago

Correct, vendor libs are not hot-reloaded because the assumption is that developer does not "live-modify" their content. Of course new libraries can be added and existing ones can be updated but in that case, you need to restart Browserify. And there is no multi-bundle support yet, see #146.