livereactload icon indicating copy to clipboard operation
livereactload copied to clipboard

Always loading react-hot-loader production AppContainer

Open boba-keyost opened this issue 6 years ago • 3 comments

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.

boba-keyost avatar Oct 16 '17 17:10 boba-keyost

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

milankinen avatar Oct 17 '17 13:10 milankinen

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.

boba-keyost avatar Oct 17 '17 13:10 boba-keyost

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.

milankinen avatar Oct 24 '17 08:10 milankinen