aspnetcore: aspnet-webpack-react not compatible with react-hot-loader v4
Hello,
react-hot-loader/patch has been removed from react-hot-loader v4: See documentation here
A new package for aspnet-webpack-react (v4.0.0?), removing support of “reactHotLoaderPatch”, need to be created I suppose.
const reactHotLoaderPatch = 'react-hot-loader/patch';
let entryValueArray = entryConfig[entrypointName] as string[];
if (entryValueArray.indexOf(reactHotLoaderPatch) < 0) {
entryValueArray.unshift(reactHotLoaderPatch);
}
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 19 (4 by maintainers)
@SteveSandersonMS I hate to bug you, but would it be possible to get this PR merged, assuming there is nothing holding it up? We have been waiting a while and it would be nice to be able to upgrade. The proposed solution works for myself and others as described above. Is there anything holding this up?
any solution doesn’t work for me. Would be good to release a new version compatible with react-hot-loader v4
Any updates on this issue? 🙏
Waiting for #1675 being merged
Since #1562 was resolved. Maybe this issue also could now be fixed?
@SteveSanderson
I would like to add that by removing the following lines (along with usage of variables) from HotModuleReplacement.ts I was able to successfully use webpack 4 & HMR inside of the ASPNET CORE React/Redux template site.
If thats the case then @mark-monteiro suggestion of conditionally invoking may just work. Can anyone else confirm this resolves their issue?
Seems like this is now fixed, and is working for me https://github.com/aspnet/JavaScriptServices/pull/1675#issuecomment-424783809
Any updates on this?