If you are reporting a bug or having an issue setting up React Hot Loader, please fill in below. For feature requests, feel free to remove this template entirely.
Hi , I'm straggling to make the bundle free of react-hot-loader code,
in Webpack config i only add react-hot-loader/babel in development and same for @hot-loader/react-dom , also i have theNODE_ENV set to production
if i added hot(module)(Com) i find react-hot-loader included in the bundle,
it would solve this by have two entries for prod and development but what if i have many components that are been lazy-loaded i have to add hot to get HMR working
what is the best way to deal with that
react-hot-loader code not included if the NODE_ENV set production and babel plugin isn't included
react-hot-loader included on the bundle because of using hot
React Hot Loader version:
Run these commands in the project folder and fill in their results:
Node: v10.15.3:Npm 6.4.1:Then, specify:
webpack resolve

babel config

webpack plugins

package.json scripts

Thanks
Long story short, but that's impossible, from a javascript prospective, to remove some module, not the code, from "production". hot(module) still should be something, or you will get _undefined is not a function_.
__Include__ RHL babel plugin in production - it will remove everything you _"don't want to have in prod"_
Most helpful comment
Long story short, but that's impossible, from a javascript prospective, to remove some module, not the code, from "production".
hot(module)still should be something, or you will get _undefined is not a function_.__Include__ RHL babel plugin in production - it will remove everything you _"don't want to have in prod"_