We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
I get the warning in browser console React-Hot-Loader: react-馃敟-dom patch is not detected. React 16.6+ features may not work.
React-Hot-Loader: react-馃敟-dom patch is not detected. React 16.6+ features may not work.
My package.json
package.json
"scripts": { "start": "react-app-rewired start", "build": "react-app-rewired build", "test": "react-app-rewired test --env=jsdom", "eject": "react-app-rewired eject" }, "devDependencies": { "react-app-rewire-hot-loader": "^2.0.1", "react-app-rewired": "^2.1.1", "react-hot-loader": "^4.8.4" }
config-overrides (in root folder)
config-overrides
const rewireReactHotLoader = require('react-app-rewire-hot-loader'); /* config-overrides.js */ module.exports = function override(config, env) { config = rewireReactHotLoader(config, env); return config; };
App.js
import React from 'react'; import './App.css'; import { hot } from 'react-hot-loader/root'; const App = () => <div className="container mt-4">app</div>; export default (process.env.NODE_ENV === 'development' ? hot(App) : App);
The text was updated successfully, but these errors were encountered:
gaearon/react-hot-loader#1227
Sorry, something went wrong.
Edit, so I figured it out:
yarn add @hot-loader/react-dom -D
const rewireReactHotLoader = require("react-app-rewire-hot-loader"); /* config-overrides.js */ module.exports = function override(config, env) { if (env == "development") { config.resolve.alias["react-dom"] = "@hot-loader/react-dom"; } config = rewireReactHotLoader(config, env); return config; };
Maybe the parent example by @cdharris could be updated?
Can we add the alias injection to react-app-rewire-hot-loader please?
No branches or pull requests
I get the warning in browser console
React-Hot-Loader: react-馃敟-dom patch is not detected. React 16.6+ features may not work.
My
package.json
config-overrides
(in root folder)App.js
The text was updated successfully, but these errors were encountered: