webpack2 React热更新配置报错 ?
配置按照官网文档进行配置的,运行后一直保错,对于 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
像这样写就可以了
我也遇到这个问题,请问你解决了吗