React-hot-loader: react-

后端 未结 6 506
长发绾君心
长发绾君心 2021-02-01 13:14

I updated some npm packages in my Gatsby project and now I\'m seeing this warning in console:

React-hot-loader: react-

6条回答
  •  一整个雨季
    2021-02-01 13:26

    You need to add @hot-loader/react-dom to your project based on your ReactJS version, pay attention below command:

    yarn add @hot-loader/react-dom@[YOUR_REACT_VERSION]
    

    Then it is needed to add resolve alias for it on your Webpack configuration file:

    resolve: {
        alias: {
          'react-dom': '@hot-loader/react-dom'
        }
    }
    

    For more information read its docs.

提交回复
热议问题