New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update hmr.md #463
Update hmr.md #463
Conversation
Clarify that HMR is now opt-in. See parcel-bundler/parcel#2676 (comment)
This pull request is automatically deployed with Now. |
src/i18n/en/docs/hmr.md
Outdated
Hot Module Replacement (HMR) improves the development experience by automatically updating modules in the browser at runtime without needing a whole page refresh. This means that application state can be retained as you change small things. Parcel's HMR implementation supports both JavaScript and CSS assets out of the box. HMR is automatically disabled when bundling in production mode. | ||
Hot Module Replacement (HMR) improves the development experience by automatically updating modules in the browser at runtime without needing a whole page refresh. This means that application state can be retained as you change small things. Parcel's HMR implementation supports both JavaScript and CSS assets. | ||
|
||
As of version 1.12.x, the default implementation has changed to fully refresh the page when files change. You can opt-in to enable true HMR by calling `module.hot.accept()` in your app. HMR is automatically disabled when bundling in production mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The last sentence can be a bit deceiving, you definitely need an enclosing if(module.hot)....
otherwise there will be an error in production that module.hot
is undefined .
"1.12.x" isn't really a version, the change was in 1.12.0.
Apparently the original branch this PR is comparing to dissapeared, so we can't merge this... |
Oh! I must've cleaned house and forgot that this PR was still extant. Thanks for setting it up separately. Sorry about the inconvenience 😬 |
Clarify that HMR is now opt-in. See parcel-bundler/parcel#2676 (comment)