gaearon / react-hot-boilerplate

Minimal live-editing example for React
MIT License
3.91k stars 879 forks source link

[v3] Why every file between edited file and root is updated? #104

Closed mariuszdev closed 7 years ago

mariuszdev commented 7 years ago

In RHL@1 the console used to log:

[HMR] Updated modules:
[HMR] - <module_id>

Currently, in RHL@3 the console logs whole path between edited file and the root component. Is it correct with RHL philosophy that only the updated module should be replaced? Why is there such change?

screen shot 2016-12-01 at 22 40 46

Counter imports Button and Button imports Link, it's extended version of 'next' branch. It can lead to the situation when the whole console is polluted by number of module names which has been changed (even if only one changed).

calesce commented 7 years ago

WebpackDevServer has a clientLogLevel option that's supposed to quiet that output, but it hasn't worked very well in my experience.

If you use webpack-hot-middleware, you can reliably quiet output when adding it to the Webpack config's entry array, see here.

We're probably not going to disable this output in this boilerplate, but instead point people to Webpack's docs.