Webpack Hot Reload Chrome中的无限刷新

时间:2018-02-07 00:51:58

标签: reactjs webpack webpack-dev-server webpack-hmr react-boilerplate

我遇到一个奇怪的热重装问题,我认为这与我的环境有关,但我无法追踪到什么。我希望其他人遇到它并指出我正确的方向。我已经在这个问题上敲了几天了。

我在本地运行dev webpack(Mac),它与react-boilerplate捆绑在一起,并启用了热重装。每当webpack接收到更改时,它都会重建,然后无限地获取*.hot-update.json文件,从而使页面无限刷新。

服务器日志: 0|web-clie | 2018-02-07 00:30 +00:00: webpack building... 0|web-clie | 2018-02-07 00:30 +00:00: webpack built 665bc020ab09de31dd8e in 372ms 0|web-clie | 2018-02-07 00:30 +00:00: 200 GET /static/7dd032a1be4383284dfd.hot-update.json - 0 0|web-clie | 2018-02-07 00:30 +00:00: 200 GET /static/1.7dd032a1be4383284dfd.hot-update.js - 1 0|web-clie | 2018-02-07 00:30 +00:00: 200 GET /static/1.7dd032a1be4383284dfd.hot-update.js.map - 0 0|web-clie | 2018-02-07 00:30 +00:00: 200 GET /perk/6 - 148 0|web-clie | 2018-02-07 00:30 +00:00: 200 GET /static/7dd032a1be4383284dfd.hot-update.json - 0 0|web-clie | 2018-02-07 00:30 +00:00: 200 GET /perk/6 - 142 0|web-clie | 2018-02-07 00:30 +00:00: 200 GET /static/7dd032a1be4383284dfd.hot-update.json - 0 0|web-clie | 2018-02-07 00:30 +00:00: 200 GET /perk/6 - 138 0|web-clie | 2018-02-07 00:30 +00:00: 200 GET /static/7dd032a1be4383284dfd.hot-update.json - 0 0|web-clie | 2018-02-07 00:30 +00:00: 200 GET /perk/6 - 139 0|web-clie | 2018-02-07 00:30 +00:00: 200 GET /static/7dd032a1be4383284dfd.hot-update.json - 0 0|web-clie | 2018-02-07 00:30 +00:00: 200 GET /perk/6 - 138 0|web-clie | 2018-02-07 00:30 +00:00: 200 GET /static/7dd032a1be4383284dfd.hot-update.json - 0 0|web-clie | 2018-02-07 00:30 +00:00: 200 GET /perk/6 - 141 0|web-clie | 2018-02-07 00:30 +00:00: 200 GET /static/7dd032a1be4383284dfd.hot-update.json - 0 0|web-clie | 2018-02-07 00:30 +00:00: 200 GET /perk/6 - 141 0|web-clie | 2018-02-07 00:30 +00:00: 200 GET /static/7dd032a1be4383284dfd.hot-update.json - 0 0|web-clie | 2018-02-07 00:30 +00:00: 200 GET /perk/6 - 142

"webpack": "3.5.5", "webpack-bundle-analyzer": "^2.9.1", "webpack-dev-middleware": "1.11.0", "webpack-hot-middleware": "2.18.0",

webpack config:https://gist.github.com/cgray9/0333b4b4278da06a17395c7967ca489a

dev中间件:https://gist.github.com/cgray9/0333b4b4278da06a17395c7967ca489a

注意:此问题仅发生在Chrome中。 HMR在Safari中运行良好。

我尝试卸载Chrome并删除所有应用程序文件但没有运气。

0 个答案:

没有答案