Not compatible with React Hot Loader v4
See original GitHub issueReact Hot Loader v4 removes the need for react-hot-loader/patch
.
https://github.com/gaearon/react-hot-loader/tree/next#no-patch-required
When trying to use the new version in a Parcel project, I get this error in console and my app won’t load:
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:10 (4 by maintainers)
Top Results From Across the Web
react-hot-loader - npm
As of version 4, React Hot Loader requires you to pass your code through Babel to transform it so that it can be...
Read more >aspnet-webpack-react not compatible with react-hot-loader v4
The safest solution to this might be to check if the react-hot-loader/patch or react-hot-loader/webpack packages exist before injecting them ...
Read more >React-Hot-Loader Not Preserving State. v.4.12.21
Found the solution. //webpack.config.js const path = require('path'); const webpack = require('webpack'); const MiniCssExtractPlugin ...
Read more >React-Hot-Loader 4.6. ⚛️ — Hooks, Errors and ... - Medium
The problem was coming from React-Hot-Loader nature – it was wrapping SFC with Class-based component, which does not support hooks.
Read more >Hot Module Replacement - webpack
HMR is not intended for use in production, meaning it should only be used ... Since webpack-dev-server v4.0.0, Hot Module Replacement is enabled...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It seems like this issue has been solved with the recent versions of Parcel and react-hot-loader.
That may be because of the cache of the Parcel itself. If I use
--no-cache
to build, I cannot see those errors butCannot find module 'react-hot-loader/patch'
is still raised.