'webpack-dev-server hot:true vs hot:only
Upon reading webpack documentation, I failed to understand the difference between hot:only vs hot:true
To enable Hot Module Replacement without page refresh as a fallback in case of build failures, use hot: 'only'
If we use webpack-dev-server, watch mode is enabled automatically. So in which case does the build failure happen?
I am aware of how HMR works behind the scene (HMR server, HMR runtime), but don't know what the differences between those two above.
Can someone explain? Thank you.
Solution 1:[1]
Setting hot: 'only'
doesn't reload the browser page when there are errors (build fails) whereas hot: true
will.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Navpreet |