配置按照官网文档进行配置的,运行后一直保错,对于 react-hot-loader/patch 我在 webpack.config.js 中已经写在了 entry 数组的最前部,依然没有效果。
main.js:1 React Hot Loader: It appears that "react-hot-loader/patch" did not run immediately before the app started. Make sure that it runs before any other code. For example, if you use Webpack, you can add "react-hot-loader/patch" as the very first item to the "entry" array in its config. Alternatively, you can add require("react-hot-loader/patch") as the very first line in the application code, before any other imports.
像这样写就可以了